A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
push editor bundle
ammarahm-edfe79f9ce3188
diff --git a/apps/mobile/web.bundle/asset-manifest.json b/apps/mobile/web.bundle/asset-manifest.jsonindex 08434a911..43c6a41c4 100644--- a/apps/mobile/web.bundle/asset-manifest.json+++ b/apps/mobile/web.bundle/asset-manifest.json@@ -1,23 +1,23 @@{"files": {- "static/js/0.6b732ed5.chunk.js": "./static/js/0.6b732ed5.chunk.js",+ "static/js/0.91d7b8d5.chunk.js": "./static/js/0.91d7b8d5.chunk.js","main.css": "./static/css/main.f2465fba.chunk.css",- "main.js": "./static/js/main.473e79dd.chunk.js",- "runtime-main.js": "./static/js/runtime-main.563aec9a.js",+ "main.js": "./static/js/main.63f81e65.chunk.js",+ "runtime-main.js": "./static/js/runtime-main.9bd4fa53.js","static/css/3.526cedf0.chunk.css": "./static/css/3.526cedf0.chunk.css",- "static/js/3.e9f97eed.chunk.js": "./static/js/3.e9f97eed.chunk.js",- "static/js/4.628ec668.chunk.js": "./static/js/4.628ec668.chunk.js",- "static/js/5.34df2de4.chunk.js": "./static/js/5.34df2de4.chunk.js",+ "static/js/3.7fb602fe.chunk.js": "./static/js/3.7fb602fe.chunk.js",+ "static/js/4.7884bc18.chunk.js": "./static/js/4.7884bc18.chunk.js",+ "static/js/5.077f361c.chunk.js": "./static/js/5.077f361c.chunk.js","index.html": "./index.html",- "static/js/3.e9f97eed.chunk.js.LICENSE.txt": "./static/js/3.e9f97eed.chunk.js.LICENSE.txt",+ "static/js/3.7fb602fe.chunk.js.LICENSE.txt": "./static/js/3.7fb602fe.chunk.js.LICENSE.txt","static/media/katexfonts.mobile.css": "./static/media/KaTeX_Typewriter-Regular.c5c02d76.ttf","static/media/fonts.mobile.css": "./static/media/hack-regular.f2412cb7.ttf"},"entrypoints": [- "static/js/runtime-main.563aec9a.js",+ "static/js/runtime-main.9bd4fa53.js","static/css/3.526cedf0.chunk.css",- "static/js/3.e9f97eed.chunk.js",+ "static/js/3.7fb602fe.chunk.js","static/css/main.f2465fba.chunk.css",- "static/js/main.473e79dd.chunk.js"+ "static/js/main.63f81e65.chunk.js"]}\ No newline at end of filediff --git a/apps/mobile/web.bundle/index.html b/apps/mobile/web.bundle/index.htmlindex f1c36dc2a..5ce6c4f7f 100644--- a/apps/mobile/web.bundle/index.html+++ b/apps/mobile/web.bundle/index.html@@ -1 +1 @@-<!doctype html><html style="height:100%" lang="en"><head><meta charset="utf-8"/><link rel="icon" href="favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1"/><meta name="theme-color" content="#000000"/><link href="fonts.css" rel="stylesheet"/><style>body{height:100%;font-family:"Open Sans"}p{font-family:"Open Sans"}::selection{color:#fff;background-color:var(--nn_accent)}::placeholder{color:var(--nn_placeholder)}p.is-editor-empty:first-child::before{color:var(--nn_placeholder)!important}h1,h2,h3,h4,h5,h6{font-family:"Open Sans";color:var(--nn_heading)}#root{height:100%;caret-color:var(--nn_accent);display:flex}</style><meta name="description" content="Notesnook editor for mobile"/><link rel="manifest" href="manifest.json"/><title>Notesnook editor</title><link href="./static/css/3.526cedf0.chunk.css" rel="stylesheet"><link href="./static/css/main.f2465fba.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(e){function t(t){for(var n,i,a=t[0],c=t[1],l=t[2],p=0,s=[];p<a.length;p++)i=a[p],Object.prototype.hasOwnProperty.call(o,i)&&o[i]&&s.push(o[i][0]),o[i]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(f&&f(t);s.length;)s.shift()();return u.push.apply(u,l||[]),r()}function r(){for(var e,t=0;t<u.length;t++){for(var r=u[t],n=!0,a=1;a<r.length;a++){var c=r[a];0!==o[c]&&(n=!1)}n&&(u.splice(t--,1),e=i(i.s=r[0]))}return e}var n={},o={2:0},u=[];function i(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.e=function(e){var t=[],r=o[e];if(0!==r)if(r)t.push(r[2]);else{var n=new Promise((function(t,n){r=o[e]=[t,n]}));t.push(r[2]=n);var u,a=document.createElement("script");a.charset="utf-8",a.timeout=120,i.nc&&a.setAttribute("nonce",i.nc),a.src=function(e){return i.p+"static/js/"+({}[e]||e)+"."+{0:"6b732ed5",4:"628ec668",5:"34df2de4"}[e]+".chunk.js"}(e);var c=new Error;u=function(t){a.onerror=a.onload=null,clearTimeout(l);var r=o[e];if(0!==r){if(r){var n=t&&("load"===t.type?"missing":t.type),u=t&&t.target&&t.target.src;c.message="Loading chunk "+e+" failed.\n("+n+": "+u+")",c.name="ChunkLoadError",c.type=n,c.request=u,r[1](c)}o[e]=void 0}};var l=setTimeout((function(){u({type:"timeout",target:a})}),12e4);a.onerror=a.onload=u,document.head.appendChild(a)}return Promise.all(t)},i.m=e,i.c=n,i.d=function(e,t,r){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)i.d(r,n,function(t){return e[t]}.bind(null,n));return r},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="./",i.oe=function(e){throw console.error(e),e};var a=this.webpackJsonptiptap=this.webpackJsonptiptap||[],c=a.push.bind(a);a.push=t,a=a.slice();for(var l=0;l<a.length;l++)t(a[l]);var f=c;r()}([])</script><script src="./static/js/3.e9f97eed.chunk.js"></script><script src="./static/js/main.473e79dd.chunk.js"></script></body></html>\ No newline at end of file+<!doctype html><html style="height:100%" lang="en"><head><meta charset="utf-8"/><link rel="icon" href="favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1"/><meta name="theme-color" content="#000000"/><link href="fonts.css" rel="stylesheet"/><style>body{height:100%;font-family:"Open Sans"}p{font-family:"Open Sans"}::selection{color:#fff;background-color:var(--nn_accent)}::placeholder{color:var(--nn_placeholder)}p.is-editor-empty:first-child::before{color:var(--nn_placeholder)!important}h1,h2,h3,h4,h5,h6{font-family:"Open Sans";color:var(--nn_heading)}#root{height:100%;display:flex}</style><meta name="description" content="Notesnook editor for mobile"/><link rel="manifest" href="manifest.json"/><title>Notesnook editor</title><link href="./static/css/3.526cedf0.chunk.css" rel="stylesheet"><link href="./static/css/main.f2465fba.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(e){function t(t){for(var n,i,a=t[0],c=t[1],l=t[2],p=0,s=[];p<a.length;p++)i=a[p],Object.prototype.hasOwnProperty.call(o,i)&&o[i]&&s.push(o[i][0]),o[i]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(f&&f(t);s.length;)s.shift()();return u.push.apply(u,l||[]),r()}function r(){for(var e,t=0;t<u.length;t++){for(var r=u[t],n=!0,a=1;a<r.length;a++){var c=r[a];0!==o[c]&&(n=!1)}n&&(u.splice(t--,1),e=i(i.s=r[0]))}return e}var n={},o={2:0},u=[];function i(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.e=function(e){var t=[],r=o[e];if(0!==r)if(r)t.push(r[2]);else{var n=new Promise((function(t,n){r=o[e]=[t,n]}));t.push(r[2]=n);var u,a=document.createElement("script");a.charset="utf-8",a.timeout=120,i.nc&&a.setAttribute("nonce",i.nc),a.src=function(e){return i.p+"static/js/"+({}[e]||e)+"."+{0:"91d7b8d5",4:"7884bc18",5:"077f361c"}[e]+".chunk.js"}(e);var c=new Error;u=function(t){a.onerror=a.onload=null,clearTimeout(l);var r=o[e];if(0!==r){if(r){var n=t&&("load"===t.type?"missing":t.type),u=t&&t.target&&t.target.src;c.message="Loading chunk "+e+" failed.\n("+n+": "+u+")",c.name="ChunkLoadError",c.type=n,c.request=u,r[1](c)}o[e]=void 0}};var l=setTimeout((function(){u({type:"timeout",target:a})}),12e4);a.onerror=a.onload=u,document.head.appendChild(a)}return Promise.all(t)},i.m=e,i.c=n,i.d=function(e,t,r){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)i.d(r,n,function(t){return e[t]}.bind(null,n));return r},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="./",i.oe=function(e){throw console.error(e),e};var a=this.webpackJsonptiptap=this.webpackJsonptiptap||[],c=a.push.bind(a);a.push=t,a=a.slice();for(var l=0;l<a.length;l++)t(a[l]);var f=c;r()}([])</script><script src="./static/js/3.7fb602fe.chunk.js"></script><script src="./static/js/main.63f81e65.chunk.js"></script></body></html>\ No newline at end of filediff --git a/apps/mobile/web.bundle/static/js/0.6b732ed5.chunk.js b/apps/mobile/web.bundle/static/js/0.91d7b8d5.chunk.jssimilarity index 99%rename from apps/mobile/web.bundle/static/js/0.6b732ed5.chunk.jsrename to apps/mobile/web.bundle/static/js/0.91d7b8d5.chunk.jsindex 9000ed0d2..94ba358cd 100644--- a/apps/mobile/web.bundle/static/js/0.6b732ed5.chunk.js+++ b/apps/mobile/web.bundle/static/js/0.91d7b8d5.chunk.js@@ -1 +1 @@-(this.webpackJsonptiptap=this.webpackJsonptiptap||[]).push([[0],{127:function(e,t,r){var n;"undefined"!==typeof self&&self,n=function(){return function(){"use strict";var e={d:function(t,r){for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t={};e.d(t,{default:function(){return Jn}});var r=function e(t,r){this.position=void 0;var n,a="KaTeX parse error: "+t,i=r&&r.loc;if(i&&i.start<=i.end){var o=i.lexer.input;n=i.start;var s=i.end;n===o.length?a+=" at end of input: ":a+=" at position "+(n+1)+": ";var l=o.slice(n,s).replace(/[^]/g,"$&\u0332");a+=(n>15?"\u2026"+o.slice(n-15,n):o.slice(0,n))+l+(s+15<o.length?o.slice(s,s+15)+"\u2026":o.slice(s))}var h=new Error(a);return h.name="ParseError",h.__proto__=e.prototype,h.position=n,h};r.prototype.__proto__=Error.prototype;var n=r,a=/([A-Z])/g,i={"&":"&",">":">","<":"<",'"':""","'":"'"},o=/[&><"']/g,s=function e(t){return"ordgroup"===t.type||"color"===t.type?1===t.body.length?e(t.body[0]):t:"font"===t.type?e(t.body):t},l={contains:function(e,t){return-1!==e.indexOf(t)},deflt:function(e,t){return void 0===e?t:e},escape:function(e){return String(e).replace(o,(function(e){return i[e]}))},hyphenate:function(e){return e.replace(a,"-$1").toLowerCase()},getBaseElem:s,isCharacterBox:function(e){var t=s(e);return"mathord"===t.type||"textord"===t.type||"atom"===t.type},protocolFromUrl:function(e){var t=/^\s*([^\\/#]*?)(?::|�*58|�*3a)/i.exec(e);return null!=t?t[1]:"_relative"}},h={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:function(e){return"#"+e}},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:function(e,t){return t.push(e),t}},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:function(e){return Math.max(0,e)},cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:function(e){return Math.max(0,e)},cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:function(e){return Math.max(0,e)},cli:"-e, --max-expand <n>",cliProcessor:function(e){return"Infinity"===e?1/0:parseInt(e)}},globalGroup:{type:"boolean",cli:!1}};function m(e){if(e.default)return e.default;var t=e.type,r=Array.isArray(t)?t[0]:t;if("string"!==typeof r)return r.enum[0];switch(r){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}var c=function(){function e(e){for(var t in this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{},h)if(h.hasOwnProperty(t)){var r=h[t];this[t]=void 0!==e[t]?r.processor?r.processor(e[t]):e[t]:m(r)}}var t=e.prototype;return t.reportNonstrict=function(e,t,r){var a=this.strict;if("function"===typeof a&&(a=a(e,t,r)),a&&"ignore"!==a){if(!0===a||"error"===a)throw new n("LaTeX-incompatible input and strict mode is set to 'error': "+t+" ["+e+"]",r);"warn"===a?"undefined"!==typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"):"undefined"!==typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+a+"': "+t+" ["+e+"]")}},t.useStrictBehavior=function(e,t,r){var n=this.strict;if("function"===typeof n)try{n=n(e,t,r)}catch(a){n="error"}return!(!n||"ignore"===n)&&(!0===n||"error"===n||("warn"===n?("undefined"!==typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"),!1):("undefined"!==typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+n+"': "+t+" ["+e+"]"),!1)))},t.isTrusted=function(e){e.url&&!e.protocol&&(e.protocol=l.protocolFromUrl(e.url));var t="function"===typeof this.trust?this.trust(e):this.trust;return Boolean(t)},e}(),u=function(){function e(e,t,r){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=r}var t=e.prototype;return t.sup=function(){return p[d[this.id]]},t.sub=function(){return p[f[this.id]]},t.fracNum=function(){return p[g[this.id]]},t.fracDen=function(){return p[v[this.id]]},t.cramp=function(){return p[b[this.id]]},t.text=function(){return p[y[this.id]]},t.isTight=function(){return this.size>=2},e}(),p=[new u(0,0,!1),new u(1,0,!0),new u(2,1,!1),new u(3,1,!0),new u(4,2,!1),new u(5,2,!0),new u(6,3,!1),new u(7,3,!0)],d=[4,5,4,5,6,7,6,7],f=[5,5,5,5,7,7,7,7],g=[2,3,4,5,6,7,6,7],v=[3,3,5,5,7,7,7,7],b=[1,1,3,3,5,5,7,7],y=[0,1,2,3,2,3,2,3],x={DISPLAY:p[0],TEXT:p[2],SCRIPT:p[4],SCRIPTSCRIPT:p[6]},w=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}],k=[];function S(e){for(var t=0;t<k.length;t+=2)if(e>=k[t]&&e<=k[t+1])return!0;return!1}w.forEach((function(e){return e.blocks.forEach((function(e){return k.push.apply(k,e)}))}));var M=80,z={doubleleftarrow:"M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",doublerightarrow:"M399738 392l\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",leftarrow:"M400000 241H110l3-3c68.7-52.7 113.7-120\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\n l-3-3h399890zM100 241v40h399900v-40z",leftbrace:"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z",leftbraceunder:"M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",leftgroup:"M400000 80\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\n 435 0h399565z",leftgroupunder:"M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",leftharpoon:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z",leftharpoonplus:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",leftharpoondown:"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",leftharpoondownplus:"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",lefthook:"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z",leftlinesegment:"M40 281 V428 H0 V94 H40 V241 H400000 v40z\nM40 281 V428 H0 V94 H40 V241 H400000 v40z",leftmapsto:"M40 281 V448H0V74H40V241H400000v40z\nM40 281 V448H0V74H40V241H400000v40z",leftToFrom:"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",longequal:"M0 50 h400000 v40H0z m0 194h40000v40H0z\nM0 50 h400000 v40H0z m0 194h40000v40H0z",midbrace:"M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",midbraceunder:"M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z",oiintSize1:"M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z",oiintSize2:"M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 110 84 276 504 276s502.4-166 502.4-276z",oiiintSize1:"M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z",oiiintSize2:"M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z",rightarrow:"M0 241v40h399891c-47.3 35.3-84 78-110 128\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n 151.7 139 205zm0 0v40h399900v-40z",rightbrace:"M400000 542l\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z",rightbraceunder:"M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z",rightgroup:"M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\n 3-1 3-3v-38c-76-158-257-219-435-219H0z",rightgroupunder:"M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z",rightharpoon:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\n 69.2 92 94.5zm0 0v40h399900v-40z",rightharpoonplus:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z",rightharpoondown:"M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z",rightharpoondownplus:"M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z",righthook:"M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",rightlinesegment:"M399960 241 V94 h40 V428 h-40 V281 H0 v-40z\nM399960 241 V94 h40 V428 h-40 V281 H0 v-40z",rightToFrom:"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",twoheadleftarrow:"M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z",twoheadrightarrow:"M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z",tilde1:"M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",tilde2:"M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z",tilde3:"M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",tilde4:"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -175.236-744-175.236z",vec:"M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",widehat1:"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z",widehat2:"M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat3:"M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat4:"M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widecheck1:"M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z",widecheck2:"M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck3:"M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck4:"M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",baraboveleftarrow:"M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",rightarrowabovebar:"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",baraboveshortleftharpoon:"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",rightharpoonaboveshortbar:"M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z",shortbaraboveleftharpoon:"M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z",shortrightharpoonabovebar:"M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"},A=function(){function e(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}var t=e.prototype;return t.hasClass=function(e){return l.contains(this.classes,e)},t.toNode=function(){for(var e=document.createDocumentFragment(),t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e},t.toMarkup=function(){for(var e="",t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e},t.toText=function(){var e=function(e){return e.toText()};return this.children.map(e).join("")},e}(),T={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},B={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},C={"\xc5":"A","\xd0":"D","\xde":"o","\xe5":"a","\xf0":"d","\xfe":"o","\u0410":"A","\u0411":"B","\u0412":"B","\u0413":"F","\u0414":"A","\u0415":"E","\u0416":"K","\u0417":"3","\u0418":"N","\u0419":"N","\u041a":"K","\u041b":"N","\u041c":"M","\u041d":"H","\u041e":"O","\u041f":"N","\u0420":"P","\u0421":"C","\u0422":"T","\u0423":"y","\u0424":"O","\u0425":"X","\u0426":"U","\u0427":"h","\u0428":"W","\u0429":"W","\u042a":"B","\u042b":"X","\u042c":"B","\u042d":"3","\u042e":"X","\u042f":"R","\u0430":"a","\u0431":"b","\u0432":"a","\u0433":"r","\u0434":"y","\u0435":"e","\u0436":"m","\u0437":"e","\u0438":"n","\u0439":"n","\u043a":"n","\u043b":"n","\u043c":"m","\u043d":"n","\u043e":"o","\u043f":"n","\u0440":"p","\u0441":"c","\u0442":"o","\u0443":"y","\u0444":"b","\u0445":"x","\u0446":"n","\u0447":"n","\u0448":"w","\u0449":"w","\u044a":"a","\u044b":"m","\u044c":"a","\u044d":"e","\u044e":"m","\u044f":"r"};function q(e,t,r){if(!T[t])throw new Error("Font metrics not found for font: "+t+".");var n=e.charCodeAt(0),a=T[t][n];if(!a&&e[0]in C&&(n=C[e[0]].charCodeAt(0),a=T[t][n]),a||"text"!==r||S(n)&&(a=T[t][77]),a)return{depth:a[0],height:a[1],italic:a[2],skew:a[3],width:a[4]}}var N={},I=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],R=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],O=function(e,t){return t.size<2?e:I[e-1][t.size-1]},H=function(){function e(t){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=t.style,this.color=t.color,this.size=t.size||e.BASESIZE,this.textSize=t.textSize||this.size,this.phantom=!!t.phantom,this.font=t.font||"",this.fontFamily=t.fontFamily||"",this.fontWeight=t.fontWeight||"",this.fontShape=t.fontShape||"",this.sizeMultiplier=R[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this._fontMetrics=void 0}var t=e.prototype;return t.extend=function(t){var r={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var n in t)t.hasOwnProperty(n)&&(r[n]=t[n]);return new e(r)},t.havingStyle=function(e){return this.style===e?this:this.extend({style:e,size:O(this.textSize,e)})},t.havingCrampedStyle=function(){return this.havingStyle(this.style.cramp())},t.havingSize=function(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:R[e-1]})},t.havingBaseStyle=function(t){t=t||this.style.text();var r=O(e.BASESIZE,t);return this.size===r&&this.textSize===e.BASESIZE&&this.style===t?this:this.extend({style:t,size:r})},t.havingBaseSizing=function(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})},t.withColor=function(e){return this.extend({color:e})},t.withPhantom=function(){return this.extend({phantom:!0})},t.withFont=function(e){return this.extend({font:e})},t.withTextFontFamily=function(e){return this.extend({fontFamily:e,font:""})},t.withTextFontWeight=function(e){return this.extend({fontWeight:e,font:""})},t.withTextFontShape=function(e){return this.extend({fontShape:e,font:""})},t.sizingClasses=function(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]},t.baseSizingClasses=function(){return this.size!==e.BASESIZE?["sizing","reset-size"+this.size,"size"+e.BASESIZE]:[]},t.fontMetrics=function(){return this._fontMetrics||(this._fontMetrics=function(e){var t;if(!N[t=e>=5?0:e>=3?1:2]){var r=N[t]={cssEmPerMu:B.quad[t]/18};for(var n in B)B.hasOwnProperty(n)&&(r[n]=B[n][t])}return N[t]}(this.size)),this._fontMetrics},t.getColor=function(){return this.phantom?"transparent":this.color},e}();H.BASESIZE=6;var E=H,L={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},D={ex:!0,em:!0,mu:!0},P=function(e){return"string"!==typeof e&&(e=e.unit),e in L||e in D||"ex"===e},F=function(e,t){var r;if(e.unit in L)r=L[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)r=t.fontMetrics().cssEmPerMu;else{var a;if(a=t.style.isTight()?t.havingStyle(t.style.text()):t,"ex"===e.unit)r=a.fontMetrics().xHeight;else{if("em"!==e.unit)throw new n("Invalid unit: '"+e.unit+"'");r=a.fontMetrics().quad}a!==t&&(r*=a.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*r,t.maxSize)},V=function(e){return+e.toFixed(4)+"em"},G=function(e){return e.filter((function(e){return e})).join(" ")},U=function(e,t,r){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},t){t.style.isTight()&&this.classes.push("mtight");var n=t.getColor();n&&(this.style.color=n)}},Y=function(e){var t=document.createElement(e);for(var r in t.className=G(this.classes),this.style)this.style.hasOwnProperty(r)&&(t.style[r]=this.style[r]);for(var n in this.attributes)this.attributes.hasOwnProperty(n)&&t.setAttribute(n,this.attributes[n]);for(var a=0;a<this.children.length;a++)t.appendChild(this.children[a].toNode());return t},X=function(e){var t="<"+e;this.classes.length&&(t+=' class="'+l.escape(G(this.classes))+'"');var r="";for(var n in this.style)this.style.hasOwnProperty(n)&&(r+=l.hyphenate(n)+":"+this.style[n]+";");for(var a in r&&(t+=' style="'+l.escape(r)+'"'),this.attributes)this.attributes.hasOwnProperty(a)&&(t+=" "+a+'="'+l.escape(this.attributes[a])+'"');t+=">";for(var i=0;i<this.children.length;i++)t+=this.children[i].toMarkup();return t+="</"+e+">"},W=function(){function e(e,t,r,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,U.call(this,e,r,n),this.children=t||[]}var t=e.prototype;return t.setAttribute=function(e,t){this.attributes[e]=t},t.hasClass=function(e){return l.contains(this.classes,e)},t.toNode=function(){return Y.call(this,"span")},t.toMarkup=function(){return X.call(this,"span")},e}(),_=function(){function e(e,t,r,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,U.call(this,t,n),this.children=r||[],this.setAttribute("href",e)}var t=e.prototype;return t.setAttribute=function(e,t){this.attributes[e]=t},t.hasClass=function(e){return l.contains(this.classes,e)},t.toNode=function(){return Y.call(this,"a")},t.toMarkup=function(){return X.call(this,"a")},e}(),j=function(){function e(e,t,r){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.style=r}var t=e.prototype;return t.hasClass=function(e){return l.contains(this.classes,e)},t.toNode=function(){var e=document.createElement("img");for(var t in e.src=this.src,e.alt=this.alt,e.className="mord",this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e},t.toMarkup=function(){var e="<img src='"+this.src+" 'alt='"+this.alt+"' ",t="";for(var r in this.style)this.style.hasOwnProperty(r)&&(t+=l.hyphenate(r)+":"+this.style[r]+";");return t&&(e+=' style="'+l.escape(t)+'"'),e+="'/>"},e}(),$={"\xee":"\u0131\u0302","\xef":"\u0131\u0308","\xed":"\u0131\u0301","\xec":"\u0131\u0300"},Z=function(){function e(e,t,r,n,a,i,o,s){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=r||0,this.italic=n||0,this.skew=a||0,this.width=i||0,this.classes=o||[],this.style=s||{},this.maxFontSize=0;var l=function(e){for(var t=0;t<w.length;t++)for(var r=w[t],n=0;n<r.blocks.length;n++){var a=r.blocks[n];if(e>=a[0]&&e<=a[1])return r.name}return null}(this.text.charCodeAt(0));l&&this.classes.push(l+"_fallback"),/[\xee\xef\xed\xec]/.test(this.text)&&(this.text=$[this.text])}var t=e.prototype;return t.hasClass=function(e){return l.contains(this.classes,e)},t.toNode=function(){var e=document.createTextNode(this.text),t=null;for(var r in this.italic>0&&((t=document.createElement("span")).style.marginRight=V(this.italic)),this.classes.length>0&&((t=t||document.createElement("span")).className=G(this.classes)),this.style)this.style.hasOwnProperty(r)&&((t=t||document.createElement("span")).style[r]=this.style[r]);return t?(t.appendChild(e),t):e},t.toMarkup=function(){var e=!1,t="<span";this.classes.length&&(e=!0,t+=' class="',t+=l.escape(G(this.classes)),t+='"');var r="";for(var n in this.italic>0&&(r+="margin-right:"+this.italic+"em;"),this.style)this.style.hasOwnProperty(n)&&(r+=l.hyphenate(n)+":"+this.style[n]+";");r&&(e=!0,t+=' style="'+l.escape(r)+'"');var a=l.escape(this.text);return e?(t+=">",t+=a,t+="</span>"):a},e}(),K=function(){function e(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}var t=e.prototype;return t.toNode=function(){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);for(var r=0;r<this.children.length;r++)e.appendChild(this.children[r].toNode());return e},t.toMarkup=function(){var e='<svg xmlns="http://www.w3.org/2000/svg"';for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+"='"+this.attributes[t]+"'");e+=">";for(var r=0;r<this.children.length;r++)e+=this.children[r].toMarkup();return e+="</svg>"},e}(),J=function(){function e(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}var t=e.prototype;return t.toNode=function(){var e=document.createElementNS("http://www.w3.org/2000/svg","path");return this.alternate?e.setAttribute("d",this.alternate):e.setAttribute("d",z[this.pathName]),e},t.toMarkup=function(){return this.alternate?"<path d='"+this.alternate+"'/>":"<path d='"+z[this.pathName]+"'/>"},e}(),Q=function(){function e(e){this.attributes=void 0,this.attributes=e||{}}var t=e.prototype;return t.toNode=function(){var e=document.createElementNS("http://www.w3.org/2000/svg","line");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);return e},t.toMarkup=function(){var e="<line";for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+"='"+this.attributes[t]+"'");return e+="/>"},e}();function ee(e){if(e instanceof Z)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}var te={bin:1,close:1,inner:1,open:1,punct:1,rel:1},re={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},ne={math:{},text:{}},ae=ne;function ie(e,t,r,n,a,i){ne[e][a]={font:t,group:r,replace:n},i&&n&&(ne[e][n]=ne[e][a])}var oe="math",se="text",le="main",he="ams",me="accent-token",ce="bin",ue="close",pe="inner",de="mathord",fe="op-token",ge="open",ve="punct",be="rel",ye="spacing",xe="textord";ie(oe,le,be,"\u2261","\\equiv",!0),ie(oe,le,be,"\u227a","\\prec",!0),ie(oe,le,be,"\u227b","\\succ",!0),ie(oe,le,be,"\u223c","\\sim",!0),ie(oe,le,be,"\u22a5","\\perp"),ie(oe,le,be,"\u2aaf","\\preceq",!0),ie(oe,le,be,"\u2ab0","\\succeq",!0),ie(oe,le,be,"\u2243","\\simeq",!0),ie(oe,le,be,"\u2223","\\mid",!0),ie(oe,le,be,"\u226a","\\ll",!0),ie(oe,le,be,"\u226b","\\gg",!0),ie(oe,le,be,"\u224d","\\asymp",!0),ie(oe,le,be,"\u2225","\\parallel"),ie(oe,le,be,"\u22c8","\\bowtie",!0),ie(oe,le,be,"\u2323","\\smile",!0),ie(oe,le,be,"\u2291","\\sqsubseteq",!0),ie(oe,le,be,"\u2292","\\sqsupseteq",!0),ie(oe,le,be,"\u2250","\\doteq",!0),ie(oe,le,be,"\u2322","\\frown",!0),ie(oe,le,be,"\u220b","\\ni",!0),ie(oe,le,be,"\u221d","\\propto",!0),ie(oe,le,be,"\u22a2","\\vdash",!0),ie(oe,le,be,"\u22a3","\\dashv",!0),ie(oe,le,be,"\u220b","\\owns"),ie(oe,le,ve,".","\\ldotp"),ie(oe,le,ve,"\u22c5","\\cdotp"),ie(oe,le,xe,"#","\\#"),ie(se,le,xe,"#","\\#"),ie(oe,le,xe,"&","\\&"),ie(se,le,xe,"&","\\&"),ie(oe,le,xe,"\u2135","\\aleph",!0),ie(oe,le,xe,"\u2200","\\forall",!0),ie(oe,le,xe,"\u210f","\\hbar",!0),ie(oe,le,xe,"\u2203","\\exists",!0),ie(oe,le,xe,"\u2207","\\nabla",!0),ie(oe,le,xe,"\u266d","\\flat",!0),ie(oe,le,xe,"\u2113","\\ell",!0),ie(oe,le,xe,"\u266e","\\natural",!0),ie(oe,le,xe,"\u2663","\\clubsuit",!0),ie(oe,le,xe,"\u2118","\\wp",!0),ie(oe,le,xe,"\u266f","\\sharp",!0),ie(oe,le,xe,"\u2662","\\diamondsuit",!0),ie(oe,le,xe,"\u211c","\\Re",!0),ie(oe,le,xe,"\u2661","\\heartsuit",!0),ie(oe,le,xe,"\u2111","\\Im",!0),ie(oe,le,xe,"\u2660","\\spadesuit",!0),ie(oe,le,xe,"\xa7","\\S",!0),ie(se,le,xe,"\xa7","\\S"),ie(oe,le,xe,"\xb6","\\P",!0),ie(se,le,xe,"\xb6","\\P"),ie(oe,le,xe,"\u2020","\\dag"),ie(se,le,xe,"\u2020","\\dag"),ie(se,le,xe,"\u2020","\\textdagger"),ie(oe,le,xe,"\u2021","\\ddag"),ie(se,le,xe,"\u2021","\\ddag"),ie(se,le,xe,"\u2021","\\textdaggerdbl"),ie(oe,le,ue,"\u23b1","\\rmoustache",!0),ie(oe,le,ge,"\u23b0","\\lmoustache",!0),ie(oe,le,ue,"\u27ef","\\rgroup",!0),ie(oe,le,ge,"\u27ee","\\lgroup",!0),ie(oe,le,ce,"\u2213","\\mp",!0),ie(oe,le,ce,"\u2296","\\ominus",!0),ie(oe,le,ce,"\u228e","\\uplus",!0),ie(oe,le,ce,"\u2293","\\sqcap",!0),ie(oe,le,ce,"\u2217","\\ast"),ie(oe,le,ce,"\u2294","\\sqcup",!0),ie(oe,le,ce,"\u25ef","\\bigcirc",!0),ie(oe,le,ce,"\u2219","\\bullet",!0),ie(oe,le,ce,"\u2021","\\ddagger"),ie(oe,le,ce,"\u2240","\\wr",!0),ie(oe,le,ce,"\u2a3f","\\amalg"),ie(oe,le,ce,"&","\\And"),ie(oe,le,be,"\u27f5","\\longleftarrow",!0),ie(oe,le,be,"\u21d0","\\Leftarrow",!0),ie(oe,le,be,"\u27f8","\\Longleftarrow",!0),ie(oe,le,be,"\u27f6","\\longrightarrow",!0),ie(oe,le,be,"\u21d2","\\Rightarrow",!0),ie(oe,le,be,"\u27f9","\\Longrightarrow",!0),ie(oe,le,be,"\u2194","\\leftrightarrow",!0),ie(oe,le,be,"\u27f7","\\longleftrightarrow",!0),ie(oe,le,be,"\u21d4","\\Leftrightarrow",!0),ie(oe,le,be,"\u27fa","\\Longleftrightarrow",!0),ie(oe,le,be,"\u21a6","\\mapsto",!0),ie(oe,le,be,"\u27fc","\\longmapsto",!0),ie(oe,le,be,"\u2197","\\nearrow",!0),ie(oe,le,be,"\u21a9","\\hookleftarrow",!0),ie(oe,le,be,"\u21aa","\\hookrightarrow",!0),ie(oe,le,be,"\u2198","\\searrow",!0),ie(oe,le,be,"\u21bc","\\leftharpoonup",!0),ie(oe,le,be,"\u21c0","\\rightharpoonup",!0),ie(oe,le,be,"\u2199","\\swarrow",!0),ie(oe,le,be,"\u21bd","\\leftharpoondown",!0),ie(oe,le,be,"\u21c1","\\rightharpoondown",!0),ie(oe,le,be,"\u2196","\\nwarrow",!0),ie(oe,le,be,"\u21cc","\\rightleftharpoons",!0),ie(oe,he,be,"\u226e","\\nless",!0),ie(oe,he,be,"\ue010","\\@nleqslant"),ie(oe,he,be,"\ue011","\\@nleqq"),ie(oe,he,be,"\u2a87","\\lneq",!0),ie(oe,he,be,"\u2268","\\lneqq",!0),ie(oe,he,be,"\ue00c","\\@lvertneqq"),ie(oe,he,be,"\u22e6","\\lnsim",!0),ie(oe,he,be,"\u2a89","\\lnapprox",!0),ie(oe,he,be,"\u2280","\\nprec",!0),ie(oe,he,be,"\u22e0","\\npreceq",!0),ie(oe,he,be,"\u22e8","\\precnsim",!0),ie(oe,he,be,"\u2ab9","\\precnapprox",!0),ie(oe,he,be,"\u2241","\\nsim",!0),ie(oe,he,be,"\ue006","\\@nshortmid"),ie(oe,he,be,"\u2224","\\nmid",!0),ie(oe,he,be,"\u22ac","\\nvdash",!0),ie(oe,he,be,"\u22ad","\\nvDash",!0),ie(oe,he,be,"\u22ea","\\ntriangleleft"),ie(oe,he,be,"\u22ec","\\ntrianglelefteq",!0),ie(oe,he,be,"\u228a","\\subsetneq",!0),ie(oe,he,be,"\ue01a","\\@varsubsetneq"),ie(oe,he,be,"\u2acb","\\subsetneqq",!0),ie(oe,he,be,"\ue017","\\@varsubsetneqq"),ie(oe,he,be,"\u226f","\\ngtr",!0),ie(oe,he,be,"\ue00f","\\@ngeqslant"),ie(oe,he,be,"\ue00e","\\@ngeqq"),ie(oe,he,be,"\u2a88","\\gneq",!0),ie(oe,he,be,"\u2269","\\gneqq",!0),ie(oe,he,be,"\ue00d","\\@gvertneqq"),ie(oe,he,be,"\u22e7","\\gnsim",!0),ie(oe,he,be,"\u2a8a","\\gnapprox",!0),ie(oe,he,be,"\u2281","\\nsucc",!0),ie(oe,he,be,"\u22e1","\\nsucceq",!0),ie(oe,he,be,"\u22e9","\\succnsim",!0),ie(oe,he,be,"\u2aba","\\succnapprox",!0),ie(oe,he,be,"\u2246","\\ncong",!0),ie(oe,he,be,"\ue007","\\@nshortparallel"),ie(oe,he,be,"\u2226","\\nparallel",!0),ie(oe,he,be,"\u22af","\\nVDash",!0),ie(oe,he,be,"\u22eb","\\ntriangleright"),ie(oe,he,be,"\u22ed","\\ntrianglerighteq",!0),ie(oe,he,be,"\ue018","\\@nsupseteqq"),ie(oe,he,be,"\u228b","\\supsetneq",!0),ie(oe,he,be,"\ue01b","\\@varsupsetneq"),ie(oe,he,be,"\u2acc","\\supsetneqq",!0),ie(oe,he,be,"\ue019","\\@varsupsetneqq"),ie(oe,he,be,"\u22ae","\\nVdash",!0),ie(oe,he,be,"\u2ab5","\\precneqq",!0),ie(oe,he,be,"\u2ab6","\\succneqq",!0),ie(oe,he,be,"\ue016","\\@nsubseteqq"),ie(oe,he,ce,"\u22b4","\\unlhd"),ie(oe,he,ce,"\u22b5","\\unrhd"),ie(oe,he,be,"\u219a","\\nleftarrow",!0),ie(oe,he,be,"\u219b","\\nrightarrow",!0),ie(oe,he,be,"\u21cd","\\nLeftarrow",!0),ie(oe,he,be,"\u21cf","\\nRightarrow",!0),ie(oe,he,be,"\u21ae","\\nleftrightarrow",!0),ie(oe,he,be,"\u21ce","\\nLeftrightarrow",!0),ie(oe,he,be,"\u25b3","\\vartriangle"),ie(oe,he,xe,"\u210f","\\hslash"),ie(oe,he,xe,"\u25bd","\\triangledown"),ie(oe,he,xe,"\u25ca","\\lozenge"),ie(oe,he,xe,"\u24c8","\\circledS"),ie(oe,he,xe,"\xae","\\circledR"),ie(se,he,xe,"\xae","\\circledR"),ie(oe,he,xe,"\u2221","\\measuredangle",!0),ie(oe,he,xe,"\u2204","\\nexists"),ie(oe,he,xe,"\u2127","\\mho"),ie(oe,he,xe,"\u2132","\\Finv",!0),ie(oe,he,xe,"\u2141","\\Game",!0),ie(oe,he,xe,"\u2035","\\backprime"),ie(oe,he,xe,"\u25b2","\\blacktriangle"),ie(oe,he,xe,"\u25bc","\\blacktriangledown"),ie(oe,he,xe,"\u25a0","\\blacksquare"),ie(oe,he,xe,"\u29eb","\\blacklozenge"),ie(oe,he,xe,"\u2605","\\bigstar"),ie(oe,he,xe,"\u2222","\\sphericalangle",!0),ie(oe,he,xe,"\u2201","\\complement",!0),ie(oe,he,xe,"\xf0","\\eth",!0),ie(se,le,xe,"\xf0","\xf0"),ie(oe,he,xe,"\u2571","\\diagup"),ie(oe,he,xe,"\u2572","\\diagdown"),ie(oe,he,xe,"\u25a1","\\square"),ie(oe,he,xe,"\u25a1","\\Box"),ie(oe,he,xe,"\u25ca","\\Diamond"),ie(oe,he,xe,"\xa5","\\yen",!0),ie(se,he,xe,"\xa5","\\yen",!0),ie(oe,he,xe,"\u2713","\\checkmark",!0),ie(se,he,xe,"\u2713","\\checkmark"),ie(oe,he,xe,"\u2136","\\beth",!0),ie(oe,he,xe,"\u2138","\\daleth",!0),ie(oe,he,xe,"\u2137","\\gimel",!0),ie(oe,he,xe,"\u03dd","\\digamma",!0),ie(oe,he,xe,"\u03f0","\\varkappa"),ie(oe,he,ge,"\u250c","\\@ulcorner",!0),ie(oe,he,ue,"\u2510","\\@urcorner",!0),ie(oe,he,ge,"\u2514","\\@llcorner",!0),ie(oe,he,ue,"\u2518","\\@lrcorner",!0),ie(oe,he,be,"\u2266","\\leqq",!0),ie(oe,he,be,"\u2a7d","\\leqslant",!0),ie(oe,he,be,"\u2a95","\\eqslantless",!0),ie(oe,he,be,"\u2272","\\lesssim",!0),ie(oe,he,be,"\u2a85","\\lessapprox",!0),ie(oe,he,be,"\u224a","\\approxeq",!0),ie(oe,he,ce,"\u22d6","\\lessdot"),ie(oe,he,be,"\u22d8","\\lll",!0),ie(oe,he,be,"\u2276","\\lessgtr",!0),ie(oe,he,be,"\u22da","\\lesseqgtr",!0),ie(oe,he,be,"\u2a8b","\\lesseqqgtr",!0),ie(oe,he,be,"\u2251","\\doteqdot"),ie(oe,he,be,"\u2253","\\risingdotseq",!0),ie(oe,he,be,"\u2252","\\fallingdotseq",!0),ie(oe,he,be,"\u223d","\\backsim",!0),ie(oe,he,be,"\u22cd","\\backsimeq",!0),ie(oe,he,be,"\u2ac5","\\subseteqq",!0),ie(oe,he,be,"\u22d0","\\Subset",!0),ie(oe,he,be,"\u228f","\\sqsubset",!0),ie(oe,he,be,"\u227c","\\preccurlyeq",!0),ie(oe,he,be,"\u22de","\\curlyeqprec",!0),ie(oe,he,be,"\u227e","\\precsim",!0),ie(oe,he,be,"\u2ab7","\\precapprox",!0),ie(oe,he,be,"\u22b2","\\vartriangleleft"),ie(oe,he,be,"\u22b4","\\trianglelefteq"),ie(oe,he,be,"\u22a8","\\vDash",!0),ie(oe,he,be,"\u22aa","\\Vvdash",!0),ie(oe,he,be,"\u2323","\\smallsmile"),ie(oe,he,be,"\u2322","\\smallfrown"),ie(oe,he,be,"\u224f","\\bumpeq",!0),ie(oe,he,be,"\u224e","\\Bumpeq",!0),ie(oe,he,be,"\u2267","\\geqq",!0),ie(oe,he,be,"\u2a7e","\\geqslant",!0),ie(oe,he,be,"\u2a96","\\eqslantgtr",!0),ie(oe,he,be,"\u2273","\\gtrsim",!0),ie(oe,he,be,"\u2a86","\\gtrapprox",!0),ie(oe,he,ce,"\u22d7","\\gtrdot"),ie(oe,he,be,"\u22d9","\\ggg",!0),ie(oe,he,be,"\u2277","\\gtrless",!0),ie(oe,he,be,"\u22db","\\gtreqless",!0),ie(oe,he,be,"\u2a8c","\\gtreqqless",!0),ie(oe,he,be,"\u2256","\\eqcirc",!0),ie(oe,he,be,"\u2257","\\circeq",!0),ie(oe,he,be,"\u225c","\\triangleq",!0),ie(oe,he,be,"\u223c","\\thicksim"),ie(oe,he,be,"\u2248","\\thickapprox"),ie(oe,he,be,"\u2ac6","\\supseteqq",!0),ie(oe,he,be,"\u22d1","\\Supset",!0),ie(oe,he,be,"\u2290","\\sqsupset",!0),ie(oe,he,be,"\u227d","\\succcurlyeq",!0),ie(oe,he,be,"\u22df","\\curlyeqsucc",!0),ie(oe,he,be,"\u227f","\\succsim",!0),ie(oe,he,be,"\u2ab8","\\succapprox",!0),ie(oe,he,be,"\u22b3","\\vartriangleright"),ie(oe,he,be,"\u22b5","\\trianglerighteq"),ie(oe,he,be,"\u22a9","\\Vdash",!0),ie(oe,he,be,"\u2223","\\shortmid"),ie(oe,he,be,"\u2225","\\shortparallel"),ie(oe,he,be,"\u226c","\\between",!0),ie(oe,he,be,"\u22d4","\\pitchfork",!0),ie(oe,he,be,"\u221d","\\varpropto"),ie(oe,he,be,"\u25c0","\\blacktriangleleft"),ie(oe,he,be,"\u2234","\\therefore",!0),ie(oe,he,be,"\u220d","\\backepsilon"),ie(oe,he,be,"\u25b6","\\blacktriangleright"),ie(oe,he,be,"\u2235","\\because",!0),ie(oe,he,be,"\u22d8","\\llless"),ie(oe,he,be,"\u22d9","\\gggtr"),ie(oe,he,ce,"\u22b2","\\lhd"),ie(oe,he,ce,"\u22b3","\\rhd"),ie(oe,he,be,"\u2242","\\eqsim",!0),ie(oe,le,be,"\u22c8","\\Join"),ie(oe,he,be,"\u2251","\\Doteq",!0),ie(oe,he,ce,"\u2214","\\dotplus",!0),ie(oe,he,ce,"\u2216","\\smallsetminus"),ie(oe,he,ce,"\u22d2","\\Cap",!0),ie(oe,he,ce,"\u22d3","\\Cup",!0),ie(oe,he,ce,"\u2a5e","\\doublebarwedge",!0),ie(oe,he,ce,"\u229f","\\boxminus",!0),ie(oe,he,ce,"\u229e","\\boxplus",!0),ie(oe,he,ce,"\u22c7","\\divideontimes",!0),ie(oe,he,ce,"\u22c9","\\ltimes",!0),ie(oe,he,ce,"\u22ca","\\rtimes",!0),ie(oe,he,ce,"\u22cb","\\leftthreetimes",!0),ie(oe,he,ce,"\u22cc","\\rightthreetimes",!0),ie(oe,he,ce,"\u22cf","\\curlywedge",!0),ie(oe,he,ce,"\u22ce","\\curlyvee",!0),ie(oe,he,ce,"\u229d","\\circleddash",!0),ie(oe,he,ce,"\u229b","\\circledast",!0),ie(oe,he,ce,"\u22c5","\\centerdot"),ie(oe,he,ce,"\u22ba","\\intercal",!0),ie(oe,he,ce,"\u22d2","\\doublecap"),ie(oe,he,ce,"\u22d3","\\doublecup"),ie(oe,he,ce,"\u22a0","\\boxtimes",!0),ie(oe,he,be,"\u21e2","\\dashrightarrow",!0),ie(oe,he,be,"\u21e0","\\dashleftarrow",!0),ie(oe,he,be,"\u21c7","\\leftleftarrows",!0),ie(oe,he,be,"\u21c6","\\leftrightarrows",!0),ie(oe,he,be,"\u21da","\\Lleftarrow",!0),ie(oe,he,be,"\u219e","\\twoheadleftarrow",!0),ie(oe,he,be,"\u21a2","\\leftarrowtail",!0),ie(oe,he,be,"\u21ab","\\looparrowleft",!0),ie(oe,he,be,"\u21cb","\\leftrightharpoons",!0),ie(oe,he,be,"\u21b6","\\curvearrowleft",!0),ie(oe,he,be,"\u21ba","\\circlearrowleft",!0),ie(oe,he,be,"\u21b0","\\Lsh",!0),ie(oe,he,be,"\u21c8","\\upuparrows",!0),ie(oe,he,be,"\u21bf","\\upharpoonleft",!0),ie(oe,he,be,"\u21c3","\\downharpoonleft",!0),ie(oe,le,be,"\u22b6","\\origof",!0),ie(oe,le,be,"\u22b7","\\imageof",!0),ie(oe,he,be,"\u22b8","\\multimap",!0),ie(oe,he,be,"\u21ad","\\leftrightsquigarrow",!0),ie(oe,he,be,"\u21c9","\\rightrightarrows",!0),ie(oe,he,be,"\u21c4","\\rightleftarrows",!0),ie(oe,he,be,"\u21a0","\\twoheadrightarrow",!0),ie(oe,he,be,"\u21a3","\\rightarrowtail",!0),ie(oe,he,be,"\u21ac","\\looparrowright",!0),ie(oe,he,be,"\u21b7","\\curvearrowright",!0),ie(oe,he,be,"\u21bb","\\circlearrowright",!0),ie(oe,he,be,"\u21b1","\\Rsh",!0),ie(oe,he,be,"\u21ca","\\downdownarrows",!0),ie(oe,he,be,"\u21be","\\upharpoonright",!0),ie(oe,he,be,"\u21c2","\\downharpoonright",!0),ie(oe,he,be,"\u21dd","\\rightsquigarrow",!0),ie(oe,he,be,"\u21dd","\\leadsto"),ie(oe,he,be,"\u21db","\\Rrightarrow",!0),ie(oe,he,be,"\u21be","\\restriction"),ie(oe,le,xe,"\u2018","`"),ie(oe,le,xe,"$","\\$"),ie(se,le,xe,"$","\\$"),ie(se,le,xe,"$","\\textdollar"),ie(oe,le,xe,"%","\\%"),ie(se,le,xe,"%","\\%"),ie(oe,le,xe,"_","\\_"),ie(se,le,xe,"_","\\_"),ie(se,le,xe,"_","\\textunderscore"),ie(oe,le,xe,"\u2220","\\angle",!0),ie(oe,le,xe,"\u221e","\\infty",!0),ie(oe,le,xe,"\u2032","\\prime"),ie(oe,le,xe,"\u25b3","\\triangle"),ie(oe,le,xe,"\u0393","\\Gamma",!0),ie(oe,le,xe,"\u0394","\\Delta",!0),ie(oe,le,xe,"\u0398","\\Theta",!0),ie(oe,le,xe,"\u039b","\\Lambda",!0),ie(oe,le,xe,"\u039e","\\Xi",!0),ie(oe,le,xe,"\u03a0","\\Pi",!0),ie(oe,le,xe,"\u03a3","\\Sigma",!0),ie(oe,le,xe,"\u03a5","\\Upsilon",!0),ie(oe,le,xe,"\u03a6","\\Phi",!0),ie(oe,le,xe,"\u03a8","\\Psi",!0),ie(oe,le,xe,"\u03a9","\\Omega",!0),ie(oe,le,xe,"A","\u0391"),ie(oe,le,xe,"B","\u0392"),ie(oe,le,xe,"E","\u0395"),ie(oe,le,xe,"Z","\u0396"),ie(oe,le,xe,"H","\u0397"),ie(oe,le,xe,"I","\u0399"),ie(oe,le,xe,"K","\u039a"),ie(oe,le,xe,"M","\u039c"),ie(oe,le,xe,"N","\u039d"),ie(oe,le,xe,"O","\u039f"),ie(oe,le,xe,"P","\u03a1"),ie(oe,le,xe,"T","\u03a4"),ie(oe,le,xe,"X","\u03a7"),ie(oe,le,xe,"\xac","\\neg",!0),ie(oe,le,xe,"\xac","\\lnot"),ie(oe,le,xe,"\u22a4","\\top"),ie(oe,le,xe,"\u22a5","\\bot"),ie(oe,le,xe,"\u2205","\\emptyset"),ie(oe,he,xe,"\u2205","\\varnothing"),ie(oe,le,de,"\u03b1","\\alpha",!0),ie(oe,le,de,"\u03b2","\\beta",!0),ie(oe,le,de,"\u03b3","\\gamma",!0),ie(oe,le,de,"\u03b4","\\delta",!0),ie(oe,le,de,"\u03f5","\\epsilon",!0),ie(oe,le,de,"\u03b6","\\zeta",!0),ie(oe,le,de,"\u03b7","\\eta",!0),ie(oe,le,de,"\u03b8","\\theta",!0),ie(oe,le,de,"\u03b9","\\iota",!0),ie(oe,le,de,"\u03ba","\\kappa",!0),ie(oe,le,de,"\u03bb","\\lambda",!0),ie(oe,le,de,"\u03bc","\\mu",!0),ie(oe,le,de,"\u03bd","\\nu",!0),ie(oe,le,de,"\u03be","\\xi",!0),ie(oe,le,de,"\u03bf","\\omicron",!0),ie(oe,le,de,"\u03c0","\\pi",!0),ie(oe,le,de,"\u03c1","\\rho",!0),ie(oe,le,de,"\u03c3","\\sigma",!0),ie(oe,le,de,"\u03c4","\\tau",!0),ie(oe,le,de,"\u03c5","\\upsilon",!0),ie(oe,le,de,"\u03d5","\\phi",!0),ie(oe,le,de,"\u03c7","\\chi",!0),ie(oe,le,de,"\u03c8","\\psi",!0),ie(oe,le,de,"\u03c9","\\omega",!0),ie(oe,le,de,"\u03b5","\\varepsilon",!0),ie(oe,le,de,"\u03d1","\\vartheta",!0),ie(oe,le,de,"\u03d6","\\varpi",!0),ie(oe,le,de,"\u03f1","\\varrho",!0),ie(oe,le,de,"\u03c2","\\varsigma",!0),ie(oe,le,de,"\u03c6","\\varphi",!0),ie(oe,le,ce,"\u2217","*",!0),ie(oe,le,ce,"+","+"),ie(oe,le,ce,"\u2212","-",!0),ie(oe,le,ce,"\u22c5","\\cdot",!0),ie(oe,le,ce,"\u2218","\\circ",!0),ie(oe,le,ce,"\xf7","\\div",!0),ie(oe,le,ce,"\xb1","\\pm",!0),ie(oe,le,ce,"\xd7","\\times",!0),ie(oe,le,ce,"\u2229","\\cap",!0),ie(oe,le,ce,"\u222a","\\cup",!0),ie(oe,le,ce,"\u2216","\\setminus",!0),ie(oe,le,ce,"\u2227","\\land"),ie(oe,le,ce,"\u2228","\\lor"),ie(oe,le,ce,"\u2227","\\wedge",!0),ie(oe,le,ce,"\u2228","\\vee",!0),ie(oe,le,xe,"\u221a","\\surd"),ie(oe,le,ge,"\u27e8","\\langle",!0),ie(oe,le,ge,"\u2223","\\lvert"),ie(oe,le,ge,"\u2225","\\lVert"),ie(oe,le,ue,"?","?"),ie(oe,le,ue,"!","!"),ie(oe,le,ue,"\u27e9","\\rangle",!0),ie(oe,le,ue,"\u2223","\\rvert"),ie(oe,le,ue,"\u2225","\\rVert"),ie(oe,le,be,"=","="),ie(oe,le,be,":",":"),ie(oe,le,be,"\u2248","\\approx",!0),ie(oe,le,be,"\u2245","\\cong",!0),ie(oe,le,be,"\u2265","\\ge"),ie(oe,le,be,"\u2265","\\geq",!0),ie(oe,le,be,"\u2190","\\gets"),ie(oe,le,be,">","\\gt",!0),ie(oe,le,be,"\u2208","\\in",!0),ie(oe,le,be,"\ue020","\\@not"),ie(oe,le,be,"\u2282","\\subset",!0),ie(oe,le,be,"\u2283","\\supset",!0),ie(oe,le,be,"\u2286","\\subseteq",!0),ie(oe,le,be,"\u2287","\\supseteq",!0),ie(oe,he,be,"\u2288","\\nsubseteq",!0),ie(oe,he,be,"\u2289","\\nsupseteq",!0),ie(oe,le,be,"\u22a8","\\models"),ie(oe,le,be,"\u2190","\\leftarrow",!0),ie(oe,le,be,"\u2264","\\le"),ie(oe,le,be,"\u2264","\\leq",!0),ie(oe,le,be,"<","\\lt",!0),ie(oe,le,be,"\u2192","\\rightarrow",!0),ie(oe,le,be,"\u2192","\\to"),ie(oe,he,be,"\u2271","\\ngeq",!0),ie(oe,he,be,"\u2270","\\nleq",!0),ie(oe,le,ye,"\xa0","\\ "),ie(oe,le,ye,"\xa0","\\space"),ie(oe,le,ye,"\xa0","\\nobreakspace"),ie(se,le,ye,"\xa0","\\ "),ie(se,le,ye,"\xa0"," "),ie(se,le,ye,"\xa0","\\space"),ie(se,le,ye,"\xa0","\\nobreakspace"),ie(oe,le,ye,null,"\\nobreak"),ie(oe,le,ye,null,"\\allowbreak"),ie(oe,le,ve,",",","),ie(oe,le,ve,";",";"),ie(oe,he,ce,"\u22bc","\\barwedge",!0),ie(oe,he,ce,"\u22bb","\\veebar",!0),ie(oe,le,ce,"\u2299","\\odot",!0),ie(oe,le,ce,"\u2295","\\oplus",!0),ie(oe,le,ce,"\u2297","\\otimes",!0),ie(oe,le,xe,"\u2202","\\partial",!0),ie(oe,le,ce,"\u2298","\\oslash",!0),ie(oe,he,ce,"\u229a","\\circledcirc",!0),ie(oe,he,ce,"\u22a1","\\boxdot",!0),ie(oe,le,ce,"\u25b3","\\bigtriangleup"),ie(oe,le,ce,"\u25bd","\\bigtriangledown"),ie(oe,le,ce,"\u2020","\\dagger"),ie(oe,le,ce,"\u22c4","\\diamond"),ie(oe,le,ce,"\u22c6","\\star"),ie(oe,le,ce,"\u25c3","\\triangleleft"),ie(oe,le,ce,"\u25b9","\\triangleright"),ie(oe,le,ge,"{","\\{"),ie(se,le,xe,"{","\\{"),ie(se,le,xe,"{","\\textbraceleft"),ie(oe,le,ue,"}","\\}"),ie(se,le,xe,"}","\\}"),ie(se,le,xe,"}","\\textbraceright"),ie(oe,le,ge,"{","\\lbrace"),ie(oe,le,ue,"}","\\rbrace"),ie(oe,le,ge,"[","\\lbrack",!0),ie(se,le,xe,"[","\\lbrack",!0),ie(oe,le,ue,"]","\\rbrack",!0),ie(se,le,xe,"]","\\rbrack",!0),ie(oe,le,ge,"(","\\lparen",!0),ie(oe,le,ue,")","\\rparen",!0),ie(se,le,xe,"<","\\textless",!0),ie(se,le,xe,">","\\textgreater",!0),ie(oe,le,ge,"\u230a","\\lfloor",!0),ie(oe,le,ue,"\u230b","\\rfloor",!0),ie(oe,le,ge,"\u2308","\\lceil",!0),ie(oe,le,ue,"\u2309","\\rceil",!0),ie(oe,le,xe,"\\","\\backslash"),ie(oe,le,xe,"\u2223","|"),ie(oe,le,xe,"\u2223","\\vert"),ie(se,le,xe,"|","\\textbar",!0),ie(oe,le,xe,"\u2225","\\|"),ie(oe,le,xe,"\u2225","\\Vert"),ie(se,le,xe,"\u2225","\\textbardbl"),ie(se,le,xe,"~","\\textasciitilde"),ie(se,le,xe,"\\","\\textbackslash"),ie(se,le,xe,"^","\\textasciicircum"),ie(oe,le,be,"\u2191","\\uparrow",!0),ie(oe,le,be,"\u21d1","\\Uparrow",!0),ie(oe,le,be,"\u2193","\\downarrow",!0),ie(oe,le,be,"\u21d3","\\Downarrow",!0),ie(oe,le,be,"\u2195","\\updownarrow",!0),ie(oe,le,be,"\u21d5","\\Updownarrow",!0),ie(oe,le,fe,"\u2210","\\coprod"),ie(oe,le,fe,"\u22c1","\\bigvee"),ie(oe,le,fe,"\u22c0","\\bigwedge"),ie(oe,le,fe,"\u2a04","\\biguplus"),ie(oe,le,fe,"\u22c2","\\bigcap"),ie(oe,le,fe,"\u22c3","\\bigcup"),ie(oe,le,fe,"\u222b","\\int"),ie(oe,le,fe,"\u222b","\\intop"),ie(oe,le,fe,"\u222c","\\iint"),ie(oe,le,fe,"\u222d","\\iiint"),ie(oe,le,fe,"\u220f","\\prod"),ie(oe,le,fe,"\u2211","\\sum"),ie(oe,le,fe,"\u2a02","\\bigotimes"),ie(oe,le,fe,"\u2a01","\\bigoplus"),ie(oe,le,fe,"\u2a00","\\bigodot"),ie(oe,le,fe,"\u222e","\\oint"),ie(oe,le,fe,"\u222f","\\oiint"),ie(oe,le,fe,"\u2230","\\oiiint"),ie(oe,le,fe,"\u2a06","\\bigsqcup"),ie(oe,le,fe,"\u222b","\\smallint"),ie(se,le,pe,"\u2026","\\textellipsis"),ie(oe,le,pe,"\u2026","\\mathellipsis"),ie(se,le,pe,"\u2026","\\ldots",!0),ie(oe,le,pe,"\u2026","\\ldots",!0),ie(oe,le,pe,"\u22ef","\\@cdots",!0),ie(oe,le,pe,"\u22f1","\\ddots",!0),ie(oe,le,xe,"\u22ee","\\varvdots"),ie(oe,le,me,"\u02ca","\\acute"),ie(oe,le,me,"\u02cb","\\grave"),ie(oe,le,me,"\xa8","\\ddot"),ie(oe,le,me,"~","\\tilde"),ie(oe,le,me,"\u02c9","\\bar"),ie(oe,le,me,"\u02d8","\\breve"),ie(oe,le,me,"\u02c7","\\check"),ie(oe,le,me,"^","\\hat"),ie(oe,le,me,"\u20d7","\\vec"),ie(oe,le,me,"\u02d9","\\dot"),ie(oe,le,me,"\u02da","\\mathring"),ie(oe,le,de,"\ue131","\\@imath"),ie(oe,le,de,"\ue237","\\@jmath"),ie(oe,le,xe,"\u0131","\u0131"),ie(oe,le,xe,"\u0237","\u0237"),ie(se,le,xe,"\u0131","\\i",!0),ie(se,le,xe,"\u0237","\\j",!0),ie(se,le,xe,"\xdf","\\ss",!0),ie(se,le,xe,"\xe6","\\ae",!0),ie(se,le,xe,"\u0153","\\oe",!0),ie(se,le,xe,"\xf8","\\o",!0),ie(se,le,xe,"\xc6","\\AE",!0),ie(se,le,xe,"\u0152","\\OE",!0),ie(se,le,xe,"\xd8","\\O",!0),ie(se,le,me,"\u02ca","\\'"),ie(se,le,me,"\u02cb","\\`"),ie(se,le,me,"\u02c6","\\^"),ie(se,le,me,"\u02dc","\\~"),ie(se,le,me,"\u02c9","\\="),ie(se,le,me,"\u02d8","\\u"),ie(se,le,me,"\u02d9","\\."),ie(se,le,me,"\xb8","\\c"),ie(se,le,me,"\u02da","\\r"),ie(se,le,me,"\u02c7","\\v"),ie(se,le,me,"\xa8",'\\"'),ie(se,le,me,"\u02dd","\\H"),ie(se,le,me,"\u25ef","\\textcircled");var we={"--":!0,"---":!0,"``":!0,"''":!0};ie(se,le,xe,"\u2013","--",!0),ie(se,le,xe,"\u2013","\\textendash"),ie(se,le,xe,"\u2014","---",!0),ie(se,le,xe,"\u2014","\\textemdash"),ie(se,le,xe,"\u2018","`",!0),ie(se,le,xe,"\u2018","\\textquoteleft"),ie(se,le,xe,"\u2019","'",!0),ie(se,le,xe,"\u2019","\\textquoteright"),ie(se,le,xe,"\u201c","``",!0),ie(se,le,xe,"\u201c","\\textquotedblleft"),ie(se,le,xe,"\u201d","''",!0),ie(se,le,xe,"\u201d","\\textquotedblright"),ie(oe,le,xe,"\xb0","\\degree",!0),ie(se,le,xe,"\xb0","\\degree"),ie(se,le,xe,"\xb0","\\textdegree",!0),ie(oe,le,xe,"\xa3","\\pounds"),ie(oe,le,xe,"\xa3","\\mathsterling",!0),ie(se,le,xe,"\xa3","\\pounds"),ie(se,le,xe,"\xa3","\\textsterling",!0),ie(oe,he,xe,"\u2720","\\maltese"),ie(se,he,xe,"\u2720","\\maltese");for(var ke='0123456789/@."',Se=0;Se<ke.length;Se++){var Me=ke.charAt(Se);ie(oe,le,xe,Me,Me)}for(var ze='0123456789!@*()-=+";:?/.,',Ae=0;Ae<ze.length;Ae++){var Te=ze.charAt(Ae);ie(se,le,xe,Te,Te)}for(var Be="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Ce=0;Ce<Be.length;Ce++){var qe=Be.charAt(Ce);ie(oe,le,de,qe,qe),ie(se,le,xe,qe,qe)}ie(oe,he,xe,"C","\u2102"),ie(se,he,xe,"C","\u2102"),ie(oe,he,xe,"H","\u210d"),ie(se,he,xe,"H","\u210d"),ie(oe,he,xe,"N","\u2115"),ie(se,he,xe,"N","\u2115"),ie(oe,he,xe,"P","\u2119"),ie(se,he,xe,"P","\u2119"),ie(oe,he,xe,"Q","\u211a"),ie(se,he,xe,"Q","\u211a"),ie(oe,he,xe,"R","\u211d"),ie(se,he,xe,"R","\u211d"),ie(oe,he,xe,"Z","\u2124"),ie(se,he,xe,"Z","\u2124"),ie(oe,le,de,"h","\u210e"),ie(se,le,de,"h","\u210e");for(var Ne="",Ie=0;Ie<Be.length;Ie++){var Re=Be.charAt(Ie);ie(oe,le,de,Re,Ne=String.fromCharCode(55349,56320+Ie)),ie(se,le,xe,Re,Ne),ie(oe,le,de,Re,Ne=String.fromCharCode(55349,56372+Ie)),ie(se,le,xe,Re,Ne),ie(oe,le,de,Re,Ne=String.fromCharCode(55349,56424+Ie)),ie(se,le,xe,Re,Ne),ie(oe,le,de,Re,Ne=String.fromCharCode(55349,56580+Ie)),ie(se,le,xe,Re,Ne),ie(oe,le,de,Re,Ne=String.fromCharCode(55349,56736+Ie)),ie(se,le,xe,Re,Ne),ie(oe,le,de,Re,Ne=String.fromCharCode(55349,56788+Ie)),ie(se,le,xe,Re,Ne),ie(oe,le,de,Re,Ne=String.fromCharCode(55349,56840+Ie)),ie(se,le,xe,Re,Ne),ie(oe,le,de,Re,Ne=String.fromCharCode(55349,56944+Ie)),ie(se,le,xe,Re,Ne),Ie<26&&(ie(oe,le,de,Re,Ne=String.fromCharCode(55349,56632+Ie)),ie(se,le,xe,Re,Ne),ie(oe,le,de,Re,Ne=String.fromCharCode(55349,56476+Ie)),ie(se,le,xe,Re,Ne))}ie(oe,le,de,"k",Ne=String.fromCharCode(55349,56668)),ie(se,le,xe,"k",Ne);for(var Oe=0;Oe<10;Oe++){var He=Oe.toString();ie(oe,le,de,He,Ne=String.fromCharCode(55349,57294+Oe)),ie(se,le,xe,He,Ne),ie(oe,le,de,He,Ne=String.fromCharCode(55349,57314+Oe)),ie(se,le,xe,He,Ne),ie(oe,le,de,He,Ne=String.fromCharCode(55349,57324+Oe)),ie(se,le,xe,He,Ne),ie(oe,le,de,He,Ne=String.fromCharCode(55349,57334+Oe)),ie(se,le,xe,He,Ne)}for(var Ee="\xd0\xde\xfe",Le=0;Le<Ee.length;Le++){var De=Ee.charAt(Le);ie(oe,le,de,De,De),ie(se,le,xe,De,De)}var Pe=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["","",""],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],Fe=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],Ve=function(e,t,r){return ae[r][e]&&ae[r][e].replace&&(e=ae[r][e].replace),{value:e,metrics:q(e,t,r)}},Ge=function(e,t,r,n,a){var i,o=Ve(e,t,r),s=o.metrics;if(e=o.value,s){var l=s.italic;("text"===r||n&&"mathit"===n.font)&&(l=0),i=new Z(e,s.height,s.depth,l,s.skew,s.width,a)}else"undefined"!==typeof console&&console.warn("No character metrics for '"+e+"' in style '"+t+"' and mode '"+r+"'"),i=new Z(e,0,0,0,0,0,a);if(n){i.maxFontSize=n.sizeMultiplier,n.style.isTight()&&i.classes.push("mtight");var h=n.getColor();h&&(i.style.color=h)}return i},Ue=function(e,t){if(G(e.classes)!==G(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize)return!1;if(1===e.classes.length){var r=e.classes[0];if("mbin"===r||"mord"===r)return!1}for(var n in e.style)if(e.style.hasOwnProperty(n)&&e.style[n]!==t.style[n])return!1;for(var a in t.style)if(t.style.hasOwnProperty(a)&&e.style[a]!==t.style[a])return!1;return!0},Ye=function(e){for(var t=0,r=0,n=0,a=0;a<e.children.length;a++){var i=e.children[a];i.height>t&&(t=i.height),i.depth>r&&(r=i.depth),i.maxFontSize>n&&(n=i.maxFontSize)}e.height=t,e.depth=r,e.maxFontSize=n},Xe=function(e,t,r,n){var a=new W(e,t,r,n);return Ye(a),a},We=function(e,t,r,n){return new W(e,t,r,n)},_e=function(e){var t=new A(e);return Ye(t),t},je=function(e,t,r){var n="";switch(e){case"amsrm":n="AMS";break;case"textrm":n="Main";break;case"textsf":n="SansSerif";break;case"texttt":n="Typewriter";break;default:n=e}return n+"-"+("textbf"===t&&"textit"===r?"BoldItalic":"textbf"===t?"Bold":"textit"===t?"Italic":"Regular")},$e={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},Ze={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},Ke={fontMap:$e,makeSymbol:Ge,mathsym:function(e,t,r,n){return void 0===n&&(n=[]),"boldsymbol"===r.font&&Ve(e,"Main-Bold",t).metrics?Ge(e,"Main-Bold",t,r,n.concat(["mathbf"])):"\\"===e||"main"===ae[t][e].font?Ge(e,"Main-Regular",t,r,n):Ge(e,"AMS-Regular",t,r,n.concat(["amsrm"]))},makeSpan:Xe,makeSvgSpan:We,makeLineSpan:function(e,t,r){var n=Xe([e],[],t);return n.height=Math.max(r||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),n.style.borderBottomWidth=V(n.height),n.maxFontSize=1,n},makeAnchor:function(e,t,r,n){var a=new _(e,t,r,n);return Ye(a),a},makeFragment:_e,wrapFragment:function(e,t){return e instanceof A?Xe([],[e],t):e},makeVList:function(e,t){for(var r=function(e){if("individualShift"===e.positionType){for(var t=e.children,r=[t[0]],n=-t[0].shift-t[0].elem.depth,a=n,i=1;i<t.length;i++){var o=-t[i].shift-a-t[i].elem.depth,s=o-(t[i-1].elem.height+t[i-1].elem.depth);a+=o,r.push({type:"kern",size:s}),r.push(t[i])}return{children:r,depth:n}}var l;if("top"===e.positionType){for(var h=e.positionData,m=0;m<e.children.length;m++){var c=e.children[m];h-="kern"===c.type?c.size:c.elem.height+c.elem.depth}l=h}else if("bottom"===e.positionType)l=-e.positionData;else{var u=e.children[0];if("elem"!==u.type)throw new Error('First child must have type "elem".');if("shift"===e.positionType)l=-u.elem.depth-e.positionData;else{if("firstBaseline"!==e.positionType)throw new Error("Invalid positionType "+e.positionType+".");l=-u.elem.depth}}return{children:e.children,depth:l}}(e),n=r.children,a=r.depth,i=0,o=0;o<n.length;o++){var s=n[o];if("elem"===s.type){var l=s.elem;i=Math.max(i,l.maxFontSize,l.height)}}i+=2;var h=Xe(["pstrut"],[]);h.style.height=V(i);for(var m=[],c=a,u=a,p=a,d=0;d<n.length;d++){var f=n[d];if("kern"===f.type)p+=f.size;else{var g=f.elem,v=f.wrapperClasses||[],b=f.wrapperStyle||{},y=Xe(v,[h,g],void 0,b);y.style.top=V(-i-p-g.depth),f.marginLeft&&(y.style.marginLeft=f.marginLeft),f.marginRight&&(y.style.marginRight=f.marginRight),m.push(y),p+=g.height+g.depth}c=Math.min(c,p),u=Math.max(u,p)}var x,w=Xe(["vlist"],m);if(w.style.height=V(u),c<0){var k=Xe([],[]),S=Xe(["vlist"],[k]);S.style.height=V(-c);var M=Xe(["vlist-s"],[new Z("\u200b")]);x=[Xe(["vlist-r"],[w,M]),Xe(["vlist-r"],[S])]}else x=[Xe(["vlist-r"],[w])];var z=Xe(["vlist-t"],x);return 2===x.length&&z.classes.push("vlist-t2"),z.height=u,z.depth=-c,z},makeOrd:function(e,t,r){var a=e.mode,i=e.text,o=["mord"],s="math"===a||"text"===a&&t.font,l=s?t.font:t.fontFamily;if(55349===i.charCodeAt(0)){var h=function(e,t){var r=1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536,a="math"===t?0:1;if(119808<=r&&r<120484){var i=Math.floor((r-119808)/26);return[Pe[i][2],Pe[i][a]]}if(120782<=r&&r<=120831){var o=Math.floor((r-120782)/10);return[Fe[o][2],Fe[o][a]]}if(120485===r||120486===r)return[Pe[0][2],Pe[0][a]];if(120486<r&&r<120782)return["",""];throw new n("Unsupported character: "+e)}(i,a),m=h[0],c=h[1];return Ge(i,m,a,t,o.concat(c))}if(l){var u,p;if("boldsymbol"===l){var d=function(e,t,r,n,a){return"textord"!==a&&Ve(e,"Math-BoldItalic",t).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}}(i,a,0,0,r);u=d.fontName,p=[d.fontClass]}else s?(u=$e[l].fontName,p=[l]):(u=je(l,t.fontWeight,t.fontShape),p=[l,t.fontWeight,t.fontShape]);if(Ve(i,u,a).metrics)return Ge(i,u,a,t,o.concat(p));if(we.hasOwnProperty(i)&&"Typewriter"===u.substr(0,10)){for(var f=[],g=0;g<i.length;g++)f.push(Ge(i[g],u,a,t,o.concat(p)));return _e(f)}}if("mathord"===r)return Ge(i,"Math-Italic",a,t,o.concat(["mathnormal"]));if("textord"===r){var v=ae[a][i]&&ae[a][i].font;if("ams"===v){var b=je("amsrm",t.fontWeight,t.fontShape);return Ge(i,b,a,t,o.concat("amsrm",t.fontWeight,t.fontShape))}if("main"!==v&&v){var y=je(v,t.fontWeight,t.fontShape);return Ge(i,y,a,t,o.concat(y,t.fontWeight,t.fontShape))}var x=je("textrm",t.fontWeight,t.fontShape);return Ge(i,x,a,t,o.concat(t.fontWeight,t.fontShape))}throw new Error("unexpected type: "+r+" in makeOrd")},makeGlue:function(e,t){var r=Xe(["mspace"],[],t),n=F(e,t);return r.style.marginRight=V(n),r},staticSvg:function(e,t){var r=Ze[e],n=r[0],a=r[1],i=r[2],o=new J(n),s=new K([o],{width:V(a),height:V(i),style:"width:"+V(a),viewBox:"0 0 "+1e3*a+" "+1e3*i,preserveAspectRatio:"xMinYMin"}),l=We(["overlay"],[s],t);return l.height=i,l.style.height=V(i),l.style.width=V(a),l},svgData:Ze,tryCombineChars:function(e){for(var t=0;t<e.length-1;t++){var r=e[t],n=e[t+1];r instanceof Z&&n instanceof Z&&Ue(r,n)&&(r.text+=n.text,r.height=Math.max(r.height,n.height),r.depth=Math.max(r.depth,n.depth),r.italic=n.italic,e.splice(t+1,1),t--)}return e}},Je={number:3,unit:"mu"},Qe={number:4,unit:"mu"},et={number:5,unit:"mu"},tt={mord:{mop:Je,mbin:Qe,mrel:et,minner:Je},mop:{mord:Je,mop:Je,mrel:et,minner:Je},mbin:{mord:Qe,mop:Qe,mopen:Qe,minner:Qe},mrel:{mord:et,mop:et,mopen:et,minner:et},mopen:{},mclose:{mop:Je,mbin:Qe,mrel:et,minner:Je},mpunct:{mord:Je,mop:Je,mrel:et,mopen:Je,mclose:Je,mpunct:Je,minner:Je},minner:{mord:Je,mop:Je,mbin:Qe,mrel:et,mopen:Je,mpunct:Je,minner:Je}},rt={mord:{mop:Je},mop:{mord:Je,mop:Je},mbin:{},mrel:{},mopen:{},mclose:{mop:Je},mpunct:{},minner:{mop:Je}},nt={},at={},it={};function ot(e){for(var t=e.type,r=e.names,n=e.props,a=e.handler,i=e.htmlBuilder,o=e.mathmlBuilder,s={type:t,numArgs:n.numArgs,argTypes:n.argTypes,allowedInArgument:!!n.allowedInArgument,allowedInText:!!n.allowedInText,allowedInMath:void 0===n.allowedInMath||n.allowedInMath,numOptionalArgs:n.numOptionalArgs||0,infix:!!n.infix,primitive:!!n.primitive,handler:a},l=0;l<r.length;++l)nt[r[l]]=s;t&&(i&&(at[t]=i),o&&(it[t]=o))}function st(e){ot({type:e.type,names:[],props:{numArgs:0},handler:function(){throw new Error("Should never be called.")},htmlBuilder:e.htmlBuilder,mathmlBuilder:e.mathmlBuilder})}var lt=function(e){return"ordgroup"===e.type&&1===e.body.length?e.body[0]:e},ht=function(e){return"ordgroup"===e.type?e.body:[e]},mt=Ke.makeSpan,ct=["leftmost","mbin","mopen","mrel","mop","mpunct"],ut=["rightmost","mrel","mclose","mpunct"],pt={display:x.DISPLAY,text:x.TEXT,script:x.SCRIPT,scriptscript:x.SCRIPTSCRIPT},dt={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},ft=function(e,t,r,n){void 0===n&&(n=[null,null]);for(var a=[],i=0;i<e.length;i++){var o=wt(e[i],t);if(o instanceof A){var s=o.children;a.push.apply(a,s)}else a.push(o)}if(Ke.tryCombineChars(a),!r)return a;var h=t;if(1===e.length){var m=e[0];"sizing"===m.type?h=t.havingSize(m.size):"styling"===m.type&&(h=t.havingStyle(pt[m.style]))}var c=mt([n[0]||"leftmost"],[],t),u=mt([n[1]||"rightmost"],[],t),p="root"===r;return gt(a,(function(e,t){var r=t.classes[0],n=e.classes[0];"mbin"===r&&l.contains(ut,n)?t.classes[0]="mord":"mbin"===n&&l.contains(ct,r)&&(e.classes[0]="mord")}),{node:c},u,p),gt(a,(function(e,t){var r=yt(t),n=yt(e),a=r&&n?e.hasClass("mtight")?rt[r][n]:tt[r][n]:null;if(a)return Ke.makeGlue(a,h)}),{node:c},u,p),a},gt=function e(t,r,n,a,i){a&&t.push(a);for(var o=0;o<t.length;o++){var s=t[o],l=vt(s);if(l)e(l.children,r,n,null,i);else{var h=!s.hasClass("mspace");if(h){var m=r(s,n.node);m&&(n.insertAfter?n.insertAfter(m):(t.unshift(m),o++))}h?n.node=s:i&&s.hasClass("newline")&&(n.node=mt(["leftmost"])),n.insertAfter=function(e){return function(r){t.splice(e+1,0,r),o++}}(o)}}a&&t.pop()},vt=function(e){return e instanceof A||e instanceof _||e instanceof W&&e.hasClass("enclosing")?e:null},bt=function e(t,r){var n=vt(t);if(n){var a=n.children;if(a.length){if("right"===r)return e(a[a.length-1],"right");if("left"===r)return e(a[0],"left")}}return t},yt=function(e,t){return e?(t&&(e=bt(e,t)),dt[e.classes[0]]||null):null},xt=function(e,t){var r=["nulldelimiter"].concat(e.baseSizingClasses());return mt(t.concat(r))},wt=function(e,t,r){if(!e)return mt();if(at[e.type]){var a=at[e.type](e,t);if(r&&t.size!==r.size){a=mt(t.sizingClasses(r),[a],t);var i=t.sizeMultiplier/r.sizeMultiplier;a.height*=i,a.depth*=i}return a}throw new n("Got group of unknown type: '"+e.type+"'")};function kt(e,t){var r=mt(["base"],e,t),n=mt(["strut"]);return n.style.height=V(r.height+r.depth),r.depth&&(n.style.verticalAlign=V(-r.depth)),r.children.unshift(n),r}function St(e,t){var r=null;1===e.length&&"tag"===e[0].type&&(r=e[0].tag,e=e[0].body);var n,a=ft(e,t,"root");2===a.length&&a[1].hasClass("tag")&&(n=a.pop());for(var i,o=[],s=[],l=0;l<a.length;l++)if(s.push(a[l]),a[l].hasClass("mbin")||a[l].hasClass("mrel")||a[l].hasClass("allowbreak")){for(var h=!1;l<a.length-1&&a[l+1].hasClass("mspace")&&!a[l+1].hasClass("newline");)l++,s.push(a[l]),a[l].hasClass("nobreak")&&(h=!0);h||(o.push(kt(s,t)),s=[])}else a[l].hasClass("newline")&&(s.pop(),s.length>0&&(o.push(kt(s,t)),s=[]),o.push(a[l]));s.length>0&&o.push(kt(s,t)),r?((i=kt(ft(r,t,!0))).classes=["tag"],o.push(i)):n&&o.push(n);var m=mt(["katex-html"],o);if(m.setAttribute("aria-hidden","true"),i){var c=i.children[0];c.style.height=V(m.height+m.depth),m.depth&&(c.style.verticalAlign=V(-m.depth))}return m}function Mt(e){return new A(e)}var zt=function(){function e(e,t,r){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=r||[]}var t=e.prototype;return t.setAttribute=function(e,t){this.attributes[e]=t},t.getAttribute=function(e){return this.attributes[e]},t.toNode=function(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=G(this.classes));for(var r=0;r<this.children.length;r++)e.appendChild(this.children[r].toNode());return e},t.toMarkup=function(){var e="<"+this.type;for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="',e+=l.escape(this.attributes[t]),e+='"');this.classes.length>0&&(e+=' class ="'+l.escape(G(this.classes))+'"'),e+=">";for(var r=0;r<this.children.length;r++)e+=this.children[r].toMarkup();return e+="</"+this.type+">"},t.toText=function(){return this.children.map((function(e){return e.toText()})).join("")},e}(),At=function(){function e(e){this.text=void 0,this.text=e}var t=e.prototype;return t.toNode=function(){return document.createTextNode(this.text)},t.toMarkup=function(){return l.escape(this.toText())},t.toText=function(){return this.text},e}(),Tt={MathNode:zt,TextNode:At,SpaceNode:function(){function e(e){this.width=void 0,this.character=void 0,this.width=e,this.character=e>=.05555&&e<=.05556?"\u200a":e>=.1666&&e<=.1667?"\u2009":e>=.2222&&e<=.2223?"\u2005":e>=.2777&&e<=.2778?"\u2005\u200a":e>=-.05556&&e<=-.05555?"\u200a\u2063":e>=-.1667&&e<=-.1666?"\u2009\u2063":e>=-.2223&&e<=-.2222?"\u205f\u2063":e>=-.2778&&e<=-.2777?"\u2005\u2063":null}var t=e.prototype;return t.toNode=function(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",V(this.width)),e},t.toMarkup=function(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+V(this.width)+'"/>'},t.toText=function(){return this.character?this.character:" "},e}(),newDocumentFragment:Mt},Bt=function(e,t,r){return!ae[t][e]||!ae[t][e].replace||55349===e.charCodeAt(0)||we.hasOwnProperty(e)&&r&&(r.fontFamily&&"tt"===r.fontFamily.substr(4,2)||r.font&&"tt"===r.font.substr(4,2))||(e=ae[t][e].replace),new Tt.TextNode(e)},Ct=function(e){return 1===e.length?e[0]:new Tt.MathNode("mrow",e)},qt=function(e,t){if("texttt"===t.fontFamily)return"monospace";if("textsf"===t.fontFamily)return"textit"===t.fontShape&&"textbf"===t.fontWeight?"sans-serif-bold-italic":"textit"===t.fontShape?"sans-serif-italic":"textbf"===t.fontWeight?"bold-sans-serif":"sans-serif";if("textit"===t.fontShape&&"textbf"===t.fontWeight)return"bold-italic";if("textit"===t.fontShape)return"italic";if("textbf"===t.fontWeight)return"bold";var r=t.font;if(!r||"mathnormal"===r)return null;var n=e.mode;if("mathit"===r)return"italic";if("boldsymbol"===r)return"textord"===e.type?"bold":"bold-italic";if("mathbf"===r)return"bold";if("mathbb"===r)return"double-struck";if("mathfrak"===r)return"fraktur";if("mathscr"===r||"mathcal"===r)return"script";if("mathsf"===r)return"sans-serif";if("mathtt"===r)return"monospace";var a=e.text;return l.contains(["\\imath","\\jmath"],a)?null:(ae[n][a]&&ae[n][a].replace&&(a=ae[n][a].replace),q(a,Ke.fontMap[r].fontName,n)?Ke.fontMap[r].variant:null)},Nt=function(e,t,r){if(1===e.length){var n=Rt(e[0],t);return r&&n instanceof zt&&"mo"===n.type&&(n.setAttribute("lspace","0em"),n.setAttribute("rspace","0em")),[n]}for(var a,i=[],o=0;o<e.length;o++){var s=Rt(e[o],t);if(s instanceof zt&&a instanceof zt){if("mtext"===s.type&&"mtext"===a.type&&s.getAttribute("mathvariant")===a.getAttribute("mathvariant")){var l;(l=a.children).push.apply(l,s.children);continue}if("mn"===s.type&&"mn"===a.type){var h;(h=a.children).push.apply(h,s.children);continue}if("mi"===s.type&&1===s.children.length&&"mn"===a.type){var m=s.children[0];if(m instanceof At&&"."===m.text){var c;(c=a.children).push.apply(c,s.children);continue}}else if("mi"===a.type&&1===a.children.length){var u=a.children[0];if(u instanceof At&&"\u0338"===u.text&&("mo"===s.type||"mi"===s.type||"mn"===s.type)){var p=s.children[0];p instanceof At&&p.text.length>0&&(p.text=p.text.slice(0,1)+"\u0338"+p.text.slice(1),i.pop())}}}i.push(s),a=s}return i},It=function(e,t,r){return Ct(Nt(e,t,r))},Rt=function(e,t){if(!e)return new Tt.MathNode("mrow");if(it[e.type])return it[e.type](e,t);throw new n("Got group of unknown type: '"+e.type+"'")};function Ot(e,t,r,n,a){var i,o=Nt(e,r);i=1===o.length&&o[0]instanceof zt&&l.contains(["mrow","mtable"],o[0].type)?o[0]:new Tt.MathNode("mrow",o);var s=new Tt.MathNode("annotation",[new Tt.TextNode(t)]);s.setAttribute("encoding","application/x-tex");var h=new Tt.MathNode("semantics",[i,s]),m=new Tt.MathNode("math",[h]);m.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&m.setAttribute("display","block");var c=a?"katex":"katex-mathml";return Ke.makeSpan([c],[m])}var Ht=function(e){return new E({style:e.displayMode?x.DISPLAY:x.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},Et=function(e,t){if(t.displayMode){var r=["katex-display"];t.leqno&&r.push("leqno"),t.fleqn&&r.push("fleqn"),e=Ke.makeSpan(r,[e])}return e},Lt={widehat:"^",widecheck:"\u02c7",widetilde:"~",utilde:"~",overleftarrow:"\u2190",underleftarrow:"\u2190",xleftarrow:"\u2190",overrightarrow:"\u2192",underrightarrow:"\u2192",xrightarrow:"\u2192",underbrace:"\u23df",overbrace:"\u23de",overgroup:"\u23e0",undergroup:"\u23e1",overleftrightarrow:"\u2194",underleftrightarrow:"\u2194",xleftrightarrow:"\u2194",Overrightarrow:"\u21d2",xRightarrow:"\u21d2",overleftharpoon:"\u21bc",xleftharpoonup:"\u21bc",overrightharpoon:"\u21c0",xrightharpoonup:"\u21c0",xLeftarrow:"\u21d0",xLeftrightarrow:"\u21d4",xhookleftarrow:"\u21a9",xhookrightarrow:"\u21aa",xmapsto:"\u21a6",xrightharpoondown:"\u21c1",xleftharpoondown:"\u21bd",xrightleftharpoons:"\u21cc",xleftrightharpoons:"\u21cb",xtwoheadleftarrow:"\u219e",xtwoheadrightarrow:"\u21a0",xlongequal:"=",xtofrom:"\u21c4",xrightleftarrows:"\u21c4",xrightequilibrium:"\u21cc",xleftequilibrium:"\u21cb","\\cdrightarrow":"\u2192","\\cdleftarrow":"\u2190","\\cdlongequal":"="},Dt={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},Pt=function(e,t,r,n,a){var i,o=e.height+e.depth+r+n;if(/fbox|color|angl/.test(t)){if(i=Ke.makeSpan(["stretchy",t],[],a),"fbox"===t){var s=a.color&&a.getColor();s&&(i.style.borderColor=s)}}else{var l=[];/^[bx]cancel$/.test(t)&&l.push(new Q({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&l.push(new Q({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var h=new K(l,{width:"100%",height:V(o)});i=Ke.makeSvgSpan([],[h],a)}return i.height=o,i.style.height=V(o),i},Ft=function(e){var t=new Tt.MathNode("mo",[new Tt.TextNode(Lt[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},Vt=function(e,t){var r=function(){var r=4e5,n=e.label.substr(1);if(l.contains(["widehat","widecheck","widetilde","utilde"],n)){var a,i,o,s="ordgroup"===(d=e.base).type?d.body.length:1;if(s>5)"widehat"===n||"widecheck"===n?(a=420,r=2364,o=.42,i=n+"4"):(a=312,r=2340,o=.34,i="tilde4");else{var h=[1,1,2,2,3,3][s];"widehat"===n||"widecheck"===n?(r=[0,1062,2364,2364,2364][h],a=[0,239,300,360,420][h],o=[0,.24,.3,.3,.36,.42][h],i=n+h):(r=[0,600,1033,2339,2340][h],a=[0,260,286,306,312][h],o=[0,.26,.286,.3,.306,.34][h],i="tilde"+h)}var m=new J(i),c=new K([m],{width:"100%",height:V(o),viewBox:"0 0 "+r+" "+a,preserveAspectRatio:"none"});return{span:Ke.makeSvgSpan([],[c],t),minWidth:0,height:o}}var u,p,d,f=[],g=Dt[n],v=g[0],b=g[1],y=g[2],x=y/1e3,w=v.length;if(1===w)u=["hide-tail"],p=[g[3]];else if(2===w)u=["halfarrow-left","halfarrow-right"],p=["xMinYMin","xMaxYMin"];else{if(3!==w)throw new Error("Correct katexImagesData or update code here to support\n "+w+" children.");u=["brace-left","brace-center","brace-right"],p=["xMinYMin","xMidYMin","xMaxYMin"]}for(var k=0;k<w;k++){var S=new J(v[k]),M=new K([S],{width:"400em",height:V(x),viewBox:"0 0 "+r+" "+y,preserveAspectRatio:p[k]+" slice"}),z=Ke.makeSvgSpan([u[k]],[M],t);if(1===w)return{span:z,minWidth:b,height:x};z.style.height=V(x),f.push(z)}return{span:Ke.makeSpan(["stretchy"],f,t),minWidth:b,height:x}}(),n=r.span,a=r.minWidth,i=r.height;return n.height=i,n.style.height=V(i),a>0&&(n.style.minWidth=V(a)),n};function Gt(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function Ut(e){var t=Yt(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function Yt(e){return e&&("atom"===e.type||re.hasOwnProperty(e.type))?e:null}var Xt=function(e,t){var r,n,a;e&&"supsub"===e.type?(r=(n=Gt(e.base,"accent")).base,e.base=r,a=function(e){if(e instanceof W)return e;throw new Error("Expected span<HtmlDomNode> but got "+String(e)+".")}(wt(e,t)),e.base=n):r=(n=Gt(e,"accent")).base;var i=wt(r,t.havingCrampedStyle()),o=0;if(n.isShifty&&l.isCharacterBox(r)){var s=l.getBaseElem(r);o=ee(wt(s,t.havingCrampedStyle())).skew}var h,m="\\c"===n.label,c=m?i.height+i.depth:Math.min(i.height,t.fontMetrics().xHeight);if(n.isStretchy)h=Vt(n,t),h=Ke.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"elem",elem:h,wrapperClasses:["svg-align"],wrapperStyle:o>0?{width:"calc(100% - "+V(2*o)+")",marginLeft:V(2*o)}:void 0}]},t);else{var u,p;"\\vec"===n.label?(u=Ke.staticSvg("vec",t),p=Ke.svgData.vec[1]):((u=ee(u=Ke.makeOrd({mode:n.mode,text:n.label},t,"textord"))).italic=0,p=u.width,m&&(c+=u.depth)),h=Ke.makeSpan(["accent-body"],[u]);var d="\\textcircled"===n.label;d&&(h.classes.push("accent-full"),c=i.height);var f=o;d||(f-=p/2),h.style.left=V(f),"\\textcircled"===n.label&&(h.style.top=".2em"),h=Ke.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:-c},{type:"elem",elem:h}]},t)}var g=Ke.makeSpan(["mord","accent"],[h],t);return a?(a.children[0]=g,a.height=Math.max(g.height,a.height),a.classes[0]="mord",a):g},Wt=function(e,t){var r=e.isStretchy?Ft(e.label):new Tt.MathNode("mo",[Bt(e.label,e.mode)]),n=new Tt.MathNode("mover",[Rt(e.base,t),r]);return n.setAttribute("accent","true"),n},_t=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map((function(e){return"\\"+e})).join("|"));ot({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:function(e,t){var r=lt(t[0]),n=!_t.test(e.funcName),a=!n||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:n,isShifty:a,base:r}},htmlBuilder:Xt,mathmlBuilder:Wt}),ot({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:function(e,t){var r=t[0],n=e.parser.mode;return"math"===n&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:e.funcName,isStretchy:!1,isShifty:!0,base:r}},htmlBuilder:Xt,mathmlBuilder:Wt}),ot({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:function(e,t){var r=e.parser,n=e.funcName,a=t[0];return{type:"accentUnder",mode:r.mode,label:n,base:a}},htmlBuilder:function(e,t){var r=wt(e.base,t),n=Vt(e,t),a="\\utilde"===e.label?.12:0,i=Ke.makeVList({positionType:"top",positionData:r.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:a},{type:"elem",elem:r}]},t);return Ke.makeSpan(["mord","accentunder"],[i],t)},mathmlBuilder:function(e,t){var r=Ft(e.label),n=new Tt.MathNode("munder",[Rt(e.base,t),r]);return n.setAttribute("accentunder","true"),n}});var jt=function(e){var t=new Tt.MathNode("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};ot({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler:function(e,t,r){var n=e.parser,a=e.funcName;return{type:"xArrow",mode:n.mode,label:a,body:t[0],below:r[0]}},htmlBuilder:function(e,t){var r,n=t.style,a=t.havingStyle(n.sup()),i=Ke.wrapFragment(wt(e.body,a,t),t),o="\\x"===e.label.slice(0,2)?"x":"cd";i.classes.push(o+"-arrow-pad"),e.below&&(a=t.havingStyle(n.sub()),(r=Ke.wrapFragment(wt(e.below,a,t),t)).classes.push(o+"-arrow-pad"));var s,l=Vt(e,t),h=-t.fontMetrics().axisHeight+.5*l.height,m=-t.fontMetrics().axisHeight-.5*l.height-.111;if((i.depth>.25||"\\xleftequilibrium"===e.label)&&(m-=i.depth),r){var c=-t.fontMetrics().axisHeight+r.height+.5*l.height+.111;s=Ke.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:m},{type:"elem",elem:l,shift:h},{type:"elem",elem:r,shift:c}]},t)}else s=Ke.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:m},{type:"elem",elem:l,shift:h}]},t);return s.children[0].children[0].children[1].classes.push("svg-align"),Ke.makeSpan(["mrel","x-arrow"],[s],t)},mathmlBuilder:function(e,t){var r,n=Ft(e.label);if(n.setAttribute("minsize","x"===e.label.charAt(0)?"1.75em":"3.0em"),e.body){var a=jt(Rt(e.body,t));if(e.below){var i=jt(Rt(e.below,t));r=new Tt.MathNode("munderover",[n,i,a])}else r=new Tt.MathNode("mover",[n,a])}else if(e.below){var o=jt(Rt(e.below,t));r=new Tt.MathNode("munder",[n,o])}else r=jt(),r=new Tt.MathNode("mover",[n,r]);return r}});var $t={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Zt=function(e){return"textord"===e.type&&"@"===e.text};function Kt(e,t,r){var n=$t[e];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(n,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":var a={type:"atom",text:n,mode:"math",family:"rel"},i={type:"ordgroup",mode:"math",body:[r.callFunction("\\\\cdleft",[t[0]],[]),r.callFunction("\\Big",[a],[]),r.callFunction("\\\\cdright",[t[1]],[])]};return r.callFunction("\\\\cdparent",[i],[]);case"\\\\cdlongequal":return r.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":return r.callFunction("\\Big",[{type:"textord",text:"\\Vert",mode:"math"}],[]);default:return{type:"textord",text:" ",mode:"math"}}}ot({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler:function(e,t){var r=e.parser,n=e.funcName;return{type:"cdlabel",mode:r.mode,side:n.slice(4),label:t[0]}},htmlBuilder:function(e,t){var r=t.havingStyle(t.style.sup()),n=Ke.wrapFragment(wt(e.label,r,t),t);return n.classes.push("cd-label-"+e.side),n.style.bottom=V(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder:function(e,t){var r=new Tt.MathNode("mrow",[Rt(e.label,t)]);return(r=new Tt.MathNode("mpadded",[r])).setAttribute("width","0"),"left"===e.side&&r.setAttribute("lspace","-1width"),r.setAttribute("voffset","0.7em"),(r=new Tt.MathNode("mstyle",[r])).setAttribute("displaystyle","false"),r.setAttribute("scriptlevel","1"),r}}),ot({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler:function(e,t){return{type:"cdlabelparent",mode:e.parser.mode,fragment:t[0]}},htmlBuilder:function(e,t){var r=Ke.wrapFragment(wt(e.fragment,t),t);return r.classes.push("cd-vert-arrow"),r},mathmlBuilder:function(e,t){return new Tt.MathNode("mrow",[Rt(e.fragment,t)])}}),ot({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){for(var r=e.parser,a=Gt(t[0],"ordgroup").body,i="",o=0;o<a.length;o++)i+=Gt(a[o],"textord").text;var s,l=parseInt(i);if(isNaN(l))throw new n("\\@char has non-numeric argument "+i);if(l<0||l>=1114111)throw new n("\\@char with invalid code point "+i);return l<=65535?s=String.fromCharCode(l):(l-=65536,s=String.fromCharCode(55296+(l>>10),56320+(1023&l))),{type:"textord",mode:r.mode,text:s}}});var Jt=function(e,t){var r=ft(e.body,t.withColor(e.color),!1);return Ke.makeFragment(r)},Qt=function(e,t){var r=Nt(e.body,t.withColor(e.color)),n=new Tt.MathNode("mstyle",r);return n.setAttribute("mathcolor",e.color),n};ot({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler:function(e,t){var r=e.parser,n=Gt(t[0],"color-token").color,a=t[1];return{type:"color",mode:r.mode,color:n,body:ht(a)}},htmlBuilder:Jt,mathmlBuilder:Qt}),ot({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler:function(e,t){var r=e.parser,n=e.breakOnTokenText,a=Gt(t[0],"color-token").color;r.gullet.macros.set("\\current@color",a);var i=r.parseExpression(!0,n);return{type:"color",mode:r.mode,color:a,body:i}},htmlBuilder:Jt,mathmlBuilder:Qt}),ot({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:1,argTypes:["size"],allowedInText:!0},handler:function(e,t,r){var n=e.parser,a=r[0],i=!n.settings.displayMode||!n.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:n.mode,newLine:i,size:a&&Gt(a,"size").value}},htmlBuilder:function(e,t){var r=Ke.makeSpan(["mspace"],[],t);return e.newLine&&(r.classes.push("newline"),e.size&&(r.style.marginTop=V(F(e.size,t)))),r},mathmlBuilder:function(e,t){var r=new Tt.MathNode("mspace");return e.newLine&&(r.setAttribute("linebreak","newline"),e.size&&r.setAttribute("height",V(F(e.size,t)))),r}});var er={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},tr=function(e){var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new n("Expected a control sequence",e);return t},rr=function(e,t,r,n){var a=e.gullet.macros.get(r.text);null==a&&(r.noexpand=!0,a={tokens:[r],numArgs:0,unexpandable:!e.gullet.isExpandable(r.text)}),e.gullet.macros.set(t,a,n)};ot({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler:function(e){var t=e.parser,r=e.funcName;t.consumeSpaces();var a=t.fetch();if(er[a.text])return"\\global"!==r&&"\\\\globallong"!==r||(a.text=er[a.text]),Gt(t.parseFunction(),"internal");throw new n("Invalid token after macro prefix",a)}}),ot({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler:function(e){var t=e.parser,r=e.funcName,a=t.gullet.popToken(),i=a.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new n("Expected a control sequence",a);for(var o,s=0,l=[[]];"{"!==t.gullet.future().text;)if("#"===(a=t.gullet.popToken()).text){if("{"===t.gullet.future().text){o=t.gullet.future(),l[s].push("{");break}if(a=t.gullet.popToken(),!/^[1-9]$/.test(a.text))throw new n('Invalid argument number "'+a.text+'"');if(parseInt(a.text)!==s+1)throw new n('Argument number "'+a.text+'" out of order');s++,l.push([])}else{if("EOF"===a.text)throw new n("Expected a macro definition");l[s].push(a.text)}var h=t.gullet.consumeArg().tokens;return o&&h.unshift(o),"\\edef"!==r&&"\\xdef"!==r||(h=t.gullet.expandTokens(h)).reverse(),t.gullet.macros.set(i,{tokens:h,numArgs:s,delimiters:l},r===er[r]),{type:"internal",mode:t.mode}}}),ot({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler:function(e){var t=e.parser,r=e.funcName,n=tr(t.gullet.popToken());t.gullet.consumeSpaces();var a=function(e){var t=e.gullet.popToken();return"="===t.text&&" "===(t=e.gullet.popToken()).text&&(t=e.gullet.popToken()),t}(t);return rr(t,n,a,"\\\\globallet"===r),{type:"internal",mode:t.mode}}}),ot({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler:function(e){var t=e.parser,r=e.funcName,n=tr(t.gullet.popToken()),a=t.gullet.popToken(),i=t.gullet.popToken();return rr(t,n,i,"\\\\globalfuture"===r),t.gullet.pushToken(i),t.gullet.pushToken(a),{type:"internal",mode:t.mode}}});var nr=function(e,t,r){var n=q(ae.math[e]&&ae.math[e].replace||e,t,r);if(!n)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return n},ar=function(e,t,r,n){var a=r.havingBaseStyle(t),i=Ke.makeSpan(n.concat(a.sizingClasses(r)),[e],r),o=a.sizeMultiplier/r.sizeMultiplier;return i.height*=o,i.depth*=o,i.maxFontSize=a.sizeMultiplier,i},ir=function(e,t,r){var n=t.havingBaseStyle(r),a=(1-t.sizeMultiplier/n.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=V(a),e.height-=a,e.depth+=a},or=function(e,t,r,n,a,i){var o=function(e,t,r,n){return Ke.makeSymbol(e,"Size"+t+"-Regular",r,n)}(e,t,a,n),s=ar(Ke.makeSpan(["delimsizing","size"+t],[o],n),x.TEXT,n,i);return r&&ir(s,n,x.TEXT),s},sr=function(e,t,r){var n;return n="Size1-Regular"===t?"delim-size1":"delim-size4",{type:"elem",elem:Ke.makeSpan(["delimsizinginner",n],[Ke.makeSpan([],[Ke.makeSymbol(e,t,r)])])}},lr=function(e,t,r){var n=T["Size4-Regular"][e.charCodeAt(0)]?T["Size4-Regular"][e.charCodeAt(0)][4]:T["Size1-Regular"][e.charCodeAt(0)][4],a=new J("inner",function(e,t){switch(e){case"\u239c":return"M291 0 H417 V"+t+" H291z M291 0 H417 V"+t+" H291z";case"\u2223":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z";case"\u2225":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145zM367 0 H410 V"+t+" H367z M367 0 H410 V"+t+" H367z";case"\u239f":return"M457 0 H583 V"+t+" H457z M457 0 H583 V"+t+" H457z";case"\u23a2":return"M319 0 H403 V"+t+" H319z M319 0 H403 V"+t+" H319z";case"\u23a5":return"M263 0 H347 V"+t+" H263z M263 0 H347 V"+t+" H263z";case"\u23aa":return"M384 0 H504 V"+t+" H384z M384 0 H504 V"+t+" H384z";case"\u23d0":return"M312 0 H355 V"+t+" H312z M312 0 H355 V"+t+" H312z";case"\u2016":return"M257 0 H300 V"+t+" H257z M257 0 H300 V"+t+" H257zM478 0 H521 V"+t+" H478z M478 0 H521 V"+t+" H478z";default:return""}}(e,Math.round(1e3*t))),i=new K([a],{width:V(n),height:V(t),style:"width:"+V(n),viewBox:"0 0 "+1e3*n+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),o=Ke.makeSvgSpan([],[i],r);return o.height=t,o.style.height=V(t),o.style.width=V(n),{type:"elem",elem:o}},hr={type:"kern",size:-.008},mr=["|","\\lvert","\\rvert","\\vert"],cr=["\\|","\\lVert","\\rVert","\\Vert"],ur=function(e,t,r,n,a,i){var o,s,h,m;o=h=m=e,s=null;var c="Size1-Regular";"\\uparrow"===e?h=m="\u23d0":"\\Uparrow"===e?h=m="\u2016":"\\downarrow"===e?o=h="\u23d0":"\\Downarrow"===e?o=h="\u2016":"\\updownarrow"===e?(o="\\uparrow",h="\u23d0",m="\\downarrow"):"\\Updownarrow"===e?(o="\\Uparrow",h="\u2016",m="\\Downarrow"):l.contains(mr,e)?h="\u2223":l.contains(cr,e)?h="\u2225":"["===e||"\\lbrack"===e?(o="\u23a1",h="\u23a2",m="\u23a3",c="Size4-Regular"):"]"===e||"\\rbrack"===e?(o="\u23a4",h="\u23a5",m="\u23a6",c="Size4-Regular"):"\\lfloor"===e||"\u230a"===e?(h=o="\u23a2",m="\u23a3",c="Size4-Regular"):"\\lceil"===e||"\u2308"===e?(o="\u23a1",h=m="\u23a2",c="Size4-Regular"):"\\rfloor"===e||"\u230b"===e?(h=o="\u23a5",m="\u23a6",c="Size4-Regular"):"\\rceil"===e||"\u2309"===e?(o="\u23a4",h=m="\u23a5",c="Size4-Regular"):"("===e||"\\lparen"===e?(o="\u239b",h="\u239c",m="\u239d",c="Size4-Regular"):")"===e||"\\rparen"===e?(o="\u239e",h="\u239f",m="\u23a0",c="Size4-Regular"):"\\{"===e||"\\lbrace"===e?(o="\u23a7",s="\u23a8",m="\u23a9",h="\u23aa",c="Size4-Regular"):"\\}"===e||"\\rbrace"===e?(o="\u23ab",s="\u23ac",m="\u23ad",h="\u23aa",c="Size4-Regular"):"\\lgroup"===e||"\u27ee"===e?(o="\u23a7",m="\u23a9",h="\u23aa",c="Size4-Regular"):"\\rgroup"===e||"\u27ef"===e?(o="\u23ab",m="\u23ad",h="\u23aa",c="Size4-Regular"):"\\lmoustache"===e||"\u23b0"===e?(o="\u23a7",m="\u23ad",h="\u23aa",c="Size4-Regular"):"\\rmoustache"!==e&&"\u23b1"!==e||(o="\u23ab",m="\u23a9",h="\u23aa",c="Size4-Regular");var u=nr(o,c,a),p=u.height+u.depth,d=nr(h,c,a),f=d.height+d.depth,g=nr(m,c,a),v=g.height+g.depth,b=0,y=1;if(null!==s){var w=nr(s,c,a);b=w.height+w.depth,y=2}var k=p+v+b,S=k+Math.max(0,Math.ceil((t-k)/(y*f)))*y*f,M=n.fontMetrics().axisHeight;r&&(M*=n.sizeMultiplier);var z=S/2-M,A=[];if(A.push(sr(m,c,a)),A.push(hr),null===s){var T=S-p-v+.016;A.push(lr(h,T,n))}else{var B=(S-p-v-b)/2+.016;A.push(lr(h,B,n)),A.push(hr),A.push(sr(s,c,a)),A.push(hr),A.push(lr(h,B,n))}A.push(hr),A.push(sr(o,c,a));var C=n.havingBaseStyle(x.TEXT),q=Ke.makeVList({positionType:"bottom",positionData:z,children:A},C);return ar(Ke.makeSpan(["delimsizing","mult"],[q],C),x.TEXT,n,i)},pr=.08,dr=function(e,t,r,n,a){var i=function(e,t,r){t*=1e3;var n="";switch(e){case"sqrtMain":n=function(e,t){return"M95,"+(622+e+t)+"\nc-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14\nc0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54\nc44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10\ns173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429\nc69,-144,104.5,-217.7,106.5,-221\nl"+e/2.075+" -"+e+"\nc5.3,-9.3,12,-14,20,-14\nH400000v"+(40+e)+"H845.2724\ns-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7\nc-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z\nM"+(834+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,M);break;case"sqrtSize1":n=function(e,t){return"M263,"+(601+e+t)+"c0.7,0,18,39.7,52,119\nc34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120\nc340,-704.7,510.7,-1060.3,512,-1067\nl"+e/2.084+" -"+e+"\nc4.7,-7.3,11,-11,19,-11\nH40000v"+(40+e)+"H1012.3\ns-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232\nc-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1\ns-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26\nc-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,M);break;case"sqrtSize2":n=function(e,t){return"M983 "+(10+e+t)+"\nl"+e/3.13+" -"+e+"\nc4,-6.7,10,-10,18,-10 H400000v"+(40+e)+"\nH1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7\ns-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744\nc-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30\nc26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722\nc56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5\nc53.7,-170.3,84.5,-266.8,92.5,-289.5z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,M);break;case"sqrtSize3":n=function(e,t){return"M424,"+(2398+e+t)+"\nc-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514\nc0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20\ns-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121\ns209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081\nl"+e/4.223+" -"+e+"c4,-6.7,10,-10,18,-10 H400000\nv"+(40+e)+"H1014.6\ns-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185\nc-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2z M"+(1001+e)+" "+t+"\nh400000v"+(40+e)+"h-400000z"}(t,M);break;case"sqrtSize4":n=function(e,t){return"M473,"+(2713+e+t)+"\nc339.3,-1799.3,509.3,-2700,510,-2702 l"+e/5.298+" -"+e+"\nc3.3,-7.3,9.3,-11,18,-11 H400000v"+(40+e)+"H1017.7\ns-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200\nc0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26\ns76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,\n606zM"+(1001+e)+" "+t+"h400000v"+(40+e)+"H1017.7z"}(t,M);break;case"sqrtTall":n=function(e,t,r){return"M702 "+(e+t)+"H400000"+(40+e)+"\nH742v"+(r-54-t-e)+"l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1\nh-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170\nc-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667\n219 661 l218 661zM702 "+t+"H400000v"+(40+e)+"H742z"}(t,M,r)}return n}(e,n,r),o=new J(e,i),s=new K([o],{width:"400em",height:V(t),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return Ke.makeSvgSpan(["hide-tail"],[s],a)},fr=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230a","\u230b","\\lceil","\\rceil","\u2308","\u2309","\\surd"],gr=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27ee","\u27ef","\\lmoustache","\\rmoustache","\u23b0","\u23b1"],vr=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],br=[0,1.2,1.8,2.4,3],yr=[{type:"small",style:x.SCRIPTSCRIPT},{type:"small",style:x.SCRIPT},{type:"small",style:x.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],xr=[{type:"small",style:x.SCRIPTSCRIPT},{type:"small",style:x.SCRIPT},{type:"small",style:x.TEXT},{type:"stack"}],wr=[{type:"small",style:x.SCRIPTSCRIPT},{type:"small",style:x.SCRIPT},{type:"small",style:x.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],kr=function(e){if("small"===e.type)return"Main-Regular";if("large"===e.type)return"Size"+e.size+"-Regular";if("stack"===e.type)return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},Sr=function(e,t,r,n){for(var a=Math.min(2,3-n.style.size);a<r.length&&"stack"!==r[a].type;a++){var i=nr(e,kr(r[a]),"math"),o=i.height+i.depth;if("small"===r[a].type&&(o*=n.havingBaseStyle(r[a].style).sizeMultiplier),o>t)return r[a]}return r[r.length-1]},Mr=function(e,t,r,n,a,i){var o;"<"===e||"\\lt"===e||"\u27e8"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"\u27e9"!==e||(e="\\rangle"),o=l.contains(vr,e)?yr:l.contains(fr,e)?wr:xr;var s=Sr(e,t,o,n);return"small"===s.type?function(e,t,r,n,a,i){var o=Ke.makeSymbol(e,"Main-Regular",a,n),s=ar(o,t,n,i);return r&&ir(s,n,t),s}(e,s.style,r,n,a,i):"large"===s.type?or(e,s.size,r,n,a,i):ur(e,t,r,n,a,i)},zr={sqrtImage:function(e,t){var r,n,a=t.havingBaseSizing(),i=Sr("\\surd",e*a.sizeMultiplier,wr,a),o=a.sizeMultiplier,s=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),l=0,h=0,m=0;return"small"===i.type?(e<1?o=1:e<1.4&&(o=.7),h=(1+s)/o,(r=dr("sqrtMain",l=(1+s+pr)/o,m=1e3+1e3*s+80,s,t)).style.minWidth="0.853em",n=.833/o):"large"===i.type?(m=1080*br[i.size],h=(br[i.size]+s)/o,l=(br[i.size]+s+pr)/o,(r=dr("sqrtSize"+i.size,l,m,s,t)).style.minWidth="1.02em",n=1/o):(l=e+s+pr,h=e+s,m=Math.floor(1e3*e+s)+80,(r=dr("sqrtTall",l,m,s,t)).style.minWidth="0.742em",n=1.056),r.height=h,r.style.height=V(l),{span:r,advanceWidth:n,ruleWidth:(t.fontMetrics().sqrtRuleThickness+s)*o}},sizedDelim:function(e,t,r,a,i){if("<"===e||"\\lt"===e||"\u27e8"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"\u27e9"!==e||(e="\\rangle"),l.contains(fr,e)||l.contains(vr,e))return or(e,t,!1,r,a,i);if(l.contains(gr,e))return ur(e,br[t],!1,r,a,i);throw new n("Illegal delimiter: '"+e+"'")},sizeToMaxHeight:br,customSizedDelim:Mr,leftRightDelim:function(e,t,r,n,a,i){var o=n.fontMetrics().axisHeight*n.sizeMultiplier,s=5/n.fontMetrics().ptPerEm,l=Math.max(t-o,r+o),h=Math.max(l/500*901,2*l-s);return Mr(e,h,!0,n,a,i)}},Ar={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},Tr=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230a","\u230b","\\lceil","\\rceil","\u2308","\u2309","<",">","\\langle","\u27e8","\\rangle","\u27e9","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27ee","\u27ef","\\lmoustache","\\rmoustache","\u23b0","\u23b1","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function Br(e,t){var r=Yt(e);if(r&&l.contains(Tr,r.text))return r;throw new n(r?"Invalid delimiter '"+r.text+"' after '"+t.funcName+"'":"Invalid delimiter type '"+e.type+"'",e)}function Cr(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}ot({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:function(e,t){var r=Br(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:Ar[e.funcName].size,mclass:Ar[e.funcName].mclass,delim:r.text}},htmlBuilder:function(e,t){return"."===e.delim?Ke.makeSpan([e.mclass]):zr.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass])},mathmlBuilder:function(e){var t=[];"."!==e.delim&&t.push(Bt(e.delim,e.mode));var r=new Tt.MathNode("mo",t);"mopen"===e.mclass||"mclose"===e.mclass?r.setAttribute("fence","true"):r.setAttribute("fence","false"),r.setAttribute("stretchy","true");var n=V(zr.sizeToMaxHeight[e.size]);return r.setAttribute("minsize",n),r.setAttribute("maxsize",n),r}}),ot({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:function(e,t){var r=e.parser.gullet.macros.get("\\current@color");if(r&&"string"!==typeof r)throw new n("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:Br(t[0],e).text,color:r}}}),ot({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:function(e,t){var r=Br(t[0],e),n=e.parser;++n.leftrightDepth;var a=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var i=Gt(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:a,left:r.text,right:i.delim,rightColor:i.color}},htmlBuilder:function(e,t){Cr(e);for(var r,n,a=ft(e.body,t,!0,["mopen","mclose"]),i=0,o=0,s=!1,l=0;l<a.length;l++)a[l].isMiddle?s=!0:(i=Math.max(a[l].height,i),o=Math.max(a[l].depth,o));if(i*=t.sizeMultiplier,o*=t.sizeMultiplier,r="."===e.left?xt(t,["mopen"]):zr.leftRightDelim(e.left,i,o,t,e.mode,["mopen"]),a.unshift(r),s)for(var h=1;h<a.length;h++){var m=a[h].isMiddle;m&&(a[h]=zr.leftRightDelim(m.delim,i,o,m.options,e.mode,[]))}if("."===e.right)n=xt(t,["mclose"]);else{var c=e.rightColor?t.withColor(e.rightColor):t;n=zr.leftRightDelim(e.right,i,o,c,e.mode,["mclose"])}return a.push(n),Ke.makeSpan(["minner"],a,t)},mathmlBuilder:function(e,t){Cr(e);var r=Nt(e.body,t);if("."!==e.left){var n=new Tt.MathNode("mo",[Bt(e.left,e.mode)]);n.setAttribute("fence","true"),r.unshift(n)}if("."!==e.right){var a=new Tt.MathNode("mo",[Bt(e.right,e.mode)]);a.setAttribute("fence","true"),e.rightColor&&a.setAttribute("mathcolor",e.rightColor),r.push(a)}return Ct(r)}}),ot({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:function(e,t){var r=Br(t[0],e);if(!e.parser.leftrightDepth)throw new n("\\middle without preceding \\left",r);return{type:"middle",mode:e.parser.mode,delim:r.text}},htmlBuilder:function(e,t){var r;if("."===e.delim)r=xt(t,[]);else{r=zr.sizedDelim(e.delim,1,t,e.mode,[]);var n={delim:e.delim,options:t};r.isMiddle=n}return r},mathmlBuilder:function(e,t){var r="\\vert"===e.delim||"|"===e.delim?Bt("|","text"):Bt(e.delim,e.mode),n=new Tt.MathNode("mo",[r]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n}});var qr=function(e,t){var r,n,a,i=Ke.wrapFragment(wt(e.body,t),t),o=e.label.substr(1),s=t.sizeMultiplier,h=0,m=l.isCharacterBox(e.body);if("sout"===o)(r=Ke.makeSpan(["stretchy","sout"])).height=t.fontMetrics().defaultRuleThickness/s,h=-.5*t.fontMetrics().xHeight;else if("phase"===o){var c=F({number:.6,unit:"pt"},t),u=F({number:.35,unit:"ex"},t);s/=t.havingBaseSizing().sizeMultiplier;var p=i.height+i.depth+c+u;i.style.paddingLeft=V(p/2+c);var d=Math.floor(1e3*p*s),f="M400000 "+(n=d)+" H0 L"+n/2+" 0 l65 45 L145 "+(n-80)+" H400000z",g=new K([new J("phase",f)],{width:"400em",height:V(d/1e3),viewBox:"0 0 400000 "+d,preserveAspectRatio:"xMinYMin slice"});(r=Ke.makeSvgSpan(["hide-tail"],[g],t)).style.height=V(p),h=i.depth+c+u}else{/cancel/.test(o)?m||i.classes.push("cancel-pad"):"angl"===o?i.classes.push("anglpad"):i.classes.push("boxpad");var v=0,b=0,y=0;/box/.test(o)?(y=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),b=v=t.fontMetrics().fboxsep+("colorbox"===o?0:y)):"angl"===o?(v=4*(y=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness)),b=Math.max(0,.25-i.depth)):b=v=m?.2:0,r=Pt(i,o,v,b,t),/fbox|boxed|fcolorbox/.test(o)?(r.style.borderStyle="solid",r.style.borderWidth=V(y)):"angl"===o&&.049!==y&&(r.style.borderTopWidth=V(y),r.style.borderRightWidth=V(y)),h=i.depth+b,e.backgroundColor&&(r.style.backgroundColor=e.backgroundColor,e.borderColor&&(r.style.borderColor=e.borderColor))}if(e.backgroundColor)a=Ke.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:h},{type:"elem",elem:i,shift:0}]},t);else{var x=/cancel|phase/.test(o)?["svg-align"]:[];a=Ke.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:0},{type:"elem",elem:r,shift:h,wrapperClasses:x}]},t)}return/cancel/.test(o)&&(a.height=i.height,a.depth=i.depth),/cancel/.test(o)&&!m?Ke.makeSpan(["mord","cancel-lap"],[a],t):Ke.makeSpan(["mord"],[a],t)},Nr=function(e,t){var r=0,n=new Tt.MathNode(e.label.indexOf("colorbox")>-1?"mpadded":"menclose",[Rt(e.body,t)]);switch(e.label){case"\\cancel":n.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":n.setAttribute("notation","downdiagonalstrike");break;case"\\phase":n.setAttribute("notation","phasorangle");break;case"\\sout":n.setAttribute("notation","horizontalstrike");break;case"\\fbox":n.setAttribute("notation","box");break;case"\\angl":n.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(r=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*r+"pt"),n.setAttribute("height","+"+2*r+"pt"),n.setAttribute("lspace",r+"pt"),n.setAttribute("voffset",r+"pt"),"\\fcolorbox"===e.label){var a=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);n.setAttribute("style","border: "+a+"em solid "+String(e.borderColor))}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return e.backgroundColor&&n.setAttribute("mathbackground",e.backgroundColor),n};ot({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler:function(e,t,r){var n=e.parser,a=e.funcName,i=Gt(t[0],"color-token").color,o=t[1];return{type:"enclose",mode:n.mode,label:a,backgroundColor:i,body:o}},htmlBuilder:qr,mathmlBuilder:Nr}),ot({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler:function(e,t,r){var n=e.parser,a=e.funcName,i=Gt(t[0],"color-token").color,o=Gt(t[1],"color-token").color,s=t[2];return{type:"enclose",mode:n.mode,label:a,backgroundColor:o,borderColor:i,body:s}},htmlBuilder:qr,mathmlBuilder:Nr}),ot({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler:function(e,t){return{type:"enclose",mode:e.parser.mode,label:"\\fbox",body:t[0]}}}),ot({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler:function(e,t){var r=e.parser,n=e.funcName,a=t[0];return{type:"enclose",mode:r.mode,label:n,body:a}},htmlBuilder:qr,mathmlBuilder:Nr}),ot({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler:function(e,t){return{type:"enclose",mode:e.parser.mode,label:"\\angl",body:t[0]}}});var Ir={};function Rr(e){for(var t=e.type,r=e.names,n=e.props,a=e.handler,i=e.htmlBuilder,o=e.mathmlBuilder,s={type:t,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:a},l=0;l<r.length;++l)Ir[r[l]]=s;i&&(at[t]=i),o&&(it[t]=o)}var Or={};function Hr(e,t){Or[e]=t}var Er=function(){function e(e,t,r){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=r}return e.range=function(t,r){return r?t&&t.loc&&r.loc&&t.loc.lexer===r.loc.lexer?new e(t.loc.lexer,t.loc.start,r.loc.end):null:t&&t.loc},e}(),Lr=function(){function e(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}return e.prototype.range=function(t,r){return new e(r,Er.range(this,t))},e}();function Dr(e){var t=[];e.consumeSpaces();for(var r=e.fetch().text;"\\hline"===r||"\\hdashline"===r;)e.consume(),t.push("\\hdashline"===r),e.consumeSpaces(),r=e.fetch().text;return t}var Pr=function(e){if(!e.parser.settings.displayMode)throw new n("{"+e.envName+"} can be used only in display mode.")};function Fr(e){if(-1===e.indexOf("ed"))return-1===e.indexOf("*")}function Vr(e,t,r){var a=t.hskipBeforeAndAfter,i=t.addJot,o=t.cols,s=t.arraystretch,l=t.colSeparationType,h=t.autoTag,m=t.singleRow,c=t.emptySingleRow,u=t.maxNumCols,p=t.leqno;if(e.gullet.beginGroup(),m||e.gullet.macros.set("\\cr","\\\\\\relax"),!s){var d=e.gullet.expandMacroAsText("\\arraystretch");if(null==d)s=1;else if(!(s=parseFloat(d))||s<0)throw new n("Invalid \\arraystretch: "+d)}e.gullet.beginGroup();var f=[],g=[f],v=[],b=[],y=null!=h?[]:void 0;function x(){h&&e.gullet.macros.set("\\@eqnsw","1",!0)}function w(){y&&(e.gullet.macros.get("\\df@tag")?(y.push(e.subparse([new Lr("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):y.push(Boolean(h)&&"1"===e.gullet.macros.get("\\@eqnsw")))}for(x(),b.push(Dr(e));;){var k=e.parseExpression(!1,m?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup(),k={type:"ordgroup",mode:e.mode,body:k},r&&(k={type:"styling",mode:e.mode,style:r,body:[k]}),f.push(k);var S=e.fetch().text;if("&"===S){if(u&&f.length===u){if(m||l)throw new n("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else{if("\\end"===S){w(),1===f.length&&"styling"===k.type&&0===k.body[0].body.length&&(g.length>1||!c)&&g.pop(),b.length<g.length+1&&b.push([]);break}if("\\\\"!==S)throw new n("Expected & or \\\\ or \\cr or \\end",e.nextToken);e.consume();var M=void 0;" "!==e.gullet.future().text&&(M=e.parseSizeGroup(!0)),v.push(M?M.value:null),w(),b.push(Dr(e)),f=[],g.push(f),x()}}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:e.mode,addJot:i,arraystretch:s,body:g,cols:o,rowGaps:v,hskipBeforeAndAfter:a,hLinesBeforeRow:b,colSeparationType:l,tags:y,leqno:p}}function Gr(e){return"d"===e.substr(0,1)?"display":"text"}var Ur=function(e,t){var r,a,i=e.body.length,o=e.hLinesBeforeRow,s=0,h=new Array(i),m=[],c=Math.max(t.fontMetrics().arrayRuleWidth,t.minRuleThickness),u=1/t.fontMetrics().ptPerEm,p=5*u;e.colSeparationType&&"small"===e.colSeparationType&&(p=t.havingStyle(x.SCRIPT).sizeMultiplier/t.sizeMultiplier*.2778);var d="CD"===e.colSeparationType?F({number:3,unit:"ex"},t):12*u,f=3*u,g=e.arraystretch*d,v=.7*g,b=.3*g,y=0;function w(e){for(var t=0;t<e.length;++t)t>0&&(y+=.25),m.push({pos:y,isDashed:e[t]})}for(w(o[0]),r=0;r<e.body.length;++r){var k=e.body[r],S=v,M=b;s<k.length&&(s=k.length);var z=new Array(k.length);for(a=0;a<k.length;++a){var A=wt(k[a],t);M<A.depth&&(M=A.depth),S<A.height&&(S=A.height),z[a]=A}var T=e.rowGaps[r],B=0;T&&(B=F(T,t))>0&&(M<(B+=b)&&(M=B),B=0),e.addJot&&(M+=f),z.height=S,z.depth=M,y+=S,z.pos=y,y+=M+B,h[r]=z,w(o[r+1])}var C,q,N=y/2+t.fontMetrics().axisHeight,I=e.cols||[],R=[],O=[];if(e.tags&&e.tags.some((function(e){return e})))for(r=0;r<i;++r){var H=h[r],E=H.pos-N,L=e.tags[r],D=void 0;(D=!0===L?Ke.makeSpan(["eqn-num"],[],t):!1===L?Ke.makeSpan([],[],t):Ke.makeSpan([],ft(L,t,!0),t)).depth=H.depth,D.height=H.height,O.push({type:"elem",elem:D,shift:E})}for(a=0,q=0;a<s||q<I.length;++a,++q){for(var P=I[q]||{},G=!0;"separator"===P.type;){if(G||((C=Ke.makeSpan(["arraycolsep"],[])).style.width=V(t.fontMetrics().doubleRuleSep),R.push(C)),"|"!==P.separator&&":"!==P.separator)throw new n("Invalid separator type: "+P.separator);var U="|"===P.separator?"solid":"dashed",Y=Ke.makeSpan(["vertical-separator"],[],t);Y.style.height=V(y),Y.style.borderRightWidth=V(c),Y.style.borderRightStyle=U,Y.style.margin="0 "+V(-c/2);var X=y-N;X&&(Y.style.verticalAlign=V(-X)),R.push(Y),P=I[++q]||{},G=!1}if(!(a>=s)){var W=void 0;(a>0||e.hskipBeforeAndAfter)&&0!==(W=l.deflt(P.pregap,p))&&((C=Ke.makeSpan(["arraycolsep"],[])).style.width=V(W),R.push(C));var _=[];for(r=0;r<i;++r){var j=h[r],$=j[a];if($){var Z=j.pos-N;$.depth=j.depth,$.height=j.height,_.push({type:"elem",elem:$,shift:Z})}}_=Ke.makeVList({positionType:"individualShift",children:_},t),_=Ke.makeSpan(["col-align-"+(P.align||"c")],[_]),R.push(_),(a<s-1||e.hskipBeforeAndAfter)&&0!==(W=l.deflt(P.postgap,p))&&((C=Ke.makeSpan(["arraycolsep"],[])).style.width=V(W),R.push(C))}}if(h=Ke.makeSpan(["mtable"],R),m.length>0){for(var K=Ke.makeLineSpan("hline",t,c),J=Ke.makeLineSpan("hdashline",t,c),Q=[{type:"elem",elem:h,shift:0}];m.length>0;){var ee=m.pop(),te=ee.pos-N;ee.isDashed?Q.push({type:"elem",elem:J,shift:te}):Q.push({type:"elem",elem:K,shift:te})}h=Ke.makeVList({positionType:"individualShift",children:Q},t)}if(0===O.length)return Ke.makeSpan(["mord"],[h],t);var re=Ke.makeVList({positionType:"individualShift",children:O},t);return re=Ke.makeSpan(["tag"],[re],t),Ke.makeFragment([h,re])},Yr={c:"center ",l:"left ",r:"right "},Xr=function(e,t){for(var r=[],n=new Tt.MathNode("mtd",[],["mtr-glue"]),a=new Tt.MathNode("mtd",[],["mml-eqn-num"]),i=0;i<e.body.length;i++){for(var o=e.body[i],s=[],l=0;l<o.length;l++)s.push(new Tt.MathNode("mtd",[Rt(o[l],t)]));e.tags&&e.tags[i]&&(s.unshift(n),s.push(n),e.leqno?s.unshift(a):s.push(a)),r.push(new Tt.MathNode("mtr",s))}var h=new Tt.MathNode("mtable",r),m=.5===e.arraystretch?.1:.16+e.arraystretch-1+(e.addJot?.09:0);h.setAttribute("rowspacing",V(m));var c="",u="";if(e.cols&&e.cols.length>0){var p=e.cols,d="",f=!1,g=0,v=p.length;"separator"===p[0].type&&(c+="top ",g=1),"separator"===p[p.length-1].type&&(c+="bottom ",v-=1);for(var b=g;b<v;b++)"align"===p[b].type?(u+=Yr[p[b].align],f&&(d+="none "),f=!0):"separator"===p[b].type&&f&&(d+="|"===p[b].separator?"solid ":"dashed ",f=!1);h.setAttribute("columnalign",u.trim()),/[sd]/.test(d)&&h.setAttribute("columnlines",d.trim())}if("align"===e.colSeparationType){for(var y=e.cols||[],x="",w=1;w<y.length;w++)x+=w%2?"0em ":"1em ";h.setAttribute("columnspacing",x.trim())}else"alignat"===e.colSeparationType||"gather"===e.colSeparationType?h.setAttribute("columnspacing","0em"):"small"===e.colSeparationType?h.setAttribute("columnspacing","0.2778em"):"CD"===e.colSeparationType?h.setAttribute("columnspacing","0.5em"):h.setAttribute("columnspacing","1em");var k="",S=e.hLinesBeforeRow;c+=S[0].length>0?"left ":"",c+=S[S.length-1].length>0?"right ":"";for(var M=1;M<S.length-1;M++)k+=0===S[M].length?"none ":S[M][0]?"dashed ":"solid ";return/[sd]/.test(k)&&h.setAttribute("rowlines",k.trim()),""!==c&&(h=new Tt.MathNode("menclose",[h])).setAttribute("notation",c.trim()),e.arraystretch&&e.arraystretch<1&&(h=new Tt.MathNode("mstyle",[h])).setAttribute("scriptlevel","1"),h},Wr=function(e,t){-1===e.envName.indexOf("ed")&&Pr(e);var r,a=[],i=e.envName.indexOf("at")>-1?"alignat":"align",o="split"===e.envName,s=Vr(e.parser,{cols:a,addJot:!0,autoTag:o?void 0:Fr(e.envName),emptySingleRow:!0,colSeparationType:i,maxNumCols:o?2:void 0,leqno:e.parser.settings.leqno},"display"),l=0,h={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&"ordgroup"===t[0].type){for(var m="",c=0;c<t[0].body.length;c++)m+=Gt(t[0].body[c],"textord").text;r=Number(m),l=2*r}var u=!l;s.body.forEach((function(e){for(var t=1;t<e.length;t+=2){var a=Gt(e[t],"styling");Gt(a.body[0],"ordgroup").body.unshift(h)}if(u)l<e.length&&(l=e.length);else{var i=e.length/2;if(r<i)throw new n("Too many math in a row: expected "+r+", but got "+i,e[0])}}));for(var p=0;p<l;++p){var d="r",f=0;p%2===1?d="l":p>0&&u&&(f=1),a[p]={type:"align",align:d,pregap:f,postgap:0}}return s.colSeparationType=u?"align":"alignat",s};Rr({type:"array",names:["array","darray"],props:{numArgs:1},handler:function(e,t){var r=(Yt(t[0])?[t[0]]:Gt(t[0],"ordgroup").body).map((function(e){var t=Ut(e).text;if(-1!=="lcr".indexOf(t))return{type:"align",align:t};if("|"===t)return{type:"separator",separator:"|"};if(":"===t)return{type:"separator",separator:":"};throw new n("Unknown column alignment: "+t,e)})),a={cols:r,hskipBeforeAndAfter:!0,maxNumCols:r.length};return Vr(e.parser,a,Gr(e.envName))},htmlBuilder:Ur,mathmlBuilder:Xr}),Rr({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler:function(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],r="c",a={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if("*"===e.envName.charAt(e.envName.length-1)){var i=e.parser;if(i.consumeSpaces(),"["===i.fetch().text){if(i.consume(),i.consumeSpaces(),r=i.fetch().text,-1==="lcr".indexOf(r))throw new n("Expected l or c or r",i.nextToken);i.consume(),i.consumeSpaces(),i.expect("]"),i.consume(),a.cols=[{type:"align",align:r}]}}var o=Vr(e.parser,a,Gr(e.envName)),s=Math.max.apply(Math,[0].concat(o.body.map((function(e){return e.length}))));return o.cols=new Array(s).fill({type:"align",align:r}),t?{type:"leftright",mode:e.mode,body:[o],left:t[0],right:t[1],rightColor:void 0}:o},htmlBuilder:Ur,mathmlBuilder:Xr}),Rr({type:"array",names:["smallmatrix"],props:{numArgs:0},handler:function(e){var t=Vr(e.parser,{arraystretch:.5},"script");return t.colSeparationType="small",t},htmlBuilder:Ur,mathmlBuilder:Xr}),Rr({type:"array",names:["subarray"],props:{numArgs:1},handler:function(e,t){var r=(Yt(t[0])?[t[0]]:Gt(t[0],"ordgroup").body).map((function(e){var t=Ut(e).text;if(-1!=="lc".indexOf(t))return{type:"align",align:t};throw new n("Unknown column alignment: "+t,e)}));if(r.length>1)throw new n("{subarray} can contain only one column");var a={cols:r,hskipBeforeAndAfter:!1,arraystretch:.5};if((a=Vr(e.parser,a,"script")).body.length>0&&a.body[0].length>1)throw new n("{subarray} can contain only one column");return a},htmlBuilder:Ur,mathmlBuilder:Xr}),Rr({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler:function(e){var t=Vr(e.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},Gr(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.indexOf("r")>-1?".":"\\{",right:e.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:Ur,mathmlBuilder:Xr}),Rr({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:Wr,htmlBuilder:Ur,mathmlBuilder:Xr}),Rr({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler:function(e){l.contains(["gather","gather*"],e.envName)&&Pr(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Fr(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return Vr(e.parser,t,"display")},htmlBuilder:Ur,mathmlBuilder:Xr}),Rr({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:Wr,htmlBuilder:Ur,mathmlBuilder:Xr}),Rr({type:"array",names:["equation","equation*"],props:{numArgs:0},handler:function(e){Pr(e);var t={autoTag:Fr(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return Vr(e.parser,t,"display")},htmlBuilder:Ur,mathmlBuilder:Xr}),Rr({type:"array",names:["CD"],props:{numArgs:0},handler:function(e){return Pr(e),function(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var r=e.fetch().text;if("&"!==r&&"\\\\"!==r){if("\\end"===r){0===t[t.length-1].length&&t.pop();break}throw new n("Expected \\\\ or \\cr or \\end",e.nextToken)}e.consume()}for(var a,i,o=[],s=[o],l=0;l<t.length;l++){for(var h=t[l],m={type:"styling",body:[],mode:"math",style:"display"},c=0;c<h.length;c++)if(Zt(h[c])){o.push(m);var u=Ut(h[c+=1]).text,p=new Array(2);if(p[0]={type:"ordgroup",mode:"math",body:[]},p[1]={type:"ordgroup",mode:"math",body:[]},"=|.".indexOf(u)>-1);else{if(!("<>AV".indexOf(u)>-1))throw new n('Expected one of "<>AV=|." after @',h[c]);for(var d=0;d<2;d++){for(var f=!0,g=c+1;g<h.length;g++){if(i=u,("mathord"===(a=h[g]).type||"atom"===a.type)&&a.text===i){f=!1,c=g;break}if(Zt(h[g]))throw new n("Missing a "+u+" character to complete a CD arrow.",h[g]);p[d].body.push(h[g])}if(f)throw new n("Missing a "+u+" character to complete a CD arrow.",h[c])}}var v={type:"styling",body:[Kt(u,p,e)],mode:"math",style:"display"};o.push(v),m={type:"styling",body:[],mode:"math",style:"display"}}else m.body.push(h[c]);l%2===0?o.push(m):o.shift(),o=[],s.push(o)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:"math",body:s,arraystretch:1,addJot:!0,rowGaps:[null],cols:new Array(s[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25}),colSeparationType:"CD",hLinesBeforeRow:new Array(s.length+1).fill([])}}(e.parser)},htmlBuilder:Ur,mathmlBuilder:Xr}),Hr("\\nonumber","\\gdef\\@eqnsw{0}"),Hr("\\notag","\\nonumber"),ot({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler:function(e,t){throw new n(e.funcName+" valid only within array environment")}});var _r=Ir;ot({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler:function(e,t){var r=e.parser,a=e.funcName,i=t[0];if("ordgroup"!==i.type)throw new n("Invalid environment name",i);for(var o="",s=0;s<i.body.length;++s)o+=Gt(i.body[s],"textord").text;if("\\begin"===a){if(!_r.hasOwnProperty(o))throw new n("No such environment: "+o,i);var l=_r[o],h=r.parseArguments("\\begin{"+o+"}",l),m=h.args,c=h.optArgs,u={mode:r.mode,envName:o,parser:r},p=l.handler(u,m,c);r.expect("\\end",!1);var d=r.nextToken,f=Gt(r.parseFunction(),"environment");if(f.name!==o)throw new n("Mismatch: \\begin{"+o+"} matched by \\end{"+f.name+"}",d);return p}return{type:"environment",mode:r.mode,name:o,nameGroup:i}}});var jr=Ke.makeSpan;function $r(e,t){var r=ft(e.body,t,!0);return jr([e.mclass],r,t)}function Zr(e,t){var r,n=Nt(e.body,t);return"minner"===e.mclass?r=new Tt.MathNode("mpadded",n):"mord"===e.mclass?e.isCharacterBox?(r=n[0]).type="mi":r=new Tt.MathNode("mi",n):(e.isCharacterBox?(r=n[0]).type="mo":r=new Tt.MathNode("mo",n),"mbin"===e.mclass?(r.attributes.lspace="0.22em",r.attributes.rspace="0.22em"):"mpunct"===e.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0.17em"):"mopen"===e.mclass||"mclose"===e.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0em"):"minner"===e.mclass&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em")),r}ot({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler:function(e,t){var r=e.parser,n=e.funcName,a=t[0];return{type:"mclass",mode:r.mode,mclass:"m"+n.substr(5),body:ht(a),isCharacterBox:l.isCharacterBox(a)}},htmlBuilder:$r,mathmlBuilder:Zr});var Kr=function(e){var t="ordgroup"===e.type&&e.body.length?e.body[0]:e;return"atom"!==t.type||"bin"!==t.family&&"rel"!==t.family?"mord":"m"+t.family};ot({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler:function(e,t){return{type:"mclass",mode:e.parser.mode,mclass:Kr(t[0]),body:ht(t[1]),isCharacterBox:l.isCharacterBox(t[1])}}}),ot({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler:function(e,t){var r,n=e.parser,a=e.funcName,i=t[1],o=t[0];r="\\stackrel"!==a?Kr(i):"mrel";var s={type:"op",mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==a,body:ht(i)},h={type:"supsub",mode:o.mode,base:s,sup:"\\underset"===a?null:o,sub:"\\underset"===a?o:null};return{type:"mclass",mode:n.mode,mclass:r,body:[h],isCharacterBox:l.isCharacterBox(h)}},htmlBuilder:$r,mathmlBuilder:Zr});var Jr=function(e,t){var r=e.font,n=t.withFont(r);return wt(e.body,n)},Qr=function(e,t){var r=e.font,n=t.withFont(r);return Rt(e.body,n)},en={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};ot({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:function(e,t){var r=e.parser,n=e.funcName,a=lt(t[0]),i=n;return i in en&&(i=en[i]),{type:"font",mode:r.mode,font:i.slice(1),body:a}},htmlBuilder:Jr,mathmlBuilder:Qr}),ot({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:function(e,t){var r=e.parser,n=t[0],a=l.isCharacterBox(n);return{type:"mclass",mode:r.mode,mclass:Kr(n),body:[{type:"font",mode:r.mode,font:"boldsymbol",body:n}],isCharacterBox:a}}}),ot({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:function(e,t){var r=e.parser,n=e.funcName,a=e.breakOnTokenText,i=r.mode,o=r.parseExpression(!0,a);return{type:"font",mode:i,font:"math"+n.slice(1),body:{type:"ordgroup",mode:r.mode,body:o}}},htmlBuilder:Jr,mathmlBuilder:Qr});var tn=function(e,t){var r=t;return"display"===e?r=r.id>=x.SCRIPT.id?r.text():x.DISPLAY:"text"===e&&r.size===x.DISPLAY.size?r=x.TEXT:"script"===e?r=x.SCRIPT:"scriptscript"===e&&(r=x.SCRIPTSCRIPT),r},rn=function(e,t){var r,n=tn(e.size,t.style),a=n.fracNum(),i=n.fracDen();r=t.havingStyle(a);var o=wt(e.numer,r,t);if(e.continued){var s=8.5/t.fontMetrics().ptPerEm,l=3.5/t.fontMetrics().ptPerEm;o.height=o.height<s?s:o.height,o.depth=o.depth<l?l:o.depth}r=t.havingStyle(i);var h,m,c,u,p,d,f,g,v,b,y=wt(e.denom,r,t);if(e.hasBarLine?(e.barSize?(m=F(e.barSize,t),h=Ke.makeLineSpan("frac-line",t,m)):h=Ke.makeLineSpan("frac-line",t),m=h.height,c=h.height):(h=null,m=0,c=t.fontMetrics().defaultRuleThickness),n.size===x.DISPLAY.size||"display"===e.size?(u=t.fontMetrics().num1,p=m>0?3*c:7*c,d=t.fontMetrics().denom1):(m>0?(u=t.fontMetrics().num2,p=c):(u=t.fontMetrics().num3,p=3*c),d=t.fontMetrics().denom2),h){var w=t.fontMetrics().axisHeight;u-o.depth-(w+.5*m)<p&&(u+=p-(u-o.depth-(w+.5*m))),w-.5*m-(y.height-d)<p&&(d+=p-(w-.5*m-(y.height-d)));var k=-(w-.5*m);f=Ke.makeVList({positionType:"individualShift",children:[{type:"elem",elem:y,shift:d},{type:"elem",elem:h,shift:k},{type:"elem",elem:o,shift:-u}]},t)}else{var S=u-o.depth-(y.height-d);S<p&&(u+=.5*(p-S),d+=.5*(p-S)),f=Ke.makeVList({positionType:"individualShift",children:[{type:"elem",elem:y,shift:d},{type:"elem",elem:o,shift:-u}]},t)}return r=t.havingStyle(n),f.height*=r.sizeMultiplier/t.sizeMultiplier,f.depth*=r.sizeMultiplier/t.sizeMultiplier,g=n.size===x.DISPLAY.size?t.fontMetrics().delim1:n.size===x.SCRIPTSCRIPT.size?t.havingStyle(x.SCRIPT).fontMetrics().delim2:t.fontMetrics().delim2,v=null==e.leftDelim?xt(t,["mopen"]):zr.customSizedDelim(e.leftDelim,g,!0,t.havingStyle(n),e.mode,["mopen"]),b=e.continued?Ke.makeSpan([]):null==e.rightDelim?xt(t,["mclose"]):zr.customSizedDelim(e.rightDelim,g,!0,t.havingStyle(n),e.mode,["mclose"]),Ke.makeSpan(["mord"].concat(r.sizingClasses(t)),[v,Ke.makeSpan(["mfrac"],[f]),b],t)},nn=function(e,t){var r=new Tt.MathNode("mfrac",[Rt(e.numer,t),Rt(e.denom,t)]);if(e.hasBarLine){if(e.barSize){var n=F(e.barSize,t);r.setAttribute("linethickness",V(n))}}else r.setAttribute("linethickness","0px");var a=tn(e.size,t.style);if(a.size!==t.style.size){r=new Tt.MathNode("mstyle",[r]);var i=a.size===x.DISPLAY.size?"true":"false";r.setAttribute("displaystyle",i),r.setAttribute("scriptlevel","0")}if(null!=e.leftDelim||null!=e.rightDelim){var o=[];if(null!=e.leftDelim){var s=new Tt.MathNode("mo",[new Tt.TextNode(e.leftDelim.replace("\\",""))]);s.setAttribute("fence","true"),o.push(s)}if(o.push(r),null!=e.rightDelim){var l=new Tt.MathNode("mo",[new Tt.TextNode(e.rightDelim.replace("\\",""))]);l.setAttribute("fence","true"),o.push(l)}return Ct(o)}return r};ot({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:function(e,t){var r,n=e.parser,a=e.funcName,i=t[0],o=t[1],s=null,l=null,h="auto";switch(a){case"\\dfrac":case"\\frac":case"\\tfrac":r=!0;break;case"\\\\atopfrac":r=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":r=!1,s="(",l=")";break;case"\\\\bracefrac":r=!1,s="\\{",l="\\}";break;case"\\\\brackfrac":r=!1,s="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}switch(a){case"\\dfrac":case"\\dbinom":h="display";break;case"\\tfrac":case"\\tbinom":h="text"}return{type:"genfrac",mode:n.mode,continued:!1,numer:i,denom:o,hasBarLine:r,leftDelim:s,rightDelim:l,size:h,barSize:null}},htmlBuilder:rn,mathmlBuilder:nn}),ot({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:function(e,t){var r=e.parser,n=(e.funcName,t[0]),a=t[1];return{type:"genfrac",mode:r.mode,continued:!0,numer:n,denom:a,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}}),ot({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler:function(e){var t,r=e.parser,n=e.funcName,a=e.token;switch(n){case"\\over":t="\\frac";break;case"\\choose":t="\\binom";break;case"\\atop":t="\\\\atopfrac";break;case"\\brace":t="\\\\bracefrac";break;case"\\brack":t="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:r.mode,replaceWith:t,token:a}}});var an=["display","text","script","scriptscript"],on=function(e){var t=null;return e.length>0&&(t="."===(t=e)?null:t),t};ot({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler:function(e,t){var r,n=e.parser,a=t[4],i=t[5],o=lt(t[0]),s="atom"===o.type&&"open"===o.family?on(o.text):null,l=lt(t[1]),h="atom"===l.type&&"close"===l.family?on(l.text):null,m=Gt(t[2],"size"),c=null;r=!!m.isBlank||(c=m.value).number>0;var u="auto",p=t[3];if("ordgroup"===p.type){if(p.body.length>0){var d=Gt(p.body[0],"textord");u=an[Number(d.text)]}}else p=Gt(p,"textord"),u=an[Number(p.text)];return{type:"genfrac",mode:n.mode,numer:a,denom:i,continued:!1,hasBarLine:r,barSize:c,leftDelim:s,rightDelim:h,size:u}},htmlBuilder:rn,mathmlBuilder:nn}),ot({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler:function(e,t){var r=e.parser,n=(e.funcName,e.token);return{type:"infix",mode:r.mode,replaceWith:"\\\\abovefrac",size:Gt(t[0],"size").value,token:n}}}),ot({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:function(e,t){var r=e.parser,n=(e.funcName,t[0]),a=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e}(Gt(t[1],"infix").size),i=t[2],o=a.number>0;return{type:"genfrac",mode:r.mode,numer:n,denom:i,continued:!1,hasBarLine:o,barSize:a,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:rn,mathmlBuilder:nn});var sn=function(e,t){var r,n,a=t.style;"supsub"===e.type?(r=e.sup?wt(e.sup,t.havingStyle(a.sup()),t):wt(e.sub,t.havingStyle(a.sub()),t),n=Gt(e.base,"horizBrace")):n=Gt(e,"horizBrace");var i,o=wt(n.base,t.havingBaseStyle(x.DISPLAY)),s=Vt(n,t);if(n.isOver?(i=Ke.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:s}]},t)).children[0].children[0].children[1].classes.push("svg-align"):(i=Ke.makeVList({positionType:"bottom",positionData:o.depth+.1+s.height,children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:o}]},t)).children[0].children[0].children[0].classes.push("svg-align"),r){var l=Ke.makeSpan(["mord",n.isOver?"mover":"munder"],[i],t);i=n.isOver?Ke.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:r}]},t):Ke.makeVList({positionType:"bottom",positionData:l.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:l}]},t)}return Ke.makeSpan(["mord",n.isOver?"mover":"munder"],[i],t)};ot({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler:function(e,t){var r=e.parser,n=e.funcName;return{type:"horizBrace",mode:r.mode,label:n,isOver:/^\\over/.test(n),base:t[0]}},htmlBuilder:sn,mathmlBuilder:function(e,t){var r=Ft(e.label);return new Tt.MathNode(e.isOver?"mover":"munder",[Rt(e.base,t),r])}}),ot({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:function(e,t){var r=e.parser,n=t[1],a=Gt(t[0],"url").url;return r.settings.isTrusted({command:"\\href",url:a})?{type:"href",mode:r.mode,href:a,body:ht(n)}:r.formatUnsupportedCmd("\\href")},htmlBuilder:function(e,t){var r=ft(e.body,t,!1);return Ke.makeAnchor(e.href,[],r,t)},mathmlBuilder:function(e,t){var r=It(e.body,t);return r instanceof zt||(r=new zt("mrow",[r])),r.setAttribute("href",e.href),r}}),ot({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:function(e,t){var r=e.parser,n=Gt(t[0],"url").url;if(!r.settings.isTrusted({command:"\\url",url:n}))return r.formatUnsupportedCmd("\\url");for(var a=[],i=0;i<n.length;i++){var o=n[i];"~"===o&&(o="\\textasciitilde"),a.push({type:"textord",mode:"text",text:o})}var s={type:"text",mode:r.mode,font:"\\texttt",body:a};return{type:"href",mode:r.mode,href:n,body:ht(s)}}}),ot({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler:function(e,t){return{type:"hbox",mode:e.parser.mode,body:ht(t[0])}},htmlBuilder:function(e,t){var r=ft(e.body,t,!1);return Ke.makeFragment(r)},mathmlBuilder:function(e,t){return new Tt.MathNode("mrow",Nt(e.body,t))}}),ot({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:function(e,t){var r,a=e.parser,i=e.funcName,o=(e.token,Gt(t[0],"raw").string),s=t[1];a.settings.strict&&a.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var l={};switch(i){case"\\htmlClass":l.class=o,r={command:"\\htmlClass",class:o};break;case"\\htmlId":l.id=o,r={command:"\\htmlId",id:o};break;case"\\htmlStyle":l.style=o,r={command:"\\htmlStyle",style:o};break;case"\\htmlData":for(var h=o.split(","),m=0;m<h.length;m++){var c=h[m].split("=");if(2!==c.length)throw new n("Error parsing key-value for \\htmlData");l["data-"+c[0].trim()]=c[1].trim()}r={command:"\\htmlData",attributes:l};break;default:throw new Error("Unrecognized html command")}return a.settings.isTrusted(r)?{type:"html",mode:a.mode,attributes:l,body:ht(s)}:a.formatUnsupportedCmd(i)},htmlBuilder:function(e,t){var r=ft(e.body,t,!1),n=["enclosing"];e.attributes.class&&n.push.apply(n,e.attributes.class.trim().split(/\s+/));var a=Ke.makeSpan(n,r,t);for(var i in e.attributes)"class"!==i&&e.attributes.hasOwnProperty(i)&&a.setAttribute(i,e.attributes[i]);return a},mathmlBuilder:function(e,t){return It(e.body,t)}}),ot({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:function(e,t){return{type:"htmlmathml",mode:e.parser.mode,html:ht(t[0]),mathml:ht(t[1])}},htmlBuilder:function(e,t){var r=ft(e.html,t,!1);return Ke.makeFragment(r)},mathmlBuilder:function(e,t){return It(e.mathml,t)}});var ln=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new n("Invalid size: '"+e+"' in \\includegraphics");var r={number:+(t[1]+t[2]),unit:t[3]};if(!P(r))throw new n("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r};ot({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:function(e,t,r){var a=e.parser,i={number:0,unit:"em"},o={number:.9,unit:"em"},s={number:0,unit:"em"},l="";if(r[0])for(var h=Gt(r[0],"raw").string.split(","),m=0;m<h.length;m++){var c=h[m].split("=");if(2===c.length){var u=c[1].trim();switch(c[0].trim()){case"alt":l=u;break;case"width":i=ln(u);break;case"height":o=ln(u);break;case"totalheight":s=ln(u);break;default:throw new n("Invalid key: '"+c[0]+"' in \\includegraphics.")}}}var p=Gt(t[0],"url").url;return""===l&&(l=(l=(l=p).replace(/^.*[\\/]/,"")).substring(0,l.lastIndexOf("."))),a.settings.isTrusted({command:"\\includegraphics",url:p})?{type:"includegraphics",mode:a.mode,alt:l,width:i,height:o,totalheight:s,src:p}:a.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:function(e,t){var r=F(e.height,t),n=0;e.totalheight.number>0&&(n=F(e.totalheight,t)-r);var a=0;e.width.number>0&&(a=F(e.width,t));var i={height:V(r+n)};a>0&&(i.width=V(a)),n>0&&(i.verticalAlign=V(-n));var o=new j(e.src,e.alt,i);return o.height=r,o.depth=n,o},mathmlBuilder:function(e,t){var r=new Tt.MathNode("mglyph",[]);r.setAttribute("alt",e.alt);var n=F(e.height,t),a=0;if(e.totalheight.number>0&&(a=F(e.totalheight,t)-n,r.setAttribute("valign",V(-a))),r.setAttribute("height",V(n+a)),e.width.number>0){var i=F(e.width,t);r.setAttribute("width",V(i))}return r.setAttribute("src",e.src),r}}),ot({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler:function(e,t){var r=e.parser,n=e.funcName,a=Gt(t[0],"size");if(r.settings.strict){var i="m"===n[1],o="mu"===a.value.unit;i?(o||r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, not "+a.value.unit+" units"),"math"!==r.mode&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):o&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:r.mode,dimension:a.value}},htmlBuilder:function(e,t){return Ke.makeGlue(e.dimension,t)},mathmlBuilder:function(e,t){var r=F(e.dimension,t);return new Tt.SpaceNode(r)}}),ot({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){var r=e.parser,n=e.funcName,a=t[0];return{type:"lap",mode:r.mode,alignment:n.slice(5),body:a}},htmlBuilder:function(e,t){var r;"clap"===e.alignment?(r=Ke.makeSpan([],[wt(e.body,t)]),r=Ke.makeSpan(["inner"],[r],t)):r=Ke.makeSpan(["inner"],[wt(e.body,t)]);var n=Ke.makeSpan(["fix"],[]),a=Ke.makeSpan([e.alignment],[r,n],t),i=Ke.makeSpan(["strut"]);return i.style.height=V(a.height+a.depth),a.depth&&(i.style.verticalAlign=V(-a.depth)),a.children.unshift(i),a=Ke.makeSpan(["thinbox"],[a],t),Ke.makeSpan(["mord","vbox"],[a],t)},mathmlBuilder:function(e,t){var r=new Tt.MathNode("mpadded",[Rt(e.body,t)]);if("rlap"!==e.alignment){var n="llap"===e.alignment?"-1":"-0.5";r.setAttribute("lspace",n+"width")}return r.setAttribute("width","0px"),r}}),ot({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(e,t){var r=e.funcName,n=e.parser,a=n.mode;n.switchMode("math");var i="\\("===r?"\\)":"$",o=n.parseExpression(!1,i);return n.expect(i),n.switchMode(a),{type:"styling",mode:n.mode,style:"text",body:o}}}),ot({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(e,t){throw new n("Mismatched "+e.funcName)}});var hn=function(e,t){switch(t.style.size){case x.DISPLAY.size:return e.display;case x.TEXT.size:return e.text;case x.SCRIPT.size:return e.script;case x.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};ot({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:function(e,t){return{type:"mathchoice",mode:e.parser.mode,display:ht(t[0]),text:ht(t[1]),script:ht(t[2]),scriptscript:ht(t[3])}},htmlBuilder:function(e,t){var r=hn(e,t),n=ft(r,t,!1);return Ke.makeFragment(n)},mathmlBuilder:function(e,t){var r=hn(e,t);return It(r,t)}});var mn=function(e,t,r,n,a,i,o){e=Ke.makeSpan([],[e]);var s,h,m,c=r&&l.isCharacterBox(r);if(t){var u=wt(t,n.havingStyle(a.sup()),n);h={elem:u,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-u.depth)}}if(r){var p=wt(r,n.havingStyle(a.sub()),n);s={elem:p,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-p.height)}}if(h&&s){var d=n.fontMetrics().bigOpSpacing5+s.elem.height+s.elem.depth+s.kern+e.depth+o;m=Ke.makeVList({positionType:"bottom",positionData:d,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:V(-i)},{type:"kern",size:s.kern},{type:"elem",elem:e},{type:"kern",size:h.kern},{type:"elem",elem:h.elem,marginLeft:V(i)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else if(s){var f=e.height-o;m=Ke.makeVList({positionType:"top",positionData:f,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:V(-i)},{type:"kern",size:s.kern},{type:"elem",elem:e}]},n)}else{if(!h)return e;var g=e.depth+o;m=Ke.makeVList({positionType:"bottom",positionData:g,children:[{type:"elem",elem:e},{type:"kern",size:h.kern},{type:"elem",elem:h.elem,marginLeft:V(i)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}var v=[m];if(s&&0!==i&&!c){var b=Ke.makeSpan(["mspace"],[],n);b.style.marginRight=V(i),v.unshift(b)}return Ke.makeSpan(["mop","op-limits"],v,n)},cn=["\\smallint"],un=function(e,t){var r,n,a,i=!1;"supsub"===e.type?(r=e.sup,n=e.sub,a=Gt(e.base,"op"),i=!0):a=Gt(e,"op");var o,s=t.style,h=!1;if(s.size===x.DISPLAY.size&&a.symbol&&!l.contains(cn,a.name)&&(h=!0),a.symbol){var m=h?"Size2-Regular":"Size1-Regular",c="";if("\\oiint"!==a.name&&"\\oiiint"!==a.name||(c=a.name.substr(1),a.name="oiint"===c?"\\iint":"\\iiint"),o=Ke.makeSymbol(a.name,m,"math",t,["mop","op-symbol",h?"large-op":"small-op"]),c.length>0){var u=o.italic,p=Ke.staticSvg(c+"Size"+(h?"2":"1"),t);o=Ke.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:0},{type:"elem",elem:p,shift:h?.08:0}]},t),a.name="\\"+c,o.classes.unshift("mop"),o.italic=u}}else if(a.body){var d=ft(a.body,t,!0);1===d.length&&d[0]instanceof Z?(o=d[0]).classes[0]="mop":o=Ke.makeSpan(["mop"],d,t)}else{for(var f=[],g=1;g<a.name.length;g++)f.push(Ke.mathsym(a.name[g],a.mode,t));o=Ke.makeSpan(["mop"],f,t)}var v=0,b=0;return(o instanceof Z||"\\oiint"===a.name||"\\oiiint"===a.name)&&!a.suppressBaseShift&&(v=(o.height-o.depth)/2-t.fontMetrics().axisHeight,b=o.italic),i?mn(o,r,n,t,s,b,v):(v&&(o.style.position="relative",o.style.top=V(v)),o)},pn=function(e,t){var r;if(e.symbol)r=new zt("mo",[Bt(e.name,e.mode)]),l.contains(cn,e.name)&&r.setAttribute("largeop","false");else if(e.body)r=new zt("mo",Nt(e.body,t));else{r=new zt("mi",[new At(e.name.slice(1))]);var n=new zt("mo",[Bt("\u2061","text")]);r=e.parentIsSupSub?new zt("mrow",[r,n]):Mt([r,n])}return r},dn={"\u220f":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22c0":"\\bigwedge","\u22c1":"\\bigvee","\u22c2":"\\bigcap","\u22c3":"\\bigcup","\u2a00":"\\bigodot","\u2a01":"\\bigoplus","\u2a02":"\\bigotimes","\u2a04":"\\biguplus","\u2a06":"\\bigsqcup"};ot({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","\u220f","\u2210","\u2211","\u22c0","\u22c1","\u22c2","\u22c3","\u2a00","\u2a01","\u2a02","\u2a04","\u2a06"],props:{numArgs:0},handler:function(e,t){var r=e.parser,n=e.funcName;return 1===n.length&&(n=dn[n]),{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:un,mathmlBuilder:pn}),ot({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:function(e,t){var r=e.parser,n=t[0];return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:ht(n)}},htmlBuilder:un,mathmlBuilder:pn});var fn={"\u222b":"\\int","\u222c":"\\iint","\u222d":"\\iiint","\u222e":"\\oint","\u222f":"\\oiint","\u2230":"\\oiiint"};ot({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler:function(e){var t=e.parser,r=e.funcName;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:un,mathmlBuilder:pn}),ot({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler:function(e){var t=e.parser,r=e.funcName;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:un,mathmlBuilder:pn}),ot({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","\u222b","\u222c","\u222d","\u222e","\u222f","\u2230"],props:{numArgs:0},handler:function(e){var t=e.parser,r=e.funcName;return 1===r.length&&(r=fn[r]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:un,mathmlBuilder:pn});var gn=function(e,t){var r,n,a,i,o=!1;if("supsub"===e.type?(r=e.sup,n=e.sub,a=Gt(e.base,"operatorname"),o=!0):a=Gt(e,"operatorname"),a.body.length>0){for(var s=a.body.map((function(e){var t=e.text;return"string"===typeof t?{type:"textord",mode:e.mode,text:t}:e})),l=ft(s,t.withFont("mathrm"),!0),h=0;h<l.length;h++){var m=l[h];m instanceof Z&&(m.text=m.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}i=Ke.makeSpan(["mop"],l,t)}else i=Ke.makeSpan(["mop"],[],t);return o?mn(i,r,n,t,t.style,0,0):i};function vn(e,t,r){for(var n=ft(e,t,!1),a=t.sizeMultiplier/r.sizeMultiplier,i=0;i<n.length;i++){var o=n[i].classes.indexOf("sizing");o<0?Array.prototype.push.apply(n[i].classes,t.sizingClasses(r)):n[i].classes[o+1]==="reset-size"+t.size&&(n[i].classes[o+1]="reset-size"+r.size),n[i].height*=a,n[i].depth*=a}return Ke.makeFragment(n)}ot({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:function(e,t){var r=e.parser,n=e.funcName,a=t[0];return{type:"operatorname",mode:r.mode,body:ht(a),alwaysHandleSupSub:"\\operatornamewithlimits"===n,limits:!1,parentIsSupSub:!1}},htmlBuilder:gn,mathmlBuilder:function(e,t){for(var r=Nt(e.body,t.withFont("mathrm")),n=!0,a=0;a<r.length;a++){var i=r[a];if(i instanceof Tt.SpaceNode);else if(i instanceof Tt.MathNode)switch(i.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":var o=i.children[0];1===i.children.length&&o instanceof Tt.TextNode?o.text=o.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):n=!1;break;default:n=!1}else n=!1}if(n){var s=r.map((function(e){return e.toText()})).join("");r=[new Tt.TextNode(s)]}var l=new Tt.MathNode("mi",r);l.setAttribute("mathvariant","normal");var h=new Tt.MathNode("mo",[Bt("\u2061","text")]);return e.parentIsSupSub?new Tt.MathNode("mrow",[l,h]):Tt.newDocumentFragment([l,h])}}),Hr("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),st({type:"ordgroup",htmlBuilder:function(e,t){return e.semisimple?Ke.makeFragment(ft(e.body,t,!1)):Ke.makeSpan(["mord"],ft(e.body,t,!0),t)},mathmlBuilder:function(e,t){return It(e.body,t,!0)}}),ot({type:"overline",names:["\\overline"],props:{numArgs:1},handler:function(e,t){var r=e.parser,n=t[0];return{type:"overline",mode:r.mode,body:n}},htmlBuilder:function(e,t){var r=wt(e.body,t.havingCrampedStyle()),n=Ke.makeLineSpan("overline-line",t),a=t.fontMetrics().defaultRuleThickness,i=Ke.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:3*a},{type:"elem",elem:n},{type:"kern",size:a}]},t);return Ke.makeSpan(["mord","overline"],[i],t)},mathmlBuilder:function(e,t){var r=new Tt.MathNode("mo",[new Tt.TextNode("\u203e")]);r.setAttribute("stretchy","true");var n=new Tt.MathNode("mover",[Rt(e.body,t),r]);return n.setAttribute("accent","true"),n}}),ot({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){var r=e.parser,n=t[0];return{type:"phantom",mode:r.mode,body:ht(n)}},htmlBuilder:function(e,t){var r=ft(e.body,t.withPhantom(),!1);return Ke.makeFragment(r)},mathmlBuilder:function(e,t){var r=Nt(e.body,t);return new Tt.MathNode("mphantom",r)}}),ot({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){var r=e.parser,n=t[0];return{type:"hphantom",mode:r.mode,body:n}},htmlBuilder:function(e,t){var r=Ke.makeSpan([],[wt(e.body,t.withPhantom())]);if(r.height=0,r.depth=0,r.children)for(var n=0;n<r.children.length;n++)r.children[n].height=0,r.children[n].depth=0;return r=Ke.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r}]},t),Ke.makeSpan(["mord"],[r],t)},mathmlBuilder:function(e,t){var r=Nt(ht(e.body),t),n=new Tt.MathNode("mphantom",r),a=new Tt.MathNode("mpadded",[n]);return a.setAttribute("height","0px"),a.setAttribute("depth","0px"),a}}),ot({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){var r=e.parser,n=t[0];return{type:"vphantom",mode:r.mode,body:n}},htmlBuilder:function(e,t){var r=Ke.makeSpan(["inner"],[wt(e.body,t.withPhantom())]),n=Ke.makeSpan(["fix"],[]);return Ke.makeSpan(["mord","rlap"],[r,n],t)},mathmlBuilder:function(e,t){var r=Nt(ht(e.body),t),n=new Tt.MathNode("mphantom",r),a=new Tt.MathNode("mpadded",[n]);return a.setAttribute("width","0px"),a}}),ot({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler:function(e,t){var r=e.parser,n=Gt(t[0],"size").value,a=t[1];return{type:"raisebox",mode:r.mode,dy:n,body:a}},htmlBuilder:function(e,t){var r=wt(e.body,t),n=F(e.dy,t);return Ke.makeVList({positionType:"shift",positionData:-n,children:[{type:"elem",elem:r}]},t)},mathmlBuilder:function(e,t){var r=new Tt.MathNode("mpadded",[Rt(e.body,t)]),n=e.dy.number+e.dy.unit;return r.setAttribute("voffset",n),r}}),ot({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0},handler:function(e){return{type:"internal",mode:e.parser.mode}}}),ot({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler:function(e,t,r){var n=e.parser,a=r[0],i=Gt(t[0],"size"),o=Gt(t[1],"size");return{type:"rule",mode:n.mode,shift:a&&Gt(a,"size").value,width:i.value,height:o.value}},htmlBuilder:function(e,t){var r=Ke.makeSpan(["mord","rule"],[],t),n=F(e.width,t),a=F(e.height,t),i=e.shift?F(e.shift,t):0;return r.style.borderRightWidth=V(n),r.style.borderTopWidth=V(a),r.style.bottom=V(i),r.width=n,r.height=a+i,r.depth=-i,r.maxFontSize=1.125*a*t.sizeMultiplier,r},mathmlBuilder:function(e,t){var r=F(e.width,t),n=F(e.height,t),a=e.shift?F(e.shift,t):0,i=t.color&&t.getColor()||"black",o=new Tt.MathNode("mspace");o.setAttribute("mathbackground",i),o.setAttribute("width",V(r)),o.setAttribute("height",V(n));var s=new Tt.MathNode("mpadded",[o]);return a>=0?s.setAttribute("height",V(a)):(s.setAttribute("height",V(a)),s.setAttribute("depth",V(-a))),s.setAttribute("voffset",V(a)),s}});var bn=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"];ot({type:"sizing",names:bn,props:{numArgs:0,allowedInText:!0},handler:function(e,t){var r=e.breakOnTokenText,n=e.funcName,a=e.parser,i=a.parseExpression(!1,r);return{type:"sizing",mode:a.mode,size:bn.indexOf(n)+1,body:i}},htmlBuilder:function(e,t){var r=t.havingSize(e.size);return vn(e.body,r,t)},mathmlBuilder:function(e,t){var r=t.havingSize(e.size),n=Nt(e.body,r),a=new Tt.MathNode("mstyle",n);return a.setAttribute("mathsize",V(r.sizeMultiplier)),a}}),ot({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:function(e,t,r){var n=e.parser,a=!1,i=!1,o=r[0]&&Gt(r[0],"ordgroup");if(o)for(var s="",l=0;l<o.body.length;++l)if("t"===(s=o.body[l].text))a=!0;else{if("b"!==s){a=!1,i=!1;break}i=!0}else a=!0,i=!0;var h=t[0];return{type:"smash",mode:n.mode,body:h,smashHeight:a,smashDepth:i}},htmlBuilder:function(e,t){var r=Ke.makeSpan([],[wt(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return r;if(e.smashHeight&&(r.height=0,r.children))for(var n=0;n<r.children.length;n++)r.children[n].height=0;if(e.smashDepth&&(r.depth=0,r.children))for(var a=0;a<r.children.length;a++)r.children[a].depth=0;var i=Ke.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r}]},t);return Ke.makeSpan(["mord"],[i],t)},mathmlBuilder:function(e,t){var r=new Tt.MathNode("mpadded",[Rt(e.body,t)]);return e.smashHeight&&r.setAttribute("height","0px"),e.smashDepth&&r.setAttribute("depth","0px"),r}}),ot({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler:function(e,t,r){var n=e.parser,a=r[0],i=t[0];return{type:"sqrt",mode:n.mode,body:i,index:a}},htmlBuilder:function(e,t){var r=wt(e.body,t.havingCrampedStyle());0===r.height&&(r.height=t.fontMetrics().xHeight),r=Ke.wrapFragment(r,t);var n=t.fontMetrics().defaultRuleThickness,a=n;t.style.id<x.TEXT.id&&(a=t.fontMetrics().xHeight);var i=n+a/4,o=r.height+r.depth+i+n,s=zr.sqrtImage(o,t),l=s.span,h=s.ruleWidth,m=s.advanceWidth,c=l.height-h;c>r.height+r.depth+i&&(i=(i+c-r.height-r.depth)/2);var u=l.height-r.height-i-h;r.style.paddingLeft=V(m);var p=Ke.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+u)},{type:"elem",elem:l},{type:"kern",size:h}]},t);if(e.index){var d=t.havingStyle(x.SCRIPTSCRIPT),f=wt(e.index,d,t),g=.6*(p.height-p.depth),v=Ke.makeVList({positionType:"shift",positionData:-g,children:[{type:"elem",elem:f}]},t),b=Ke.makeSpan(["root"],[v]);return Ke.makeSpan(["mord","sqrt"],[b,p],t)}return Ke.makeSpan(["mord","sqrt"],[p],t)},mathmlBuilder:function(e,t){var r=e.body,n=e.index;return n?new Tt.MathNode("mroot",[Rt(r,t),Rt(n,t)]):new Tt.MathNode("msqrt",[Rt(r,t)])}});var yn={display:x.DISPLAY,text:x.TEXT,script:x.SCRIPT,scriptscript:x.SCRIPTSCRIPT};ot({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler:function(e,t){var r=e.breakOnTokenText,n=e.funcName,a=e.parser,i=a.parseExpression(!0,r),o=n.slice(1,n.length-5);return{type:"styling",mode:a.mode,style:o,body:i}},htmlBuilder:function(e,t){var r=yn[e.style],n=t.havingStyle(r).withFont("");return vn(e.body,n,t)},mathmlBuilder:function(e,t){var r=yn[e.style],n=t.havingStyle(r),a=Nt(e.body,n),i=new Tt.MathNode("mstyle",a),o={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[e.style];return i.setAttribute("scriptlevel",o[0]),i.setAttribute("displaystyle",o[1]),i}});var xn=function(e,t){var r=e.base;return r?"op"===r.type?r.limits&&(t.style.size===x.DISPLAY.size||r.alwaysHandleSupSub)?un:null:"operatorname"===r.type?r.alwaysHandleSupSub&&(t.style.size===x.DISPLAY.size||r.limits)?gn:null:"accent"===r.type?l.isCharacterBox(r.base)?Xt:null:"horizBrace"===r.type&&!e.sub===r.isOver?sn:null:null};st({type:"supsub",htmlBuilder:function(e,t){var r=xn(e,t);if(r)return r(e,t);var n,a,i,o=e.base,s=e.sup,h=e.sub,m=wt(o,t),c=t.fontMetrics(),u=0,p=0,d=o&&l.isCharacterBox(o);if(s){var f=t.havingStyle(t.style.sup());n=wt(s,f,t),d||(u=m.height-f.fontMetrics().supDrop*f.sizeMultiplier/t.sizeMultiplier)}if(h){var g=t.havingStyle(t.style.sub());a=wt(h,g,t),d||(p=m.depth+g.fontMetrics().subDrop*g.sizeMultiplier/t.sizeMultiplier)}i=t.style===x.DISPLAY?c.sup1:t.style.cramped?c.sup3:c.sup2;var v,b=t.sizeMultiplier,y=V(.5/c.ptPerEm/b),w=null;if(a){var k=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name);(m instanceof Z||k)&&(w=V(-m.italic))}if(n&&a){u=Math.max(u,i,n.depth+.25*c.xHeight),p=Math.max(p,c.sub2);var S=4*c.defaultRuleThickness;if(u-n.depth-(a.height-p)<S){p=S-(u-n.depth)+a.height;var M=.8*c.xHeight-(u-n.depth);M>0&&(u+=M,p-=M)}var z=[{type:"elem",elem:a,shift:p,marginRight:y,marginLeft:w},{type:"elem",elem:n,shift:-u,marginRight:y}];v=Ke.makeVList({positionType:"individualShift",children:z},t)}else if(a){p=Math.max(p,c.sub1,a.height-.8*c.xHeight);var A=[{type:"elem",elem:a,marginLeft:w,marginRight:y}];v=Ke.makeVList({positionType:"shift",positionData:p,children:A},t)}else{if(!n)throw new Error("supsub must have either sup or sub.");u=Math.max(u,i,n.depth+.25*c.xHeight),v=Ke.makeVList({positionType:"shift",positionData:-u,children:[{type:"elem",elem:n,marginRight:y}]},t)}var T=yt(m,"right")||"mord";return Ke.makeSpan([T],[m,Ke.makeSpan(["msupsub"],[v])],t)},mathmlBuilder:function(e,t){var r,n=!1;e.base&&"horizBrace"===e.base.type&&!!e.sup===e.base.isOver&&(n=!0,r=e.base.isOver),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0);var a,i=[Rt(e.base,t)];if(e.sub&&i.push(Rt(e.sub,t)),e.sup&&i.push(Rt(e.sup,t)),n)a=r?"mover":"munder";else if(e.sub)if(e.sup){var o=e.base;a=o&&"op"===o.type&&o.limits&&t.style===x.DISPLAY||o&&"operatorname"===o.type&&o.alwaysHandleSupSub&&(t.style===x.DISPLAY||o.limits)?"munderover":"msubsup"}else{var s=e.base;a=s&&"op"===s.type&&s.limits&&(t.style===x.DISPLAY||s.alwaysHandleSupSub)||s&&"operatorname"===s.type&&s.alwaysHandleSupSub&&(s.limits||t.style===x.DISPLAY)?"munder":"msub"}else{var l=e.base;a=l&&"op"===l.type&&l.limits&&(t.style===x.DISPLAY||l.alwaysHandleSupSub)||l&&"operatorname"===l.type&&l.alwaysHandleSupSub&&(l.limits||t.style===x.DISPLAY)?"mover":"msup"}return new Tt.MathNode(a,i)}}),st({type:"atom",htmlBuilder:function(e,t){return Ke.mathsym(e.text,e.mode,t,["m"+e.family])},mathmlBuilder:function(e,t){var r=new Tt.MathNode("mo",[Bt(e.text,e.mode)]);if("bin"===e.family){var n=qt(e,t);"bold-italic"===n&&r.setAttribute("mathvariant",n)}else"punct"===e.family?r.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||r.setAttribute("stretchy","false");return r}});var wn={mi:"italic",mn:"normal",mtext:"normal"};st({type:"mathord",htmlBuilder:function(e,t){return Ke.makeOrd(e,t,"mathord")},mathmlBuilder:function(e,t){var r=new Tt.MathNode("mi",[Bt(e.text,e.mode,t)]),n=qt(e,t)||"italic";return n!==wn[r.type]&&r.setAttribute("mathvariant",n),r}}),st({type:"textord",htmlBuilder:function(e,t){return Ke.makeOrd(e,t,"textord")},mathmlBuilder:function(e,t){var r,n=Bt(e.text,e.mode,t),a=qt(e,t)||"normal";return r="text"===e.mode?new Tt.MathNode("mtext",[n]):/[0-9]/.test(e.text)?new Tt.MathNode("mn",[n]):"\\prime"===e.text?new Tt.MathNode("mo",[n]):new Tt.MathNode("mi",[n]),a!==wn[r.type]&&r.setAttribute("mathvariant",a),r}});var kn={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Sn={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};st({type:"spacing",htmlBuilder:function(e,t){if(Sn.hasOwnProperty(e.text)){var r=Sn[e.text].className||"";if("text"===e.mode){var a=Ke.makeOrd(e,t,"textord");return a.classes.push(r),a}return Ke.makeSpan(["mspace",r],[Ke.mathsym(e.text,e.mode,t)],t)}if(kn.hasOwnProperty(e.text))return Ke.makeSpan(["mspace",kn[e.text]],[],t);throw new n('Unknown type of space "'+e.text+'"')},mathmlBuilder:function(e,t){if(!Sn.hasOwnProperty(e.text)){if(kn.hasOwnProperty(e.text))return new Tt.MathNode("mspace");throw new n('Unknown type of space "'+e.text+'"')}return new Tt.MathNode("mtext",[new Tt.TextNode("\xa0")])}});var Mn=function(){var e=new Tt.MathNode("mtd",[]);return e.setAttribute("width","50%"),e};st({type:"tag",mathmlBuilder:function(e,t){var r=new Tt.MathNode("mtable",[new Tt.MathNode("mtr",[Mn(),new Tt.MathNode("mtd",[It(e.body,t)]),Mn(),new Tt.MathNode("mtd",[It(e.tag,t)])])]);return r.setAttribute("width","100%"),r}});var zn={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},An={"\\textbf":"textbf","\\textmd":"textmd"},Tn={"\\textit":"textit","\\textup":"textup"},Bn=function(e,t){var r=e.font;return r?zn[r]?t.withTextFontFamily(zn[r]):An[r]?t.withTextFontWeight(An[r]):t.withTextFontShape(Tn[r]):t};ot({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler:function(e,t){var r=e.parser,n=e.funcName,a=t[0];return{type:"text",mode:r.mode,body:ht(a),font:n}},htmlBuilder:function(e,t){var r=Bn(e,t),n=ft(e.body,r,!0);return Ke.makeSpan(["mord","text"],n,r)},mathmlBuilder:function(e,t){var r=Bn(e,t);return It(e.body,r)}}),ot({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){return{type:"underline",mode:e.parser.mode,body:t[0]}},htmlBuilder:function(e,t){var r=wt(e.body,t),n=Ke.makeLineSpan("underline-line",t),a=t.fontMetrics().defaultRuleThickness,i=Ke.makeVList({positionType:"top",positionData:r.height,children:[{type:"kern",size:a},{type:"elem",elem:n},{type:"kern",size:3*a},{type:"elem",elem:r}]},t);return Ke.makeSpan(["mord","underline"],[i],t)},mathmlBuilder:function(e,t){var r=new Tt.MathNode("mo",[new Tt.TextNode("\u203e")]);r.setAttribute("stretchy","true");var n=new Tt.MathNode("munder",[Rt(e.body,t),r]);return n.setAttribute("accentunder","true"),n}}),ot({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler:function(e,t){return{type:"vcenter",mode:e.parser.mode,body:t[0]}},htmlBuilder:function(e,t){var r=wt(e.body,t),n=t.fontMetrics().axisHeight,a=.5*(r.height-n-(r.depth+n));return Ke.makeVList({positionType:"shift",positionData:a,children:[{type:"elem",elem:r}]},t)},mathmlBuilder:function(e,t){return new Tt.MathNode("mpadded",[Rt(e.body,t)],["vcenter"])}}),ot({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler:function(e,t,r){throw new n("\\verb ended by end of line instead of matching delimiter")},htmlBuilder:function(e,t){for(var r=Cn(e),n=[],a=t.havingStyle(t.style.text()),i=0;i<r.length;i++){var o=r[i];"~"===o&&(o="\\textasciitilde"),n.push(Ke.makeSymbol(o,"Typewriter-Regular",e.mode,a,["mord","texttt"]))}return Ke.makeSpan(["mord","text"].concat(a.sizingClasses(t)),Ke.tryCombineChars(n),a)},mathmlBuilder:function(e,t){var r=new Tt.TextNode(Cn(e)),n=new Tt.MathNode("mtext",[r]);return n.setAttribute("mathvariant","monospace"),n}});var Cn=function(e){return e.body.replace(/ /g,e.star?"\u2423":"\xa0")},qn=nt,Nn=new RegExp("[\u0300-\u036f]+$"),In=function(){function e(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp("([ \r\n\t]+)|\\\\(\n|[ \r\t]+\n?)[ \r\t]*|([!-\\[\\]-\u2027\u202a-\ud7ff\uf900-\uffff][\u0300-\u036f]*|[\ud800-\udbff][\udc00-\udfff][\u0300-\u036f]*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|(\\\\[a-zA-Z@]+)[ \r\n\t]*|\\\\[^\ud800-\udfff])","g"),this.catcodes={"%":14,"~":13}}var t=e.prototype;return t.setCatcode=function(e,t){this.catcodes[e]=t},t.lex=function(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new Lr("EOF",new Er(this,t,t));var r=this.tokenRegex.exec(e);if(null===r||r.index!==t)throw new n("Unexpected character: '"+e[t]+"'",new Lr(e[t],new Er(this,t,t+1)));var a=r[6]||r[3]||(r[2]?"\\ ":" ");if(14===this.catcodes[a]){var i=e.indexOf("\n",this.tokenRegex.lastIndex);return-1===i?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=i+1,this.lex()}return new Lr(a,new Er(this,t,this.tokenRegex.lastIndex))},e}(),Rn=function(){function e(e,t){void 0===e&&(e={}),void 0===t&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}var t=e.prototype;return t.beginGroup=function(){this.undefStack.push({})},t.endGroup=function(){if(0===this.undefStack.length)throw new n("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var t in e)e.hasOwnProperty(t)&&(null==e[t]?delete this.current[t]:this.current[t]=e[t])},t.endGroups=function(){for(;this.undefStack.length>0;)this.endGroup()},t.has=function(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)},t.get=function(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]},t.set=function(e,t,r){if(void 0===r&&(r=!1),r){for(var n=0;n<this.undefStack.length;n++)delete this.undefStack[n][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var a=this.undefStack[this.undefStack.length-1];a&&!a.hasOwnProperty(e)&&(a[e]=this.current[e])}null==t?delete this.current[e]:this.current[e]=t},e}(),On=Or;Hr("\\noexpand",(function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}})),Hr("\\expandafter",(function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}})),Hr("\\@firstoftwo",(function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}})),Hr("\\@secondoftwo",(function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}})),Hr("\\@ifnextchar",(function(e){var t=e.consumeArgs(3);e.consumeSpaces();var r=e.future();return 1===t[0].length&&t[0][0].text===r.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}})),Hr("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),Hr("\\TextOrMath",(function(e){var t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}}));var Hn={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};Hr("\\char",(function(e){var t,r=e.popToken(),a="";if("'"===r.text)t=8,r=e.popToken();else if('"'===r.text)t=16,r=e.popToken();else if("`"===r.text)if("\\"===(r=e.popToken()).text[0])a=r.text.charCodeAt(1);else{if("EOF"===r.text)throw new n("\\char` missing argument");a=r.text.charCodeAt(0)}else t=10;if(t){if(null==(a=Hn[r.text])||a>=t)throw new n("Invalid base-"+t+" digit "+r.text);for(var i;null!=(i=Hn[e.future().text])&&i<t;)a*=t,a+=i,e.popToken()}return"\\@char{"+a+"}"}));var En=function(e,t,r){var a=e.consumeArg().tokens;if(1!==a.length)throw new n("\\newcommand's first argument must be a macro name");var i=a[0].text,o=e.isDefined(i);if(o&&!t)throw new n("\\newcommand{"+i+"} attempting to redefine "+i+"; use \\renewcommand");if(!o&&!r)throw new n("\\renewcommand{"+i+"} when command "+i+" does not yet exist; use \\newcommand");var s=0;if(1===(a=e.consumeArg().tokens).length&&"["===a[0].text){for(var l="",h=e.expandNextToken();"]"!==h.text&&"EOF"!==h.text;)l+=h.text,h=e.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new n("Invalid number of arguments: "+l);s=parseInt(l),a=e.consumeArg().tokens}return e.macros.set(i,{tokens:a,numArgs:s}),""};Hr("\\newcommand",(function(e){return En(e,!1,!0)})),Hr("\\renewcommand",(function(e){return En(e,!0,!1)})),Hr("\\providecommand",(function(e){return En(e,!0,!0)})),Hr("\\message",(function(e){var t=e.consumeArgs(1)[0];return console.log(t.reverse().map((function(e){return e.text})).join("")),""})),Hr("\\errmessage",(function(e){var t=e.consumeArgs(1)[0];return console.error(t.reverse().map((function(e){return e.text})).join("")),""})),Hr("\\show",(function(e){var t=e.popToken(),r=t.text;return console.log(t,e.macros.get(r),qn[r],ae.math[r],ae.text[r]),""})),Hr("\\bgroup","{"),Hr("\\egroup","}"),Hr("~","\\nobreakspace"),Hr("\\lq","`"),Hr("\\rq","'"),Hr("\\aa","\\r a"),Hr("\\AA","\\r A"),Hr("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`\xa9}"),Hr("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),Hr("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`\xae}"),Hr("\u212c","\\mathscr{B}"),Hr("\u2130","\\mathscr{E}"),Hr("\u2131","\\mathscr{F}"),Hr("\u210b","\\mathscr{H}"),Hr("\u2110","\\mathscr{I}"),Hr("\u2112","\\mathscr{L}"),Hr("\u2133","\\mathscr{M}"),Hr("\u211b","\\mathscr{R}"),Hr("\u212d","\\mathfrak{C}"),Hr("\u210c","\\mathfrak{H}"),Hr("\u2128","\\mathfrak{Z}"),Hr("\\Bbbk","\\Bbb{k}"),Hr("\xb7","\\cdotp"),Hr("\\llap","\\mathllap{\\textrm{#1}}"),Hr("\\rlap","\\mathrlap{\\textrm{#1}}"),Hr("\\clap","\\mathclap{\\textrm{#1}}"),Hr("\\mathstrut","\\vphantom{(}"),Hr("\\underbar","\\underline{\\text{#1}}"),Hr("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),Hr("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`\u2260}}"),Hr("\\ne","\\neq"),Hr("\u2260","\\neq"),Hr("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`\u2209}}"),Hr("\u2209","\\notin"),Hr("\u2258","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`\u2258}}"),Hr("\u2259","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}"),Hr("\u225a","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225a}}"),Hr("\u225b","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`\u225b}}"),Hr("\u225d","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`\u225d}}"),Hr("\u225e","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`\u225e}}"),Hr("\u225f","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225f}}"),Hr("\u27c2","\\perp"),Hr("\u203c","\\mathclose{!\\mkern-0.8mu!}"),Hr("\u220c","\\notni"),Hr("\u231c","\\ulcorner"),Hr("\u231d","\\urcorner"),Hr("\u231e","\\llcorner"),Hr("\u231f","\\lrcorner"),Hr("\xa9","\\copyright"),Hr("\xae","\\textregistered"),Hr("\ufe0f","\\textregistered"),Hr("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),Hr("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),Hr("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),Hr("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),Hr("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}"),Hr("\u22ee","\\vdots"),Hr("\\varGamma","\\mathit{\\Gamma}"),Hr("\\varDelta","\\mathit{\\Delta}"),Hr("\\varTheta","\\mathit{\\Theta}"),Hr("\\varLambda","\\mathit{\\Lambda}"),Hr("\\varXi","\\mathit{\\Xi}"),Hr("\\varPi","\\mathit{\\Pi}"),Hr("\\varSigma","\\mathit{\\Sigma}"),Hr("\\varUpsilon","\\mathit{\\Upsilon}"),Hr("\\varPhi","\\mathit{\\Phi}"),Hr("\\varPsi","\\mathit{\\Psi}"),Hr("\\varOmega","\\mathit{\\Omega}"),Hr("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),Hr("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),Hr("\\boxed","\\fbox{$\\displaystyle{#1}$}"),Hr("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),Hr("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),Hr("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");var Ln={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};Hr("\\dots",(function(e){var t="\\dotso",r=e.expandAfterFuture().text;return r in Ln?t=Ln[r]:("\\not"===r.substr(0,4)||r in ae.math&&l.contains(["bin","rel"],ae.math[r].group))&&(t="\\dotsb"),t}));var Dn={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};Hr("\\dotso",(function(e){return e.future().text in Dn?"\\ldots\\,":"\\ldots"})),Hr("\\dotsc",(function(e){var t=e.future().text;return t in Dn&&","!==t?"\\ldots\\,":"\\ldots"})),Hr("\\cdots",(function(e){return e.future().text in Dn?"\\@cdots\\,":"\\@cdots"})),Hr("\\dotsb","\\cdots"),Hr("\\dotsm","\\cdots"),Hr("\\dotsi","\\!\\cdots"),Hr("\\dotsx","\\ldots\\,"),Hr("\\DOTSI","\\relax"),Hr("\\DOTSB","\\relax"),Hr("\\DOTSX","\\relax"),Hr("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),Hr("\\,","\\tmspace+{3mu}{.1667em}"),Hr("\\thinspace","\\,"),Hr("\\>","\\mskip{4mu}"),Hr("\\:","\\tmspace+{4mu}{.2222em}"),Hr("\\medspace","\\:"),Hr("\\;","\\tmspace+{5mu}{.2777em}"),Hr("\\thickspace","\\;"),Hr("\\!","\\tmspace-{3mu}{.1667em}"),Hr("\\negthinspace","\\!"),Hr("\\negmedspace","\\tmspace-{4mu}{.2222em}"),Hr("\\negthickspace","\\tmspace-{5mu}{.277em}"),Hr("\\enspace","\\kern.5em "),Hr("\\enskip","\\hskip.5em\\relax"),Hr("\\quad","\\hskip1em\\relax"),Hr("\\qquad","\\hskip2em\\relax"),Hr("\\tag","\\@ifstar\\tag@literal\\tag@paren"),Hr("\\tag@paren","\\tag@literal{({#1})}"),Hr("\\tag@literal",(function(e){if(e.macros.get("\\df@tag"))throw new n("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"})),Hr("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),Hr("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),Hr("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),Hr("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),Hr("\\pmb","\\html@mathml{\\@binrel{#1}{\\mathrlap{#1}\\kern0.5px#1}}{\\mathbf{#1}}"),Hr("\\newline","\\\\\\relax"),Hr("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var Pn=V(T["Main-Regular"]["T".charCodeAt(0)][1]-.7*T["Main-Regular"]["A".charCodeAt(0)][1]);Hr("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+Pn+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),Hr("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+Pn+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),Hr("\\hspace","\\@ifstar\\@hspacer\\@hspace"),Hr("\\@hspace","\\hskip #1\\relax"),Hr("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),Hr("\\ordinarycolon",":"),Hr("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),Hr("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),Hr("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),Hr("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),Hr("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),Hr("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),Hr("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),Hr("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),Hr("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),Hr("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),Hr("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),Hr("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),Hr("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),Hr("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),Hr("\u2237","\\dblcolon"),Hr("\u2239","\\eqcolon"),Hr("\u2254","\\coloneqq"),Hr("\u2255","\\eqqcolon"),Hr("\u2a74","\\Coloneqq"),Hr("\\ratio","\\vcentcolon"),Hr("\\coloncolon","\\dblcolon"),Hr("\\colonequals","\\coloneqq"),Hr("\\coloncolonequals","\\Coloneqq"),Hr("\\equalscolon","\\eqqcolon"),Hr("\\equalscoloncolon","\\Eqqcolon"),Hr("\\colonminus","\\coloneq"),Hr("\\coloncolonminus","\\Coloneq"),Hr("\\minuscolon","\\eqcolon"),Hr("\\minuscoloncolon","\\Eqcolon"),Hr("\\coloncolonapprox","\\Colonapprox"),Hr("\\coloncolonsim","\\Colonsim"),Hr("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Hr("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Hr("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Hr("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Hr("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220c}}"),Hr("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),Hr("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),Hr("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),Hr("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),Hr("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),Hr("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),Hr("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),Hr("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),Hr("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}"),Hr("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}"),Hr("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}"),Hr("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}"),Hr("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}"),Hr("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}"),Hr("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}"),Hr("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}"),Hr("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}"),Hr("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}"),Hr("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228a}"),Hr("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2acb}"),Hr("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228b}"),Hr("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2acc}"),Hr("\\imath","\\html@mathml{\\@imath}{\u0131}"),Hr("\\jmath","\\html@mathml{\\@jmath}{\u0237}"),Hr("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27e6}}"),Hr("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27e7}}"),Hr("\u27e6","\\llbracket"),Hr("\u27e7","\\rrbracket"),Hr("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}"),Hr("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}"),Hr("\u2983","\\lBrace"),Hr("\u2984","\\rBrace"),Hr("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`\u29b5}}"),Hr("\u29b5","\\minuso"),Hr("\\darr","\\downarrow"),Hr("\\dArr","\\Downarrow"),Hr("\\Darr","\\Downarrow"),Hr("\\lang","\\langle"),Hr("\\rang","\\rangle"),Hr("\\uarr","\\uparrow"),Hr("\\uArr","\\Uparrow"),Hr("\\Uarr","\\Uparrow"),Hr("\\N","\\mathbb{N}"),Hr("\\R","\\mathbb{R}"),Hr("\\Z","\\mathbb{Z}"),Hr("\\alef","\\aleph"),Hr("\\alefsym","\\aleph"),Hr("\\Alpha","\\mathrm{A}"),Hr("\\Beta","\\mathrm{B}"),Hr("\\bull","\\bullet"),Hr("\\Chi","\\mathrm{X}"),Hr("\\clubs","\\clubsuit"),Hr("\\cnums","\\mathbb{C}"),Hr("\\Complex","\\mathbb{C}"),Hr("\\Dagger","\\ddagger"),Hr("\\diamonds","\\diamondsuit"),Hr("\\empty","\\emptyset"),Hr("\\Epsilon","\\mathrm{E}"),Hr("\\Eta","\\mathrm{H}"),Hr("\\exist","\\exists"),Hr("\\harr","\\leftrightarrow"),Hr("\\hArr","\\Leftrightarrow"),Hr("\\Harr","\\Leftrightarrow"),Hr("\\hearts","\\heartsuit"),Hr("\\image","\\Im"),Hr("\\infin","\\infty"),Hr("\\Iota","\\mathrm{I}"),Hr("\\isin","\\in"),Hr("\\Kappa","\\mathrm{K}"),Hr("\\larr","\\leftarrow"),Hr("\\lArr","\\Leftarrow"),Hr("\\Larr","\\Leftarrow"),Hr("\\lrarr","\\leftrightarrow"),Hr("\\lrArr","\\Leftrightarrow"),Hr("\\Lrarr","\\Leftrightarrow"),Hr("\\Mu","\\mathrm{M}"),Hr("\\natnums","\\mathbb{N}"),Hr("\\Nu","\\mathrm{N}"),Hr("\\Omicron","\\mathrm{O}"),Hr("\\plusmn","\\pm"),Hr("\\rarr","\\rightarrow"),Hr("\\rArr","\\Rightarrow"),Hr("\\Rarr","\\Rightarrow"),Hr("\\real","\\Re"),Hr("\\reals","\\mathbb{R}"),Hr("\\Reals","\\mathbb{R}"),Hr("\\Rho","\\mathrm{P}"),Hr("\\sdot","\\cdot"),Hr("\\sect","\\S"),Hr("\\spades","\\spadesuit"),Hr("\\sub","\\subset"),Hr("\\sube","\\subseteq"),Hr("\\supe","\\supseteq"),Hr("\\Tau","\\mathrm{T}"),Hr("\\thetasym","\\vartheta"),Hr("\\weierp","\\wp"),Hr("\\Zeta","\\mathrm{Z}"),Hr("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),Hr("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),Hr("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),Hr("\\bra","\\mathinner{\\langle{#1}|}"),Hr("\\ket","\\mathinner{|{#1}\\rangle}"),Hr("\\braket","\\mathinner{\\langle{#1}\\rangle}"),Hr("\\Bra","\\left\\langle#1\\right|"),Hr("\\Ket","\\left|#1\\right\\rangle");var Fn=function(e){return function(t){var r=t.consumeArg().tokens,n=t.consumeArg().tokens,a=t.consumeArg().tokens,i=t.consumeArg().tokens,o=t.macros.get("|"),s=t.macros.get("\\|");t.macros.beginGroup();var l=function(t){return function(r){e&&(r.macros.set("|",o),a.length&&r.macros.set("\\|",s));var i=t;return!t&&a.length&&"|"===r.future().text&&(r.popToken(),i=!0),{tokens:i?a:n,numArgs:0}}};t.macros.set("|",l(!1)),a.length&&t.macros.set("\\|",l(!0));var h=t.consumeArg().tokens,m=t.expandTokens([].concat(i,h,r));return t.macros.endGroup(),{tokens:m.reverse(),numArgs:0}}};Hr("\\bra@ket",Fn(!1)),Hr("\\bra@set",Fn(!0)),Hr("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),Hr("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),Hr("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),Hr("\\angln","{\\angl n}"),Hr("\\blue","\\textcolor{##6495ed}{#1}"),Hr("\\orange","\\textcolor{##ffa500}{#1}"),Hr("\\pink","\\textcolor{##ff00af}{#1}"),Hr("\\red","\\textcolor{##df0030}{#1}"),Hr("\\green","\\textcolor{##28ae7b}{#1}"),Hr("\\gray","\\textcolor{gray}{#1}"),Hr("\\purple","\\textcolor{##9d38bd}{#1}"),Hr("\\blueA","\\textcolor{##ccfaff}{#1}"),Hr("\\blueB","\\textcolor{##80f6ff}{#1}"),Hr("\\blueC","\\textcolor{##63d9ea}{#1}"),Hr("\\blueD","\\textcolor{##11accd}{#1}"),Hr("\\blueE","\\textcolor{##0c7f99}{#1}"),Hr("\\tealA","\\textcolor{##94fff5}{#1}"),Hr("\\tealB","\\textcolor{##26edd5}{#1}"),Hr("\\tealC","\\textcolor{##01d1c1}{#1}"),Hr("\\tealD","\\textcolor{##01a995}{#1}"),Hr("\\tealE","\\textcolor{##208170}{#1}"),Hr("\\greenA","\\textcolor{##b6ffb0}{#1}"),Hr("\\greenB","\\textcolor{##8af281}{#1}"),Hr("\\greenC","\\textcolor{##74cf70}{#1}"),Hr("\\greenD","\\textcolor{##1fab54}{#1}"),Hr("\\greenE","\\textcolor{##0d923f}{#1}"),Hr("\\goldA","\\textcolor{##ffd0a9}{#1}"),Hr("\\goldB","\\textcolor{##ffbb71}{#1}"),Hr("\\goldC","\\textcolor{##ff9c39}{#1}"),Hr("\\goldD","\\textcolor{##e07d10}{#1}"),Hr("\\goldE","\\textcolor{##a75a05}{#1}"),Hr("\\redA","\\textcolor{##fca9a9}{#1}"),Hr("\\redB","\\textcolor{##ff8482}{#1}"),Hr("\\redC","\\textcolor{##f9685d}{#1}"),Hr("\\redD","\\textcolor{##e84d39}{#1}"),Hr("\\redE","\\textcolor{##bc2612}{#1}"),Hr("\\maroonA","\\textcolor{##ffbde0}{#1}"),Hr("\\maroonB","\\textcolor{##ff92c6}{#1}"),Hr("\\maroonC","\\textcolor{##ed5fa6}{#1}"),Hr("\\maroonD","\\textcolor{##ca337c}{#1}"),Hr("\\maroonE","\\textcolor{##9e034e}{#1}"),Hr("\\purpleA","\\textcolor{##ddd7ff}{#1}"),Hr("\\purpleB","\\textcolor{##c6b9fc}{#1}"),Hr("\\purpleC","\\textcolor{##aa87ff}{#1}"),Hr("\\purpleD","\\textcolor{##7854ab}{#1}"),Hr("\\purpleE","\\textcolor{##543b78}{#1}"),Hr("\\mintA","\\textcolor{##f5f9e8}{#1}"),Hr("\\mintB","\\textcolor{##edf2df}{#1}"),Hr("\\mintC","\\textcolor{##e0e5cc}{#1}"),Hr("\\grayA","\\textcolor{##f6f7f7}{#1}"),Hr("\\grayB","\\textcolor{##f0f1f2}{#1}"),Hr("\\grayC","\\textcolor{##e3e5e6}{#1}"),Hr("\\grayD","\\textcolor{##d6d8da}{#1}"),Hr("\\grayE","\\textcolor{##babec2}{#1}"),Hr("\\grayF","\\textcolor{##888d93}{#1}"),Hr("\\grayG","\\textcolor{##626569}{#1}"),Hr("\\grayH","\\textcolor{##3b3e40}{#1}"),Hr("\\grayI","\\textcolor{##21242c}{#1}"),Hr("\\kaBlue","\\textcolor{##314453}{#1}"),Hr("\\kaGreen","\\textcolor{##71B307}{#1}");var Vn={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},Gn=function(){function e(e,t,r){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new Rn(On,t.macros),this.mode=r,this.stack=[]}var t=e.prototype;return t.feed=function(e){this.lexer=new In(e,this.settings)},t.switchMode=function(e){this.mode=e},t.beginGroup=function(){this.macros.beginGroup()},t.endGroup=function(){this.macros.endGroup()},t.endGroups=function(){this.macros.endGroups()},t.future=function(){return 0===this.stack.length&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]},t.popToken=function(){return this.future(),this.stack.pop()},t.pushToken=function(e){this.stack.push(e)},t.pushTokens=function(e){var t;(t=this.stack).push.apply(t,e)},t.scanArgument=function(e){var t,r,n;if(e){if(this.consumeSpaces(),"["!==this.future().text)return null;t=this.popToken();var a=this.consumeArg(["]"]);n=a.tokens,r=a.end}else{var i=this.consumeArg();n=i.tokens,t=i.start,r=i.end}return this.pushToken(new Lr("EOF",r.loc)),this.pushTokens(n),t.range(r,"")},t.consumeSpaces=function(){for(;" "===this.future().text;)this.stack.pop()},t.consumeArg=function(e){var t=[],r=e&&e.length>0;r||this.consumeSpaces();var a,i=this.future(),o=0,s=0;do{if(a=this.popToken(),t.push(a),"{"===a.text)++o;else if("}"===a.text){if(-1===--o)throw new n("Extra }",a)}else if("EOF"===a.text)throw new n("Unexpected end of input in a macro argument, expected '"+(e&&r?e[s]:"}")+"'",a);if(e&&r)if((0===o||1===o&&"{"===e[s])&&a.text===e[s]){if(++s===e.length){t.splice(-s,s);break}}else s=0}while(0!==o||r);return"{"===i.text&&"}"===t[t.length-1].text&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:i,end:a}},t.consumeArgs=function(e,t){if(t){if(t.length!==e+1)throw new n("The length of delimiters doesn't match the number of args!");for(var r=t[0],a=0;a<r.length;a++){var i=this.popToken();if(r[a]!==i.text)throw new n("Use of the macro doesn't match its definition",i)}}for(var o=[],s=0;s<e;s++)o.push(this.consumeArg(t&&t[s+1]).tokens);return o},t.expandOnce=function(e){var t=this.popToken(),r=t.text,a=t.noexpand?null:this._getExpansion(r);if(null==a||e&&a.unexpandable){if(e&&null==a&&"\\"===r[0]&&!this.isDefined(r))throw new n("Undefined control sequence: "+r);return this.pushToken(t),t}if(this.expansionCount++,this.expansionCount>this.settings.maxExpand)throw new n("Too many expansions: infinite loop or need to increase maxExpand setting");var i=a.tokens,o=this.consumeArgs(a.numArgs,a.delimiters);if(a.numArgs)for(var s=(i=i.slice()).length-1;s>=0;--s){var l=i[s];if("#"===l.text){if(0===s)throw new n("Incomplete placeholder at end of macro body",l);if("#"===(l=i[--s]).text)i.splice(s+1,1);else{if(!/^[1-9]$/.test(l.text))throw new n("Not a valid argument number",l);var h;(h=i).splice.apply(h,[s,2].concat(o[+l.text-1]))}}}return this.pushTokens(i),i},t.expandAfterFuture=function(){return this.expandOnce(),this.future()},t.expandNextToken=function(){for(;;){var e=this.expandOnce();if(e instanceof Lr)return e.treatAsRelax&&(e.text="\\relax"),this.stack.pop()}throw new Error},t.expandMacro=function(e){return this.macros.has(e)?this.expandTokens([new Lr(e)]):void 0},t.expandTokens=function(e){var t=[],r=this.stack.length;for(this.pushTokens(e);this.stack.length>r;){var n=this.expandOnce(!0);n instanceof Lr&&(n.treatAsRelax&&(n.noexpand=!1,n.treatAsRelax=!1),t.push(this.stack.pop()))}return t},t.expandMacroAsText=function(e){var t=this.expandMacro(e);return t?t.map((function(e){return e.text})).join(""):t},t._getExpansion=function(e){var t=this.macros.get(e);if(null==t)return t;if(1===e.length){var r=this.lexer.catcodes[e];if(null!=r&&13!==r)return}var n="function"===typeof t?t(this):t;if("string"===typeof n){var a=0;if(-1!==n.indexOf("#"))for(var i=n.replace(/##/g,"");-1!==i.indexOf("#"+(a+1));)++a;for(var o=new In(n,this.settings),s=[],l=o.lex();"EOF"!==l.text;)s.push(l),l=o.lex();return s.reverse(),{tokens:s,numArgs:a}}return n},t.isDefined=function(e){return this.macros.has(e)||qn.hasOwnProperty(e)||ae.math.hasOwnProperty(e)||ae.text.hasOwnProperty(e)||Vn.hasOwnProperty(e)},t.isExpandable=function(e){var t=this.macros.get(e);return null!=t?"string"===typeof t||"function"===typeof t||!t.unexpandable:qn.hasOwnProperty(e)&&!qn[e].primitive},e}(),Un=/^[\u208a\u208b\u208c\u208d\u208e\u2080\u2081\u2082\u2083\u2084\u2085\u2086\u2087\u2088\u2089\u2090\u2091\u2095\u1d62\u2c7c\u2096\u2097\u2098\u2099\u2092\u209a\u1d63\u209b\u209c\u1d64\u1d65\u2093\u1d66\u1d67\u1d68\u1d69\u1d6a]/,Yn=Object.freeze({"\u208a":"+","\u208b":"-","\u208c":"=","\u208d":"(","\u208e":")","\u2080":"0","\u2081":"1","\u2082":"2","\u2083":"3","\u2084":"4","\u2085":"5","\u2086":"6","\u2087":"7","\u2088":"8","\u2089":"9","\u2090":"a","\u2091":"e","\u2095":"h","\u1d62":"i","\u2c7c":"j","\u2096":"k","\u2097":"l","\u2098":"m","\u2099":"n","\u2092":"o","\u209a":"p","\u1d63":"r","\u209b":"s","\u209c":"t","\u1d64":"u","\u1d65":"v","\u2093":"x","\u1d66":"\u03b2","\u1d67":"\u03b3","\u1d68":"\u03c1","\u1d69":"\u03d5","\u1d6a":"\u03c7","\u207a":"+","\u207b":"-","\u207c":"=","\u207d":"(","\u207e":")","\u2070":"0","\xb9":"1","\xb2":"2","\xb3":"3","\u2074":"4","\u2075":"5","\u2076":"6","\u2077":"7","\u2078":"8","\u2079":"9","\u1d2c":"A","\u1d2e":"B","\u1d30":"D","\u1d31":"E","\u1d33":"G","\u1d34":"H","\u1d35":"I","\u1d36":"J","\u1d37":"K","\u1d38":"L","\u1d39":"M","\u1d3a":"N","\u1d3c":"O","\u1d3e":"P","\u1d3f":"R","\u1d40":"T","\u1d41":"U","\u2c7d":"V","\u1d42":"W","\u1d43":"a","\u1d47":"b","\u1d9c":"c","\u1d48":"d","\u1d49":"e","\u1da0":"f","\u1d4d":"g","\u02b0":"h","\u2071":"i","\u02b2":"j","\u1d4f":"k","\u02e1":"l","\u1d50":"m","\u207f":"n","\u1d52":"o","\u1d56":"p","\u02b3":"r","\u02e2":"s","\u1d57":"t","\u1d58":"u","\u1d5b":"v","\u02b7":"w","\u02e3":"x","\u02b8":"y","\u1dbb":"z","\u1d5d":"\u03b2","\u1d5e":"\u03b3","\u1d5f":"\u03b4","\u1d60":"\u03d5","\u1d61":"\u03c7","\u1dbf":"\u03b8"}),Xn={"\u0301":{text:"\\'",math:"\\acute"},"\u0300":{text:"\\`",math:"\\grave"},"\u0308":{text:'\\"',math:"\\ddot"},"\u0303":{text:"\\~",math:"\\tilde"},"\u0304":{text:"\\=",math:"\\bar"},"\u0306":{text:"\\u",math:"\\breve"},"\u030c":{text:"\\v",math:"\\check"},"\u0302":{text:"\\^",math:"\\hat"},"\u0307":{text:"\\.",math:"\\dot"},"\u030a":{text:"\\r",math:"\\mathring"},"\u030b":{text:"\\H"},"\u0327":{text:"\\c"}},Wn={"\xe1":"a\u0301","\xe0":"a\u0300","\xe4":"a\u0308","\u01df":"a\u0308\u0304","\xe3":"a\u0303","\u0101":"a\u0304","\u0103":"a\u0306","\u1eaf":"a\u0306\u0301","\u1eb1":"a\u0306\u0300","\u1eb5":"a\u0306\u0303","\u01ce":"a\u030c","\xe2":"a\u0302","\u1ea5":"a\u0302\u0301","\u1ea7":"a\u0302\u0300","\u1eab":"a\u0302\u0303","\u0227":"a\u0307","\u01e1":"a\u0307\u0304","\xe5":"a\u030a","\u01fb":"a\u030a\u0301","\u1e03":"b\u0307","\u0107":"c\u0301","\u1e09":"c\u0327\u0301","\u010d":"c\u030c","\u0109":"c\u0302","\u010b":"c\u0307","\xe7":"c\u0327","\u010f":"d\u030c","\u1e0b":"d\u0307","\u1e11":"d\u0327","\xe9":"e\u0301","\xe8":"e\u0300","\xeb":"e\u0308","\u1ebd":"e\u0303","\u0113":"e\u0304","\u1e17":"e\u0304\u0301","\u1e15":"e\u0304\u0300","\u0115":"e\u0306","\u1e1d":"e\u0327\u0306","\u011b":"e\u030c","\xea":"e\u0302","\u1ebf":"e\u0302\u0301","\u1ec1":"e\u0302\u0300","\u1ec5":"e\u0302\u0303","\u0117":"e\u0307","\u0229":"e\u0327","\u1e1f":"f\u0307","\u01f5":"g\u0301","\u1e21":"g\u0304","\u011f":"g\u0306","\u01e7":"g\u030c","\u011d":"g\u0302","\u0121":"g\u0307","\u0123":"g\u0327","\u1e27":"h\u0308","\u021f":"h\u030c","\u0125":"h\u0302","\u1e23":"h\u0307","\u1e29":"h\u0327","\xed":"i\u0301","\xec":"i\u0300","\xef":"i\u0308","\u1e2f":"i\u0308\u0301","\u0129":"i\u0303","\u012b":"i\u0304","\u012d":"i\u0306","\u01d0":"i\u030c","\xee":"i\u0302","\u01f0":"j\u030c","\u0135":"j\u0302","\u1e31":"k\u0301","\u01e9":"k\u030c","\u0137":"k\u0327","\u013a":"l\u0301","\u013e":"l\u030c","\u013c":"l\u0327","\u1e3f":"m\u0301","\u1e41":"m\u0307","\u0144":"n\u0301","\u01f9":"n\u0300","\xf1":"n\u0303","\u0148":"n\u030c","\u1e45":"n\u0307","\u0146":"n\u0327","\xf3":"o\u0301","\xf2":"o\u0300","\xf6":"o\u0308","\u022b":"o\u0308\u0304","\xf5":"o\u0303","\u1e4d":"o\u0303\u0301","\u1e4f":"o\u0303\u0308","\u022d":"o\u0303\u0304","\u014d":"o\u0304","\u1e53":"o\u0304\u0301","\u1e51":"o\u0304\u0300","\u014f":"o\u0306","\u01d2":"o\u030c","\xf4":"o\u0302","\u1ed1":"o\u0302\u0301","\u1ed3":"o\u0302\u0300","\u1ed7":"o\u0302\u0303","\u022f":"o\u0307","\u0231":"o\u0307\u0304","\u0151":"o\u030b","\u1e55":"p\u0301","\u1e57":"p\u0307","\u0155":"r\u0301","\u0159":"r\u030c","\u1e59":"r\u0307","\u0157":"r\u0327","\u015b":"s\u0301","\u1e65":"s\u0301\u0307","\u0161":"s\u030c","\u1e67":"s\u030c\u0307","\u015d":"s\u0302","\u1e61":"s\u0307","\u015f":"s\u0327","\u1e97":"t\u0308","\u0165":"t\u030c","\u1e6b":"t\u0307","\u0163":"t\u0327","\xfa":"u\u0301","\xf9":"u\u0300","\xfc":"u\u0308","\u01d8":"u\u0308\u0301","\u01dc":"u\u0308\u0300","\u01d6":"u\u0308\u0304","\u01da":"u\u0308\u030c","\u0169":"u\u0303","\u1e79":"u\u0303\u0301","\u016b":"u\u0304","\u1e7b":"u\u0304\u0308","\u016d":"u\u0306","\u01d4":"u\u030c","\xfb":"u\u0302","\u016f":"u\u030a","\u0171":"u\u030b","\u1e7d":"v\u0303","\u1e83":"w\u0301","\u1e81":"w\u0300","\u1e85":"w\u0308","\u0175":"w\u0302","\u1e87":"w\u0307","\u1e98":"w\u030a","\u1e8d":"x\u0308","\u1e8b":"x\u0307","\xfd":"y\u0301","\u1ef3":"y\u0300","\xff":"y\u0308","\u1ef9":"y\u0303","\u0233":"y\u0304","\u0177":"y\u0302","\u1e8f":"y\u0307","\u1e99":"y\u030a","\u017a":"z\u0301","\u017e":"z\u030c","\u1e91":"z\u0302","\u017c":"z\u0307","\xc1":"A\u0301","\xc0":"A\u0300","\xc4":"A\u0308","\u01de":"A\u0308\u0304","\xc3":"A\u0303","\u0100":"A\u0304","\u0102":"A\u0306","\u1eae":"A\u0306\u0301","\u1eb0":"A\u0306\u0300","\u1eb4":"A\u0306\u0303","\u01cd":"A\u030c","\xc2":"A\u0302","\u1ea4":"A\u0302\u0301","\u1ea6":"A\u0302\u0300","\u1eaa":"A\u0302\u0303","\u0226":"A\u0307","\u01e0":"A\u0307\u0304","\xc5":"A\u030a","\u01fa":"A\u030a\u0301","\u1e02":"B\u0307","\u0106":"C\u0301","\u1e08":"C\u0327\u0301","\u010c":"C\u030c","\u0108":"C\u0302","\u010a":"C\u0307","\xc7":"C\u0327","\u010e":"D\u030c","\u1e0a":"D\u0307","\u1e10":"D\u0327","\xc9":"E\u0301","\xc8":"E\u0300","\xcb":"E\u0308","\u1ebc":"E\u0303","\u0112":"E\u0304","\u1e16":"E\u0304\u0301","\u1e14":"E\u0304\u0300","\u0114":"E\u0306","\u1e1c":"E\u0327\u0306","\u011a":"E\u030c","\xca":"E\u0302","\u1ebe":"E\u0302\u0301","\u1ec0":"E\u0302\u0300","\u1ec4":"E\u0302\u0303","\u0116":"E\u0307","\u0228":"E\u0327","\u1e1e":"F\u0307","\u01f4":"G\u0301","\u1e20":"G\u0304","\u011e":"G\u0306","\u01e6":"G\u030c","\u011c":"G\u0302","\u0120":"G\u0307","\u0122":"G\u0327","\u1e26":"H\u0308","\u021e":"H\u030c","\u0124":"H\u0302","\u1e22":"H\u0307","\u1e28":"H\u0327","\xcd":"I\u0301","\xcc":"I\u0300","\xcf":"I\u0308","\u1e2e":"I\u0308\u0301","\u0128":"I\u0303","\u012a":"I\u0304","\u012c":"I\u0306","\u01cf":"I\u030c","\xce":"I\u0302","\u0130":"I\u0307","\u0134":"J\u0302","\u1e30":"K\u0301","\u01e8":"K\u030c","\u0136":"K\u0327","\u0139":"L\u0301","\u013d":"L\u030c","\u013b":"L\u0327","\u1e3e":"M\u0301","\u1e40":"M\u0307","\u0143":"N\u0301","\u01f8":"N\u0300","\xd1":"N\u0303","\u0147":"N\u030c","\u1e44":"N\u0307","\u0145":"N\u0327","\xd3":"O\u0301","\xd2":"O\u0300","\xd6":"O\u0308","\u022a":"O\u0308\u0304","\xd5":"O\u0303","\u1e4c":"O\u0303\u0301","\u1e4e":"O\u0303\u0308","\u022c":"O\u0303\u0304","\u014c":"O\u0304","\u1e52":"O\u0304\u0301","\u1e50":"O\u0304\u0300","\u014e":"O\u0306","\u01d1":"O\u030c","\xd4":"O\u0302","\u1ed0":"O\u0302\u0301","\u1ed2":"O\u0302\u0300","\u1ed6":"O\u0302\u0303","\u022e":"O\u0307","\u0230":"O\u0307\u0304","\u0150":"O\u030b","\u1e54":"P\u0301","\u1e56":"P\u0307","\u0154":"R\u0301","\u0158":"R\u030c","\u1e58":"R\u0307","\u0156":"R\u0327","\u015a":"S\u0301","\u1e64":"S\u0301\u0307","\u0160":"S\u030c","\u1e66":"S\u030c\u0307","\u015c":"S\u0302","\u1e60":"S\u0307","\u015e":"S\u0327","\u0164":"T\u030c","\u1e6a":"T\u0307","\u0162":"T\u0327","\xda":"U\u0301","\xd9":"U\u0300","\xdc":"U\u0308","\u01d7":"U\u0308\u0301","\u01db":"U\u0308\u0300","\u01d5":"U\u0308\u0304","\u01d9":"U\u0308\u030c","\u0168":"U\u0303","\u1e78":"U\u0303\u0301","\u016a":"U\u0304","\u1e7a":"U\u0304\u0308","\u016c":"U\u0306","\u01d3":"U\u030c","\xdb":"U\u0302","\u016e":"U\u030a","\u0170":"U\u030b","\u1e7c":"V\u0303","\u1e82":"W\u0301","\u1e80":"W\u0300","\u1e84":"W\u0308","\u0174":"W\u0302","\u1e86":"W\u0307","\u1e8c":"X\u0308","\u1e8a":"X\u0307","\xdd":"Y\u0301","\u1ef2":"Y\u0300","\u0178":"Y\u0308","\u1ef8":"Y\u0303","\u0232":"Y\u0304","\u0176":"Y\u0302","\u1e8e":"Y\u0307","\u0179":"Z\u0301","\u017d":"Z\u030c","\u1e90":"Z\u0302","\u017b":"Z\u0307","\u03ac":"\u03b1\u0301","\u1f70":"\u03b1\u0300","\u1fb1":"\u03b1\u0304","\u1fb0":"\u03b1\u0306","\u03ad":"\u03b5\u0301","\u1f72":"\u03b5\u0300","\u03ae":"\u03b7\u0301","\u1f74":"\u03b7\u0300","\u03af":"\u03b9\u0301","\u1f76":"\u03b9\u0300","\u03ca":"\u03b9\u0308","\u0390":"\u03b9\u0308\u0301","\u1fd2":"\u03b9\u0308\u0300","\u1fd1":"\u03b9\u0304","\u1fd0":"\u03b9\u0306","\u03cc":"\u03bf\u0301","\u1f78":"\u03bf\u0300","\u03cd":"\u03c5\u0301","\u1f7a":"\u03c5\u0300","\u03cb":"\u03c5\u0308","\u03b0":"\u03c5\u0308\u0301","\u1fe2":"\u03c5\u0308\u0300","\u1fe1":"\u03c5\u0304","\u1fe0":"\u03c5\u0306","\u03ce":"\u03c9\u0301","\u1f7c":"\u03c9\u0300","\u038e":"\u03a5\u0301","\u1fea":"\u03a5\u0300","\u03ab":"\u03a5\u0308","\u1fe9":"\u03a5\u0304","\u1fe8":"\u03a5\u0306","\u038f":"\u03a9\u0301","\u1ffa":"\u03a9\u0300"},_n=function(){function e(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new Gn(e,t,this.mode),this.settings=t,this.leftrightDepth=0}var t=e.prototype;return t.expect=function(e,t){if(void 0===t&&(t=!0),this.fetch().text!==e)throw new n("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()},t.consume=function(){this.nextToken=null},t.fetch=function(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken},t.switchMode=function(e){this.mode=e,this.gullet.switchMode(e)},t.parse=function(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}},t.subparse=function(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new Lr("}")),this.gullet.pushTokens(e);var r=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,r},t.parseExpression=function(t,r){for(var n=[];;){"math"===this.mode&&this.consumeSpaces();var a=this.fetch();if(-1!==e.endOfExpression.indexOf(a.text))break;if(r&&a.text===r)break;if(t&&qn[a.text]&&qn[a.text].infix)break;var i=this.parseAtom(r);if(!i)break;"internal"!==i.type&&n.push(i)}return"text"===this.mode&&this.formLigatures(n),this.handleInfixNodes(n)},t.handleInfixNodes=function(e){for(var t,r=-1,a=0;a<e.length;a++)if("infix"===e[a].type){if(-1!==r)throw new n("only one infix operator per group",e[a].token);r=a,t=e[a].replaceWith}if(-1!==r&&t){var i,o,s=e.slice(0,r),l=e.slice(r+1);return i=1===s.length&&"ordgroup"===s[0].type?s[0]:{type:"ordgroup",mode:this.mode,body:s},o=1===l.length&&"ordgroup"===l[0].type?l[0]:{type:"ordgroup",mode:this.mode,body:l},["\\\\abovefrac"===t?this.callFunction(t,[i,e[r],o],[]):this.callFunction(t,[i,o],[])]}return e},t.handleSupSubscript=function(e){var t=this.fetch(),r=t.text;this.consume(),this.consumeSpaces();var a=this.parseGroup(e);if(!a)throw new n("Expected group after '"+r+"'",t);return a},t.formatUnsupportedCmd=function(e){for(var t=[],r=0;r<e.length;r++)t.push({type:"textord",mode:"text",text:e[r]});var n={type:"text",mode:this.mode,body:t};return{type:"color",mode:this.mode,color:this.settings.errorColor,body:[n]}},t.parseAtom=function(t){var r,a,i=this.parseGroup("atom",t);if("text"===this.mode)return i;for(;;){this.consumeSpaces();var o=this.fetch();if("\\limits"===o.text||"\\nolimits"===o.text){if(i&&"op"===i.type){var s="\\limits"===o.text;i.limits=s,i.alwaysHandleSupSub=!0}else{if(!i||"operatorname"!==i.type)throw new n("Limit controls must follow a math operator",o);i.alwaysHandleSupSub&&(i.limits="\\limits"===o.text)}this.consume()}else if("^"===o.text){if(r)throw new n("Double superscript",o);r=this.handleSupSubscript("superscript")}else if("_"===o.text){if(a)throw new n("Double subscript",o);a=this.handleSupSubscript("subscript")}else if("'"===o.text){if(r)throw new n("Double superscript",o);var l={type:"textord",mode:this.mode,text:"\\prime"},h=[l];for(this.consume();"'"===this.fetch().text;)h.push(l),this.consume();"^"===this.fetch().text&&h.push(this.handleSupSubscript("superscript")),r={type:"ordgroup",mode:this.mode,body:h}}else{if(!Yn[o.text])break;var m=Yn[o.text],c=Un.test(o.text);for(this.consume();;){var u=this.fetch().text;if(!Yn[u])break;if(Un.test(u)!==c)break;this.consume(),m+=Yn[u]}var p=new e(m,this.settings).parse();c?a={type:"ordgroup",mode:"math",body:p}:r={type:"ordgroup",mode:"math",body:p}}}return r||a?{type:"supsub",mode:this.mode,base:i,sup:r,sub:a}:i},t.parseFunction=function(e,t){var r=this.fetch(),a=r.text,i=qn[a];if(!i)return null;if(this.consume(),t&&"atom"!==t&&!i.allowedInArgument)throw new n("Got function '"+a+"' with no arguments"+(t?" as "+t:""),r);if("text"===this.mode&&!i.allowedInText)throw new n("Can't use function '"+a+"' in text mode",r);if("math"===this.mode&&!1===i.allowedInMath)throw new n("Can't use function '"+a+"' in math mode",r);var o=this.parseArguments(a,i),s=o.args,l=o.optArgs;return this.callFunction(a,s,l,r,e)},t.callFunction=function(e,t,r,a,i){var o={funcName:e,parser:this,token:a,breakOnTokenText:i},s=qn[e];if(s&&s.handler)return s.handler(o,t,r);throw new n("No function handler for "+e)},t.parseArguments=function(e,t){var r=t.numArgs+t.numOptionalArgs;if(0===r)return{args:[],optArgs:[]};for(var a=[],i=[],o=0;o<r;o++){var s=t.argTypes&&t.argTypes[o],l=o<t.numOptionalArgs;(t.primitive&&null==s||"sqrt"===t.type&&1===o&&null==i[0])&&(s="primitive");var h=this.parseGroupOfType("argument to '"+e+"'",s,l);if(l)i.push(h);else{if(null==h)throw new n("Null argument, please report this as a bug");a.push(h)}}return{args:a,optArgs:i}},t.parseGroupOfType=function(e,t,r){switch(t){case"color":return this.parseColorGroup(r);case"size":return this.parseSizeGroup(r);case"url":return this.parseUrlGroup(r);case"math":case"text":return this.parseArgumentGroup(r,t);case"hbox":var a=this.parseArgumentGroup(r,"text");return null!=a?{type:"styling",mode:a.mode,body:[a],style:"text"}:null;case"raw":var i=this.parseStringGroup("raw",r);return null!=i?{type:"raw",mode:"text",string:i.text}:null;case"primitive":if(r)throw new n("A primitive argument cannot be optional");var o=this.parseGroup(e);if(null==o)throw new n("Expected group as "+e,this.fetch());return o;case"original":case null:case void 0:return this.parseArgumentGroup(r);default:throw new n("Unknown group type as "+e,this.fetch())}},t.consumeSpaces=function(){for(;" "===this.fetch().text;)this.consume()},t.parseStringGroup=function(e,t){var r=this.gullet.scanArgument(t);if(null==r)return null;for(var n,a="";"EOF"!==(n=this.fetch()).text;)a+=n.text,this.consume();return this.consume(),r.text=a,r},t.parseRegexGroup=function(e,t){for(var r,a=this.fetch(),i=a,o="";"EOF"!==(r=this.fetch()).text&&e.test(o+r.text);)o+=(i=r).text,this.consume();if(""===o)throw new n("Invalid "+t+": '"+a.text+"'",a);return a.range(i,o)},t.parseColorGroup=function(e){var t=this.parseStringGroup("color",e);if(null==t)return null;var r=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);if(!r)throw new n("Invalid color: '"+t.text+"'",t);var a=r[0];return/^[0-9a-f]{6}$/i.test(a)&&(a="#"+a),{type:"color-token",mode:this.mode,color:a}},t.parseSizeGroup=function(e){var t,r=!1;if(this.gullet.consumeSpaces(),!(t=e||"{"===this.gullet.future().text?this.parseStringGroup("size",e):this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size")))return null;e||0!==t.text.length||(t.text="0pt",r=!0);var a=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!a)throw new n("Invalid size: '"+t.text+"'",t);var i={number:+(a[1]+a[2]),unit:a[3]};if(!P(i))throw new n("Invalid unit: '"+i.unit+"'",t);return{type:"size",mode:this.mode,value:i,isBlank:r}},t.parseUrlGroup=function(e){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var t=this.parseStringGroup("url",e);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),null==t)return null;var r=t.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:r}},t.parseArgumentGroup=function(e,t){var r=this.gullet.scanArgument(e);if(null==r)return null;var n=this.mode;t&&this.switchMode(t),this.gullet.beginGroup();var a=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var i={type:"ordgroup",mode:this.mode,loc:r.loc,body:a};return t&&this.switchMode(n),i},t.parseGroup=function(e,t){var r,a=this.fetch(),i=a.text;if("{"===i||"\\begingroup"===i){this.consume();var o="{"===i?"}":"\\endgroup";this.gullet.beginGroup();var s=this.parseExpression(!1,o),l=this.fetch();this.expect(o),this.gullet.endGroup(),r={type:"ordgroup",mode:this.mode,loc:Er.range(a,l),body:s,semisimple:"\\begingroup"===i||void 0}}else if(null==(r=this.parseFunction(t,e)||this.parseSymbol())&&"\\"===i[0]&&!Vn.hasOwnProperty(i)){if(this.settings.throwOnError)throw new n("Undefined control sequence: "+i,a);r=this.formatUnsupportedCmd(i),this.consume()}return r},t.formLigatures=function(e){for(var t=e.length-1,r=0;r<t;++r){var n=e[r],a=n.text;"-"===a&&"-"===e[r+1].text&&(r+1<t&&"-"===e[r+2].text?(e.splice(r,3,{type:"textord",mode:"text",loc:Er.range(n,e[r+2]),text:"---"}),t-=2):(e.splice(r,2,{type:"textord",mode:"text",loc:Er.range(n,e[r+1]),text:"--"}),t-=1)),"'"!==a&&"`"!==a||e[r+1].text!==a||(e.splice(r,2,{type:"textord",mode:"text",loc:Er.range(n,e[r+1]),text:a+a}),t-=1)}},t.parseSymbol=function(){var e=this.fetch(),t=e.text;if(/^\\verb[^a-zA-Z]/.test(t)){this.consume();var r=t.slice(5),a="*"===r.charAt(0);if(a&&(r=r.slice(1)),r.length<2||r.charAt(0)!==r.slice(-1))throw new n("\\verb assertion failed --\n please report what input caused this bug");return{type:"verb",mode:"text",body:r=r.slice(1,-1),star:a}}Wn.hasOwnProperty(t[0])&&!ae[this.mode][t[0]]&&(this.settings.strict&&"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+t[0]+'" used in math mode',e),t=Wn[t[0]]+t.substr(1));var i,o=Nn.exec(t);if(o&&("i"===(t=t.substring(0,o.index))?t="\u0131":"j"===t&&(t="\u0237")),ae[this.mode][t]){this.settings.strict&&"math"===this.mode&&Ee.indexOf(t)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var s,l=ae[this.mode][t].group,h=Er.range(e);if(te.hasOwnProperty(l)){var m=l;s={type:"atom",mode:this.mode,family:m,loc:h,text:t}}else s={type:l,mode:this.mode,loc:h,text:t};i=s}else{if(!(t.charCodeAt(0)>=128))return null;this.settings.strict&&(S(t.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'" ('+t.charCodeAt(0)+")",e)),i={type:"textord",mode:"text",loc:Er.range(e),text:t}}if(this.consume(),o)for(var c=0;c<o[0].length;c++){var u=o[0][c];if(!Xn[u])throw new n("Unknown accent ' "+u+"'",e);var p=Xn[u][this.mode]||Xn[u].text;if(!p)throw new n("Accent "+u+" unsupported in "+this.mode+" mode",e);i={type:"accent",mode:this.mode,loc:Er.range(e),label:p,isStretchy:!1,isShifty:!0,base:i}}return i},e}();_n.endOfExpression=["}","\\endgroup","\\end","\\right","&"];var jn=function(e,t){if(!("string"===typeof e||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var r=new _n(e,t);delete r.gullet.macros.current["\\df@tag"];var a=r.parse();if(delete r.gullet.macros.current["\\current@color"],delete r.gullet.macros.current["\\color"],r.gullet.macros.get("\\df@tag")){if(!t.displayMode)throw new n("\\tag works only in display equations");a=[{type:"tag",mode:"text",body:a,tag:r.subparse([new Lr("\\df@tag")])}]}return a},$n=function(e,t,r){t.textContent="";var n=Kn(e,r).toNode();t.appendChild(n)};"undefined"!==typeof document&&"CSS1Compat"!==document.compatMode&&("undefined"!==typeof console&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),$n=function(){throw new n("KaTeX doesn't work in quirks mode.")});var Zn=function(e,t,r){if(r.throwOnError||!(e instanceof n))throw e;var a=Ke.makeSpan(["katex-error"],[new Z(t)]);return a.setAttribute("title",e.toString()),a.setAttribute("style","color:"+r.errorColor),a},Kn=function(e,t){var r=new c(t);try{return function(e,t,r){var n,a=Ht(r);if("mathml"===r.output)return Ot(e,t,a,r.displayMode,!0);if("html"===r.output){var i=St(e,a);n=Ke.makeSpan(["katex"],[i])}else{var o=Ot(e,t,a,r.displayMode,!1),s=St(e,a);n=Ke.makeSpan(["katex"],[o,s])}return Et(n,r)}(jn(e,r),e,r)}catch(n){return Zn(n,e,r)}},Jn={version:"0.16.0",render:$n,renderToString:function(e,t){return Kn(e,t).toMarkup()},ParseError:n,SETTINGS_SCHEMA:h,__parse:function(e,t){var r=new c(t);return jn(e,r)},__renderToDomTree:Kn,__renderToHTMLTree:function(e,t){var r=new c(t);try{return function(e,t,r){var n=St(e,Ht(r)),a=Ke.makeSpan(["katex"],[n]);return Et(a,r)}(jn(e,r),0,r)}catch(n){return Zn(n,e,r)}},__setFontMetrics:function(e,t){T[e]=t},__defineSymbol:ie,__defineMacro:Hr,__domTree:{Span:W,Anchor:_,SymbolNode:Z,SvgNode:K,PathNode:J,LineNode:Q}};return t=t.default}()},e.exports=n()}}]);\ No newline at end of file+(this.webpackJsonptiptap=this.webpackJsonptiptap||[]).push([[0],{123:function(e,t,r){var n;"undefined"!==typeof self&&self,n=function(){return function(){"use strict";var e={d:function(t,r){for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t={};e.d(t,{default:function(){return Jn}});var r=function e(t,r){this.position=void 0;var n,a="KaTeX parse error: "+t,i=r&&r.loc;if(i&&i.start<=i.end){var o=i.lexer.input;n=i.start;var s=i.end;n===o.length?a+=" at end of input: ":a+=" at position "+(n+1)+": ";var l=o.slice(n,s).replace(/[^]/g,"$&\u0332");a+=(n>15?"\u2026"+o.slice(n-15,n):o.slice(0,n))+l+(s+15<o.length?o.slice(s,s+15)+"\u2026":o.slice(s))}var h=new Error(a);return h.name="ParseError",h.__proto__=e.prototype,h.position=n,h};r.prototype.__proto__=Error.prototype;var n=r,a=/([A-Z])/g,i={"&":"&",">":">","<":"<",'"':""","'":"'"},o=/[&><"']/g,s=function e(t){return"ordgroup"===t.type||"color"===t.type?1===t.body.length?e(t.body[0]):t:"font"===t.type?e(t.body):t},l={contains:function(e,t){return-1!==e.indexOf(t)},deflt:function(e,t){return void 0===e?t:e},escape:function(e){return String(e).replace(o,(function(e){return i[e]}))},hyphenate:function(e){return e.replace(a,"-$1").toLowerCase()},getBaseElem:s,isCharacterBox:function(e){var t=s(e);return"mathord"===t.type||"textord"===t.type||"atom"===t.type},protocolFromUrl:function(e){var t=/^\s*([^\\/#]*?)(?::|�*58|�*3a)/i.exec(e);return null!=t?t[1]:"_relative"}},h={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:function(e){return"#"+e}},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:function(e,t){return t.push(e),t}},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:function(e){return Math.max(0,e)},cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:function(e){return Math.max(0,e)},cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:function(e){return Math.max(0,e)},cli:"-e, --max-expand <n>",cliProcessor:function(e){return"Infinity"===e?1/0:parseInt(e)}},globalGroup:{type:"boolean",cli:!1}};function m(e){if(e.default)return e.default;var t=e.type,r=Array.isArray(t)?t[0]:t;if("string"!==typeof r)return r.enum[0];switch(r){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}var c=function(){function e(e){for(var t in this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{},h)if(h.hasOwnProperty(t)){var r=h[t];this[t]=void 0!==e[t]?r.processor?r.processor(e[t]):e[t]:m(r)}}var t=e.prototype;return t.reportNonstrict=function(e,t,r){var a=this.strict;if("function"===typeof a&&(a=a(e,t,r)),a&&"ignore"!==a){if(!0===a||"error"===a)throw new n("LaTeX-incompatible input and strict mode is set to 'error': "+t+" ["+e+"]",r);"warn"===a?"undefined"!==typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"):"undefined"!==typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+a+"': "+t+" ["+e+"]")}},t.useStrictBehavior=function(e,t,r){var n=this.strict;if("function"===typeof n)try{n=n(e,t,r)}catch(a){n="error"}return!(!n||"ignore"===n)&&(!0===n||"error"===n||("warn"===n?("undefined"!==typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"),!1):("undefined"!==typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+n+"': "+t+" ["+e+"]"),!1)))},t.isTrusted=function(e){e.url&&!e.protocol&&(e.protocol=l.protocolFromUrl(e.url));var t="function"===typeof this.trust?this.trust(e):this.trust;return Boolean(t)},e}(),u=function(){function e(e,t,r){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=r}var t=e.prototype;return t.sup=function(){return p[d[this.id]]},t.sub=function(){return p[f[this.id]]},t.fracNum=function(){return p[g[this.id]]},t.fracDen=function(){return p[v[this.id]]},t.cramp=function(){return p[b[this.id]]},t.text=function(){return p[y[this.id]]},t.isTight=function(){return this.size>=2},e}(),p=[new u(0,0,!1),new u(1,0,!0),new u(2,1,!1),new u(3,1,!0),new u(4,2,!1),new u(5,2,!0),new u(6,3,!1),new u(7,3,!0)],d=[4,5,4,5,6,7,6,7],f=[5,5,5,5,7,7,7,7],g=[2,3,4,5,6,7,6,7],v=[3,3,5,5,7,7,7,7],b=[1,1,3,3,5,5,7,7],y=[0,1,2,3,2,3,2,3],x={DISPLAY:p[0],TEXT:p[2],SCRIPT:p[4],SCRIPTSCRIPT:p[6]},w=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}],k=[];function S(e){for(var t=0;t<k.length;t+=2)if(e>=k[t]&&e<=k[t+1])return!0;return!1}w.forEach((function(e){return e.blocks.forEach((function(e){return k.push.apply(k,e)}))}));var M=80,z={doubleleftarrow:"M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",doublerightarrow:"M399738 392l\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",leftarrow:"M400000 241H110l3-3c68.7-52.7 113.7-120\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\n l-3-3h399890zM100 241v40h399900v-40z",leftbrace:"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z",leftbraceunder:"M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",leftgroup:"M400000 80\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\n 435 0h399565z",leftgroupunder:"M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",leftharpoon:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z",leftharpoonplus:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",leftharpoondown:"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",leftharpoondownplus:"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",lefthook:"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z",leftlinesegment:"M40 281 V428 H0 V94 H40 V241 H400000 v40z\nM40 281 V428 H0 V94 H40 V241 H400000 v40z",leftmapsto:"M40 281 V448H0V74H40V241H400000v40z\nM40 281 V448H0V74H40V241H400000v40z",leftToFrom:"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",longequal:"M0 50 h400000 v40H0z m0 194h40000v40H0z\nM0 50 h400000 v40H0z m0 194h40000v40H0z",midbrace:"M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",midbraceunder:"M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z",oiintSize1:"M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z",oiintSize2:"M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 110 84 276 504 276s502.4-166 502.4-276z",oiiintSize1:"M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z",oiiintSize2:"M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z",rightarrow:"M0 241v40h399891c-47.3 35.3-84 78-110 128\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n 151.7 139 205zm0 0v40h399900v-40z",rightbrace:"M400000 542l\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z",rightbraceunder:"M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z",rightgroup:"M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\n 3-1 3-3v-38c-76-158-257-219-435-219H0z",rightgroupunder:"M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z",rightharpoon:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\n 69.2 92 94.5zm0 0v40h399900v-40z",rightharpoonplus:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z",rightharpoondown:"M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z",rightharpoondownplus:"M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z",righthook:"M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",rightlinesegment:"M399960 241 V94 h40 V428 h-40 V281 H0 v-40z\nM399960 241 V94 h40 V428 h-40 V281 H0 v-40z",rightToFrom:"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",twoheadleftarrow:"M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z",twoheadrightarrow:"M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z",tilde1:"M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",tilde2:"M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z",tilde3:"M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",tilde4:"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -175.236-744-175.236z",vec:"M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",widehat1:"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z",widehat2:"M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat3:"M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat4:"M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widecheck1:"M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z",widecheck2:"M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck3:"M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck4:"M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",baraboveleftarrow:"M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",rightarrowabovebar:"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",baraboveshortleftharpoon:"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",rightharpoonaboveshortbar:"M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z",shortbaraboveleftharpoon:"M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z",shortrightharpoonabovebar:"M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"},A=function(){function e(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}var t=e.prototype;return t.hasClass=function(e){return l.contains(this.classes,e)},t.toNode=function(){for(var e=document.createDocumentFragment(),t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e},t.toMarkup=function(){for(var e="",t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e},t.toText=function(){var e=function(e){return e.toText()};return this.children.map(e).join("")},e}(),T={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},B={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},C={"\xc5":"A","\xd0":"D","\xde":"o","\xe5":"a","\xf0":"d","\xfe":"o","\u0410":"A","\u0411":"B","\u0412":"B","\u0413":"F","\u0414":"A","\u0415":"E","\u0416":"K","\u0417":"3","\u0418":"N","\u0419":"N","\u041a":"K","\u041b":"N","\u041c":"M","\u041d":"H","\u041e":"O","\u041f":"N","\u0420":"P","\u0421":"C","\u0422":"T","\u0423":"y","\u0424":"O","\u0425":"X","\u0426":"U","\u0427":"h","\u0428":"W","\u0429":"W","\u042a":"B","\u042b":"X","\u042c":"B","\u042d":"3","\u042e":"X","\u042f":"R","\u0430":"a","\u0431":"b","\u0432":"a","\u0433":"r","\u0434":"y","\u0435":"e","\u0436":"m","\u0437":"e","\u0438":"n","\u0439":"n","\u043a":"n","\u043b":"n","\u043c":"m","\u043d":"n","\u043e":"o","\u043f":"n","\u0440":"p","\u0441":"c","\u0442":"o","\u0443":"y","\u0444":"b","\u0445":"x","\u0446":"n","\u0447":"n","\u0448":"w","\u0449":"w","\u044a":"a","\u044b":"m","\u044c":"a","\u044d":"e","\u044e":"m","\u044f":"r"};function q(e,t,r){if(!T[t])throw new Error("Font metrics not found for font: "+t+".");var n=e.charCodeAt(0),a=T[t][n];if(!a&&e[0]in C&&(n=C[e[0]].charCodeAt(0),a=T[t][n]),a||"text"!==r||S(n)&&(a=T[t][77]),a)return{depth:a[0],height:a[1],italic:a[2],skew:a[3],width:a[4]}}var N={},I=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],R=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],O=function(e,t){return t.size<2?e:I[e-1][t.size-1]},H=function(){function e(t){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=t.style,this.color=t.color,this.size=t.size||e.BASESIZE,this.textSize=t.textSize||this.size,this.phantom=!!t.phantom,this.font=t.font||"",this.fontFamily=t.fontFamily||"",this.fontWeight=t.fontWeight||"",this.fontShape=t.fontShape||"",this.sizeMultiplier=R[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this._fontMetrics=void 0}var t=e.prototype;return t.extend=function(t){var r={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var n in t)t.hasOwnProperty(n)&&(r[n]=t[n]);return new e(r)},t.havingStyle=function(e){return this.style===e?this:this.extend({style:e,size:O(this.textSize,e)})},t.havingCrampedStyle=function(){return this.havingStyle(this.style.cramp())},t.havingSize=function(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:R[e-1]})},t.havingBaseStyle=function(t){t=t||this.style.text();var r=O(e.BASESIZE,t);return this.size===r&&this.textSize===e.BASESIZE&&this.style===t?this:this.extend({style:t,size:r})},t.havingBaseSizing=function(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})},t.withColor=function(e){return this.extend({color:e})},t.withPhantom=function(){return this.extend({phantom:!0})},t.withFont=function(e){return this.extend({font:e})},t.withTextFontFamily=function(e){return this.extend({fontFamily:e,font:""})},t.withTextFontWeight=function(e){return this.extend({fontWeight:e,font:""})},t.withTextFontShape=function(e){return this.extend({fontShape:e,font:""})},t.sizingClasses=function(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]},t.baseSizingClasses=function(){return this.size!==e.BASESIZE?["sizing","reset-size"+this.size,"size"+e.BASESIZE]:[]},t.fontMetrics=function(){return this._fontMetrics||(this._fontMetrics=function(e){var t;if(!N[t=e>=5?0:e>=3?1:2]){var r=N[t]={cssEmPerMu:B.quad[t]/18};for(var n in B)B.hasOwnProperty(n)&&(r[n]=B[n][t])}return N[t]}(this.size)),this._fontMetrics},t.getColor=function(){return this.phantom?"transparent":this.color},e}();H.BASESIZE=6;var E=H,L={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},D={ex:!0,em:!0,mu:!0},P=function(e){return"string"!==typeof e&&(e=e.unit),e in L||e in D||"ex"===e},F=function(e,t){var r;if(e.unit in L)r=L[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)r=t.fontMetrics().cssEmPerMu;else{var a;if(a=t.style.isTight()?t.havingStyle(t.style.text()):t,"ex"===e.unit)r=a.fontMetrics().xHeight;else{if("em"!==e.unit)throw new n("Invalid unit: '"+e.unit+"'");r=a.fontMetrics().quad}a!==t&&(r*=a.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*r,t.maxSize)},V=function(e){return+e.toFixed(4)+"em"},G=function(e){return e.filter((function(e){return e})).join(" ")},U=function(e,t,r){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},t){t.style.isTight()&&this.classes.push("mtight");var n=t.getColor();n&&(this.style.color=n)}},Y=function(e){var t=document.createElement(e);for(var r in t.className=G(this.classes),this.style)this.style.hasOwnProperty(r)&&(t.style[r]=this.style[r]);for(var n in this.attributes)this.attributes.hasOwnProperty(n)&&t.setAttribute(n,this.attributes[n]);for(var a=0;a<this.children.length;a++)t.appendChild(this.children[a].toNode());return t},X=function(e){var t="<"+e;this.classes.length&&(t+=' class="'+l.escape(G(this.classes))+'"');var r="";for(var n in this.style)this.style.hasOwnProperty(n)&&(r+=l.hyphenate(n)+":"+this.style[n]+";");for(var a in r&&(t+=' style="'+l.escape(r)+'"'),this.attributes)this.attributes.hasOwnProperty(a)&&(t+=" "+a+'="'+l.escape(this.attributes[a])+'"');t+=">";for(var i=0;i<this.children.length;i++)t+=this.children[i].toMarkup();return t+="</"+e+">"},W=function(){function e(e,t,r,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,U.call(this,e,r,n),this.children=t||[]}var t=e.prototype;return t.setAttribute=function(e,t){this.attributes[e]=t},t.hasClass=function(e){return l.contains(this.classes,e)},t.toNode=function(){return Y.call(this,"span")},t.toMarkup=function(){return X.call(this,"span")},e}(),_=function(){function e(e,t,r,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,U.call(this,t,n),this.children=r||[],this.setAttribute("href",e)}var t=e.prototype;return t.setAttribute=function(e,t){this.attributes[e]=t},t.hasClass=function(e){return l.contains(this.classes,e)},t.toNode=function(){return Y.call(this,"a")},t.toMarkup=function(){return X.call(this,"a")},e}(),j=function(){function e(e,t,r){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.style=r}var t=e.prototype;return t.hasClass=function(e){return l.contains(this.classes,e)},t.toNode=function(){var e=document.createElement("img");for(var t in e.src=this.src,e.alt=this.alt,e.className="mord",this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e},t.toMarkup=function(){var e="<img src='"+this.src+" 'alt='"+this.alt+"' ",t="";for(var r in this.style)this.style.hasOwnProperty(r)&&(t+=l.hyphenate(r)+":"+this.style[r]+";");return t&&(e+=' style="'+l.escape(t)+'"'),e+="'/>"},e}(),$={"\xee":"\u0131\u0302","\xef":"\u0131\u0308","\xed":"\u0131\u0301","\xec":"\u0131\u0300"},Z=function(){function e(e,t,r,n,a,i,o,s){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=r||0,this.italic=n||0,this.skew=a||0,this.width=i||0,this.classes=o||[],this.style=s||{},this.maxFontSize=0;var l=function(e){for(var t=0;t<w.length;t++)for(var r=w[t],n=0;n<r.blocks.length;n++){var a=r.blocks[n];if(e>=a[0]&&e<=a[1])return r.name}return null}(this.text.charCodeAt(0));l&&this.classes.push(l+"_fallback"),/[\xee\xef\xed\xec]/.test(this.text)&&(this.text=$[this.text])}var t=e.prototype;return t.hasClass=function(e){return l.contains(this.classes,e)},t.toNode=function(){var e=document.createTextNode(this.text),t=null;for(var r in this.italic>0&&((t=document.createElement("span")).style.marginRight=V(this.italic)),this.classes.length>0&&((t=t||document.createElement("span")).className=G(this.classes)),this.style)this.style.hasOwnProperty(r)&&((t=t||document.createElement("span")).style[r]=this.style[r]);return t?(t.appendChild(e),t):e},t.toMarkup=function(){var e=!1,t="<span";this.classes.length&&(e=!0,t+=' class="',t+=l.escape(G(this.classes)),t+='"');var r="";for(var n in this.italic>0&&(r+="margin-right:"+this.italic+"em;"),this.style)this.style.hasOwnProperty(n)&&(r+=l.hyphenate(n)+":"+this.style[n]+";");r&&(e=!0,t+=' style="'+l.escape(r)+'"');var a=l.escape(this.text);return e?(t+=">",t+=a,t+="</span>"):a},e}(),K=function(){function e(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}var t=e.prototype;return t.toNode=function(){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);for(var r=0;r<this.children.length;r++)e.appendChild(this.children[r].toNode());return e},t.toMarkup=function(){var e='<svg xmlns="http://www.w3.org/2000/svg"';for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+"='"+this.attributes[t]+"'");e+=">";for(var r=0;r<this.children.length;r++)e+=this.children[r].toMarkup();return e+="</svg>"},e}(),J=function(){function e(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}var t=e.prototype;return t.toNode=function(){var e=document.createElementNS("http://www.w3.org/2000/svg","path");return this.alternate?e.setAttribute("d",this.alternate):e.setAttribute("d",z[this.pathName]),e},t.toMarkup=function(){return this.alternate?"<path d='"+this.alternate+"'/>":"<path d='"+z[this.pathName]+"'/>"},e}(),Q=function(){function e(e){this.attributes=void 0,this.attributes=e||{}}var t=e.prototype;return t.toNode=function(){var e=document.createElementNS("http://www.w3.org/2000/svg","line");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);return e},t.toMarkup=function(){var e="<line";for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+"='"+this.attributes[t]+"'");return e+="/>"},e}();function ee(e){if(e instanceof Z)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}var te={bin:1,close:1,inner:1,open:1,punct:1,rel:1},re={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},ne={math:{},text:{}},ae=ne;function ie(e,t,r,n,a,i){ne[e][a]={font:t,group:r,replace:n},i&&n&&(ne[e][n]=ne[e][a])}var oe="math",se="text",le="main",he="ams",me="accent-token",ce="bin",ue="close",pe="inner",de="mathord",fe="op-token",ge="open",ve="punct",be="rel",ye="spacing",xe="textord";ie(oe,le,be,"\u2261","\\equiv",!0),ie(oe,le,be,"\u227a","\\prec",!0),ie(oe,le,be,"\u227b","\\succ",!0),ie(oe,le,be,"\u223c","\\sim",!0),ie(oe,le,be,"\u22a5","\\perp"),ie(oe,le,be,"\u2aaf","\\preceq",!0),ie(oe,le,be,"\u2ab0","\\succeq",!0),ie(oe,le,be,"\u2243","\\simeq",!0),ie(oe,le,be,"\u2223","\\mid",!0),ie(oe,le,be,"\u226a","\\ll",!0),ie(oe,le,be,"\u226b","\\gg",!0),ie(oe,le,be,"\u224d","\\asymp",!0),ie(oe,le,be,"\u2225","\\parallel"),ie(oe,le,be,"\u22c8","\\bowtie",!0),ie(oe,le,be,"\u2323","\\smile",!0),ie(oe,le,be,"\u2291","\\sqsubseteq",!0),ie(oe,le,be,"\u2292","\\sqsupseteq",!0),ie(oe,le,be,"\u2250","\\doteq",!0),ie(oe,le,be,"\u2322","\\frown",!0),ie(oe,le,be,"\u220b","\\ni",!0),ie(oe,le,be,"\u221d","\\propto",!0),ie(oe,le,be,"\u22a2","\\vdash",!0),ie(oe,le,be,"\u22a3","\\dashv",!0),ie(oe,le,be,"\u220b","\\owns"),ie(oe,le,ve,".","\\ldotp"),ie(oe,le,ve,"\u22c5","\\cdotp"),ie(oe,le,xe,"#","\\#"),ie(se,le,xe,"#","\\#"),ie(oe,le,xe,"&","\\&"),ie(se,le,xe,"&","\\&"),ie(oe,le,xe,"\u2135","\\aleph",!0),ie(oe,le,xe,"\u2200","\\forall",!0),ie(oe,le,xe,"\u210f","\\hbar",!0),ie(oe,le,xe,"\u2203","\\exists",!0),ie(oe,le,xe,"\u2207","\\nabla",!0),ie(oe,le,xe,"\u266d","\\flat",!0),ie(oe,le,xe,"\u2113","\\ell",!0),ie(oe,le,xe,"\u266e","\\natural",!0),ie(oe,le,xe,"\u2663","\\clubsuit",!0),ie(oe,le,xe,"\u2118","\\wp",!0),ie(oe,le,xe,"\u266f","\\sharp",!0),ie(oe,le,xe,"\u2662","\\diamondsuit",!0),ie(oe,le,xe,"\u211c","\\Re",!0),ie(oe,le,xe,"\u2661","\\heartsuit",!0),ie(oe,le,xe,"\u2111","\\Im",!0),ie(oe,le,xe,"\u2660","\\spadesuit",!0),ie(oe,le,xe,"\xa7","\\S",!0),ie(se,le,xe,"\xa7","\\S"),ie(oe,le,xe,"\xb6","\\P",!0),ie(se,le,xe,"\xb6","\\P"),ie(oe,le,xe,"\u2020","\\dag"),ie(se,le,xe,"\u2020","\\dag"),ie(se,le,xe,"\u2020","\\textdagger"),ie(oe,le,xe,"\u2021","\\ddag"),ie(se,le,xe,"\u2021","\\ddag"),ie(se,le,xe,"\u2021","\\textdaggerdbl"),ie(oe,le,ue,"\u23b1","\\rmoustache",!0),ie(oe,le,ge,"\u23b0","\\lmoustache",!0),ie(oe,le,ue,"\u27ef","\\rgroup",!0),ie(oe,le,ge,"\u27ee","\\lgroup",!0),ie(oe,le,ce,"\u2213","\\mp",!0),ie(oe,le,ce,"\u2296","\\ominus",!0),ie(oe,le,ce,"\u228e","\\uplus",!0),ie(oe,le,ce,"\u2293","\\sqcap",!0),ie(oe,le,ce,"\u2217","\\ast"),ie(oe,le,ce,"\u2294","\\sqcup",!0),ie(oe,le,ce,"\u25ef","\\bigcirc",!0),ie(oe,le,ce,"\u2219","\\bullet",!0),ie(oe,le,ce,"\u2021","\\ddagger"),ie(oe,le,ce,"\u2240","\\wr",!0),ie(oe,le,ce,"\u2a3f","\\amalg"),ie(oe,le,ce,"&","\\And"),ie(oe,le,be,"\u27f5","\\longleftarrow",!0),ie(oe,le,be,"\u21d0","\\Leftarrow",!0),ie(oe,le,be,"\u27f8","\\Longleftarrow",!0),ie(oe,le,be,"\u27f6","\\longrightarrow",!0),ie(oe,le,be,"\u21d2","\\Rightarrow",!0),ie(oe,le,be,"\u27f9","\\Longrightarrow",!0),ie(oe,le,be,"\u2194","\\leftrightarrow",!0),ie(oe,le,be,"\u27f7","\\longleftrightarrow",!0),ie(oe,le,be,"\u21d4","\\Leftrightarrow",!0),ie(oe,le,be,"\u27fa","\\Longleftrightarrow",!0),ie(oe,le,be,"\u21a6","\\mapsto",!0),ie(oe,le,be,"\u27fc","\\longmapsto",!0),ie(oe,le,be,"\u2197","\\nearrow",!0),ie(oe,le,be,"\u21a9","\\hookleftarrow",!0),ie(oe,le,be,"\u21aa","\\hookrightarrow",!0),ie(oe,le,be,"\u2198","\\searrow",!0),ie(oe,le,be,"\u21bc","\\leftharpoonup",!0),ie(oe,le,be,"\u21c0","\\rightharpoonup",!0),ie(oe,le,be,"\u2199","\\swarrow",!0),ie(oe,le,be,"\u21bd","\\leftharpoondown",!0),ie(oe,le,be,"\u21c1","\\rightharpoondown",!0),ie(oe,le,be,"\u2196","\\nwarrow",!0),ie(oe,le,be,"\u21cc","\\rightleftharpoons",!0),ie(oe,he,be,"\u226e","\\nless",!0),ie(oe,he,be,"\ue010","\\@nleqslant"),ie(oe,he,be,"\ue011","\\@nleqq"),ie(oe,he,be,"\u2a87","\\lneq",!0),ie(oe,he,be,"\u2268","\\lneqq",!0),ie(oe,he,be,"\ue00c","\\@lvertneqq"),ie(oe,he,be,"\u22e6","\\lnsim",!0),ie(oe,he,be,"\u2a89","\\lnapprox",!0),ie(oe,he,be,"\u2280","\\nprec",!0),ie(oe,he,be,"\u22e0","\\npreceq",!0),ie(oe,he,be,"\u22e8","\\precnsim",!0),ie(oe,he,be,"\u2ab9","\\precnapprox",!0),ie(oe,he,be,"\u2241","\\nsim",!0),ie(oe,he,be,"\ue006","\\@nshortmid"),ie(oe,he,be,"\u2224","\\nmid",!0),ie(oe,he,be,"\u22ac","\\nvdash",!0),ie(oe,he,be,"\u22ad","\\nvDash",!0),ie(oe,he,be,"\u22ea","\\ntriangleleft"),ie(oe,he,be,"\u22ec","\\ntrianglelefteq",!0),ie(oe,he,be,"\u228a","\\subsetneq",!0),ie(oe,he,be,"\ue01a","\\@varsubsetneq"),ie(oe,he,be,"\u2acb","\\subsetneqq",!0),ie(oe,he,be,"\ue017","\\@varsubsetneqq"),ie(oe,he,be,"\u226f","\\ngtr",!0),ie(oe,he,be,"\ue00f","\\@ngeqslant"),ie(oe,he,be,"\ue00e","\\@ngeqq"),ie(oe,he,be,"\u2a88","\\gneq",!0),ie(oe,he,be,"\u2269","\\gneqq",!0),ie(oe,he,be,"\ue00d","\\@gvertneqq"),ie(oe,he,be,"\u22e7","\\gnsim",!0),ie(oe,he,be,"\u2a8a","\\gnapprox",!0),ie(oe,he,be,"\u2281","\\nsucc",!0),ie(oe,he,be,"\u22e1","\\nsucceq",!0),ie(oe,he,be,"\u22e9","\\succnsim",!0),ie(oe,he,be,"\u2aba","\\succnapprox",!0),ie(oe,he,be,"\u2246","\\ncong",!0),ie(oe,he,be,"\ue007","\\@nshortparallel"),ie(oe,he,be,"\u2226","\\nparallel",!0),ie(oe,he,be,"\u22af","\\nVDash",!0),ie(oe,he,be,"\u22eb","\\ntriangleright"),ie(oe,he,be,"\u22ed","\\ntrianglerighteq",!0),ie(oe,he,be,"\ue018","\\@nsupseteqq"),ie(oe,he,be,"\u228b","\\supsetneq",!0),ie(oe,he,be,"\ue01b","\\@varsupsetneq"),ie(oe,he,be,"\u2acc","\\supsetneqq",!0),ie(oe,he,be,"\ue019","\\@varsupsetneqq"),ie(oe,he,be,"\u22ae","\\nVdash",!0),ie(oe,he,be,"\u2ab5","\\precneqq",!0),ie(oe,he,be,"\u2ab6","\\succneqq",!0),ie(oe,he,be,"\ue016","\\@nsubseteqq"),ie(oe,he,ce,"\u22b4","\\unlhd"),ie(oe,he,ce,"\u22b5","\\unrhd"),ie(oe,he,be,"\u219a","\\nleftarrow",!0),ie(oe,he,be,"\u219b","\\nrightarrow",!0),ie(oe,he,be,"\u21cd","\\nLeftarrow",!0),ie(oe,he,be,"\u21cf","\\nRightarrow",!0),ie(oe,he,be,"\u21ae","\\nleftrightarrow",!0),ie(oe,he,be,"\u21ce","\\nLeftrightarrow",!0),ie(oe,he,be,"\u25b3","\\vartriangle"),ie(oe,he,xe,"\u210f","\\hslash"),ie(oe,he,xe,"\u25bd","\\triangledown"),ie(oe,he,xe,"\u25ca","\\lozenge"),ie(oe,he,xe,"\u24c8","\\circledS"),ie(oe,he,xe,"\xae","\\circledR"),ie(se,he,xe,"\xae","\\circledR"),ie(oe,he,xe,"\u2221","\\measuredangle",!0),ie(oe,he,xe,"\u2204","\\nexists"),ie(oe,he,xe,"\u2127","\\mho"),ie(oe,he,xe,"\u2132","\\Finv",!0),ie(oe,he,xe,"\u2141","\\Game",!0),ie(oe,he,xe,"\u2035","\\backprime"),ie(oe,he,xe,"\u25b2","\\blacktriangle"),ie(oe,he,xe,"\u25bc","\\blacktriangledown"),ie(oe,he,xe,"\u25a0","\\blacksquare"),ie(oe,he,xe,"\u29eb","\\blacklozenge"),ie(oe,he,xe,"\u2605","\\bigstar"),ie(oe,he,xe,"\u2222","\\sphericalangle",!0),ie(oe,he,xe,"\u2201","\\complement",!0),ie(oe,he,xe,"\xf0","\\eth",!0),ie(se,le,xe,"\xf0","\xf0"),ie(oe,he,xe,"\u2571","\\diagup"),ie(oe,he,xe,"\u2572","\\diagdown"),ie(oe,he,xe,"\u25a1","\\square"),ie(oe,he,xe,"\u25a1","\\Box"),ie(oe,he,xe,"\u25ca","\\Diamond"),ie(oe,he,xe,"\xa5","\\yen",!0),ie(se,he,xe,"\xa5","\\yen",!0),ie(oe,he,xe,"\u2713","\\checkmark",!0),ie(se,he,xe,"\u2713","\\checkmark"),ie(oe,he,xe,"\u2136","\\beth",!0),ie(oe,he,xe,"\u2138","\\daleth",!0),ie(oe,he,xe,"\u2137","\\gimel",!0),ie(oe,he,xe,"\u03dd","\\digamma",!0),ie(oe,he,xe,"\u03f0","\\varkappa"),ie(oe,he,ge,"\u250c","\\@ulcorner",!0),ie(oe,he,ue,"\u2510","\\@urcorner",!0),ie(oe,he,ge,"\u2514","\\@llcorner",!0),ie(oe,he,ue,"\u2518","\\@lrcorner",!0),ie(oe,he,be,"\u2266","\\leqq",!0),ie(oe,he,be,"\u2a7d","\\leqslant",!0),ie(oe,he,be,"\u2a95","\\eqslantless",!0),ie(oe,he,be,"\u2272","\\lesssim",!0),ie(oe,he,be,"\u2a85","\\lessapprox",!0),ie(oe,he,be,"\u224a","\\approxeq",!0),ie(oe,he,ce,"\u22d6","\\lessdot"),ie(oe,he,be,"\u22d8","\\lll",!0),ie(oe,he,be,"\u2276","\\lessgtr",!0),ie(oe,he,be,"\u22da","\\lesseqgtr",!0),ie(oe,he,be,"\u2a8b","\\lesseqqgtr",!0),ie(oe,he,be,"\u2251","\\doteqdot"),ie(oe,he,be,"\u2253","\\risingdotseq",!0),ie(oe,he,be,"\u2252","\\fallingdotseq",!0),ie(oe,he,be,"\u223d","\\backsim",!0),ie(oe,he,be,"\u22cd","\\backsimeq",!0),ie(oe,he,be,"\u2ac5","\\subseteqq",!0),ie(oe,he,be,"\u22d0","\\Subset",!0),ie(oe,he,be,"\u228f","\\sqsubset",!0),ie(oe,he,be,"\u227c","\\preccurlyeq",!0),ie(oe,he,be,"\u22de","\\curlyeqprec",!0),ie(oe,he,be,"\u227e","\\precsim",!0),ie(oe,he,be,"\u2ab7","\\precapprox",!0),ie(oe,he,be,"\u22b2","\\vartriangleleft"),ie(oe,he,be,"\u22b4","\\trianglelefteq"),ie(oe,he,be,"\u22a8","\\vDash",!0),ie(oe,he,be,"\u22aa","\\Vvdash",!0),ie(oe,he,be,"\u2323","\\smallsmile"),ie(oe,he,be,"\u2322","\\smallfrown"),ie(oe,he,be,"\u224f","\\bumpeq",!0),ie(oe,he,be,"\u224e","\\Bumpeq",!0),ie(oe,he,be,"\u2267","\\geqq",!0),ie(oe,he,be,"\u2a7e","\\geqslant",!0),ie(oe,he,be,"\u2a96","\\eqslantgtr",!0),ie(oe,he,be,"\u2273","\\gtrsim",!0),ie(oe,he,be,"\u2a86","\\gtrapprox",!0),ie(oe,he,ce,"\u22d7","\\gtrdot"),ie(oe,he,be,"\u22d9","\\ggg",!0),ie(oe,he,be,"\u2277","\\gtrless",!0),ie(oe,he,be,"\u22db","\\gtreqless",!0),ie(oe,he,be,"\u2a8c","\\gtreqqless",!0),ie(oe,he,be,"\u2256","\\eqcirc",!0),ie(oe,he,be,"\u2257","\\circeq",!0),ie(oe,he,be,"\u225c","\\triangleq",!0),ie(oe,he,be,"\u223c","\\thicksim"),ie(oe,he,be,"\u2248","\\thickapprox"),ie(oe,he,be,"\u2ac6","\\supseteqq",!0),ie(oe,he,be,"\u22d1","\\Supset",!0),ie(oe,he,be,"\u2290","\\sqsupset",!0),ie(oe,he,be,"\u227d","\\succcurlyeq",!0),ie(oe,he,be,"\u22df","\\curlyeqsucc",!0),ie(oe,he,be,"\u227f","\\succsim",!0),ie(oe,he,be,"\u2ab8","\\succapprox",!0),ie(oe,he,be,"\u22b3","\\vartriangleright"),ie(oe,he,be,"\u22b5","\\trianglerighteq"),ie(oe,he,be,"\u22a9","\\Vdash",!0),ie(oe,he,be,"\u2223","\\shortmid"),ie(oe,he,be,"\u2225","\\shortparallel"),ie(oe,he,be,"\u226c","\\between",!0),ie(oe,he,be,"\u22d4","\\pitchfork",!0),ie(oe,he,be,"\u221d","\\varpropto"),ie(oe,he,be,"\u25c0","\\blacktriangleleft"),ie(oe,he,be,"\u2234","\\therefore",!0),ie(oe,he,be,"\u220d","\\backepsilon"),ie(oe,he,be,"\u25b6","\\blacktriangleright"),ie(oe,he,be,"\u2235","\\because",!0),ie(oe,he,be,"\u22d8","\\llless"),ie(oe,he,be,"\u22d9","\\gggtr"),ie(oe,he,ce,"\u22b2","\\lhd"),ie(oe,he,ce,"\u22b3","\\rhd"),ie(oe,he,be,"\u2242","\\eqsim",!0),ie(oe,le,be,"\u22c8","\\Join"),ie(oe,he,be,"\u2251","\\Doteq",!0),ie(oe,he,ce,"\u2214","\\dotplus",!0),ie(oe,he,ce,"\u2216","\\smallsetminus"),ie(oe,he,ce,"\u22d2","\\Cap",!0),ie(oe,he,ce,"\u22d3","\\Cup",!0),ie(oe,he,ce,"\u2a5e","\\doublebarwedge",!0),ie(oe,he,ce,"\u229f","\\boxminus",!0),ie(oe,he,ce,"\u229e","\\boxplus",!0),ie(oe,he,ce,"\u22c7","\\divideontimes",!0),ie(oe,he,ce,"\u22c9","\\ltimes",!0),ie(oe,he,ce,"\u22ca","\\rtimes",!0),ie(oe,he,ce,"\u22cb","\\leftthreetimes",!0),ie(oe,he,ce,"\u22cc","\\rightthreetimes",!0),ie(oe,he,ce,"\u22cf","\\curlywedge",!0),ie(oe,he,ce,"\u22ce","\\curlyvee",!0),ie(oe,he,ce,"\u229d","\\circleddash",!0),ie(oe,he,ce,"\u229b","\\circledast",!0),ie(oe,he,ce,"\u22c5","\\centerdot"),ie(oe,he,ce,"\u22ba","\\intercal",!0),ie(oe,he,ce,"\u22d2","\\doublecap"),ie(oe,he,ce,"\u22d3","\\doublecup"),ie(oe,he,ce,"\u22a0","\\boxtimes",!0),ie(oe,he,be,"\u21e2","\\dashrightarrow",!0),ie(oe,he,be,"\u21e0","\\dashleftarrow",!0),ie(oe,he,be,"\u21c7","\\leftleftarrows",!0),ie(oe,he,be,"\u21c6","\\leftrightarrows",!0),ie(oe,he,be,"\u21da","\\Lleftarrow",!0),ie(oe,he,be,"\u219e","\\twoheadleftarrow",!0),ie(oe,he,be,"\u21a2","\\leftarrowtail",!0),ie(oe,he,be,"\u21ab","\\looparrowleft",!0),ie(oe,he,be,"\u21cb","\\leftrightharpoons",!0),ie(oe,he,be,"\u21b6","\\curvearrowleft",!0),ie(oe,he,be,"\u21ba","\\circlearrowleft",!0),ie(oe,he,be,"\u21b0","\\Lsh",!0),ie(oe,he,be,"\u21c8","\\upuparrows",!0),ie(oe,he,be,"\u21bf","\\upharpoonleft",!0),ie(oe,he,be,"\u21c3","\\downharpoonleft",!0),ie(oe,le,be,"\u22b6","\\origof",!0),ie(oe,le,be,"\u22b7","\\imageof",!0),ie(oe,he,be,"\u22b8","\\multimap",!0),ie(oe,he,be,"\u21ad","\\leftrightsquigarrow",!0),ie(oe,he,be,"\u21c9","\\rightrightarrows",!0),ie(oe,he,be,"\u21c4","\\rightleftarrows",!0),ie(oe,he,be,"\u21a0","\\twoheadrightarrow",!0),ie(oe,he,be,"\u21a3","\\rightarrowtail",!0),ie(oe,he,be,"\u21ac","\\looparrowright",!0),ie(oe,he,be,"\u21b7","\\curvearrowright",!0),ie(oe,he,be,"\u21bb","\\circlearrowright",!0),ie(oe,he,be,"\u21b1","\\Rsh",!0),ie(oe,he,be,"\u21ca","\\downdownarrows",!0),ie(oe,he,be,"\u21be","\\upharpoonright",!0),ie(oe,he,be,"\u21c2","\\downharpoonright",!0),ie(oe,he,be,"\u21dd","\\rightsquigarrow",!0),ie(oe,he,be,"\u21dd","\\leadsto"),ie(oe,he,be,"\u21db","\\Rrightarrow",!0),ie(oe,he,be,"\u21be","\\restriction"),ie(oe,le,xe,"\u2018","`"),ie(oe,le,xe,"$","\\$"),ie(se,le,xe,"$","\\$"),ie(se,le,xe,"$","\\textdollar"),ie(oe,le,xe,"%","\\%"),ie(se,le,xe,"%","\\%"),ie(oe,le,xe,"_","\\_"),ie(se,le,xe,"_","\\_"),ie(se,le,xe,"_","\\textunderscore"),ie(oe,le,xe,"\u2220","\\angle",!0),ie(oe,le,xe,"\u221e","\\infty",!0),ie(oe,le,xe,"\u2032","\\prime"),ie(oe,le,xe,"\u25b3","\\triangle"),ie(oe,le,xe,"\u0393","\\Gamma",!0),ie(oe,le,xe,"\u0394","\\Delta",!0),ie(oe,le,xe,"\u0398","\\Theta",!0),ie(oe,le,xe,"\u039b","\\Lambda",!0),ie(oe,le,xe,"\u039e","\\Xi",!0),ie(oe,le,xe,"\u03a0","\\Pi",!0),ie(oe,le,xe,"\u03a3","\\Sigma",!0),ie(oe,le,xe,"\u03a5","\\Upsilon",!0),ie(oe,le,xe,"\u03a6","\\Phi",!0),ie(oe,le,xe,"\u03a8","\\Psi",!0),ie(oe,le,xe,"\u03a9","\\Omega",!0),ie(oe,le,xe,"A","\u0391"),ie(oe,le,xe,"B","\u0392"),ie(oe,le,xe,"E","\u0395"),ie(oe,le,xe,"Z","\u0396"),ie(oe,le,xe,"H","\u0397"),ie(oe,le,xe,"I","\u0399"),ie(oe,le,xe,"K","\u039a"),ie(oe,le,xe,"M","\u039c"),ie(oe,le,xe,"N","\u039d"),ie(oe,le,xe,"O","\u039f"),ie(oe,le,xe,"P","\u03a1"),ie(oe,le,xe,"T","\u03a4"),ie(oe,le,xe,"X","\u03a7"),ie(oe,le,xe,"\xac","\\neg",!0),ie(oe,le,xe,"\xac","\\lnot"),ie(oe,le,xe,"\u22a4","\\top"),ie(oe,le,xe,"\u22a5","\\bot"),ie(oe,le,xe,"\u2205","\\emptyset"),ie(oe,he,xe,"\u2205","\\varnothing"),ie(oe,le,de,"\u03b1","\\alpha",!0),ie(oe,le,de,"\u03b2","\\beta",!0),ie(oe,le,de,"\u03b3","\\gamma",!0),ie(oe,le,de,"\u03b4","\\delta",!0),ie(oe,le,de,"\u03f5","\\epsilon",!0),ie(oe,le,de,"\u03b6","\\zeta",!0),ie(oe,le,de,"\u03b7","\\eta",!0),ie(oe,le,de,"\u03b8","\\theta",!0),ie(oe,le,de,"\u03b9","\\iota",!0),ie(oe,le,de,"\u03ba","\\kappa",!0),ie(oe,le,de,"\u03bb","\\lambda",!0),ie(oe,le,de,"\u03bc","\\mu",!0),ie(oe,le,de,"\u03bd","\\nu",!0),ie(oe,le,de,"\u03be","\\xi",!0),ie(oe,le,de,"\u03bf","\\omicron",!0),ie(oe,le,de,"\u03c0","\\pi",!0),ie(oe,le,de,"\u03c1","\\rho",!0),ie(oe,le,de,"\u03c3","\\sigma",!0),ie(oe,le,de,"\u03c4","\\tau",!0),ie(oe,le,de,"\u03c5","\\upsilon",!0),ie(oe,le,de,"\u03d5","\\phi",!0),ie(oe,le,de,"\u03c7","\\chi",!0),ie(oe,le,de,"\u03c8","\\psi",!0),ie(oe,le,de,"\u03c9","\\omega",!0),ie(oe,le,de,"\u03b5","\\varepsilon",!0),ie(oe,le,de,"\u03d1","\\vartheta",!0),ie(oe,le,de,"\u03d6","\\varpi",!0),ie(oe,le,de,"\u03f1","\\varrho",!0),ie(oe,le,de,"\u03c2","\\varsigma",!0),ie(oe,le,de,"\u03c6","\\varphi",!0),ie(oe,le,ce,"\u2217","*",!0),ie(oe,le,ce,"+","+"),ie(oe,le,ce,"\u2212","-",!0),ie(oe,le,ce,"\u22c5","\\cdot",!0),ie(oe,le,ce,"\u2218","\\circ",!0),ie(oe,le,ce,"\xf7","\\div",!0),ie(oe,le,ce,"\xb1","\\pm",!0),ie(oe,le,ce,"\xd7","\\times",!0),ie(oe,le,ce,"\u2229","\\cap",!0),ie(oe,le,ce,"\u222a","\\cup",!0),ie(oe,le,ce,"\u2216","\\setminus",!0),ie(oe,le,ce,"\u2227","\\land"),ie(oe,le,ce,"\u2228","\\lor"),ie(oe,le,ce,"\u2227","\\wedge",!0),ie(oe,le,ce,"\u2228","\\vee",!0),ie(oe,le,xe,"\u221a","\\surd"),ie(oe,le,ge,"\u27e8","\\langle",!0),ie(oe,le,ge,"\u2223","\\lvert"),ie(oe,le,ge,"\u2225","\\lVert"),ie(oe,le,ue,"?","?"),ie(oe,le,ue,"!","!"),ie(oe,le,ue,"\u27e9","\\rangle",!0),ie(oe,le,ue,"\u2223","\\rvert"),ie(oe,le,ue,"\u2225","\\rVert"),ie(oe,le,be,"=","="),ie(oe,le,be,":",":"),ie(oe,le,be,"\u2248","\\approx",!0),ie(oe,le,be,"\u2245","\\cong",!0),ie(oe,le,be,"\u2265","\\ge"),ie(oe,le,be,"\u2265","\\geq",!0),ie(oe,le,be,"\u2190","\\gets"),ie(oe,le,be,">","\\gt",!0),ie(oe,le,be,"\u2208","\\in",!0),ie(oe,le,be,"\ue020","\\@not"),ie(oe,le,be,"\u2282","\\subset",!0),ie(oe,le,be,"\u2283","\\supset",!0),ie(oe,le,be,"\u2286","\\subseteq",!0),ie(oe,le,be,"\u2287","\\supseteq",!0),ie(oe,he,be,"\u2288","\\nsubseteq",!0),ie(oe,he,be,"\u2289","\\nsupseteq",!0),ie(oe,le,be,"\u22a8","\\models"),ie(oe,le,be,"\u2190","\\leftarrow",!0),ie(oe,le,be,"\u2264","\\le"),ie(oe,le,be,"\u2264","\\leq",!0),ie(oe,le,be,"<","\\lt",!0),ie(oe,le,be,"\u2192","\\rightarrow",!0),ie(oe,le,be,"\u2192","\\to"),ie(oe,he,be,"\u2271","\\ngeq",!0),ie(oe,he,be,"\u2270","\\nleq",!0),ie(oe,le,ye,"\xa0","\\ "),ie(oe,le,ye,"\xa0","\\space"),ie(oe,le,ye,"\xa0","\\nobreakspace"),ie(se,le,ye,"\xa0","\\ "),ie(se,le,ye,"\xa0"," "),ie(se,le,ye,"\xa0","\\space"),ie(se,le,ye,"\xa0","\\nobreakspace"),ie(oe,le,ye,null,"\\nobreak"),ie(oe,le,ye,null,"\\allowbreak"),ie(oe,le,ve,",",","),ie(oe,le,ve,";",";"),ie(oe,he,ce,"\u22bc","\\barwedge",!0),ie(oe,he,ce,"\u22bb","\\veebar",!0),ie(oe,le,ce,"\u2299","\\odot",!0),ie(oe,le,ce,"\u2295","\\oplus",!0),ie(oe,le,ce,"\u2297","\\otimes",!0),ie(oe,le,xe,"\u2202","\\partial",!0),ie(oe,le,ce,"\u2298","\\oslash",!0),ie(oe,he,ce,"\u229a","\\circledcirc",!0),ie(oe,he,ce,"\u22a1","\\boxdot",!0),ie(oe,le,ce,"\u25b3","\\bigtriangleup"),ie(oe,le,ce,"\u25bd","\\bigtriangledown"),ie(oe,le,ce,"\u2020","\\dagger"),ie(oe,le,ce,"\u22c4","\\diamond"),ie(oe,le,ce,"\u22c6","\\star"),ie(oe,le,ce,"\u25c3","\\triangleleft"),ie(oe,le,ce,"\u25b9","\\triangleright"),ie(oe,le,ge,"{","\\{"),ie(se,le,xe,"{","\\{"),ie(se,le,xe,"{","\\textbraceleft"),ie(oe,le,ue,"}","\\}"),ie(se,le,xe,"}","\\}"),ie(se,le,xe,"}","\\textbraceright"),ie(oe,le,ge,"{","\\lbrace"),ie(oe,le,ue,"}","\\rbrace"),ie(oe,le,ge,"[","\\lbrack",!0),ie(se,le,xe,"[","\\lbrack",!0),ie(oe,le,ue,"]","\\rbrack",!0),ie(se,le,xe,"]","\\rbrack",!0),ie(oe,le,ge,"(","\\lparen",!0),ie(oe,le,ue,")","\\rparen",!0),ie(se,le,xe,"<","\\textless",!0),ie(se,le,xe,">","\\textgreater",!0),ie(oe,le,ge,"\u230a","\\lfloor",!0),ie(oe,le,ue,"\u230b","\\rfloor",!0),ie(oe,le,ge,"\u2308","\\lceil",!0),ie(oe,le,ue,"\u2309","\\rceil",!0),ie(oe,le,xe,"\\","\\backslash"),ie(oe,le,xe,"\u2223","|"),ie(oe,le,xe,"\u2223","\\vert"),ie(se,le,xe,"|","\\textbar",!0),ie(oe,le,xe,"\u2225","\\|"),ie(oe,le,xe,"\u2225","\\Vert"),ie(se,le,xe,"\u2225","\\textbardbl"),ie(se,le,xe,"~","\\textasciitilde"),ie(se,le,xe,"\\","\\textbackslash"),ie(se,le,xe,"^","\\textasciicircum"),ie(oe,le,be,"\u2191","\\uparrow",!0),ie(oe,le,be,"\u21d1","\\Uparrow",!0),ie(oe,le,be,"\u2193","\\downarrow",!0),ie(oe,le,be,"\u21d3","\\Downarrow",!0),ie(oe,le,be,"\u2195","\\updownarrow",!0),ie(oe,le,be,"\u21d5","\\Updownarrow",!0),ie(oe,le,fe,"\u2210","\\coprod"),ie(oe,le,fe,"\u22c1","\\bigvee"),ie(oe,le,fe,"\u22c0","\\bigwedge"),ie(oe,le,fe,"\u2a04","\\biguplus"),ie(oe,le,fe,"\u22c2","\\bigcap"),ie(oe,le,fe,"\u22c3","\\bigcup"),ie(oe,le,fe,"\u222b","\\int"),ie(oe,le,fe,"\u222b","\\intop"),ie(oe,le,fe,"\u222c","\\iint"),ie(oe,le,fe,"\u222d","\\iiint"),ie(oe,le,fe,"\u220f","\\prod"),ie(oe,le,fe,"\u2211","\\sum"),ie(oe,le,fe,"\u2a02","\\bigotimes"),ie(oe,le,fe,"\u2a01","\\bigoplus"),ie(oe,le,fe,"\u2a00","\\bigodot"),ie(oe,le,fe,"\u222e","\\oint"),ie(oe,le,fe,"\u222f","\\oiint"),ie(oe,le,fe,"\u2230","\\oiiint"),ie(oe,le,fe,"\u2a06","\\bigsqcup"),ie(oe,le,fe,"\u222b","\\smallint"),ie(se,le,pe,"\u2026","\\textellipsis"),ie(oe,le,pe,"\u2026","\\mathellipsis"),ie(se,le,pe,"\u2026","\\ldots",!0),ie(oe,le,pe,"\u2026","\\ldots",!0),ie(oe,le,pe,"\u22ef","\\@cdots",!0),ie(oe,le,pe,"\u22f1","\\ddots",!0),ie(oe,le,xe,"\u22ee","\\varvdots"),ie(oe,le,me,"\u02ca","\\acute"),ie(oe,le,me,"\u02cb","\\grave"),ie(oe,le,me,"\xa8","\\ddot"),ie(oe,le,me,"~","\\tilde"),ie(oe,le,me,"\u02c9","\\bar"),ie(oe,le,me,"\u02d8","\\breve"),ie(oe,le,me,"\u02c7","\\check"),ie(oe,le,me,"^","\\hat"),ie(oe,le,me,"\u20d7","\\vec"),ie(oe,le,me,"\u02d9","\\dot"),ie(oe,le,me,"\u02da","\\mathring"),ie(oe,le,de,"\ue131","\\@imath"),ie(oe,le,de,"\ue237","\\@jmath"),ie(oe,le,xe,"\u0131","\u0131"),ie(oe,le,xe,"\u0237","\u0237"),ie(se,le,xe,"\u0131","\\i",!0),ie(se,le,xe,"\u0237","\\j",!0),ie(se,le,xe,"\xdf","\\ss",!0),ie(se,le,xe,"\xe6","\\ae",!0),ie(se,le,xe,"\u0153","\\oe",!0),ie(se,le,xe,"\xf8","\\o",!0),ie(se,le,xe,"\xc6","\\AE",!0),ie(se,le,xe,"\u0152","\\OE",!0),ie(se,le,xe,"\xd8","\\O",!0),ie(se,le,me,"\u02ca","\\'"),ie(se,le,me,"\u02cb","\\`"),ie(se,le,me,"\u02c6","\\^"),ie(se,le,me,"\u02dc","\\~"),ie(se,le,me,"\u02c9","\\="),ie(se,le,me,"\u02d8","\\u"),ie(se,le,me,"\u02d9","\\."),ie(se,le,me,"\xb8","\\c"),ie(se,le,me,"\u02da","\\r"),ie(se,le,me,"\u02c7","\\v"),ie(se,le,me,"\xa8",'\\"'),ie(se,le,me,"\u02dd","\\H"),ie(se,le,me,"\u25ef","\\textcircled");var we={"--":!0,"---":!0,"``":!0,"''":!0};ie(se,le,xe,"\u2013","--",!0),ie(se,le,xe,"\u2013","\\textendash"),ie(se,le,xe,"\u2014","---",!0),ie(se,le,xe,"\u2014","\\textemdash"),ie(se,le,xe,"\u2018","`",!0),ie(se,le,xe,"\u2018","\\textquoteleft"),ie(se,le,xe,"\u2019","'",!0),ie(se,le,xe,"\u2019","\\textquoteright"),ie(se,le,xe,"\u201c","``",!0),ie(se,le,xe,"\u201c","\\textquotedblleft"),ie(se,le,xe,"\u201d","''",!0),ie(se,le,xe,"\u201d","\\textquotedblright"),ie(oe,le,xe,"\xb0","\\degree",!0),ie(se,le,xe,"\xb0","\\degree"),ie(se,le,xe,"\xb0","\\textdegree",!0),ie(oe,le,xe,"\xa3","\\pounds"),ie(oe,le,xe,"\xa3","\\mathsterling",!0),ie(se,le,xe,"\xa3","\\pounds"),ie(se,le,xe,"\xa3","\\textsterling",!0),ie(oe,he,xe,"\u2720","\\maltese"),ie(se,he,xe,"\u2720","\\maltese");for(var ke='0123456789/@."',Se=0;Se<ke.length;Se++){var Me=ke.charAt(Se);ie(oe,le,xe,Me,Me)}for(var ze='0123456789!@*()-=+";:?/.,',Ae=0;Ae<ze.length;Ae++){var Te=ze.charAt(Ae);ie(se,le,xe,Te,Te)}for(var Be="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Ce=0;Ce<Be.length;Ce++){var qe=Be.charAt(Ce);ie(oe,le,de,qe,qe),ie(se,le,xe,qe,qe)}ie(oe,he,xe,"C","\u2102"),ie(se,he,xe,"C","\u2102"),ie(oe,he,xe,"H","\u210d"),ie(se,he,xe,"H","\u210d"),ie(oe,he,xe,"N","\u2115"),ie(se,he,xe,"N","\u2115"),ie(oe,he,xe,"P","\u2119"),ie(se,he,xe,"P","\u2119"),ie(oe,he,xe,"Q","\u211a"),ie(se,he,xe,"Q","\u211a"),ie(oe,he,xe,"R","\u211d"),ie(se,he,xe,"R","\u211d"),ie(oe,he,xe,"Z","\u2124"),ie(se,he,xe,"Z","\u2124"),ie(oe,le,de,"h","\u210e"),ie(se,le,de,"h","\u210e");for(var Ne="",Ie=0;Ie<Be.length;Ie++){var Re=Be.charAt(Ie);ie(oe,le,de,Re,Ne=String.fromCharCode(55349,56320+Ie)),ie(se,le,xe,Re,Ne),ie(oe,le,de,Re,Ne=String.fromCharCode(55349,56372+Ie)),ie(se,le,xe,Re,Ne),ie(oe,le,de,Re,Ne=String.fromCharCode(55349,56424+Ie)),ie(se,le,xe,Re,Ne),ie(oe,le,de,Re,Ne=String.fromCharCode(55349,56580+Ie)),ie(se,le,xe,Re,Ne),ie(oe,le,de,Re,Ne=String.fromCharCode(55349,56736+Ie)),ie(se,le,xe,Re,Ne),ie(oe,le,de,Re,Ne=String.fromCharCode(55349,56788+Ie)),ie(se,le,xe,Re,Ne),ie(oe,le,de,Re,Ne=String.fromCharCode(55349,56840+Ie)),ie(se,le,xe,Re,Ne),ie(oe,le,de,Re,Ne=String.fromCharCode(55349,56944+Ie)),ie(se,le,xe,Re,Ne),Ie<26&&(ie(oe,le,de,Re,Ne=String.fromCharCode(55349,56632+Ie)),ie(se,le,xe,Re,Ne),ie(oe,le,de,Re,Ne=String.fromCharCode(55349,56476+Ie)),ie(se,le,xe,Re,Ne))}ie(oe,le,de,"k",Ne=String.fromCharCode(55349,56668)),ie(se,le,xe,"k",Ne);for(var Oe=0;Oe<10;Oe++){var He=Oe.toString();ie(oe,le,de,He,Ne=String.fromCharCode(55349,57294+Oe)),ie(se,le,xe,He,Ne),ie(oe,le,de,He,Ne=String.fromCharCode(55349,57314+Oe)),ie(se,le,xe,He,Ne),ie(oe,le,de,He,Ne=String.fromCharCode(55349,57324+Oe)),ie(se,le,xe,He,Ne),ie(oe,le,de,He,Ne=String.fromCharCode(55349,57334+Oe)),ie(se,le,xe,He,Ne)}for(var Ee="\xd0\xde\xfe",Le=0;Le<Ee.length;Le++){var De=Ee.charAt(Le);ie(oe,le,de,De,De),ie(se,le,xe,De,De)}var Pe=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["","",""],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],Fe=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],Ve=function(e,t,r){return ae[r][e]&&ae[r][e].replace&&(e=ae[r][e].replace),{value:e,metrics:q(e,t,r)}},Ge=function(e,t,r,n,a){var i,o=Ve(e,t,r),s=o.metrics;if(e=o.value,s){var l=s.italic;("text"===r||n&&"mathit"===n.font)&&(l=0),i=new Z(e,s.height,s.depth,l,s.skew,s.width,a)}else"undefined"!==typeof console&&console.warn("No character metrics for '"+e+"' in style '"+t+"' and mode '"+r+"'"),i=new Z(e,0,0,0,0,0,a);if(n){i.maxFontSize=n.sizeMultiplier,n.style.isTight()&&i.classes.push("mtight");var h=n.getColor();h&&(i.style.color=h)}return i},Ue=function(e,t){if(G(e.classes)!==G(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize)return!1;if(1===e.classes.length){var r=e.classes[0];if("mbin"===r||"mord"===r)return!1}for(var n in e.style)if(e.style.hasOwnProperty(n)&&e.style[n]!==t.style[n])return!1;for(var a in t.style)if(t.style.hasOwnProperty(a)&&e.style[a]!==t.style[a])return!1;return!0},Ye=function(e){for(var t=0,r=0,n=0,a=0;a<e.children.length;a++){var i=e.children[a];i.height>t&&(t=i.height),i.depth>r&&(r=i.depth),i.maxFontSize>n&&(n=i.maxFontSize)}e.height=t,e.depth=r,e.maxFontSize=n},Xe=function(e,t,r,n){var a=new W(e,t,r,n);return Ye(a),a},We=function(e,t,r,n){return new W(e,t,r,n)},_e=function(e){var t=new A(e);return Ye(t),t},je=function(e,t,r){var n="";switch(e){case"amsrm":n="AMS";break;case"textrm":n="Main";break;case"textsf":n="SansSerif";break;case"texttt":n="Typewriter";break;default:n=e}return n+"-"+("textbf"===t&&"textit"===r?"BoldItalic":"textbf"===t?"Bold":"textit"===t?"Italic":"Regular")},$e={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},Ze={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},Ke={fontMap:$e,makeSymbol:Ge,mathsym:function(e,t,r,n){return void 0===n&&(n=[]),"boldsymbol"===r.font&&Ve(e,"Main-Bold",t).metrics?Ge(e,"Main-Bold",t,r,n.concat(["mathbf"])):"\\"===e||"main"===ae[t][e].font?Ge(e,"Main-Regular",t,r,n):Ge(e,"AMS-Regular",t,r,n.concat(["amsrm"]))},makeSpan:Xe,makeSvgSpan:We,makeLineSpan:function(e,t,r){var n=Xe([e],[],t);return n.height=Math.max(r||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),n.style.borderBottomWidth=V(n.height),n.maxFontSize=1,n},makeAnchor:function(e,t,r,n){var a=new _(e,t,r,n);return Ye(a),a},makeFragment:_e,wrapFragment:function(e,t){return e instanceof A?Xe([],[e],t):e},makeVList:function(e,t){for(var r=function(e){if("individualShift"===e.positionType){for(var t=e.children,r=[t[0]],n=-t[0].shift-t[0].elem.depth,a=n,i=1;i<t.length;i++){var o=-t[i].shift-a-t[i].elem.depth,s=o-(t[i-1].elem.height+t[i-1].elem.depth);a+=o,r.push({type:"kern",size:s}),r.push(t[i])}return{children:r,depth:n}}var l;if("top"===e.positionType){for(var h=e.positionData,m=0;m<e.children.length;m++){var c=e.children[m];h-="kern"===c.type?c.size:c.elem.height+c.elem.depth}l=h}else if("bottom"===e.positionType)l=-e.positionData;else{var u=e.children[0];if("elem"!==u.type)throw new Error('First child must have type "elem".');if("shift"===e.positionType)l=-u.elem.depth-e.positionData;else{if("firstBaseline"!==e.positionType)throw new Error("Invalid positionType "+e.positionType+".");l=-u.elem.depth}}return{children:e.children,depth:l}}(e),n=r.children,a=r.depth,i=0,o=0;o<n.length;o++){var s=n[o];if("elem"===s.type){var l=s.elem;i=Math.max(i,l.maxFontSize,l.height)}}i+=2;var h=Xe(["pstrut"],[]);h.style.height=V(i);for(var m=[],c=a,u=a,p=a,d=0;d<n.length;d++){var f=n[d];if("kern"===f.type)p+=f.size;else{var g=f.elem,v=f.wrapperClasses||[],b=f.wrapperStyle||{},y=Xe(v,[h,g],void 0,b);y.style.top=V(-i-p-g.depth),f.marginLeft&&(y.style.marginLeft=f.marginLeft),f.marginRight&&(y.style.marginRight=f.marginRight),m.push(y),p+=g.height+g.depth}c=Math.min(c,p),u=Math.max(u,p)}var x,w=Xe(["vlist"],m);if(w.style.height=V(u),c<0){var k=Xe([],[]),S=Xe(["vlist"],[k]);S.style.height=V(-c);var M=Xe(["vlist-s"],[new Z("\u200b")]);x=[Xe(["vlist-r"],[w,M]),Xe(["vlist-r"],[S])]}else x=[Xe(["vlist-r"],[w])];var z=Xe(["vlist-t"],x);return 2===x.length&&z.classes.push("vlist-t2"),z.height=u,z.depth=-c,z},makeOrd:function(e,t,r){var a=e.mode,i=e.text,o=["mord"],s="math"===a||"text"===a&&t.font,l=s?t.font:t.fontFamily;if(55349===i.charCodeAt(0)){var h=function(e,t){var r=1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536,a="math"===t?0:1;if(119808<=r&&r<120484){var i=Math.floor((r-119808)/26);return[Pe[i][2],Pe[i][a]]}if(120782<=r&&r<=120831){var o=Math.floor((r-120782)/10);return[Fe[o][2],Fe[o][a]]}if(120485===r||120486===r)return[Pe[0][2],Pe[0][a]];if(120486<r&&r<120782)return["",""];throw new n("Unsupported character: "+e)}(i,a),m=h[0],c=h[1];return Ge(i,m,a,t,o.concat(c))}if(l){var u,p;if("boldsymbol"===l){var d=function(e,t,r,n,a){return"textord"!==a&&Ve(e,"Math-BoldItalic",t).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}}(i,a,0,0,r);u=d.fontName,p=[d.fontClass]}else s?(u=$e[l].fontName,p=[l]):(u=je(l,t.fontWeight,t.fontShape),p=[l,t.fontWeight,t.fontShape]);if(Ve(i,u,a).metrics)return Ge(i,u,a,t,o.concat(p));if(we.hasOwnProperty(i)&&"Typewriter"===u.substr(0,10)){for(var f=[],g=0;g<i.length;g++)f.push(Ge(i[g],u,a,t,o.concat(p)));return _e(f)}}if("mathord"===r)return Ge(i,"Math-Italic",a,t,o.concat(["mathnormal"]));if("textord"===r){var v=ae[a][i]&&ae[a][i].font;if("ams"===v){var b=je("amsrm",t.fontWeight,t.fontShape);return Ge(i,b,a,t,o.concat("amsrm",t.fontWeight,t.fontShape))}if("main"!==v&&v){var y=je(v,t.fontWeight,t.fontShape);return Ge(i,y,a,t,o.concat(y,t.fontWeight,t.fontShape))}var x=je("textrm",t.fontWeight,t.fontShape);return Ge(i,x,a,t,o.concat(t.fontWeight,t.fontShape))}throw new Error("unexpected type: "+r+" in makeOrd")},makeGlue:function(e,t){var r=Xe(["mspace"],[],t),n=F(e,t);return r.style.marginRight=V(n),r},staticSvg:function(e,t){var r=Ze[e],n=r[0],a=r[1],i=r[2],o=new J(n),s=new K([o],{width:V(a),height:V(i),style:"width:"+V(a),viewBox:"0 0 "+1e3*a+" "+1e3*i,preserveAspectRatio:"xMinYMin"}),l=We(["overlay"],[s],t);return l.height=i,l.style.height=V(i),l.style.width=V(a),l},svgData:Ze,tryCombineChars:function(e){for(var t=0;t<e.length-1;t++){var r=e[t],n=e[t+1];r instanceof Z&&n instanceof Z&&Ue(r,n)&&(r.text+=n.text,r.height=Math.max(r.height,n.height),r.depth=Math.max(r.depth,n.depth),r.italic=n.italic,e.splice(t+1,1),t--)}return e}},Je={number:3,unit:"mu"},Qe={number:4,unit:"mu"},et={number:5,unit:"mu"},tt={mord:{mop:Je,mbin:Qe,mrel:et,minner:Je},mop:{mord:Je,mop:Je,mrel:et,minner:Je},mbin:{mord:Qe,mop:Qe,mopen:Qe,minner:Qe},mrel:{mord:et,mop:et,mopen:et,minner:et},mopen:{},mclose:{mop:Je,mbin:Qe,mrel:et,minner:Je},mpunct:{mord:Je,mop:Je,mrel:et,mopen:Je,mclose:Je,mpunct:Je,minner:Je},minner:{mord:Je,mop:Je,mbin:Qe,mrel:et,mopen:Je,mpunct:Je,minner:Je}},rt={mord:{mop:Je},mop:{mord:Je,mop:Je},mbin:{},mrel:{},mopen:{},mclose:{mop:Je},mpunct:{},minner:{mop:Je}},nt={},at={},it={};function ot(e){for(var t=e.type,r=e.names,n=e.props,a=e.handler,i=e.htmlBuilder,o=e.mathmlBuilder,s={type:t,numArgs:n.numArgs,argTypes:n.argTypes,allowedInArgument:!!n.allowedInArgument,allowedInText:!!n.allowedInText,allowedInMath:void 0===n.allowedInMath||n.allowedInMath,numOptionalArgs:n.numOptionalArgs||0,infix:!!n.infix,primitive:!!n.primitive,handler:a},l=0;l<r.length;++l)nt[r[l]]=s;t&&(i&&(at[t]=i),o&&(it[t]=o))}function st(e){ot({type:e.type,names:[],props:{numArgs:0},handler:function(){throw new Error("Should never be called.")},htmlBuilder:e.htmlBuilder,mathmlBuilder:e.mathmlBuilder})}var lt=function(e){return"ordgroup"===e.type&&1===e.body.length?e.body[0]:e},ht=function(e){return"ordgroup"===e.type?e.body:[e]},mt=Ke.makeSpan,ct=["leftmost","mbin","mopen","mrel","mop","mpunct"],ut=["rightmost","mrel","mclose","mpunct"],pt={display:x.DISPLAY,text:x.TEXT,script:x.SCRIPT,scriptscript:x.SCRIPTSCRIPT},dt={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},ft=function(e,t,r,n){void 0===n&&(n=[null,null]);for(var a=[],i=0;i<e.length;i++){var o=wt(e[i],t);if(o instanceof A){var s=o.children;a.push.apply(a,s)}else a.push(o)}if(Ke.tryCombineChars(a),!r)return a;var h=t;if(1===e.length){var m=e[0];"sizing"===m.type?h=t.havingSize(m.size):"styling"===m.type&&(h=t.havingStyle(pt[m.style]))}var c=mt([n[0]||"leftmost"],[],t),u=mt([n[1]||"rightmost"],[],t),p="root"===r;return gt(a,(function(e,t){var r=t.classes[0],n=e.classes[0];"mbin"===r&&l.contains(ut,n)?t.classes[0]="mord":"mbin"===n&&l.contains(ct,r)&&(e.classes[0]="mord")}),{node:c},u,p),gt(a,(function(e,t){var r=yt(t),n=yt(e),a=r&&n?e.hasClass("mtight")?rt[r][n]:tt[r][n]:null;if(a)return Ke.makeGlue(a,h)}),{node:c},u,p),a},gt=function e(t,r,n,a,i){a&&t.push(a);for(var o=0;o<t.length;o++){var s=t[o],l=vt(s);if(l)e(l.children,r,n,null,i);else{var h=!s.hasClass("mspace");if(h){var m=r(s,n.node);m&&(n.insertAfter?n.insertAfter(m):(t.unshift(m),o++))}h?n.node=s:i&&s.hasClass("newline")&&(n.node=mt(["leftmost"])),n.insertAfter=function(e){return function(r){t.splice(e+1,0,r),o++}}(o)}}a&&t.pop()},vt=function(e){return e instanceof A||e instanceof _||e instanceof W&&e.hasClass("enclosing")?e:null},bt=function e(t,r){var n=vt(t);if(n){var a=n.children;if(a.length){if("right"===r)return e(a[a.length-1],"right");if("left"===r)return e(a[0],"left")}}return t},yt=function(e,t){return e?(t&&(e=bt(e,t)),dt[e.classes[0]]||null):null},xt=function(e,t){var r=["nulldelimiter"].concat(e.baseSizingClasses());return mt(t.concat(r))},wt=function(e,t,r){if(!e)return mt();if(at[e.type]){var a=at[e.type](e,t);if(r&&t.size!==r.size){a=mt(t.sizingClasses(r),[a],t);var i=t.sizeMultiplier/r.sizeMultiplier;a.height*=i,a.depth*=i}return a}throw new n("Got group of unknown type: '"+e.type+"'")};function kt(e,t){var r=mt(["base"],e,t),n=mt(["strut"]);return n.style.height=V(r.height+r.depth),r.depth&&(n.style.verticalAlign=V(-r.depth)),r.children.unshift(n),r}function St(e,t){var r=null;1===e.length&&"tag"===e[0].type&&(r=e[0].tag,e=e[0].body);var n,a=ft(e,t,"root");2===a.length&&a[1].hasClass("tag")&&(n=a.pop());for(var i,o=[],s=[],l=0;l<a.length;l++)if(s.push(a[l]),a[l].hasClass("mbin")||a[l].hasClass("mrel")||a[l].hasClass("allowbreak")){for(var h=!1;l<a.length-1&&a[l+1].hasClass("mspace")&&!a[l+1].hasClass("newline");)l++,s.push(a[l]),a[l].hasClass("nobreak")&&(h=!0);h||(o.push(kt(s,t)),s=[])}else a[l].hasClass("newline")&&(s.pop(),s.length>0&&(o.push(kt(s,t)),s=[]),o.push(a[l]));s.length>0&&o.push(kt(s,t)),r?((i=kt(ft(r,t,!0))).classes=["tag"],o.push(i)):n&&o.push(n);var m=mt(["katex-html"],o);if(m.setAttribute("aria-hidden","true"),i){var c=i.children[0];c.style.height=V(m.height+m.depth),m.depth&&(c.style.verticalAlign=V(-m.depth))}return m}function Mt(e){return new A(e)}var zt=function(){function e(e,t,r){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=r||[]}var t=e.prototype;return t.setAttribute=function(e,t){this.attributes[e]=t},t.getAttribute=function(e){return this.attributes[e]},t.toNode=function(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=G(this.classes));for(var r=0;r<this.children.length;r++)e.appendChild(this.children[r].toNode());return e},t.toMarkup=function(){var e="<"+this.type;for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="',e+=l.escape(this.attributes[t]),e+='"');this.classes.length>0&&(e+=' class ="'+l.escape(G(this.classes))+'"'),e+=">";for(var r=0;r<this.children.length;r++)e+=this.children[r].toMarkup();return e+="</"+this.type+">"},t.toText=function(){return this.children.map((function(e){return e.toText()})).join("")},e}(),At=function(){function e(e){this.text=void 0,this.text=e}var t=e.prototype;return t.toNode=function(){return document.createTextNode(this.text)},t.toMarkup=function(){return l.escape(this.toText())},t.toText=function(){return this.text},e}(),Tt={MathNode:zt,TextNode:At,SpaceNode:function(){function e(e){this.width=void 0,this.character=void 0,this.width=e,this.character=e>=.05555&&e<=.05556?"\u200a":e>=.1666&&e<=.1667?"\u2009":e>=.2222&&e<=.2223?"\u2005":e>=.2777&&e<=.2778?"\u2005\u200a":e>=-.05556&&e<=-.05555?"\u200a\u2063":e>=-.1667&&e<=-.1666?"\u2009\u2063":e>=-.2223&&e<=-.2222?"\u205f\u2063":e>=-.2778&&e<=-.2777?"\u2005\u2063":null}var t=e.prototype;return t.toNode=function(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",V(this.width)),e},t.toMarkup=function(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+V(this.width)+'"/>'},t.toText=function(){return this.character?this.character:" "},e}(),newDocumentFragment:Mt},Bt=function(e,t,r){return!ae[t][e]||!ae[t][e].replace||55349===e.charCodeAt(0)||we.hasOwnProperty(e)&&r&&(r.fontFamily&&"tt"===r.fontFamily.substr(4,2)||r.font&&"tt"===r.font.substr(4,2))||(e=ae[t][e].replace),new Tt.TextNode(e)},Ct=function(e){return 1===e.length?e[0]:new Tt.MathNode("mrow",e)},qt=function(e,t){if("texttt"===t.fontFamily)return"monospace";if("textsf"===t.fontFamily)return"textit"===t.fontShape&&"textbf"===t.fontWeight?"sans-serif-bold-italic":"textit"===t.fontShape?"sans-serif-italic":"textbf"===t.fontWeight?"bold-sans-serif":"sans-serif";if("textit"===t.fontShape&&"textbf"===t.fontWeight)return"bold-italic";if("textit"===t.fontShape)return"italic";if("textbf"===t.fontWeight)return"bold";var r=t.font;if(!r||"mathnormal"===r)return null;var n=e.mode;if("mathit"===r)return"italic";if("boldsymbol"===r)return"textord"===e.type?"bold":"bold-italic";if("mathbf"===r)return"bold";if("mathbb"===r)return"double-struck";if("mathfrak"===r)return"fraktur";if("mathscr"===r||"mathcal"===r)return"script";if("mathsf"===r)return"sans-serif";if("mathtt"===r)return"monospace";var a=e.text;return l.contains(["\\imath","\\jmath"],a)?null:(ae[n][a]&&ae[n][a].replace&&(a=ae[n][a].replace),q(a,Ke.fontMap[r].fontName,n)?Ke.fontMap[r].variant:null)},Nt=function(e,t,r){if(1===e.length){var n=Rt(e[0],t);return r&&n instanceof zt&&"mo"===n.type&&(n.setAttribute("lspace","0em"),n.setAttribute("rspace","0em")),[n]}for(var a,i=[],o=0;o<e.length;o++){var s=Rt(e[o],t);if(s instanceof zt&&a instanceof zt){if("mtext"===s.type&&"mtext"===a.type&&s.getAttribute("mathvariant")===a.getAttribute("mathvariant")){var l;(l=a.children).push.apply(l,s.children);continue}if("mn"===s.type&&"mn"===a.type){var h;(h=a.children).push.apply(h,s.children);continue}if("mi"===s.type&&1===s.children.length&&"mn"===a.type){var m=s.children[0];if(m instanceof At&&"."===m.text){var c;(c=a.children).push.apply(c,s.children);continue}}else if("mi"===a.type&&1===a.children.length){var u=a.children[0];if(u instanceof At&&"\u0338"===u.text&&("mo"===s.type||"mi"===s.type||"mn"===s.type)){var p=s.children[0];p instanceof At&&p.text.length>0&&(p.text=p.text.slice(0,1)+"\u0338"+p.text.slice(1),i.pop())}}}i.push(s),a=s}return i},It=function(e,t,r){return Ct(Nt(e,t,r))},Rt=function(e,t){if(!e)return new Tt.MathNode("mrow");if(it[e.type])return it[e.type](e,t);throw new n("Got group of unknown type: '"+e.type+"'")};function Ot(e,t,r,n,a){var i,o=Nt(e,r);i=1===o.length&&o[0]instanceof zt&&l.contains(["mrow","mtable"],o[0].type)?o[0]:new Tt.MathNode("mrow",o);var s=new Tt.MathNode("annotation",[new Tt.TextNode(t)]);s.setAttribute("encoding","application/x-tex");var h=new Tt.MathNode("semantics",[i,s]),m=new Tt.MathNode("math",[h]);m.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&m.setAttribute("display","block");var c=a?"katex":"katex-mathml";return Ke.makeSpan([c],[m])}var Ht=function(e){return new E({style:e.displayMode?x.DISPLAY:x.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},Et=function(e,t){if(t.displayMode){var r=["katex-display"];t.leqno&&r.push("leqno"),t.fleqn&&r.push("fleqn"),e=Ke.makeSpan(r,[e])}return e},Lt={widehat:"^",widecheck:"\u02c7",widetilde:"~",utilde:"~",overleftarrow:"\u2190",underleftarrow:"\u2190",xleftarrow:"\u2190",overrightarrow:"\u2192",underrightarrow:"\u2192",xrightarrow:"\u2192",underbrace:"\u23df",overbrace:"\u23de",overgroup:"\u23e0",undergroup:"\u23e1",overleftrightarrow:"\u2194",underleftrightarrow:"\u2194",xleftrightarrow:"\u2194",Overrightarrow:"\u21d2",xRightarrow:"\u21d2",overleftharpoon:"\u21bc",xleftharpoonup:"\u21bc",overrightharpoon:"\u21c0",xrightharpoonup:"\u21c0",xLeftarrow:"\u21d0",xLeftrightarrow:"\u21d4",xhookleftarrow:"\u21a9",xhookrightarrow:"\u21aa",xmapsto:"\u21a6",xrightharpoondown:"\u21c1",xleftharpoondown:"\u21bd",xrightleftharpoons:"\u21cc",xleftrightharpoons:"\u21cb",xtwoheadleftarrow:"\u219e",xtwoheadrightarrow:"\u21a0",xlongequal:"=",xtofrom:"\u21c4",xrightleftarrows:"\u21c4",xrightequilibrium:"\u21cc",xleftequilibrium:"\u21cb","\\cdrightarrow":"\u2192","\\cdleftarrow":"\u2190","\\cdlongequal":"="},Dt={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},Pt=function(e,t,r,n,a){var i,o=e.height+e.depth+r+n;if(/fbox|color|angl/.test(t)){if(i=Ke.makeSpan(["stretchy",t],[],a),"fbox"===t){var s=a.color&&a.getColor();s&&(i.style.borderColor=s)}}else{var l=[];/^[bx]cancel$/.test(t)&&l.push(new Q({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&l.push(new Q({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var h=new K(l,{width:"100%",height:V(o)});i=Ke.makeSvgSpan([],[h],a)}return i.height=o,i.style.height=V(o),i},Ft=function(e){var t=new Tt.MathNode("mo",[new Tt.TextNode(Lt[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},Vt=function(e,t){var r=function(){var r=4e5,n=e.label.substr(1);if(l.contains(["widehat","widecheck","widetilde","utilde"],n)){var a,i,o,s="ordgroup"===(d=e.base).type?d.body.length:1;if(s>5)"widehat"===n||"widecheck"===n?(a=420,r=2364,o=.42,i=n+"4"):(a=312,r=2340,o=.34,i="tilde4");else{var h=[1,1,2,2,3,3][s];"widehat"===n||"widecheck"===n?(r=[0,1062,2364,2364,2364][h],a=[0,239,300,360,420][h],o=[0,.24,.3,.3,.36,.42][h],i=n+h):(r=[0,600,1033,2339,2340][h],a=[0,260,286,306,312][h],o=[0,.26,.286,.3,.306,.34][h],i="tilde"+h)}var m=new J(i),c=new K([m],{width:"100%",height:V(o),viewBox:"0 0 "+r+" "+a,preserveAspectRatio:"none"});return{span:Ke.makeSvgSpan([],[c],t),minWidth:0,height:o}}var u,p,d,f=[],g=Dt[n],v=g[0],b=g[1],y=g[2],x=y/1e3,w=v.length;if(1===w)u=["hide-tail"],p=[g[3]];else if(2===w)u=["halfarrow-left","halfarrow-right"],p=["xMinYMin","xMaxYMin"];else{if(3!==w)throw new Error("Correct katexImagesData or update code here to support\n "+w+" children.");u=["brace-left","brace-center","brace-right"],p=["xMinYMin","xMidYMin","xMaxYMin"]}for(var k=0;k<w;k++){var S=new J(v[k]),M=new K([S],{width:"400em",height:V(x),viewBox:"0 0 "+r+" "+y,preserveAspectRatio:p[k]+" slice"}),z=Ke.makeSvgSpan([u[k]],[M],t);if(1===w)return{span:z,minWidth:b,height:x};z.style.height=V(x),f.push(z)}return{span:Ke.makeSpan(["stretchy"],f,t),minWidth:b,height:x}}(),n=r.span,a=r.minWidth,i=r.height;return n.height=i,n.style.height=V(i),a>0&&(n.style.minWidth=V(a)),n};function Gt(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function Ut(e){var t=Yt(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function Yt(e){return e&&("atom"===e.type||re.hasOwnProperty(e.type))?e:null}var Xt=function(e,t){var r,n,a;e&&"supsub"===e.type?(r=(n=Gt(e.base,"accent")).base,e.base=r,a=function(e){if(e instanceof W)return e;throw new Error("Expected span<HtmlDomNode> but got "+String(e)+".")}(wt(e,t)),e.base=n):r=(n=Gt(e,"accent")).base;var i=wt(r,t.havingCrampedStyle()),o=0;if(n.isShifty&&l.isCharacterBox(r)){var s=l.getBaseElem(r);o=ee(wt(s,t.havingCrampedStyle())).skew}var h,m="\\c"===n.label,c=m?i.height+i.depth:Math.min(i.height,t.fontMetrics().xHeight);if(n.isStretchy)h=Vt(n,t),h=Ke.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"elem",elem:h,wrapperClasses:["svg-align"],wrapperStyle:o>0?{width:"calc(100% - "+V(2*o)+")",marginLeft:V(2*o)}:void 0}]},t);else{var u,p;"\\vec"===n.label?(u=Ke.staticSvg("vec",t),p=Ke.svgData.vec[1]):((u=ee(u=Ke.makeOrd({mode:n.mode,text:n.label},t,"textord"))).italic=0,p=u.width,m&&(c+=u.depth)),h=Ke.makeSpan(["accent-body"],[u]);var d="\\textcircled"===n.label;d&&(h.classes.push("accent-full"),c=i.height);var f=o;d||(f-=p/2),h.style.left=V(f),"\\textcircled"===n.label&&(h.style.top=".2em"),h=Ke.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:-c},{type:"elem",elem:h}]},t)}var g=Ke.makeSpan(["mord","accent"],[h],t);return a?(a.children[0]=g,a.height=Math.max(g.height,a.height),a.classes[0]="mord",a):g},Wt=function(e,t){var r=e.isStretchy?Ft(e.label):new Tt.MathNode("mo",[Bt(e.label,e.mode)]),n=new Tt.MathNode("mover",[Rt(e.base,t),r]);return n.setAttribute("accent","true"),n},_t=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map((function(e){return"\\"+e})).join("|"));ot({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:function(e,t){var r=lt(t[0]),n=!_t.test(e.funcName),a=!n||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:n,isShifty:a,base:r}},htmlBuilder:Xt,mathmlBuilder:Wt}),ot({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:function(e,t){var r=t[0],n=e.parser.mode;return"math"===n&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:e.funcName,isStretchy:!1,isShifty:!0,base:r}},htmlBuilder:Xt,mathmlBuilder:Wt}),ot({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:function(e,t){var r=e.parser,n=e.funcName,a=t[0];return{type:"accentUnder",mode:r.mode,label:n,base:a}},htmlBuilder:function(e,t){var r=wt(e.base,t),n=Vt(e,t),a="\\utilde"===e.label?.12:0,i=Ke.makeVList({positionType:"top",positionData:r.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:a},{type:"elem",elem:r}]},t);return Ke.makeSpan(["mord","accentunder"],[i],t)},mathmlBuilder:function(e,t){var r=Ft(e.label),n=new Tt.MathNode("munder",[Rt(e.base,t),r]);return n.setAttribute("accentunder","true"),n}});var jt=function(e){var t=new Tt.MathNode("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};ot({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler:function(e,t,r){var n=e.parser,a=e.funcName;return{type:"xArrow",mode:n.mode,label:a,body:t[0],below:r[0]}},htmlBuilder:function(e,t){var r,n=t.style,a=t.havingStyle(n.sup()),i=Ke.wrapFragment(wt(e.body,a,t),t),o="\\x"===e.label.slice(0,2)?"x":"cd";i.classes.push(o+"-arrow-pad"),e.below&&(a=t.havingStyle(n.sub()),(r=Ke.wrapFragment(wt(e.below,a,t),t)).classes.push(o+"-arrow-pad"));var s,l=Vt(e,t),h=-t.fontMetrics().axisHeight+.5*l.height,m=-t.fontMetrics().axisHeight-.5*l.height-.111;if((i.depth>.25||"\\xleftequilibrium"===e.label)&&(m-=i.depth),r){var c=-t.fontMetrics().axisHeight+r.height+.5*l.height+.111;s=Ke.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:m},{type:"elem",elem:l,shift:h},{type:"elem",elem:r,shift:c}]},t)}else s=Ke.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:m},{type:"elem",elem:l,shift:h}]},t);return s.children[0].children[0].children[1].classes.push("svg-align"),Ke.makeSpan(["mrel","x-arrow"],[s],t)},mathmlBuilder:function(e,t){var r,n=Ft(e.label);if(n.setAttribute("minsize","x"===e.label.charAt(0)?"1.75em":"3.0em"),e.body){var a=jt(Rt(e.body,t));if(e.below){var i=jt(Rt(e.below,t));r=new Tt.MathNode("munderover",[n,i,a])}else r=new Tt.MathNode("mover",[n,a])}else if(e.below){var o=jt(Rt(e.below,t));r=new Tt.MathNode("munder",[n,o])}else r=jt(),r=new Tt.MathNode("mover",[n,r]);return r}});var $t={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Zt=function(e){return"textord"===e.type&&"@"===e.text};function Kt(e,t,r){var n=$t[e];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(n,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":var a={type:"atom",text:n,mode:"math",family:"rel"},i={type:"ordgroup",mode:"math",body:[r.callFunction("\\\\cdleft",[t[0]],[]),r.callFunction("\\Big",[a],[]),r.callFunction("\\\\cdright",[t[1]],[])]};return r.callFunction("\\\\cdparent",[i],[]);case"\\\\cdlongequal":return r.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":return r.callFunction("\\Big",[{type:"textord",text:"\\Vert",mode:"math"}],[]);default:return{type:"textord",text:" ",mode:"math"}}}ot({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler:function(e,t){var r=e.parser,n=e.funcName;return{type:"cdlabel",mode:r.mode,side:n.slice(4),label:t[0]}},htmlBuilder:function(e,t){var r=t.havingStyle(t.style.sup()),n=Ke.wrapFragment(wt(e.label,r,t),t);return n.classes.push("cd-label-"+e.side),n.style.bottom=V(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder:function(e,t){var r=new Tt.MathNode("mrow",[Rt(e.label,t)]);return(r=new Tt.MathNode("mpadded",[r])).setAttribute("width","0"),"left"===e.side&&r.setAttribute("lspace","-1width"),r.setAttribute("voffset","0.7em"),(r=new Tt.MathNode("mstyle",[r])).setAttribute("displaystyle","false"),r.setAttribute("scriptlevel","1"),r}}),ot({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler:function(e,t){return{type:"cdlabelparent",mode:e.parser.mode,fragment:t[0]}},htmlBuilder:function(e,t){var r=Ke.wrapFragment(wt(e.fragment,t),t);return r.classes.push("cd-vert-arrow"),r},mathmlBuilder:function(e,t){return new Tt.MathNode("mrow",[Rt(e.fragment,t)])}}),ot({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){for(var r=e.parser,a=Gt(t[0],"ordgroup").body,i="",o=0;o<a.length;o++)i+=Gt(a[o],"textord").text;var s,l=parseInt(i);if(isNaN(l))throw new n("\\@char has non-numeric argument "+i);if(l<0||l>=1114111)throw new n("\\@char with invalid code point "+i);return l<=65535?s=String.fromCharCode(l):(l-=65536,s=String.fromCharCode(55296+(l>>10),56320+(1023&l))),{type:"textord",mode:r.mode,text:s}}});var Jt=function(e,t){var r=ft(e.body,t.withColor(e.color),!1);return Ke.makeFragment(r)},Qt=function(e,t){var r=Nt(e.body,t.withColor(e.color)),n=new Tt.MathNode("mstyle",r);return n.setAttribute("mathcolor",e.color),n};ot({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler:function(e,t){var r=e.parser,n=Gt(t[0],"color-token").color,a=t[1];return{type:"color",mode:r.mode,color:n,body:ht(a)}},htmlBuilder:Jt,mathmlBuilder:Qt}),ot({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler:function(e,t){var r=e.parser,n=e.breakOnTokenText,a=Gt(t[0],"color-token").color;r.gullet.macros.set("\\current@color",a);var i=r.parseExpression(!0,n);return{type:"color",mode:r.mode,color:a,body:i}},htmlBuilder:Jt,mathmlBuilder:Qt}),ot({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:1,argTypes:["size"],allowedInText:!0},handler:function(e,t,r){var n=e.parser,a=r[0],i=!n.settings.displayMode||!n.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:n.mode,newLine:i,size:a&&Gt(a,"size").value}},htmlBuilder:function(e,t){var r=Ke.makeSpan(["mspace"],[],t);return e.newLine&&(r.classes.push("newline"),e.size&&(r.style.marginTop=V(F(e.size,t)))),r},mathmlBuilder:function(e,t){var r=new Tt.MathNode("mspace");return e.newLine&&(r.setAttribute("linebreak","newline"),e.size&&r.setAttribute("height",V(F(e.size,t)))),r}});var er={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},tr=function(e){var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new n("Expected a control sequence",e);return t},rr=function(e,t,r,n){var a=e.gullet.macros.get(r.text);null==a&&(r.noexpand=!0,a={tokens:[r],numArgs:0,unexpandable:!e.gullet.isExpandable(r.text)}),e.gullet.macros.set(t,a,n)};ot({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler:function(e){var t=e.parser,r=e.funcName;t.consumeSpaces();var a=t.fetch();if(er[a.text])return"\\global"!==r&&"\\\\globallong"!==r||(a.text=er[a.text]),Gt(t.parseFunction(),"internal");throw new n("Invalid token after macro prefix",a)}}),ot({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler:function(e){var t=e.parser,r=e.funcName,a=t.gullet.popToken(),i=a.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new n("Expected a control sequence",a);for(var o,s=0,l=[[]];"{"!==t.gullet.future().text;)if("#"===(a=t.gullet.popToken()).text){if("{"===t.gullet.future().text){o=t.gullet.future(),l[s].push("{");break}if(a=t.gullet.popToken(),!/^[1-9]$/.test(a.text))throw new n('Invalid argument number "'+a.text+'"');if(parseInt(a.text)!==s+1)throw new n('Argument number "'+a.text+'" out of order');s++,l.push([])}else{if("EOF"===a.text)throw new n("Expected a macro definition");l[s].push(a.text)}var h=t.gullet.consumeArg().tokens;return o&&h.unshift(o),"\\edef"!==r&&"\\xdef"!==r||(h=t.gullet.expandTokens(h)).reverse(),t.gullet.macros.set(i,{tokens:h,numArgs:s,delimiters:l},r===er[r]),{type:"internal",mode:t.mode}}}),ot({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler:function(e){var t=e.parser,r=e.funcName,n=tr(t.gullet.popToken());t.gullet.consumeSpaces();var a=function(e){var t=e.gullet.popToken();return"="===t.text&&" "===(t=e.gullet.popToken()).text&&(t=e.gullet.popToken()),t}(t);return rr(t,n,a,"\\\\globallet"===r),{type:"internal",mode:t.mode}}}),ot({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler:function(e){var t=e.parser,r=e.funcName,n=tr(t.gullet.popToken()),a=t.gullet.popToken(),i=t.gullet.popToken();return rr(t,n,i,"\\\\globalfuture"===r),t.gullet.pushToken(i),t.gullet.pushToken(a),{type:"internal",mode:t.mode}}});var nr=function(e,t,r){var n=q(ae.math[e]&&ae.math[e].replace||e,t,r);if(!n)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return n},ar=function(e,t,r,n){var a=r.havingBaseStyle(t),i=Ke.makeSpan(n.concat(a.sizingClasses(r)),[e],r),o=a.sizeMultiplier/r.sizeMultiplier;return i.height*=o,i.depth*=o,i.maxFontSize=a.sizeMultiplier,i},ir=function(e,t,r){var n=t.havingBaseStyle(r),a=(1-t.sizeMultiplier/n.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=V(a),e.height-=a,e.depth+=a},or=function(e,t,r,n,a,i){var o=function(e,t,r,n){return Ke.makeSymbol(e,"Size"+t+"-Regular",r,n)}(e,t,a,n),s=ar(Ke.makeSpan(["delimsizing","size"+t],[o],n),x.TEXT,n,i);return r&&ir(s,n,x.TEXT),s},sr=function(e,t,r){var n;return n="Size1-Regular"===t?"delim-size1":"delim-size4",{type:"elem",elem:Ke.makeSpan(["delimsizinginner",n],[Ke.makeSpan([],[Ke.makeSymbol(e,t,r)])])}},lr=function(e,t,r){var n=T["Size4-Regular"][e.charCodeAt(0)]?T["Size4-Regular"][e.charCodeAt(0)][4]:T["Size1-Regular"][e.charCodeAt(0)][4],a=new J("inner",function(e,t){switch(e){case"\u239c":return"M291 0 H417 V"+t+" H291z M291 0 H417 V"+t+" H291z";case"\u2223":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z";case"\u2225":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145zM367 0 H410 V"+t+" H367z M367 0 H410 V"+t+" H367z";case"\u239f":return"M457 0 H583 V"+t+" H457z M457 0 H583 V"+t+" H457z";case"\u23a2":return"M319 0 H403 V"+t+" H319z M319 0 H403 V"+t+" H319z";case"\u23a5":return"M263 0 H347 V"+t+" H263z M263 0 H347 V"+t+" H263z";case"\u23aa":return"M384 0 H504 V"+t+" H384z M384 0 H504 V"+t+" H384z";case"\u23d0":return"M312 0 H355 V"+t+" H312z M312 0 H355 V"+t+" H312z";case"\u2016":return"M257 0 H300 V"+t+" H257z M257 0 H300 V"+t+" H257zM478 0 H521 V"+t+" H478z M478 0 H521 V"+t+" H478z";default:return""}}(e,Math.round(1e3*t))),i=new K([a],{width:V(n),height:V(t),style:"width:"+V(n),viewBox:"0 0 "+1e3*n+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),o=Ke.makeSvgSpan([],[i],r);return o.height=t,o.style.height=V(t),o.style.width=V(n),{type:"elem",elem:o}},hr={type:"kern",size:-.008},mr=["|","\\lvert","\\rvert","\\vert"],cr=["\\|","\\lVert","\\rVert","\\Vert"],ur=function(e,t,r,n,a,i){var o,s,h,m;o=h=m=e,s=null;var c="Size1-Regular";"\\uparrow"===e?h=m="\u23d0":"\\Uparrow"===e?h=m="\u2016":"\\downarrow"===e?o=h="\u23d0":"\\Downarrow"===e?o=h="\u2016":"\\updownarrow"===e?(o="\\uparrow",h="\u23d0",m="\\downarrow"):"\\Updownarrow"===e?(o="\\Uparrow",h="\u2016",m="\\Downarrow"):l.contains(mr,e)?h="\u2223":l.contains(cr,e)?h="\u2225":"["===e||"\\lbrack"===e?(o="\u23a1",h="\u23a2",m="\u23a3",c="Size4-Regular"):"]"===e||"\\rbrack"===e?(o="\u23a4",h="\u23a5",m="\u23a6",c="Size4-Regular"):"\\lfloor"===e||"\u230a"===e?(h=o="\u23a2",m="\u23a3",c="Size4-Regular"):"\\lceil"===e||"\u2308"===e?(o="\u23a1",h=m="\u23a2",c="Size4-Regular"):"\\rfloor"===e||"\u230b"===e?(h=o="\u23a5",m="\u23a6",c="Size4-Regular"):"\\rceil"===e||"\u2309"===e?(o="\u23a4",h=m="\u23a5",c="Size4-Regular"):"("===e||"\\lparen"===e?(o="\u239b",h="\u239c",m="\u239d",c="Size4-Regular"):")"===e||"\\rparen"===e?(o="\u239e",h="\u239f",m="\u23a0",c="Size4-Regular"):"\\{"===e||"\\lbrace"===e?(o="\u23a7",s="\u23a8",m="\u23a9",h="\u23aa",c="Size4-Regular"):"\\}"===e||"\\rbrace"===e?(o="\u23ab",s="\u23ac",m="\u23ad",h="\u23aa",c="Size4-Regular"):"\\lgroup"===e||"\u27ee"===e?(o="\u23a7",m="\u23a9",h="\u23aa",c="Size4-Regular"):"\\rgroup"===e||"\u27ef"===e?(o="\u23ab",m="\u23ad",h="\u23aa",c="Size4-Regular"):"\\lmoustache"===e||"\u23b0"===e?(o="\u23a7",m="\u23ad",h="\u23aa",c="Size4-Regular"):"\\rmoustache"!==e&&"\u23b1"!==e||(o="\u23ab",m="\u23a9",h="\u23aa",c="Size4-Regular");var u=nr(o,c,a),p=u.height+u.depth,d=nr(h,c,a),f=d.height+d.depth,g=nr(m,c,a),v=g.height+g.depth,b=0,y=1;if(null!==s){var w=nr(s,c,a);b=w.height+w.depth,y=2}var k=p+v+b,S=k+Math.max(0,Math.ceil((t-k)/(y*f)))*y*f,M=n.fontMetrics().axisHeight;r&&(M*=n.sizeMultiplier);var z=S/2-M,A=[];if(A.push(sr(m,c,a)),A.push(hr),null===s){var T=S-p-v+.016;A.push(lr(h,T,n))}else{var B=(S-p-v-b)/2+.016;A.push(lr(h,B,n)),A.push(hr),A.push(sr(s,c,a)),A.push(hr),A.push(lr(h,B,n))}A.push(hr),A.push(sr(o,c,a));var C=n.havingBaseStyle(x.TEXT),q=Ke.makeVList({positionType:"bottom",positionData:z,children:A},C);return ar(Ke.makeSpan(["delimsizing","mult"],[q],C),x.TEXT,n,i)},pr=.08,dr=function(e,t,r,n,a){var i=function(e,t,r){t*=1e3;var n="";switch(e){case"sqrtMain":n=function(e,t){return"M95,"+(622+e+t)+"\nc-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14\nc0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54\nc44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10\ns173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429\nc69,-144,104.5,-217.7,106.5,-221\nl"+e/2.075+" -"+e+"\nc5.3,-9.3,12,-14,20,-14\nH400000v"+(40+e)+"H845.2724\ns-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7\nc-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z\nM"+(834+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,M);break;case"sqrtSize1":n=function(e,t){return"M263,"+(601+e+t)+"c0.7,0,18,39.7,52,119\nc34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120\nc340,-704.7,510.7,-1060.3,512,-1067\nl"+e/2.084+" -"+e+"\nc4.7,-7.3,11,-11,19,-11\nH40000v"+(40+e)+"H1012.3\ns-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232\nc-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1\ns-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26\nc-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,M);break;case"sqrtSize2":n=function(e,t){return"M983 "+(10+e+t)+"\nl"+e/3.13+" -"+e+"\nc4,-6.7,10,-10,18,-10 H400000v"+(40+e)+"\nH1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7\ns-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744\nc-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30\nc26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722\nc56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5\nc53.7,-170.3,84.5,-266.8,92.5,-289.5z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,M);break;case"sqrtSize3":n=function(e,t){return"M424,"+(2398+e+t)+"\nc-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514\nc0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20\ns-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121\ns209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081\nl"+e/4.223+" -"+e+"c4,-6.7,10,-10,18,-10 H400000\nv"+(40+e)+"H1014.6\ns-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185\nc-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2z M"+(1001+e)+" "+t+"\nh400000v"+(40+e)+"h-400000z"}(t,M);break;case"sqrtSize4":n=function(e,t){return"M473,"+(2713+e+t)+"\nc339.3,-1799.3,509.3,-2700,510,-2702 l"+e/5.298+" -"+e+"\nc3.3,-7.3,9.3,-11,18,-11 H400000v"+(40+e)+"H1017.7\ns-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200\nc0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26\ns76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,\n606zM"+(1001+e)+" "+t+"h400000v"+(40+e)+"H1017.7z"}(t,M);break;case"sqrtTall":n=function(e,t,r){return"M702 "+(e+t)+"H400000"+(40+e)+"\nH742v"+(r-54-t-e)+"l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1\nh-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170\nc-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667\n219 661 l218 661zM702 "+t+"H400000v"+(40+e)+"H742z"}(t,M,r)}return n}(e,n,r),o=new J(e,i),s=new K([o],{width:"400em",height:V(t),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return Ke.makeSvgSpan(["hide-tail"],[s],a)},fr=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230a","\u230b","\\lceil","\\rceil","\u2308","\u2309","\\surd"],gr=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27ee","\u27ef","\\lmoustache","\\rmoustache","\u23b0","\u23b1"],vr=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],br=[0,1.2,1.8,2.4,3],yr=[{type:"small",style:x.SCRIPTSCRIPT},{type:"small",style:x.SCRIPT},{type:"small",style:x.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],xr=[{type:"small",style:x.SCRIPTSCRIPT},{type:"small",style:x.SCRIPT},{type:"small",style:x.TEXT},{type:"stack"}],wr=[{type:"small",style:x.SCRIPTSCRIPT},{type:"small",style:x.SCRIPT},{type:"small",style:x.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],kr=function(e){if("small"===e.type)return"Main-Regular";if("large"===e.type)return"Size"+e.size+"-Regular";if("stack"===e.type)return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},Sr=function(e,t,r,n){for(var a=Math.min(2,3-n.style.size);a<r.length&&"stack"!==r[a].type;a++){var i=nr(e,kr(r[a]),"math"),o=i.height+i.depth;if("small"===r[a].type&&(o*=n.havingBaseStyle(r[a].style).sizeMultiplier),o>t)return r[a]}return r[r.length-1]},Mr=function(e,t,r,n,a,i){var o;"<"===e||"\\lt"===e||"\u27e8"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"\u27e9"!==e||(e="\\rangle"),o=l.contains(vr,e)?yr:l.contains(fr,e)?wr:xr;var s=Sr(e,t,o,n);return"small"===s.type?function(e,t,r,n,a,i){var o=Ke.makeSymbol(e,"Main-Regular",a,n),s=ar(o,t,n,i);return r&&ir(s,n,t),s}(e,s.style,r,n,a,i):"large"===s.type?or(e,s.size,r,n,a,i):ur(e,t,r,n,a,i)},zr={sqrtImage:function(e,t){var r,n,a=t.havingBaseSizing(),i=Sr("\\surd",e*a.sizeMultiplier,wr,a),o=a.sizeMultiplier,s=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),l=0,h=0,m=0;return"small"===i.type?(e<1?o=1:e<1.4&&(o=.7),h=(1+s)/o,(r=dr("sqrtMain",l=(1+s+pr)/o,m=1e3+1e3*s+80,s,t)).style.minWidth="0.853em",n=.833/o):"large"===i.type?(m=1080*br[i.size],h=(br[i.size]+s)/o,l=(br[i.size]+s+pr)/o,(r=dr("sqrtSize"+i.size,l,m,s,t)).style.minWidth="1.02em",n=1/o):(l=e+s+pr,h=e+s,m=Math.floor(1e3*e+s)+80,(r=dr("sqrtTall",l,m,s,t)).style.minWidth="0.742em",n=1.056),r.height=h,r.style.height=V(l),{span:r,advanceWidth:n,ruleWidth:(t.fontMetrics().sqrtRuleThickness+s)*o}},sizedDelim:function(e,t,r,a,i){if("<"===e||"\\lt"===e||"\u27e8"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"\u27e9"!==e||(e="\\rangle"),l.contains(fr,e)||l.contains(vr,e))return or(e,t,!1,r,a,i);if(l.contains(gr,e))return ur(e,br[t],!1,r,a,i);throw new n("Illegal delimiter: '"+e+"'")},sizeToMaxHeight:br,customSizedDelim:Mr,leftRightDelim:function(e,t,r,n,a,i){var o=n.fontMetrics().axisHeight*n.sizeMultiplier,s=5/n.fontMetrics().ptPerEm,l=Math.max(t-o,r+o),h=Math.max(l/500*901,2*l-s);return Mr(e,h,!0,n,a,i)}},Ar={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},Tr=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230a","\u230b","\\lceil","\\rceil","\u2308","\u2309","<",">","\\langle","\u27e8","\\rangle","\u27e9","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27ee","\u27ef","\\lmoustache","\\rmoustache","\u23b0","\u23b1","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function Br(e,t){var r=Yt(e);if(r&&l.contains(Tr,r.text))return r;throw new n(r?"Invalid delimiter '"+r.text+"' after '"+t.funcName+"'":"Invalid delimiter type '"+e.type+"'",e)}function Cr(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}ot({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:function(e,t){var r=Br(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:Ar[e.funcName].size,mclass:Ar[e.funcName].mclass,delim:r.text}},htmlBuilder:function(e,t){return"."===e.delim?Ke.makeSpan([e.mclass]):zr.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass])},mathmlBuilder:function(e){var t=[];"."!==e.delim&&t.push(Bt(e.delim,e.mode));var r=new Tt.MathNode("mo",t);"mopen"===e.mclass||"mclose"===e.mclass?r.setAttribute("fence","true"):r.setAttribute("fence","false"),r.setAttribute("stretchy","true");var n=V(zr.sizeToMaxHeight[e.size]);return r.setAttribute("minsize",n),r.setAttribute("maxsize",n),r}}),ot({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:function(e,t){var r=e.parser.gullet.macros.get("\\current@color");if(r&&"string"!==typeof r)throw new n("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:Br(t[0],e).text,color:r}}}),ot({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:function(e,t){var r=Br(t[0],e),n=e.parser;++n.leftrightDepth;var a=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var i=Gt(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:a,left:r.text,right:i.delim,rightColor:i.color}},htmlBuilder:function(e,t){Cr(e);for(var r,n,a=ft(e.body,t,!0,["mopen","mclose"]),i=0,o=0,s=!1,l=0;l<a.length;l++)a[l].isMiddle?s=!0:(i=Math.max(a[l].height,i),o=Math.max(a[l].depth,o));if(i*=t.sizeMultiplier,o*=t.sizeMultiplier,r="."===e.left?xt(t,["mopen"]):zr.leftRightDelim(e.left,i,o,t,e.mode,["mopen"]),a.unshift(r),s)for(var h=1;h<a.length;h++){var m=a[h].isMiddle;m&&(a[h]=zr.leftRightDelim(m.delim,i,o,m.options,e.mode,[]))}if("."===e.right)n=xt(t,["mclose"]);else{var c=e.rightColor?t.withColor(e.rightColor):t;n=zr.leftRightDelim(e.right,i,o,c,e.mode,["mclose"])}return a.push(n),Ke.makeSpan(["minner"],a,t)},mathmlBuilder:function(e,t){Cr(e);var r=Nt(e.body,t);if("."!==e.left){var n=new Tt.MathNode("mo",[Bt(e.left,e.mode)]);n.setAttribute("fence","true"),r.unshift(n)}if("."!==e.right){var a=new Tt.MathNode("mo",[Bt(e.right,e.mode)]);a.setAttribute("fence","true"),e.rightColor&&a.setAttribute("mathcolor",e.rightColor),r.push(a)}return Ct(r)}}),ot({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:function(e,t){var r=Br(t[0],e);if(!e.parser.leftrightDepth)throw new n("\\middle without preceding \\left",r);return{type:"middle",mode:e.parser.mode,delim:r.text}},htmlBuilder:function(e,t){var r;if("."===e.delim)r=xt(t,[]);else{r=zr.sizedDelim(e.delim,1,t,e.mode,[]);var n={delim:e.delim,options:t};r.isMiddle=n}return r},mathmlBuilder:function(e,t){var r="\\vert"===e.delim||"|"===e.delim?Bt("|","text"):Bt(e.delim,e.mode),n=new Tt.MathNode("mo",[r]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n}});var qr=function(e,t){var r,n,a,i=Ke.wrapFragment(wt(e.body,t),t),o=e.label.substr(1),s=t.sizeMultiplier,h=0,m=l.isCharacterBox(e.body);if("sout"===o)(r=Ke.makeSpan(["stretchy","sout"])).height=t.fontMetrics().defaultRuleThickness/s,h=-.5*t.fontMetrics().xHeight;else if("phase"===o){var c=F({number:.6,unit:"pt"},t),u=F({number:.35,unit:"ex"},t);s/=t.havingBaseSizing().sizeMultiplier;var p=i.height+i.depth+c+u;i.style.paddingLeft=V(p/2+c);var d=Math.floor(1e3*p*s),f="M400000 "+(n=d)+" H0 L"+n/2+" 0 l65 45 L145 "+(n-80)+" H400000z",g=new K([new J("phase",f)],{width:"400em",height:V(d/1e3),viewBox:"0 0 400000 "+d,preserveAspectRatio:"xMinYMin slice"});(r=Ke.makeSvgSpan(["hide-tail"],[g],t)).style.height=V(p),h=i.depth+c+u}else{/cancel/.test(o)?m||i.classes.push("cancel-pad"):"angl"===o?i.classes.push("anglpad"):i.classes.push("boxpad");var v=0,b=0,y=0;/box/.test(o)?(y=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),b=v=t.fontMetrics().fboxsep+("colorbox"===o?0:y)):"angl"===o?(v=4*(y=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness)),b=Math.max(0,.25-i.depth)):b=v=m?.2:0,r=Pt(i,o,v,b,t),/fbox|boxed|fcolorbox/.test(o)?(r.style.borderStyle="solid",r.style.borderWidth=V(y)):"angl"===o&&.049!==y&&(r.style.borderTopWidth=V(y),r.style.borderRightWidth=V(y)),h=i.depth+b,e.backgroundColor&&(r.style.backgroundColor=e.backgroundColor,e.borderColor&&(r.style.borderColor=e.borderColor))}if(e.backgroundColor)a=Ke.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:h},{type:"elem",elem:i,shift:0}]},t);else{var x=/cancel|phase/.test(o)?["svg-align"]:[];a=Ke.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:0},{type:"elem",elem:r,shift:h,wrapperClasses:x}]},t)}return/cancel/.test(o)&&(a.height=i.height,a.depth=i.depth),/cancel/.test(o)&&!m?Ke.makeSpan(["mord","cancel-lap"],[a],t):Ke.makeSpan(["mord"],[a],t)},Nr=function(e,t){var r=0,n=new Tt.MathNode(e.label.indexOf("colorbox")>-1?"mpadded":"menclose",[Rt(e.body,t)]);switch(e.label){case"\\cancel":n.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":n.setAttribute("notation","downdiagonalstrike");break;case"\\phase":n.setAttribute("notation","phasorangle");break;case"\\sout":n.setAttribute("notation","horizontalstrike");break;case"\\fbox":n.setAttribute("notation","box");break;case"\\angl":n.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(r=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*r+"pt"),n.setAttribute("height","+"+2*r+"pt"),n.setAttribute("lspace",r+"pt"),n.setAttribute("voffset",r+"pt"),"\\fcolorbox"===e.label){var a=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);n.setAttribute("style","border: "+a+"em solid "+String(e.borderColor))}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return e.backgroundColor&&n.setAttribute("mathbackground",e.backgroundColor),n};ot({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler:function(e,t,r){var n=e.parser,a=e.funcName,i=Gt(t[0],"color-token").color,o=t[1];return{type:"enclose",mode:n.mode,label:a,backgroundColor:i,body:o}},htmlBuilder:qr,mathmlBuilder:Nr}),ot({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler:function(e,t,r){var n=e.parser,a=e.funcName,i=Gt(t[0],"color-token").color,o=Gt(t[1],"color-token").color,s=t[2];return{type:"enclose",mode:n.mode,label:a,backgroundColor:o,borderColor:i,body:s}},htmlBuilder:qr,mathmlBuilder:Nr}),ot({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler:function(e,t){return{type:"enclose",mode:e.parser.mode,label:"\\fbox",body:t[0]}}}),ot({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler:function(e,t){var r=e.parser,n=e.funcName,a=t[0];return{type:"enclose",mode:r.mode,label:n,body:a}},htmlBuilder:qr,mathmlBuilder:Nr}),ot({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler:function(e,t){return{type:"enclose",mode:e.parser.mode,label:"\\angl",body:t[0]}}});var Ir={};function Rr(e){for(var t=e.type,r=e.names,n=e.props,a=e.handler,i=e.htmlBuilder,o=e.mathmlBuilder,s={type:t,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:a},l=0;l<r.length;++l)Ir[r[l]]=s;i&&(at[t]=i),o&&(it[t]=o)}var Or={};function Hr(e,t){Or[e]=t}var Er=function(){function e(e,t,r){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=r}return e.range=function(t,r){return r?t&&t.loc&&r.loc&&t.loc.lexer===r.loc.lexer?new e(t.loc.lexer,t.loc.start,r.loc.end):null:t&&t.loc},e}(),Lr=function(){function e(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}return e.prototype.range=function(t,r){return new e(r,Er.range(this,t))},e}();function Dr(e){var t=[];e.consumeSpaces();for(var r=e.fetch().text;"\\hline"===r||"\\hdashline"===r;)e.consume(),t.push("\\hdashline"===r),e.consumeSpaces(),r=e.fetch().text;return t}var Pr=function(e){if(!e.parser.settings.displayMode)throw new n("{"+e.envName+"} can be used only in display mode.")};function Fr(e){if(-1===e.indexOf("ed"))return-1===e.indexOf("*")}function Vr(e,t,r){var a=t.hskipBeforeAndAfter,i=t.addJot,o=t.cols,s=t.arraystretch,l=t.colSeparationType,h=t.autoTag,m=t.singleRow,c=t.emptySingleRow,u=t.maxNumCols,p=t.leqno;if(e.gullet.beginGroup(),m||e.gullet.macros.set("\\cr","\\\\\\relax"),!s){var d=e.gullet.expandMacroAsText("\\arraystretch");if(null==d)s=1;else if(!(s=parseFloat(d))||s<0)throw new n("Invalid \\arraystretch: "+d)}e.gullet.beginGroup();var f=[],g=[f],v=[],b=[],y=null!=h?[]:void 0;function x(){h&&e.gullet.macros.set("\\@eqnsw","1",!0)}function w(){y&&(e.gullet.macros.get("\\df@tag")?(y.push(e.subparse([new Lr("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):y.push(Boolean(h)&&"1"===e.gullet.macros.get("\\@eqnsw")))}for(x(),b.push(Dr(e));;){var k=e.parseExpression(!1,m?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup(),k={type:"ordgroup",mode:e.mode,body:k},r&&(k={type:"styling",mode:e.mode,style:r,body:[k]}),f.push(k);var S=e.fetch().text;if("&"===S){if(u&&f.length===u){if(m||l)throw new n("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else{if("\\end"===S){w(),1===f.length&&"styling"===k.type&&0===k.body[0].body.length&&(g.length>1||!c)&&g.pop(),b.length<g.length+1&&b.push([]);break}if("\\\\"!==S)throw new n("Expected & or \\\\ or \\cr or \\end",e.nextToken);e.consume();var M=void 0;" "!==e.gullet.future().text&&(M=e.parseSizeGroup(!0)),v.push(M?M.value:null),w(),b.push(Dr(e)),f=[],g.push(f),x()}}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:e.mode,addJot:i,arraystretch:s,body:g,cols:o,rowGaps:v,hskipBeforeAndAfter:a,hLinesBeforeRow:b,colSeparationType:l,tags:y,leqno:p}}function Gr(e){return"d"===e.substr(0,1)?"display":"text"}var Ur=function(e,t){var r,a,i=e.body.length,o=e.hLinesBeforeRow,s=0,h=new Array(i),m=[],c=Math.max(t.fontMetrics().arrayRuleWidth,t.minRuleThickness),u=1/t.fontMetrics().ptPerEm,p=5*u;e.colSeparationType&&"small"===e.colSeparationType&&(p=t.havingStyle(x.SCRIPT).sizeMultiplier/t.sizeMultiplier*.2778);var d="CD"===e.colSeparationType?F({number:3,unit:"ex"},t):12*u,f=3*u,g=e.arraystretch*d,v=.7*g,b=.3*g,y=0;function w(e){for(var t=0;t<e.length;++t)t>0&&(y+=.25),m.push({pos:y,isDashed:e[t]})}for(w(o[0]),r=0;r<e.body.length;++r){var k=e.body[r],S=v,M=b;s<k.length&&(s=k.length);var z=new Array(k.length);for(a=0;a<k.length;++a){var A=wt(k[a],t);M<A.depth&&(M=A.depth),S<A.height&&(S=A.height),z[a]=A}var T=e.rowGaps[r],B=0;T&&(B=F(T,t))>0&&(M<(B+=b)&&(M=B),B=0),e.addJot&&(M+=f),z.height=S,z.depth=M,y+=S,z.pos=y,y+=M+B,h[r]=z,w(o[r+1])}var C,q,N=y/2+t.fontMetrics().axisHeight,I=e.cols||[],R=[],O=[];if(e.tags&&e.tags.some((function(e){return e})))for(r=0;r<i;++r){var H=h[r],E=H.pos-N,L=e.tags[r],D=void 0;(D=!0===L?Ke.makeSpan(["eqn-num"],[],t):!1===L?Ke.makeSpan([],[],t):Ke.makeSpan([],ft(L,t,!0),t)).depth=H.depth,D.height=H.height,O.push({type:"elem",elem:D,shift:E})}for(a=0,q=0;a<s||q<I.length;++a,++q){for(var P=I[q]||{},G=!0;"separator"===P.type;){if(G||((C=Ke.makeSpan(["arraycolsep"],[])).style.width=V(t.fontMetrics().doubleRuleSep),R.push(C)),"|"!==P.separator&&":"!==P.separator)throw new n("Invalid separator type: "+P.separator);var U="|"===P.separator?"solid":"dashed",Y=Ke.makeSpan(["vertical-separator"],[],t);Y.style.height=V(y),Y.style.borderRightWidth=V(c),Y.style.borderRightStyle=U,Y.style.margin="0 "+V(-c/2);var X=y-N;X&&(Y.style.verticalAlign=V(-X)),R.push(Y),P=I[++q]||{},G=!1}if(!(a>=s)){var W=void 0;(a>0||e.hskipBeforeAndAfter)&&0!==(W=l.deflt(P.pregap,p))&&((C=Ke.makeSpan(["arraycolsep"],[])).style.width=V(W),R.push(C));var _=[];for(r=0;r<i;++r){var j=h[r],$=j[a];if($){var Z=j.pos-N;$.depth=j.depth,$.height=j.height,_.push({type:"elem",elem:$,shift:Z})}}_=Ke.makeVList({positionType:"individualShift",children:_},t),_=Ke.makeSpan(["col-align-"+(P.align||"c")],[_]),R.push(_),(a<s-1||e.hskipBeforeAndAfter)&&0!==(W=l.deflt(P.postgap,p))&&((C=Ke.makeSpan(["arraycolsep"],[])).style.width=V(W),R.push(C))}}if(h=Ke.makeSpan(["mtable"],R),m.length>0){for(var K=Ke.makeLineSpan("hline",t,c),J=Ke.makeLineSpan("hdashline",t,c),Q=[{type:"elem",elem:h,shift:0}];m.length>0;){var ee=m.pop(),te=ee.pos-N;ee.isDashed?Q.push({type:"elem",elem:J,shift:te}):Q.push({type:"elem",elem:K,shift:te})}h=Ke.makeVList({positionType:"individualShift",children:Q},t)}if(0===O.length)return Ke.makeSpan(["mord"],[h],t);var re=Ke.makeVList({positionType:"individualShift",children:O},t);return re=Ke.makeSpan(["tag"],[re],t),Ke.makeFragment([h,re])},Yr={c:"center ",l:"left ",r:"right "},Xr=function(e,t){for(var r=[],n=new Tt.MathNode("mtd",[],["mtr-glue"]),a=new Tt.MathNode("mtd",[],["mml-eqn-num"]),i=0;i<e.body.length;i++){for(var o=e.body[i],s=[],l=0;l<o.length;l++)s.push(new Tt.MathNode("mtd",[Rt(o[l],t)]));e.tags&&e.tags[i]&&(s.unshift(n),s.push(n),e.leqno?s.unshift(a):s.push(a)),r.push(new Tt.MathNode("mtr",s))}var h=new Tt.MathNode("mtable",r),m=.5===e.arraystretch?.1:.16+e.arraystretch-1+(e.addJot?.09:0);h.setAttribute("rowspacing",V(m));var c="",u="";if(e.cols&&e.cols.length>0){var p=e.cols,d="",f=!1,g=0,v=p.length;"separator"===p[0].type&&(c+="top ",g=1),"separator"===p[p.length-1].type&&(c+="bottom ",v-=1);for(var b=g;b<v;b++)"align"===p[b].type?(u+=Yr[p[b].align],f&&(d+="none "),f=!0):"separator"===p[b].type&&f&&(d+="|"===p[b].separator?"solid ":"dashed ",f=!1);h.setAttribute("columnalign",u.trim()),/[sd]/.test(d)&&h.setAttribute("columnlines",d.trim())}if("align"===e.colSeparationType){for(var y=e.cols||[],x="",w=1;w<y.length;w++)x+=w%2?"0em ":"1em ";h.setAttribute("columnspacing",x.trim())}else"alignat"===e.colSeparationType||"gather"===e.colSeparationType?h.setAttribute("columnspacing","0em"):"small"===e.colSeparationType?h.setAttribute("columnspacing","0.2778em"):"CD"===e.colSeparationType?h.setAttribute("columnspacing","0.5em"):h.setAttribute("columnspacing","1em");var k="",S=e.hLinesBeforeRow;c+=S[0].length>0?"left ":"",c+=S[S.length-1].length>0?"right ":"";for(var M=1;M<S.length-1;M++)k+=0===S[M].length?"none ":S[M][0]?"dashed ":"solid ";return/[sd]/.test(k)&&h.setAttribute("rowlines",k.trim()),""!==c&&(h=new Tt.MathNode("menclose",[h])).setAttribute("notation",c.trim()),e.arraystretch&&e.arraystretch<1&&(h=new Tt.MathNode("mstyle",[h])).setAttribute("scriptlevel","1"),h},Wr=function(e,t){-1===e.envName.indexOf("ed")&&Pr(e);var r,a=[],i=e.envName.indexOf("at")>-1?"alignat":"align",o="split"===e.envName,s=Vr(e.parser,{cols:a,addJot:!0,autoTag:o?void 0:Fr(e.envName),emptySingleRow:!0,colSeparationType:i,maxNumCols:o?2:void 0,leqno:e.parser.settings.leqno},"display"),l=0,h={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&"ordgroup"===t[0].type){for(var m="",c=0;c<t[0].body.length;c++)m+=Gt(t[0].body[c],"textord").text;r=Number(m),l=2*r}var u=!l;s.body.forEach((function(e){for(var t=1;t<e.length;t+=2){var a=Gt(e[t],"styling");Gt(a.body[0],"ordgroup").body.unshift(h)}if(u)l<e.length&&(l=e.length);else{var i=e.length/2;if(r<i)throw new n("Too many math in a row: expected "+r+", but got "+i,e[0])}}));for(var p=0;p<l;++p){var d="r",f=0;p%2===1?d="l":p>0&&u&&(f=1),a[p]={type:"align",align:d,pregap:f,postgap:0}}return s.colSeparationType=u?"align":"alignat",s};Rr({type:"array",names:["array","darray"],props:{numArgs:1},handler:function(e,t){var r=(Yt(t[0])?[t[0]]:Gt(t[0],"ordgroup").body).map((function(e){var t=Ut(e).text;if(-1!=="lcr".indexOf(t))return{type:"align",align:t};if("|"===t)return{type:"separator",separator:"|"};if(":"===t)return{type:"separator",separator:":"};throw new n("Unknown column alignment: "+t,e)})),a={cols:r,hskipBeforeAndAfter:!0,maxNumCols:r.length};return Vr(e.parser,a,Gr(e.envName))},htmlBuilder:Ur,mathmlBuilder:Xr}),Rr({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler:function(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],r="c",a={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if("*"===e.envName.charAt(e.envName.length-1)){var i=e.parser;if(i.consumeSpaces(),"["===i.fetch().text){if(i.consume(),i.consumeSpaces(),r=i.fetch().text,-1==="lcr".indexOf(r))throw new n("Expected l or c or r",i.nextToken);i.consume(),i.consumeSpaces(),i.expect("]"),i.consume(),a.cols=[{type:"align",align:r}]}}var o=Vr(e.parser,a,Gr(e.envName)),s=Math.max.apply(Math,[0].concat(o.body.map((function(e){return e.length}))));return o.cols=new Array(s).fill({type:"align",align:r}),t?{type:"leftright",mode:e.mode,body:[o],left:t[0],right:t[1],rightColor:void 0}:o},htmlBuilder:Ur,mathmlBuilder:Xr}),Rr({type:"array",names:["smallmatrix"],props:{numArgs:0},handler:function(e){var t=Vr(e.parser,{arraystretch:.5},"script");return t.colSeparationType="small",t},htmlBuilder:Ur,mathmlBuilder:Xr}),Rr({type:"array",names:["subarray"],props:{numArgs:1},handler:function(e,t){var r=(Yt(t[0])?[t[0]]:Gt(t[0],"ordgroup").body).map((function(e){var t=Ut(e).text;if(-1!=="lc".indexOf(t))return{type:"align",align:t};throw new n("Unknown column alignment: "+t,e)}));if(r.length>1)throw new n("{subarray} can contain only one column");var a={cols:r,hskipBeforeAndAfter:!1,arraystretch:.5};if((a=Vr(e.parser,a,"script")).body.length>0&&a.body[0].length>1)throw new n("{subarray} can contain only one column");return a},htmlBuilder:Ur,mathmlBuilder:Xr}),Rr({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler:function(e){var t=Vr(e.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},Gr(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.indexOf("r")>-1?".":"\\{",right:e.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:Ur,mathmlBuilder:Xr}),Rr({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:Wr,htmlBuilder:Ur,mathmlBuilder:Xr}),Rr({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler:function(e){l.contains(["gather","gather*"],e.envName)&&Pr(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Fr(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return Vr(e.parser,t,"display")},htmlBuilder:Ur,mathmlBuilder:Xr}),Rr({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:Wr,htmlBuilder:Ur,mathmlBuilder:Xr}),Rr({type:"array",names:["equation","equation*"],props:{numArgs:0},handler:function(e){Pr(e);var t={autoTag:Fr(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return Vr(e.parser,t,"display")},htmlBuilder:Ur,mathmlBuilder:Xr}),Rr({type:"array",names:["CD"],props:{numArgs:0},handler:function(e){return Pr(e),function(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var r=e.fetch().text;if("&"!==r&&"\\\\"!==r){if("\\end"===r){0===t[t.length-1].length&&t.pop();break}throw new n("Expected \\\\ or \\cr or \\end",e.nextToken)}e.consume()}for(var a,i,o=[],s=[o],l=0;l<t.length;l++){for(var h=t[l],m={type:"styling",body:[],mode:"math",style:"display"},c=0;c<h.length;c++)if(Zt(h[c])){o.push(m);var u=Ut(h[c+=1]).text,p=new Array(2);if(p[0]={type:"ordgroup",mode:"math",body:[]},p[1]={type:"ordgroup",mode:"math",body:[]},"=|.".indexOf(u)>-1);else{if(!("<>AV".indexOf(u)>-1))throw new n('Expected one of "<>AV=|." after @',h[c]);for(var d=0;d<2;d++){for(var f=!0,g=c+1;g<h.length;g++){if(i=u,("mathord"===(a=h[g]).type||"atom"===a.type)&&a.text===i){f=!1,c=g;break}if(Zt(h[g]))throw new n("Missing a "+u+" character to complete a CD arrow.",h[g]);p[d].body.push(h[g])}if(f)throw new n("Missing a "+u+" character to complete a CD arrow.",h[c])}}var v={type:"styling",body:[Kt(u,p,e)],mode:"math",style:"display"};o.push(v),m={type:"styling",body:[],mode:"math",style:"display"}}else m.body.push(h[c]);l%2===0?o.push(m):o.shift(),o=[],s.push(o)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:"math",body:s,arraystretch:1,addJot:!0,rowGaps:[null],cols:new Array(s[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25}),colSeparationType:"CD",hLinesBeforeRow:new Array(s.length+1).fill([])}}(e.parser)},htmlBuilder:Ur,mathmlBuilder:Xr}),Hr("\\nonumber","\\gdef\\@eqnsw{0}"),Hr("\\notag","\\nonumber"),ot({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler:function(e,t){throw new n(e.funcName+" valid only within array environment")}});var _r=Ir;ot({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler:function(e,t){var r=e.parser,a=e.funcName,i=t[0];if("ordgroup"!==i.type)throw new n("Invalid environment name",i);for(var o="",s=0;s<i.body.length;++s)o+=Gt(i.body[s],"textord").text;if("\\begin"===a){if(!_r.hasOwnProperty(o))throw new n("No such environment: "+o,i);var l=_r[o],h=r.parseArguments("\\begin{"+o+"}",l),m=h.args,c=h.optArgs,u={mode:r.mode,envName:o,parser:r},p=l.handler(u,m,c);r.expect("\\end",!1);var d=r.nextToken,f=Gt(r.parseFunction(),"environment");if(f.name!==o)throw new n("Mismatch: \\begin{"+o+"} matched by \\end{"+f.name+"}",d);return p}return{type:"environment",mode:r.mode,name:o,nameGroup:i}}});var jr=Ke.makeSpan;function $r(e,t){var r=ft(e.body,t,!0);return jr([e.mclass],r,t)}function Zr(e,t){var r,n=Nt(e.body,t);return"minner"===e.mclass?r=new Tt.MathNode("mpadded",n):"mord"===e.mclass?e.isCharacterBox?(r=n[0]).type="mi":r=new Tt.MathNode("mi",n):(e.isCharacterBox?(r=n[0]).type="mo":r=new Tt.MathNode("mo",n),"mbin"===e.mclass?(r.attributes.lspace="0.22em",r.attributes.rspace="0.22em"):"mpunct"===e.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0.17em"):"mopen"===e.mclass||"mclose"===e.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0em"):"minner"===e.mclass&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em")),r}ot({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler:function(e,t){var r=e.parser,n=e.funcName,a=t[0];return{type:"mclass",mode:r.mode,mclass:"m"+n.substr(5),body:ht(a),isCharacterBox:l.isCharacterBox(a)}},htmlBuilder:$r,mathmlBuilder:Zr});var Kr=function(e){var t="ordgroup"===e.type&&e.body.length?e.body[0]:e;return"atom"!==t.type||"bin"!==t.family&&"rel"!==t.family?"mord":"m"+t.family};ot({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler:function(e,t){return{type:"mclass",mode:e.parser.mode,mclass:Kr(t[0]),body:ht(t[1]),isCharacterBox:l.isCharacterBox(t[1])}}}),ot({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler:function(e,t){var r,n=e.parser,a=e.funcName,i=t[1],o=t[0];r="\\stackrel"!==a?Kr(i):"mrel";var s={type:"op",mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==a,body:ht(i)},h={type:"supsub",mode:o.mode,base:s,sup:"\\underset"===a?null:o,sub:"\\underset"===a?o:null};return{type:"mclass",mode:n.mode,mclass:r,body:[h],isCharacterBox:l.isCharacterBox(h)}},htmlBuilder:$r,mathmlBuilder:Zr});var Jr=function(e,t){var r=e.font,n=t.withFont(r);return wt(e.body,n)},Qr=function(e,t){var r=e.font,n=t.withFont(r);return Rt(e.body,n)},en={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};ot({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:function(e,t){var r=e.parser,n=e.funcName,a=lt(t[0]),i=n;return i in en&&(i=en[i]),{type:"font",mode:r.mode,font:i.slice(1),body:a}},htmlBuilder:Jr,mathmlBuilder:Qr}),ot({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:function(e,t){var r=e.parser,n=t[0],a=l.isCharacterBox(n);return{type:"mclass",mode:r.mode,mclass:Kr(n),body:[{type:"font",mode:r.mode,font:"boldsymbol",body:n}],isCharacterBox:a}}}),ot({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:function(e,t){var r=e.parser,n=e.funcName,a=e.breakOnTokenText,i=r.mode,o=r.parseExpression(!0,a);return{type:"font",mode:i,font:"math"+n.slice(1),body:{type:"ordgroup",mode:r.mode,body:o}}},htmlBuilder:Jr,mathmlBuilder:Qr});var tn=function(e,t){var r=t;return"display"===e?r=r.id>=x.SCRIPT.id?r.text():x.DISPLAY:"text"===e&&r.size===x.DISPLAY.size?r=x.TEXT:"script"===e?r=x.SCRIPT:"scriptscript"===e&&(r=x.SCRIPTSCRIPT),r},rn=function(e,t){var r,n=tn(e.size,t.style),a=n.fracNum(),i=n.fracDen();r=t.havingStyle(a);var o=wt(e.numer,r,t);if(e.continued){var s=8.5/t.fontMetrics().ptPerEm,l=3.5/t.fontMetrics().ptPerEm;o.height=o.height<s?s:o.height,o.depth=o.depth<l?l:o.depth}r=t.havingStyle(i);var h,m,c,u,p,d,f,g,v,b,y=wt(e.denom,r,t);if(e.hasBarLine?(e.barSize?(m=F(e.barSize,t),h=Ke.makeLineSpan("frac-line",t,m)):h=Ke.makeLineSpan("frac-line",t),m=h.height,c=h.height):(h=null,m=0,c=t.fontMetrics().defaultRuleThickness),n.size===x.DISPLAY.size||"display"===e.size?(u=t.fontMetrics().num1,p=m>0?3*c:7*c,d=t.fontMetrics().denom1):(m>0?(u=t.fontMetrics().num2,p=c):(u=t.fontMetrics().num3,p=3*c),d=t.fontMetrics().denom2),h){var w=t.fontMetrics().axisHeight;u-o.depth-(w+.5*m)<p&&(u+=p-(u-o.depth-(w+.5*m))),w-.5*m-(y.height-d)<p&&(d+=p-(w-.5*m-(y.height-d)));var k=-(w-.5*m);f=Ke.makeVList({positionType:"individualShift",children:[{type:"elem",elem:y,shift:d},{type:"elem",elem:h,shift:k},{type:"elem",elem:o,shift:-u}]},t)}else{var S=u-o.depth-(y.height-d);S<p&&(u+=.5*(p-S),d+=.5*(p-S)),f=Ke.makeVList({positionType:"individualShift",children:[{type:"elem",elem:y,shift:d},{type:"elem",elem:o,shift:-u}]},t)}return r=t.havingStyle(n),f.height*=r.sizeMultiplier/t.sizeMultiplier,f.depth*=r.sizeMultiplier/t.sizeMultiplier,g=n.size===x.DISPLAY.size?t.fontMetrics().delim1:n.size===x.SCRIPTSCRIPT.size?t.havingStyle(x.SCRIPT).fontMetrics().delim2:t.fontMetrics().delim2,v=null==e.leftDelim?xt(t,["mopen"]):zr.customSizedDelim(e.leftDelim,g,!0,t.havingStyle(n),e.mode,["mopen"]),b=e.continued?Ke.makeSpan([]):null==e.rightDelim?xt(t,["mclose"]):zr.customSizedDelim(e.rightDelim,g,!0,t.havingStyle(n),e.mode,["mclose"]),Ke.makeSpan(["mord"].concat(r.sizingClasses(t)),[v,Ke.makeSpan(["mfrac"],[f]),b],t)},nn=function(e,t){var r=new Tt.MathNode("mfrac",[Rt(e.numer,t),Rt(e.denom,t)]);if(e.hasBarLine){if(e.barSize){var n=F(e.barSize,t);r.setAttribute("linethickness",V(n))}}else r.setAttribute("linethickness","0px");var a=tn(e.size,t.style);if(a.size!==t.style.size){r=new Tt.MathNode("mstyle",[r]);var i=a.size===x.DISPLAY.size?"true":"false";r.setAttribute("displaystyle",i),r.setAttribute("scriptlevel","0")}if(null!=e.leftDelim||null!=e.rightDelim){var o=[];if(null!=e.leftDelim){var s=new Tt.MathNode("mo",[new Tt.TextNode(e.leftDelim.replace("\\",""))]);s.setAttribute("fence","true"),o.push(s)}if(o.push(r),null!=e.rightDelim){var l=new Tt.MathNode("mo",[new Tt.TextNode(e.rightDelim.replace("\\",""))]);l.setAttribute("fence","true"),o.push(l)}return Ct(o)}return r};ot({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:function(e,t){var r,n=e.parser,a=e.funcName,i=t[0],o=t[1],s=null,l=null,h="auto";switch(a){case"\\dfrac":case"\\frac":case"\\tfrac":r=!0;break;case"\\\\atopfrac":r=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":r=!1,s="(",l=")";break;case"\\\\bracefrac":r=!1,s="\\{",l="\\}";break;case"\\\\brackfrac":r=!1,s="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}switch(a){case"\\dfrac":case"\\dbinom":h="display";break;case"\\tfrac":case"\\tbinom":h="text"}return{type:"genfrac",mode:n.mode,continued:!1,numer:i,denom:o,hasBarLine:r,leftDelim:s,rightDelim:l,size:h,barSize:null}},htmlBuilder:rn,mathmlBuilder:nn}),ot({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:function(e,t){var r=e.parser,n=(e.funcName,t[0]),a=t[1];return{type:"genfrac",mode:r.mode,continued:!0,numer:n,denom:a,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}}),ot({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler:function(e){var t,r=e.parser,n=e.funcName,a=e.token;switch(n){case"\\over":t="\\frac";break;case"\\choose":t="\\binom";break;case"\\atop":t="\\\\atopfrac";break;case"\\brace":t="\\\\bracefrac";break;case"\\brack":t="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:r.mode,replaceWith:t,token:a}}});var an=["display","text","script","scriptscript"],on=function(e){var t=null;return e.length>0&&(t="."===(t=e)?null:t),t};ot({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler:function(e,t){var r,n=e.parser,a=t[4],i=t[5],o=lt(t[0]),s="atom"===o.type&&"open"===o.family?on(o.text):null,l=lt(t[1]),h="atom"===l.type&&"close"===l.family?on(l.text):null,m=Gt(t[2],"size"),c=null;r=!!m.isBlank||(c=m.value).number>0;var u="auto",p=t[3];if("ordgroup"===p.type){if(p.body.length>0){var d=Gt(p.body[0],"textord");u=an[Number(d.text)]}}else p=Gt(p,"textord"),u=an[Number(p.text)];return{type:"genfrac",mode:n.mode,numer:a,denom:i,continued:!1,hasBarLine:r,barSize:c,leftDelim:s,rightDelim:h,size:u}},htmlBuilder:rn,mathmlBuilder:nn}),ot({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler:function(e,t){var r=e.parser,n=(e.funcName,e.token);return{type:"infix",mode:r.mode,replaceWith:"\\\\abovefrac",size:Gt(t[0],"size").value,token:n}}}),ot({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:function(e,t){var r=e.parser,n=(e.funcName,t[0]),a=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e}(Gt(t[1],"infix").size),i=t[2],o=a.number>0;return{type:"genfrac",mode:r.mode,numer:n,denom:i,continued:!1,hasBarLine:o,barSize:a,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:rn,mathmlBuilder:nn});var sn=function(e,t){var r,n,a=t.style;"supsub"===e.type?(r=e.sup?wt(e.sup,t.havingStyle(a.sup()),t):wt(e.sub,t.havingStyle(a.sub()),t),n=Gt(e.base,"horizBrace")):n=Gt(e,"horizBrace");var i,o=wt(n.base,t.havingBaseStyle(x.DISPLAY)),s=Vt(n,t);if(n.isOver?(i=Ke.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:s}]},t)).children[0].children[0].children[1].classes.push("svg-align"):(i=Ke.makeVList({positionType:"bottom",positionData:o.depth+.1+s.height,children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:o}]},t)).children[0].children[0].children[0].classes.push("svg-align"),r){var l=Ke.makeSpan(["mord",n.isOver?"mover":"munder"],[i],t);i=n.isOver?Ke.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:r}]},t):Ke.makeVList({positionType:"bottom",positionData:l.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:l}]},t)}return Ke.makeSpan(["mord",n.isOver?"mover":"munder"],[i],t)};ot({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler:function(e,t){var r=e.parser,n=e.funcName;return{type:"horizBrace",mode:r.mode,label:n,isOver:/^\\over/.test(n),base:t[0]}},htmlBuilder:sn,mathmlBuilder:function(e,t){var r=Ft(e.label);return new Tt.MathNode(e.isOver?"mover":"munder",[Rt(e.base,t),r])}}),ot({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:function(e,t){var r=e.parser,n=t[1],a=Gt(t[0],"url").url;return r.settings.isTrusted({command:"\\href",url:a})?{type:"href",mode:r.mode,href:a,body:ht(n)}:r.formatUnsupportedCmd("\\href")},htmlBuilder:function(e,t){var r=ft(e.body,t,!1);return Ke.makeAnchor(e.href,[],r,t)},mathmlBuilder:function(e,t){var r=It(e.body,t);return r instanceof zt||(r=new zt("mrow",[r])),r.setAttribute("href",e.href),r}}),ot({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:function(e,t){var r=e.parser,n=Gt(t[0],"url").url;if(!r.settings.isTrusted({command:"\\url",url:n}))return r.formatUnsupportedCmd("\\url");for(var a=[],i=0;i<n.length;i++){var o=n[i];"~"===o&&(o="\\textasciitilde"),a.push({type:"textord",mode:"text",text:o})}var s={type:"text",mode:r.mode,font:"\\texttt",body:a};return{type:"href",mode:r.mode,href:n,body:ht(s)}}}),ot({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler:function(e,t){return{type:"hbox",mode:e.parser.mode,body:ht(t[0])}},htmlBuilder:function(e,t){var r=ft(e.body,t,!1);return Ke.makeFragment(r)},mathmlBuilder:function(e,t){return new Tt.MathNode("mrow",Nt(e.body,t))}}),ot({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:function(e,t){var r,a=e.parser,i=e.funcName,o=(e.token,Gt(t[0],"raw").string),s=t[1];a.settings.strict&&a.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var l={};switch(i){case"\\htmlClass":l.class=o,r={command:"\\htmlClass",class:o};break;case"\\htmlId":l.id=o,r={command:"\\htmlId",id:o};break;case"\\htmlStyle":l.style=o,r={command:"\\htmlStyle",style:o};break;case"\\htmlData":for(var h=o.split(","),m=0;m<h.length;m++){var c=h[m].split("=");if(2!==c.length)throw new n("Error parsing key-value for \\htmlData");l["data-"+c[0].trim()]=c[1].trim()}r={command:"\\htmlData",attributes:l};break;default:throw new Error("Unrecognized html command")}return a.settings.isTrusted(r)?{type:"html",mode:a.mode,attributes:l,body:ht(s)}:a.formatUnsupportedCmd(i)},htmlBuilder:function(e,t){var r=ft(e.body,t,!1),n=["enclosing"];e.attributes.class&&n.push.apply(n,e.attributes.class.trim().split(/\s+/));var a=Ke.makeSpan(n,r,t);for(var i in e.attributes)"class"!==i&&e.attributes.hasOwnProperty(i)&&a.setAttribute(i,e.attributes[i]);return a},mathmlBuilder:function(e,t){return It(e.body,t)}}),ot({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:function(e,t){return{type:"htmlmathml",mode:e.parser.mode,html:ht(t[0]),mathml:ht(t[1])}},htmlBuilder:function(e,t){var r=ft(e.html,t,!1);return Ke.makeFragment(r)},mathmlBuilder:function(e,t){return It(e.mathml,t)}});var ln=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new n("Invalid size: '"+e+"' in \\includegraphics");var r={number:+(t[1]+t[2]),unit:t[3]};if(!P(r))throw new n("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r};ot({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:function(e,t,r){var a=e.parser,i={number:0,unit:"em"},o={number:.9,unit:"em"},s={number:0,unit:"em"},l="";if(r[0])for(var h=Gt(r[0],"raw").string.split(","),m=0;m<h.length;m++){var c=h[m].split("=");if(2===c.length){var u=c[1].trim();switch(c[0].trim()){case"alt":l=u;break;case"width":i=ln(u);break;case"height":o=ln(u);break;case"totalheight":s=ln(u);break;default:throw new n("Invalid key: '"+c[0]+"' in \\includegraphics.")}}}var p=Gt(t[0],"url").url;return""===l&&(l=(l=(l=p).replace(/^.*[\\/]/,"")).substring(0,l.lastIndexOf("."))),a.settings.isTrusted({command:"\\includegraphics",url:p})?{type:"includegraphics",mode:a.mode,alt:l,width:i,height:o,totalheight:s,src:p}:a.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:function(e,t){var r=F(e.height,t),n=0;e.totalheight.number>0&&(n=F(e.totalheight,t)-r);var a=0;e.width.number>0&&(a=F(e.width,t));var i={height:V(r+n)};a>0&&(i.width=V(a)),n>0&&(i.verticalAlign=V(-n));var o=new j(e.src,e.alt,i);return o.height=r,o.depth=n,o},mathmlBuilder:function(e,t){var r=new Tt.MathNode("mglyph",[]);r.setAttribute("alt",e.alt);var n=F(e.height,t),a=0;if(e.totalheight.number>0&&(a=F(e.totalheight,t)-n,r.setAttribute("valign",V(-a))),r.setAttribute("height",V(n+a)),e.width.number>0){var i=F(e.width,t);r.setAttribute("width",V(i))}return r.setAttribute("src",e.src),r}}),ot({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler:function(e,t){var r=e.parser,n=e.funcName,a=Gt(t[0],"size");if(r.settings.strict){var i="m"===n[1],o="mu"===a.value.unit;i?(o||r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, not "+a.value.unit+" units"),"math"!==r.mode&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):o&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:r.mode,dimension:a.value}},htmlBuilder:function(e,t){return Ke.makeGlue(e.dimension,t)},mathmlBuilder:function(e,t){var r=F(e.dimension,t);return new Tt.SpaceNode(r)}}),ot({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){var r=e.parser,n=e.funcName,a=t[0];return{type:"lap",mode:r.mode,alignment:n.slice(5),body:a}},htmlBuilder:function(e,t){var r;"clap"===e.alignment?(r=Ke.makeSpan([],[wt(e.body,t)]),r=Ke.makeSpan(["inner"],[r],t)):r=Ke.makeSpan(["inner"],[wt(e.body,t)]);var n=Ke.makeSpan(["fix"],[]),a=Ke.makeSpan([e.alignment],[r,n],t),i=Ke.makeSpan(["strut"]);return i.style.height=V(a.height+a.depth),a.depth&&(i.style.verticalAlign=V(-a.depth)),a.children.unshift(i),a=Ke.makeSpan(["thinbox"],[a],t),Ke.makeSpan(["mord","vbox"],[a],t)},mathmlBuilder:function(e,t){var r=new Tt.MathNode("mpadded",[Rt(e.body,t)]);if("rlap"!==e.alignment){var n="llap"===e.alignment?"-1":"-0.5";r.setAttribute("lspace",n+"width")}return r.setAttribute("width","0px"),r}}),ot({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(e,t){var r=e.funcName,n=e.parser,a=n.mode;n.switchMode("math");var i="\\("===r?"\\)":"$",o=n.parseExpression(!1,i);return n.expect(i),n.switchMode(a),{type:"styling",mode:n.mode,style:"text",body:o}}}),ot({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(e,t){throw new n("Mismatched "+e.funcName)}});var hn=function(e,t){switch(t.style.size){case x.DISPLAY.size:return e.display;case x.TEXT.size:return e.text;case x.SCRIPT.size:return e.script;case x.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};ot({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:function(e,t){return{type:"mathchoice",mode:e.parser.mode,display:ht(t[0]),text:ht(t[1]),script:ht(t[2]),scriptscript:ht(t[3])}},htmlBuilder:function(e,t){var r=hn(e,t),n=ft(r,t,!1);return Ke.makeFragment(n)},mathmlBuilder:function(e,t){var r=hn(e,t);return It(r,t)}});var mn=function(e,t,r,n,a,i,o){e=Ke.makeSpan([],[e]);var s,h,m,c=r&&l.isCharacterBox(r);if(t){var u=wt(t,n.havingStyle(a.sup()),n);h={elem:u,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-u.depth)}}if(r){var p=wt(r,n.havingStyle(a.sub()),n);s={elem:p,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-p.height)}}if(h&&s){var d=n.fontMetrics().bigOpSpacing5+s.elem.height+s.elem.depth+s.kern+e.depth+o;m=Ke.makeVList({positionType:"bottom",positionData:d,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:V(-i)},{type:"kern",size:s.kern},{type:"elem",elem:e},{type:"kern",size:h.kern},{type:"elem",elem:h.elem,marginLeft:V(i)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else if(s){var f=e.height-o;m=Ke.makeVList({positionType:"top",positionData:f,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:V(-i)},{type:"kern",size:s.kern},{type:"elem",elem:e}]},n)}else{if(!h)return e;var g=e.depth+o;m=Ke.makeVList({positionType:"bottom",positionData:g,children:[{type:"elem",elem:e},{type:"kern",size:h.kern},{type:"elem",elem:h.elem,marginLeft:V(i)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}var v=[m];if(s&&0!==i&&!c){var b=Ke.makeSpan(["mspace"],[],n);b.style.marginRight=V(i),v.unshift(b)}return Ke.makeSpan(["mop","op-limits"],v,n)},cn=["\\smallint"],un=function(e,t){var r,n,a,i=!1;"supsub"===e.type?(r=e.sup,n=e.sub,a=Gt(e.base,"op"),i=!0):a=Gt(e,"op");var o,s=t.style,h=!1;if(s.size===x.DISPLAY.size&&a.symbol&&!l.contains(cn,a.name)&&(h=!0),a.symbol){var m=h?"Size2-Regular":"Size1-Regular",c="";if("\\oiint"!==a.name&&"\\oiiint"!==a.name||(c=a.name.substr(1),a.name="oiint"===c?"\\iint":"\\iiint"),o=Ke.makeSymbol(a.name,m,"math",t,["mop","op-symbol",h?"large-op":"small-op"]),c.length>0){var u=o.italic,p=Ke.staticSvg(c+"Size"+(h?"2":"1"),t);o=Ke.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:0},{type:"elem",elem:p,shift:h?.08:0}]},t),a.name="\\"+c,o.classes.unshift("mop"),o.italic=u}}else if(a.body){var d=ft(a.body,t,!0);1===d.length&&d[0]instanceof Z?(o=d[0]).classes[0]="mop":o=Ke.makeSpan(["mop"],d,t)}else{for(var f=[],g=1;g<a.name.length;g++)f.push(Ke.mathsym(a.name[g],a.mode,t));o=Ke.makeSpan(["mop"],f,t)}var v=0,b=0;return(o instanceof Z||"\\oiint"===a.name||"\\oiiint"===a.name)&&!a.suppressBaseShift&&(v=(o.height-o.depth)/2-t.fontMetrics().axisHeight,b=o.italic),i?mn(o,r,n,t,s,b,v):(v&&(o.style.position="relative",o.style.top=V(v)),o)},pn=function(e,t){var r;if(e.symbol)r=new zt("mo",[Bt(e.name,e.mode)]),l.contains(cn,e.name)&&r.setAttribute("largeop","false");else if(e.body)r=new zt("mo",Nt(e.body,t));else{r=new zt("mi",[new At(e.name.slice(1))]);var n=new zt("mo",[Bt("\u2061","text")]);r=e.parentIsSupSub?new zt("mrow",[r,n]):Mt([r,n])}return r},dn={"\u220f":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22c0":"\\bigwedge","\u22c1":"\\bigvee","\u22c2":"\\bigcap","\u22c3":"\\bigcup","\u2a00":"\\bigodot","\u2a01":"\\bigoplus","\u2a02":"\\bigotimes","\u2a04":"\\biguplus","\u2a06":"\\bigsqcup"};ot({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","\u220f","\u2210","\u2211","\u22c0","\u22c1","\u22c2","\u22c3","\u2a00","\u2a01","\u2a02","\u2a04","\u2a06"],props:{numArgs:0},handler:function(e,t){var r=e.parser,n=e.funcName;return 1===n.length&&(n=dn[n]),{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:un,mathmlBuilder:pn}),ot({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:function(e,t){var r=e.parser,n=t[0];return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:ht(n)}},htmlBuilder:un,mathmlBuilder:pn});var fn={"\u222b":"\\int","\u222c":"\\iint","\u222d":"\\iiint","\u222e":"\\oint","\u222f":"\\oiint","\u2230":"\\oiiint"};ot({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler:function(e){var t=e.parser,r=e.funcName;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:un,mathmlBuilder:pn}),ot({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler:function(e){var t=e.parser,r=e.funcName;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:un,mathmlBuilder:pn}),ot({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","\u222b","\u222c","\u222d","\u222e","\u222f","\u2230"],props:{numArgs:0},handler:function(e){var t=e.parser,r=e.funcName;return 1===r.length&&(r=fn[r]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:un,mathmlBuilder:pn});var gn=function(e,t){var r,n,a,i,o=!1;if("supsub"===e.type?(r=e.sup,n=e.sub,a=Gt(e.base,"operatorname"),o=!0):a=Gt(e,"operatorname"),a.body.length>0){for(var s=a.body.map((function(e){var t=e.text;return"string"===typeof t?{type:"textord",mode:e.mode,text:t}:e})),l=ft(s,t.withFont("mathrm"),!0),h=0;h<l.length;h++){var m=l[h];m instanceof Z&&(m.text=m.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}i=Ke.makeSpan(["mop"],l,t)}else i=Ke.makeSpan(["mop"],[],t);return o?mn(i,r,n,t,t.style,0,0):i};function vn(e,t,r){for(var n=ft(e,t,!1),a=t.sizeMultiplier/r.sizeMultiplier,i=0;i<n.length;i++){var o=n[i].classes.indexOf("sizing");o<0?Array.prototype.push.apply(n[i].classes,t.sizingClasses(r)):n[i].classes[o+1]==="reset-size"+t.size&&(n[i].classes[o+1]="reset-size"+r.size),n[i].height*=a,n[i].depth*=a}return Ke.makeFragment(n)}ot({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:function(e,t){var r=e.parser,n=e.funcName,a=t[0];return{type:"operatorname",mode:r.mode,body:ht(a),alwaysHandleSupSub:"\\operatornamewithlimits"===n,limits:!1,parentIsSupSub:!1}},htmlBuilder:gn,mathmlBuilder:function(e,t){for(var r=Nt(e.body,t.withFont("mathrm")),n=!0,a=0;a<r.length;a++){var i=r[a];if(i instanceof Tt.SpaceNode);else if(i instanceof Tt.MathNode)switch(i.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":var o=i.children[0];1===i.children.length&&o instanceof Tt.TextNode?o.text=o.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):n=!1;break;default:n=!1}else n=!1}if(n){var s=r.map((function(e){return e.toText()})).join("");r=[new Tt.TextNode(s)]}var l=new Tt.MathNode("mi",r);l.setAttribute("mathvariant","normal");var h=new Tt.MathNode("mo",[Bt("\u2061","text")]);return e.parentIsSupSub?new Tt.MathNode("mrow",[l,h]):Tt.newDocumentFragment([l,h])}}),Hr("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),st({type:"ordgroup",htmlBuilder:function(e,t){return e.semisimple?Ke.makeFragment(ft(e.body,t,!1)):Ke.makeSpan(["mord"],ft(e.body,t,!0),t)},mathmlBuilder:function(e,t){return It(e.body,t,!0)}}),ot({type:"overline",names:["\\overline"],props:{numArgs:1},handler:function(e,t){var r=e.parser,n=t[0];return{type:"overline",mode:r.mode,body:n}},htmlBuilder:function(e,t){var r=wt(e.body,t.havingCrampedStyle()),n=Ke.makeLineSpan("overline-line",t),a=t.fontMetrics().defaultRuleThickness,i=Ke.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:3*a},{type:"elem",elem:n},{type:"kern",size:a}]},t);return Ke.makeSpan(["mord","overline"],[i],t)},mathmlBuilder:function(e,t){var r=new Tt.MathNode("mo",[new Tt.TextNode("\u203e")]);r.setAttribute("stretchy","true");var n=new Tt.MathNode("mover",[Rt(e.body,t),r]);return n.setAttribute("accent","true"),n}}),ot({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){var r=e.parser,n=t[0];return{type:"phantom",mode:r.mode,body:ht(n)}},htmlBuilder:function(e,t){var r=ft(e.body,t.withPhantom(),!1);return Ke.makeFragment(r)},mathmlBuilder:function(e,t){var r=Nt(e.body,t);return new Tt.MathNode("mphantom",r)}}),ot({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){var r=e.parser,n=t[0];return{type:"hphantom",mode:r.mode,body:n}},htmlBuilder:function(e,t){var r=Ke.makeSpan([],[wt(e.body,t.withPhantom())]);if(r.height=0,r.depth=0,r.children)for(var n=0;n<r.children.length;n++)r.children[n].height=0,r.children[n].depth=0;return r=Ke.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r}]},t),Ke.makeSpan(["mord"],[r],t)},mathmlBuilder:function(e,t){var r=Nt(ht(e.body),t),n=new Tt.MathNode("mphantom",r),a=new Tt.MathNode("mpadded",[n]);return a.setAttribute("height","0px"),a.setAttribute("depth","0px"),a}}),ot({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){var r=e.parser,n=t[0];return{type:"vphantom",mode:r.mode,body:n}},htmlBuilder:function(e,t){var r=Ke.makeSpan(["inner"],[wt(e.body,t.withPhantom())]),n=Ke.makeSpan(["fix"],[]);return Ke.makeSpan(["mord","rlap"],[r,n],t)},mathmlBuilder:function(e,t){var r=Nt(ht(e.body),t),n=new Tt.MathNode("mphantom",r),a=new Tt.MathNode("mpadded",[n]);return a.setAttribute("width","0px"),a}}),ot({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler:function(e,t){var r=e.parser,n=Gt(t[0],"size").value,a=t[1];return{type:"raisebox",mode:r.mode,dy:n,body:a}},htmlBuilder:function(e,t){var r=wt(e.body,t),n=F(e.dy,t);return Ke.makeVList({positionType:"shift",positionData:-n,children:[{type:"elem",elem:r}]},t)},mathmlBuilder:function(e,t){var r=new Tt.MathNode("mpadded",[Rt(e.body,t)]),n=e.dy.number+e.dy.unit;return r.setAttribute("voffset",n),r}}),ot({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0},handler:function(e){return{type:"internal",mode:e.parser.mode}}}),ot({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler:function(e,t,r){var n=e.parser,a=r[0],i=Gt(t[0],"size"),o=Gt(t[1],"size");return{type:"rule",mode:n.mode,shift:a&&Gt(a,"size").value,width:i.value,height:o.value}},htmlBuilder:function(e,t){var r=Ke.makeSpan(["mord","rule"],[],t),n=F(e.width,t),a=F(e.height,t),i=e.shift?F(e.shift,t):0;return r.style.borderRightWidth=V(n),r.style.borderTopWidth=V(a),r.style.bottom=V(i),r.width=n,r.height=a+i,r.depth=-i,r.maxFontSize=1.125*a*t.sizeMultiplier,r},mathmlBuilder:function(e,t){var r=F(e.width,t),n=F(e.height,t),a=e.shift?F(e.shift,t):0,i=t.color&&t.getColor()||"black",o=new Tt.MathNode("mspace");o.setAttribute("mathbackground",i),o.setAttribute("width",V(r)),o.setAttribute("height",V(n));var s=new Tt.MathNode("mpadded",[o]);return a>=0?s.setAttribute("height",V(a)):(s.setAttribute("height",V(a)),s.setAttribute("depth",V(-a))),s.setAttribute("voffset",V(a)),s}});var bn=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"];ot({type:"sizing",names:bn,props:{numArgs:0,allowedInText:!0},handler:function(e,t){var r=e.breakOnTokenText,n=e.funcName,a=e.parser,i=a.parseExpression(!1,r);return{type:"sizing",mode:a.mode,size:bn.indexOf(n)+1,body:i}},htmlBuilder:function(e,t){var r=t.havingSize(e.size);return vn(e.body,r,t)},mathmlBuilder:function(e,t){var r=t.havingSize(e.size),n=Nt(e.body,r),a=new Tt.MathNode("mstyle",n);return a.setAttribute("mathsize",V(r.sizeMultiplier)),a}}),ot({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:function(e,t,r){var n=e.parser,a=!1,i=!1,o=r[0]&&Gt(r[0],"ordgroup");if(o)for(var s="",l=0;l<o.body.length;++l)if("t"===(s=o.body[l].text))a=!0;else{if("b"!==s){a=!1,i=!1;break}i=!0}else a=!0,i=!0;var h=t[0];return{type:"smash",mode:n.mode,body:h,smashHeight:a,smashDepth:i}},htmlBuilder:function(e,t){var r=Ke.makeSpan([],[wt(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return r;if(e.smashHeight&&(r.height=0,r.children))for(var n=0;n<r.children.length;n++)r.children[n].height=0;if(e.smashDepth&&(r.depth=0,r.children))for(var a=0;a<r.children.length;a++)r.children[a].depth=0;var i=Ke.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r}]},t);return Ke.makeSpan(["mord"],[i],t)},mathmlBuilder:function(e,t){var r=new Tt.MathNode("mpadded",[Rt(e.body,t)]);return e.smashHeight&&r.setAttribute("height","0px"),e.smashDepth&&r.setAttribute("depth","0px"),r}}),ot({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler:function(e,t,r){var n=e.parser,a=r[0],i=t[0];return{type:"sqrt",mode:n.mode,body:i,index:a}},htmlBuilder:function(e,t){var r=wt(e.body,t.havingCrampedStyle());0===r.height&&(r.height=t.fontMetrics().xHeight),r=Ke.wrapFragment(r,t);var n=t.fontMetrics().defaultRuleThickness,a=n;t.style.id<x.TEXT.id&&(a=t.fontMetrics().xHeight);var i=n+a/4,o=r.height+r.depth+i+n,s=zr.sqrtImage(o,t),l=s.span,h=s.ruleWidth,m=s.advanceWidth,c=l.height-h;c>r.height+r.depth+i&&(i=(i+c-r.height-r.depth)/2);var u=l.height-r.height-i-h;r.style.paddingLeft=V(m);var p=Ke.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+u)},{type:"elem",elem:l},{type:"kern",size:h}]},t);if(e.index){var d=t.havingStyle(x.SCRIPTSCRIPT),f=wt(e.index,d,t),g=.6*(p.height-p.depth),v=Ke.makeVList({positionType:"shift",positionData:-g,children:[{type:"elem",elem:f}]},t),b=Ke.makeSpan(["root"],[v]);return Ke.makeSpan(["mord","sqrt"],[b,p],t)}return Ke.makeSpan(["mord","sqrt"],[p],t)},mathmlBuilder:function(e,t){var r=e.body,n=e.index;return n?new Tt.MathNode("mroot",[Rt(r,t),Rt(n,t)]):new Tt.MathNode("msqrt",[Rt(r,t)])}});var yn={display:x.DISPLAY,text:x.TEXT,script:x.SCRIPT,scriptscript:x.SCRIPTSCRIPT};ot({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler:function(e,t){var r=e.breakOnTokenText,n=e.funcName,a=e.parser,i=a.parseExpression(!0,r),o=n.slice(1,n.length-5);return{type:"styling",mode:a.mode,style:o,body:i}},htmlBuilder:function(e,t){var r=yn[e.style],n=t.havingStyle(r).withFont("");return vn(e.body,n,t)},mathmlBuilder:function(e,t){var r=yn[e.style],n=t.havingStyle(r),a=Nt(e.body,n),i=new Tt.MathNode("mstyle",a),o={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[e.style];return i.setAttribute("scriptlevel",o[0]),i.setAttribute("displaystyle",o[1]),i}});var xn=function(e,t){var r=e.base;return r?"op"===r.type?r.limits&&(t.style.size===x.DISPLAY.size||r.alwaysHandleSupSub)?un:null:"operatorname"===r.type?r.alwaysHandleSupSub&&(t.style.size===x.DISPLAY.size||r.limits)?gn:null:"accent"===r.type?l.isCharacterBox(r.base)?Xt:null:"horizBrace"===r.type&&!e.sub===r.isOver?sn:null:null};st({type:"supsub",htmlBuilder:function(e,t){var r=xn(e,t);if(r)return r(e,t);var n,a,i,o=e.base,s=e.sup,h=e.sub,m=wt(o,t),c=t.fontMetrics(),u=0,p=0,d=o&&l.isCharacterBox(o);if(s){var f=t.havingStyle(t.style.sup());n=wt(s,f,t),d||(u=m.height-f.fontMetrics().supDrop*f.sizeMultiplier/t.sizeMultiplier)}if(h){var g=t.havingStyle(t.style.sub());a=wt(h,g,t),d||(p=m.depth+g.fontMetrics().subDrop*g.sizeMultiplier/t.sizeMultiplier)}i=t.style===x.DISPLAY?c.sup1:t.style.cramped?c.sup3:c.sup2;var v,b=t.sizeMultiplier,y=V(.5/c.ptPerEm/b),w=null;if(a){var k=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name);(m instanceof Z||k)&&(w=V(-m.italic))}if(n&&a){u=Math.max(u,i,n.depth+.25*c.xHeight),p=Math.max(p,c.sub2);var S=4*c.defaultRuleThickness;if(u-n.depth-(a.height-p)<S){p=S-(u-n.depth)+a.height;var M=.8*c.xHeight-(u-n.depth);M>0&&(u+=M,p-=M)}var z=[{type:"elem",elem:a,shift:p,marginRight:y,marginLeft:w},{type:"elem",elem:n,shift:-u,marginRight:y}];v=Ke.makeVList({positionType:"individualShift",children:z},t)}else if(a){p=Math.max(p,c.sub1,a.height-.8*c.xHeight);var A=[{type:"elem",elem:a,marginLeft:w,marginRight:y}];v=Ke.makeVList({positionType:"shift",positionData:p,children:A},t)}else{if(!n)throw new Error("supsub must have either sup or sub.");u=Math.max(u,i,n.depth+.25*c.xHeight),v=Ke.makeVList({positionType:"shift",positionData:-u,children:[{type:"elem",elem:n,marginRight:y}]},t)}var T=yt(m,"right")||"mord";return Ke.makeSpan([T],[m,Ke.makeSpan(["msupsub"],[v])],t)},mathmlBuilder:function(e,t){var r,n=!1;e.base&&"horizBrace"===e.base.type&&!!e.sup===e.base.isOver&&(n=!0,r=e.base.isOver),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0);var a,i=[Rt(e.base,t)];if(e.sub&&i.push(Rt(e.sub,t)),e.sup&&i.push(Rt(e.sup,t)),n)a=r?"mover":"munder";else if(e.sub)if(e.sup){var o=e.base;a=o&&"op"===o.type&&o.limits&&t.style===x.DISPLAY||o&&"operatorname"===o.type&&o.alwaysHandleSupSub&&(t.style===x.DISPLAY||o.limits)?"munderover":"msubsup"}else{var s=e.base;a=s&&"op"===s.type&&s.limits&&(t.style===x.DISPLAY||s.alwaysHandleSupSub)||s&&"operatorname"===s.type&&s.alwaysHandleSupSub&&(s.limits||t.style===x.DISPLAY)?"munder":"msub"}else{var l=e.base;a=l&&"op"===l.type&&l.limits&&(t.style===x.DISPLAY||l.alwaysHandleSupSub)||l&&"operatorname"===l.type&&l.alwaysHandleSupSub&&(l.limits||t.style===x.DISPLAY)?"mover":"msup"}return new Tt.MathNode(a,i)}}),st({type:"atom",htmlBuilder:function(e,t){return Ke.mathsym(e.text,e.mode,t,["m"+e.family])},mathmlBuilder:function(e,t){var r=new Tt.MathNode("mo",[Bt(e.text,e.mode)]);if("bin"===e.family){var n=qt(e,t);"bold-italic"===n&&r.setAttribute("mathvariant",n)}else"punct"===e.family?r.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||r.setAttribute("stretchy","false");return r}});var wn={mi:"italic",mn:"normal",mtext:"normal"};st({type:"mathord",htmlBuilder:function(e,t){return Ke.makeOrd(e,t,"mathord")},mathmlBuilder:function(e,t){var r=new Tt.MathNode("mi",[Bt(e.text,e.mode,t)]),n=qt(e,t)||"italic";return n!==wn[r.type]&&r.setAttribute("mathvariant",n),r}}),st({type:"textord",htmlBuilder:function(e,t){return Ke.makeOrd(e,t,"textord")},mathmlBuilder:function(e,t){var r,n=Bt(e.text,e.mode,t),a=qt(e,t)||"normal";return r="text"===e.mode?new Tt.MathNode("mtext",[n]):/[0-9]/.test(e.text)?new Tt.MathNode("mn",[n]):"\\prime"===e.text?new Tt.MathNode("mo",[n]):new Tt.MathNode("mi",[n]),a!==wn[r.type]&&r.setAttribute("mathvariant",a),r}});var kn={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Sn={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};st({type:"spacing",htmlBuilder:function(e,t){if(Sn.hasOwnProperty(e.text)){var r=Sn[e.text].className||"";if("text"===e.mode){var a=Ke.makeOrd(e,t,"textord");return a.classes.push(r),a}return Ke.makeSpan(["mspace",r],[Ke.mathsym(e.text,e.mode,t)],t)}if(kn.hasOwnProperty(e.text))return Ke.makeSpan(["mspace",kn[e.text]],[],t);throw new n('Unknown type of space "'+e.text+'"')},mathmlBuilder:function(e,t){if(!Sn.hasOwnProperty(e.text)){if(kn.hasOwnProperty(e.text))return new Tt.MathNode("mspace");throw new n('Unknown type of space "'+e.text+'"')}return new Tt.MathNode("mtext",[new Tt.TextNode("\xa0")])}});var Mn=function(){var e=new Tt.MathNode("mtd",[]);return e.setAttribute("width","50%"),e};st({type:"tag",mathmlBuilder:function(e,t){var r=new Tt.MathNode("mtable",[new Tt.MathNode("mtr",[Mn(),new Tt.MathNode("mtd",[It(e.body,t)]),Mn(),new Tt.MathNode("mtd",[It(e.tag,t)])])]);return r.setAttribute("width","100%"),r}});var zn={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},An={"\\textbf":"textbf","\\textmd":"textmd"},Tn={"\\textit":"textit","\\textup":"textup"},Bn=function(e,t){var r=e.font;return r?zn[r]?t.withTextFontFamily(zn[r]):An[r]?t.withTextFontWeight(An[r]):t.withTextFontShape(Tn[r]):t};ot({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler:function(e,t){var r=e.parser,n=e.funcName,a=t[0];return{type:"text",mode:r.mode,body:ht(a),font:n}},htmlBuilder:function(e,t){var r=Bn(e,t),n=ft(e.body,r,!0);return Ke.makeSpan(["mord","text"],n,r)},mathmlBuilder:function(e,t){var r=Bn(e,t);return It(e.body,r)}}),ot({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){return{type:"underline",mode:e.parser.mode,body:t[0]}},htmlBuilder:function(e,t){var r=wt(e.body,t),n=Ke.makeLineSpan("underline-line",t),a=t.fontMetrics().defaultRuleThickness,i=Ke.makeVList({positionType:"top",positionData:r.height,children:[{type:"kern",size:a},{type:"elem",elem:n},{type:"kern",size:3*a},{type:"elem",elem:r}]},t);return Ke.makeSpan(["mord","underline"],[i],t)},mathmlBuilder:function(e,t){var r=new Tt.MathNode("mo",[new Tt.TextNode("\u203e")]);r.setAttribute("stretchy","true");var n=new Tt.MathNode("munder",[Rt(e.body,t),r]);return n.setAttribute("accentunder","true"),n}}),ot({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler:function(e,t){return{type:"vcenter",mode:e.parser.mode,body:t[0]}},htmlBuilder:function(e,t){var r=wt(e.body,t),n=t.fontMetrics().axisHeight,a=.5*(r.height-n-(r.depth+n));return Ke.makeVList({positionType:"shift",positionData:a,children:[{type:"elem",elem:r}]},t)},mathmlBuilder:function(e,t){return new Tt.MathNode("mpadded",[Rt(e.body,t)],["vcenter"])}}),ot({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler:function(e,t,r){throw new n("\\verb ended by end of line instead of matching delimiter")},htmlBuilder:function(e,t){for(var r=Cn(e),n=[],a=t.havingStyle(t.style.text()),i=0;i<r.length;i++){var o=r[i];"~"===o&&(o="\\textasciitilde"),n.push(Ke.makeSymbol(o,"Typewriter-Regular",e.mode,a,["mord","texttt"]))}return Ke.makeSpan(["mord","text"].concat(a.sizingClasses(t)),Ke.tryCombineChars(n),a)},mathmlBuilder:function(e,t){var r=new Tt.TextNode(Cn(e)),n=new Tt.MathNode("mtext",[r]);return n.setAttribute("mathvariant","monospace"),n}});var Cn=function(e){return e.body.replace(/ /g,e.star?"\u2423":"\xa0")},qn=nt,Nn=new RegExp("[\u0300-\u036f]+$"),In=function(){function e(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp("([ \r\n\t]+)|\\\\(\n|[ \r\t]+\n?)[ \r\t]*|([!-\\[\\]-\u2027\u202a-\ud7ff\uf900-\uffff][\u0300-\u036f]*|[\ud800-\udbff][\udc00-\udfff][\u0300-\u036f]*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|(\\\\[a-zA-Z@]+)[ \r\n\t]*|\\\\[^\ud800-\udfff])","g"),this.catcodes={"%":14,"~":13}}var t=e.prototype;return t.setCatcode=function(e,t){this.catcodes[e]=t},t.lex=function(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new Lr("EOF",new Er(this,t,t));var r=this.tokenRegex.exec(e);if(null===r||r.index!==t)throw new n("Unexpected character: '"+e[t]+"'",new Lr(e[t],new Er(this,t,t+1)));var a=r[6]||r[3]||(r[2]?"\\ ":" ");if(14===this.catcodes[a]){var i=e.indexOf("\n",this.tokenRegex.lastIndex);return-1===i?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=i+1,this.lex()}return new Lr(a,new Er(this,t,this.tokenRegex.lastIndex))},e}(),Rn=function(){function e(e,t){void 0===e&&(e={}),void 0===t&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}var t=e.prototype;return t.beginGroup=function(){this.undefStack.push({})},t.endGroup=function(){if(0===this.undefStack.length)throw new n("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var t in e)e.hasOwnProperty(t)&&(null==e[t]?delete this.current[t]:this.current[t]=e[t])},t.endGroups=function(){for(;this.undefStack.length>0;)this.endGroup()},t.has=function(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)},t.get=function(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]},t.set=function(e,t,r){if(void 0===r&&(r=!1),r){for(var n=0;n<this.undefStack.length;n++)delete this.undefStack[n][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var a=this.undefStack[this.undefStack.length-1];a&&!a.hasOwnProperty(e)&&(a[e]=this.current[e])}null==t?delete this.current[e]:this.current[e]=t},e}(),On=Or;Hr("\\noexpand",(function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}})),Hr("\\expandafter",(function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}})),Hr("\\@firstoftwo",(function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}})),Hr("\\@secondoftwo",(function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}})),Hr("\\@ifnextchar",(function(e){var t=e.consumeArgs(3);e.consumeSpaces();var r=e.future();return 1===t[0].length&&t[0][0].text===r.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}})),Hr("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),Hr("\\TextOrMath",(function(e){var t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}}));var Hn={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};Hr("\\char",(function(e){var t,r=e.popToken(),a="";if("'"===r.text)t=8,r=e.popToken();else if('"'===r.text)t=16,r=e.popToken();else if("`"===r.text)if("\\"===(r=e.popToken()).text[0])a=r.text.charCodeAt(1);else{if("EOF"===r.text)throw new n("\\char` missing argument");a=r.text.charCodeAt(0)}else t=10;if(t){if(null==(a=Hn[r.text])||a>=t)throw new n("Invalid base-"+t+" digit "+r.text);for(var i;null!=(i=Hn[e.future().text])&&i<t;)a*=t,a+=i,e.popToken()}return"\\@char{"+a+"}"}));var En=function(e,t,r){var a=e.consumeArg().tokens;if(1!==a.length)throw new n("\\newcommand's first argument must be a macro name");var i=a[0].text,o=e.isDefined(i);if(o&&!t)throw new n("\\newcommand{"+i+"} attempting to redefine "+i+"; use \\renewcommand");if(!o&&!r)throw new n("\\renewcommand{"+i+"} when command "+i+" does not yet exist; use \\newcommand");var s=0;if(1===(a=e.consumeArg().tokens).length&&"["===a[0].text){for(var l="",h=e.expandNextToken();"]"!==h.text&&"EOF"!==h.text;)l+=h.text,h=e.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new n("Invalid number of arguments: "+l);s=parseInt(l),a=e.consumeArg().tokens}return e.macros.set(i,{tokens:a,numArgs:s}),""};Hr("\\newcommand",(function(e){return En(e,!1,!0)})),Hr("\\renewcommand",(function(e){return En(e,!0,!1)})),Hr("\\providecommand",(function(e){return En(e,!0,!0)})),Hr("\\message",(function(e){var t=e.consumeArgs(1)[0];return console.log(t.reverse().map((function(e){return e.text})).join("")),""})),Hr("\\errmessage",(function(e){var t=e.consumeArgs(1)[0];return console.error(t.reverse().map((function(e){return e.text})).join("")),""})),Hr("\\show",(function(e){var t=e.popToken(),r=t.text;return console.log(t,e.macros.get(r),qn[r],ae.math[r],ae.text[r]),""})),Hr("\\bgroup","{"),Hr("\\egroup","}"),Hr("~","\\nobreakspace"),Hr("\\lq","`"),Hr("\\rq","'"),Hr("\\aa","\\r a"),Hr("\\AA","\\r A"),Hr("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`\xa9}"),Hr("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),Hr("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`\xae}"),Hr("\u212c","\\mathscr{B}"),Hr("\u2130","\\mathscr{E}"),Hr("\u2131","\\mathscr{F}"),Hr("\u210b","\\mathscr{H}"),Hr("\u2110","\\mathscr{I}"),Hr("\u2112","\\mathscr{L}"),Hr("\u2133","\\mathscr{M}"),Hr("\u211b","\\mathscr{R}"),Hr("\u212d","\\mathfrak{C}"),Hr("\u210c","\\mathfrak{H}"),Hr("\u2128","\\mathfrak{Z}"),Hr("\\Bbbk","\\Bbb{k}"),Hr("\xb7","\\cdotp"),Hr("\\llap","\\mathllap{\\textrm{#1}}"),Hr("\\rlap","\\mathrlap{\\textrm{#1}}"),Hr("\\clap","\\mathclap{\\textrm{#1}}"),Hr("\\mathstrut","\\vphantom{(}"),Hr("\\underbar","\\underline{\\text{#1}}"),Hr("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),Hr("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`\u2260}}"),Hr("\\ne","\\neq"),Hr("\u2260","\\neq"),Hr("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`\u2209}}"),Hr("\u2209","\\notin"),Hr("\u2258","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`\u2258}}"),Hr("\u2259","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}"),Hr("\u225a","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225a}}"),Hr("\u225b","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`\u225b}}"),Hr("\u225d","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`\u225d}}"),Hr("\u225e","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`\u225e}}"),Hr("\u225f","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225f}}"),Hr("\u27c2","\\perp"),Hr("\u203c","\\mathclose{!\\mkern-0.8mu!}"),Hr("\u220c","\\notni"),Hr("\u231c","\\ulcorner"),Hr("\u231d","\\urcorner"),Hr("\u231e","\\llcorner"),Hr("\u231f","\\lrcorner"),Hr("\xa9","\\copyright"),Hr("\xae","\\textregistered"),Hr("\ufe0f","\\textregistered"),Hr("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),Hr("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),Hr("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),Hr("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),Hr("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}"),Hr("\u22ee","\\vdots"),Hr("\\varGamma","\\mathit{\\Gamma}"),Hr("\\varDelta","\\mathit{\\Delta}"),Hr("\\varTheta","\\mathit{\\Theta}"),Hr("\\varLambda","\\mathit{\\Lambda}"),Hr("\\varXi","\\mathit{\\Xi}"),Hr("\\varPi","\\mathit{\\Pi}"),Hr("\\varSigma","\\mathit{\\Sigma}"),Hr("\\varUpsilon","\\mathit{\\Upsilon}"),Hr("\\varPhi","\\mathit{\\Phi}"),Hr("\\varPsi","\\mathit{\\Psi}"),Hr("\\varOmega","\\mathit{\\Omega}"),Hr("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),Hr("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),Hr("\\boxed","\\fbox{$\\displaystyle{#1}$}"),Hr("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),Hr("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),Hr("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");var Ln={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};Hr("\\dots",(function(e){var t="\\dotso",r=e.expandAfterFuture().text;return r in Ln?t=Ln[r]:("\\not"===r.substr(0,4)||r in ae.math&&l.contains(["bin","rel"],ae.math[r].group))&&(t="\\dotsb"),t}));var Dn={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};Hr("\\dotso",(function(e){return e.future().text in Dn?"\\ldots\\,":"\\ldots"})),Hr("\\dotsc",(function(e){var t=e.future().text;return t in Dn&&","!==t?"\\ldots\\,":"\\ldots"})),Hr("\\cdots",(function(e){return e.future().text in Dn?"\\@cdots\\,":"\\@cdots"})),Hr("\\dotsb","\\cdots"),Hr("\\dotsm","\\cdots"),Hr("\\dotsi","\\!\\cdots"),Hr("\\dotsx","\\ldots\\,"),Hr("\\DOTSI","\\relax"),Hr("\\DOTSB","\\relax"),Hr("\\DOTSX","\\relax"),Hr("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),Hr("\\,","\\tmspace+{3mu}{.1667em}"),Hr("\\thinspace","\\,"),Hr("\\>","\\mskip{4mu}"),Hr("\\:","\\tmspace+{4mu}{.2222em}"),Hr("\\medspace","\\:"),Hr("\\;","\\tmspace+{5mu}{.2777em}"),Hr("\\thickspace","\\;"),Hr("\\!","\\tmspace-{3mu}{.1667em}"),Hr("\\negthinspace","\\!"),Hr("\\negmedspace","\\tmspace-{4mu}{.2222em}"),Hr("\\negthickspace","\\tmspace-{5mu}{.277em}"),Hr("\\enspace","\\kern.5em "),Hr("\\enskip","\\hskip.5em\\relax"),Hr("\\quad","\\hskip1em\\relax"),Hr("\\qquad","\\hskip2em\\relax"),Hr("\\tag","\\@ifstar\\tag@literal\\tag@paren"),Hr("\\tag@paren","\\tag@literal{({#1})}"),Hr("\\tag@literal",(function(e){if(e.macros.get("\\df@tag"))throw new n("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"})),Hr("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),Hr("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),Hr("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),Hr("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),Hr("\\pmb","\\html@mathml{\\@binrel{#1}{\\mathrlap{#1}\\kern0.5px#1}}{\\mathbf{#1}}"),Hr("\\newline","\\\\\\relax"),Hr("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var Pn=V(T["Main-Regular"]["T".charCodeAt(0)][1]-.7*T["Main-Regular"]["A".charCodeAt(0)][1]);Hr("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+Pn+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),Hr("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+Pn+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),Hr("\\hspace","\\@ifstar\\@hspacer\\@hspace"),Hr("\\@hspace","\\hskip #1\\relax"),Hr("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),Hr("\\ordinarycolon",":"),Hr("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),Hr("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),Hr("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),Hr("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),Hr("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),Hr("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),Hr("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),Hr("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),Hr("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),Hr("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),Hr("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),Hr("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),Hr("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),Hr("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),Hr("\u2237","\\dblcolon"),Hr("\u2239","\\eqcolon"),Hr("\u2254","\\coloneqq"),Hr("\u2255","\\eqqcolon"),Hr("\u2a74","\\Coloneqq"),Hr("\\ratio","\\vcentcolon"),Hr("\\coloncolon","\\dblcolon"),Hr("\\colonequals","\\coloneqq"),Hr("\\coloncolonequals","\\Coloneqq"),Hr("\\equalscolon","\\eqqcolon"),Hr("\\equalscoloncolon","\\Eqqcolon"),Hr("\\colonminus","\\coloneq"),Hr("\\coloncolonminus","\\Coloneq"),Hr("\\minuscolon","\\eqcolon"),Hr("\\minuscoloncolon","\\Eqcolon"),Hr("\\coloncolonapprox","\\Colonapprox"),Hr("\\coloncolonsim","\\Colonsim"),Hr("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Hr("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Hr("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Hr("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Hr("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220c}}"),Hr("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),Hr("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),Hr("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),Hr("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),Hr("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),Hr("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),Hr("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),Hr("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),Hr("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}"),Hr("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}"),Hr("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}"),Hr("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}"),Hr("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}"),Hr("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}"),Hr("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}"),Hr("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}"),Hr("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}"),Hr("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}"),Hr("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228a}"),Hr("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2acb}"),Hr("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228b}"),Hr("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2acc}"),Hr("\\imath","\\html@mathml{\\@imath}{\u0131}"),Hr("\\jmath","\\html@mathml{\\@jmath}{\u0237}"),Hr("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27e6}}"),Hr("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27e7}}"),Hr("\u27e6","\\llbracket"),Hr("\u27e7","\\rrbracket"),Hr("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}"),Hr("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}"),Hr("\u2983","\\lBrace"),Hr("\u2984","\\rBrace"),Hr("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`\u29b5}}"),Hr("\u29b5","\\minuso"),Hr("\\darr","\\downarrow"),Hr("\\dArr","\\Downarrow"),Hr("\\Darr","\\Downarrow"),Hr("\\lang","\\langle"),Hr("\\rang","\\rangle"),Hr("\\uarr","\\uparrow"),Hr("\\uArr","\\Uparrow"),Hr("\\Uarr","\\Uparrow"),Hr("\\N","\\mathbb{N}"),Hr("\\R","\\mathbb{R}"),Hr("\\Z","\\mathbb{Z}"),Hr("\\alef","\\aleph"),Hr("\\alefsym","\\aleph"),Hr("\\Alpha","\\mathrm{A}"),Hr("\\Beta","\\mathrm{B}"),Hr("\\bull","\\bullet"),Hr("\\Chi","\\mathrm{X}"),Hr("\\clubs","\\clubsuit"),Hr("\\cnums","\\mathbb{C}"),Hr("\\Complex","\\mathbb{C}"),Hr("\\Dagger","\\ddagger"),Hr("\\diamonds","\\diamondsuit"),Hr("\\empty","\\emptyset"),Hr("\\Epsilon","\\mathrm{E}"),Hr("\\Eta","\\mathrm{H}"),Hr("\\exist","\\exists"),Hr("\\harr","\\leftrightarrow"),Hr("\\hArr","\\Leftrightarrow"),Hr("\\Harr","\\Leftrightarrow"),Hr("\\hearts","\\heartsuit"),Hr("\\image","\\Im"),Hr("\\infin","\\infty"),Hr("\\Iota","\\mathrm{I}"),Hr("\\isin","\\in"),Hr("\\Kappa","\\mathrm{K}"),Hr("\\larr","\\leftarrow"),Hr("\\lArr","\\Leftarrow"),Hr("\\Larr","\\Leftarrow"),Hr("\\lrarr","\\leftrightarrow"),Hr("\\lrArr","\\Leftrightarrow"),Hr("\\Lrarr","\\Leftrightarrow"),Hr("\\Mu","\\mathrm{M}"),Hr("\\natnums","\\mathbb{N}"),Hr("\\Nu","\\mathrm{N}"),Hr("\\Omicron","\\mathrm{O}"),Hr("\\plusmn","\\pm"),Hr("\\rarr","\\rightarrow"),Hr("\\rArr","\\Rightarrow"),Hr("\\Rarr","\\Rightarrow"),Hr("\\real","\\Re"),Hr("\\reals","\\mathbb{R}"),Hr("\\Reals","\\mathbb{R}"),Hr("\\Rho","\\mathrm{P}"),Hr("\\sdot","\\cdot"),Hr("\\sect","\\S"),Hr("\\spades","\\spadesuit"),Hr("\\sub","\\subset"),Hr("\\sube","\\subseteq"),Hr("\\supe","\\supseteq"),Hr("\\Tau","\\mathrm{T}"),Hr("\\thetasym","\\vartheta"),Hr("\\weierp","\\wp"),Hr("\\Zeta","\\mathrm{Z}"),Hr("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),Hr("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),Hr("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),Hr("\\bra","\\mathinner{\\langle{#1}|}"),Hr("\\ket","\\mathinner{|{#1}\\rangle}"),Hr("\\braket","\\mathinner{\\langle{#1}\\rangle}"),Hr("\\Bra","\\left\\langle#1\\right|"),Hr("\\Ket","\\left|#1\\right\\rangle");var Fn=function(e){return function(t){var r=t.consumeArg().tokens,n=t.consumeArg().tokens,a=t.consumeArg().tokens,i=t.consumeArg().tokens,o=t.macros.get("|"),s=t.macros.get("\\|");t.macros.beginGroup();var l=function(t){return function(r){e&&(r.macros.set("|",o),a.length&&r.macros.set("\\|",s));var i=t;return!t&&a.length&&"|"===r.future().text&&(r.popToken(),i=!0),{tokens:i?a:n,numArgs:0}}};t.macros.set("|",l(!1)),a.length&&t.macros.set("\\|",l(!0));var h=t.consumeArg().tokens,m=t.expandTokens([].concat(i,h,r));return t.macros.endGroup(),{tokens:m.reverse(),numArgs:0}}};Hr("\\bra@ket",Fn(!1)),Hr("\\bra@set",Fn(!0)),Hr("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),Hr("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),Hr("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),Hr("\\angln","{\\angl n}"),Hr("\\blue","\\textcolor{##6495ed}{#1}"),Hr("\\orange","\\textcolor{##ffa500}{#1}"),Hr("\\pink","\\textcolor{##ff00af}{#1}"),Hr("\\red","\\textcolor{##df0030}{#1}"),Hr("\\green","\\textcolor{##28ae7b}{#1}"),Hr("\\gray","\\textcolor{gray}{#1}"),Hr("\\purple","\\textcolor{##9d38bd}{#1}"),Hr("\\blueA","\\textcolor{##ccfaff}{#1}"),Hr("\\blueB","\\textcolor{##80f6ff}{#1}"),Hr("\\blueC","\\textcolor{##63d9ea}{#1}"),Hr("\\blueD","\\textcolor{##11accd}{#1}"),Hr("\\blueE","\\textcolor{##0c7f99}{#1}"),Hr("\\tealA","\\textcolor{##94fff5}{#1}"),Hr("\\tealB","\\textcolor{##26edd5}{#1}"),Hr("\\tealC","\\textcolor{##01d1c1}{#1}"),Hr("\\tealD","\\textcolor{##01a995}{#1}"),Hr("\\tealE","\\textcolor{##208170}{#1}"),Hr("\\greenA","\\textcolor{##b6ffb0}{#1}"),Hr("\\greenB","\\textcolor{##8af281}{#1}"),Hr("\\greenC","\\textcolor{##74cf70}{#1}"),Hr("\\greenD","\\textcolor{##1fab54}{#1}"),Hr("\\greenE","\\textcolor{##0d923f}{#1}"),Hr("\\goldA","\\textcolor{##ffd0a9}{#1}"),Hr("\\goldB","\\textcolor{##ffbb71}{#1}"),Hr("\\goldC","\\textcolor{##ff9c39}{#1}"),Hr("\\goldD","\\textcolor{##e07d10}{#1}"),Hr("\\goldE","\\textcolor{##a75a05}{#1}"),Hr("\\redA","\\textcolor{##fca9a9}{#1}"),Hr("\\redB","\\textcolor{##ff8482}{#1}"),Hr("\\redC","\\textcolor{##f9685d}{#1}"),Hr("\\redD","\\textcolor{##e84d39}{#1}"),Hr("\\redE","\\textcolor{##bc2612}{#1}"),Hr("\\maroonA","\\textcolor{##ffbde0}{#1}"),Hr("\\maroonB","\\textcolor{##ff92c6}{#1}"),Hr("\\maroonC","\\textcolor{##ed5fa6}{#1}"),Hr("\\maroonD","\\textcolor{##ca337c}{#1}"),Hr("\\maroonE","\\textcolor{##9e034e}{#1}"),Hr("\\purpleA","\\textcolor{##ddd7ff}{#1}"),Hr("\\purpleB","\\textcolor{##c6b9fc}{#1}"),Hr("\\purpleC","\\textcolor{##aa87ff}{#1}"),Hr("\\purpleD","\\textcolor{##7854ab}{#1}"),Hr("\\purpleE","\\textcolor{##543b78}{#1}"),Hr("\\mintA","\\textcolor{##f5f9e8}{#1}"),Hr("\\mintB","\\textcolor{##edf2df}{#1}"),Hr("\\mintC","\\textcolor{##e0e5cc}{#1}"),Hr("\\grayA","\\textcolor{##f6f7f7}{#1}"),Hr("\\grayB","\\textcolor{##f0f1f2}{#1}"),Hr("\\grayC","\\textcolor{##e3e5e6}{#1}"),Hr("\\grayD","\\textcolor{##d6d8da}{#1}"),Hr("\\grayE","\\textcolor{##babec2}{#1}"),Hr("\\grayF","\\textcolor{##888d93}{#1}"),Hr("\\grayG","\\textcolor{##626569}{#1}"),Hr("\\grayH","\\textcolor{##3b3e40}{#1}"),Hr("\\grayI","\\textcolor{##21242c}{#1}"),Hr("\\kaBlue","\\textcolor{##314453}{#1}"),Hr("\\kaGreen","\\textcolor{##71B307}{#1}");var Vn={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},Gn=function(){function e(e,t,r){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new Rn(On,t.macros),this.mode=r,this.stack=[]}var t=e.prototype;return t.feed=function(e){this.lexer=new In(e,this.settings)},t.switchMode=function(e){this.mode=e},t.beginGroup=function(){this.macros.beginGroup()},t.endGroup=function(){this.macros.endGroup()},t.endGroups=function(){this.macros.endGroups()},t.future=function(){return 0===this.stack.length&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]},t.popToken=function(){return this.future(),this.stack.pop()},t.pushToken=function(e){this.stack.push(e)},t.pushTokens=function(e){var t;(t=this.stack).push.apply(t,e)},t.scanArgument=function(e){var t,r,n;if(e){if(this.consumeSpaces(),"["!==this.future().text)return null;t=this.popToken();var a=this.consumeArg(["]"]);n=a.tokens,r=a.end}else{var i=this.consumeArg();n=i.tokens,t=i.start,r=i.end}return this.pushToken(new Lr("EOF",r.loc)),this.pushTokens(n),t.range(r,"")},t.consumeSpaces=function(){for(;" "===this.future().text;)this.stack.pop()},t.consumeArg=function(e){var t=[],r=e&&e.length>0;r||this.consumeSpaces();var a,i=this.future(),o=0,s=0;do{if(a=this.popToken(),t.push(a),"{"===a.text)++o;else if("}"===a.text){if(-1===--o)throw new n("Extra }",a)}else if("EOF"===a.text)throw new n("Unexpected end of input in a macro argument, expected '"+(e&&r?e[s]:"}")+"'",a);if(e&&r)if((0===o||1===o&&"{"===e[s])&&a.text===e[s]){if(++s===e.length){t.splice(-s,s);break}}else s=0}while(0!==o||r);return"{"===i.text&&"}"===t[t.length-1].text&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:i,end:a}},t.consumeArgs=function(e,t){if(t){if(t.length!==e+1)throw new n("The length of delimiters doesn't match the number of args!");for(var r=t[0],a=0;a<r.length;a++){var i=this.popToken();if(r[a]!==i.text)throw new n("Use of the macro doesn't match its definition",i)}}for(var o=[],s=0;s<e;s++)o.push(this.consumeArg(t&&t[s+1]).tokens);return o},t.expandOnce=function(e){var t=this.popToken(),r=t.text,a=t.noexpand?null:this._getExpansion(r);if(null==a||e&&a.unexpandable){if(e&&null==a&&"\\"===r[0]&&!this.isDefined(r))throw new n("Undefined control sequence: "+r);return this.pushToken(t),t}if(this.expansionCount++,this.expansionCount>this.settings.maxExpand)throw new n("Too many expansions: infinite loop or need to increase maxExpand setting");var i=a.tokens,o=this.consumeArgs(a.numArgs,a.delimiters);if(a.numArgs)for(var s=(i=i.slice()).length-1;s>=0;--s){var l=i[s];if("#"===l.text){if(0===s)throw new n("Incomplete placeholder at end of macro body",l);if("#"===(l=i[--s]).text)i.splice(s+1,1);else{if(!/^[1-9]$/.test(l.text))throw new n("Not a valid argument number",l);var h;(h=i).splice.apply(h,[s,2].concat(o[+l.text-1]))}}}return this.pushTokens(i),i},t.expandAfterFuture=function(){return this.expandOnce(),this.future()},t.expandNextToken=function(){for(;;){var e=this.expandOnce();if(e instanceof Lr)return e.treatAsRelax&&(e.text="\\relax"),this.stack.pop()}throw new Error},t.expandMacro=function(e){return this.macros.has(e)?this.expandTokens([new Lr(e)]):void 0},t.expandTokens=function(e){var t=[],r=this.stack.length;for(this.pushTokens(e);this.stack.length>r;){var n=this.expandOnce(!0);n instanceof Lr&&(n.treatAsRelax&&(n.noexpand=!1,n.treatAsRelax=!1),t.push(this.stack.pop()))}return t},t.expandMacroAsText=function(e){var t=this.expandMacro(e);return t?t.map((function(e){return e.text})).join(""):t},t._getExpansion=function(e){var t=this.macros.get(e);if(null==t)return t;if(1===e.length){var r=this.lexer.catcodes[e];if(null!=r&&13!==r)return}var n="function"===typeof t?t(this):t;if("string"===typeof n){var a=0;if(-1!==n.indexOf("#"))for(var i=n.replace(/##/g,"");-1!==i.indexOf("#"+(a+1));)++a;for(var o=new In(n,this.settings),s=[],l=o.lex();"EOF"!==l.text;)s.push(l),l=o.lex();return s.reverse(),{tokens:s,numArgs:a}}return n},t.isDefined=function(e){return this.macros.has(e)||qn.hasOwnProperty(e)||ae.math.hasOwnProperty(e)||ae.text.hasOwnProperty(e)||Vn.hasOwnProperty(e)},t.isExpandable=function(e){var t=this.macros.get(e);return null!=t?"string"===typeof t||"function"===typeof t||!t.unexpandable:qn.hasOwnProperty(e)&&!qn[e].primitive},e}(),Un=/^[\u208a\u208b\u208c\u208d\u208e\u2080\u2081\u2082\u2083\u2084\u2085\u2086\u2087\u2088\u2089\u2090\u2091\u2095\u1d62\u2c7c\u2096\u2097\u2098\u2099\u2092\u209a\u1d63\u209b\u209c\u1d64\u1d65\u2093\u1d66\u1d67\u1d68\u1d69\u1d6a]/,Yn=Object.freeze({"\u208a":"+","\u208b":"-","\u208c":"=","\u208d":"(","\u208e":")","\u2080":"0","\u2081":"1","\u2082":"2","\u2083":"3","\u2084":"4","\u2085":"5","\u2086":"6","\u2087":"7","\u2088":"8","\u2089":"9","\u2090":"a","\u2091":"e","\u2095":"h","\u1d62":"i","\u2c7c":"j","\u2096":"k","\u2097":"l","\u2098":"m","\u2099":"n","\u2092":"o","\u209a":"p","\u1d63":"r","\u209b":"s","\u209c":"t","\u1d64":"u","\u1d65":"v","\u2093":"x","\u1d66":"\u03b2","\u1d67":"\u03b3","\u1d68":"\u03c1","\u1d69":"\u03d5","\u1d6a":"\u03c7","\u207a":"+","\u207b":"-","\u207c":"=","\u207d":"(","\u207e":")","\u2070":"0","\xb9":"1","\xb2":"2","\xb3":"3","\u2074":"4","\u2075":"5","\u2076":"6","\u2077":"7","\u2078":"8","\u2079":"9","\u1d2c":"A","\u1d2e":"B","\u1d30":"D","\u1d31":"E","\u1d33":"G","\u1d34":"H","\u1d35":"I","\u1d36":"J","\u1d37":"K","\u1d38":"L","\u1d39":"M","\u1d3a":"N","\u1d3c":"O","\u1d3e":"P","\u1d3f":"R","\u1d40":"T","\u1d41":"U","\u2c7d":"V","\u1d42":"W","\u1d43":"a","\u1d47":"b","\u1d9c":"c","\u1d48":"d","\u1d49":"e","\u1da0":"f","\u1d4d":"g","\u02b0":"h","\u2071":"i","\u02b2":"j","\u1d4f":"k","\u02e1":"l","\u1d50":"m","\u207f":"n","\u1d52":"o","\u1d56":"p","\u02b3":"r","\u02e2":"s","\u1d57":"t","\u1d58":"u","\u1d5b":"v","\u02b7":"w","\u02e3":"x","\u02b8":"y","\u1dbb":"z","\u1d5d":"\u03b2","\u1d5e":"\u03b3","\u1d5f":"\u03b4","\u1d60":"\u03d5","\u1d61":"\u03c7","\u1dbf":"\u03b8"}),Xn={"\u0301":{text:"\\'",math:"\\acute"},"\u0300":{text:"\\`",math:"\\grave"},"\u0308":{text:'\\"',math:"\\ddot"},"\u0303":{text:"\\~",math:"\\tilde"},"\u0304":{text:"\\=",math:"\\bar"},"\u0306":{text:"\\u",math:"\\breve"},"\u030c":{text:"\\v",math:"\\check"},"\u0302":{text:"\\^",math:"\\hat"},"\u0307":{text:"\\.",math:"\\dot"},"\u030a":{text:"\\r",math:"\\mathring"},"\u030b":{text:"\\H"},"\u0327":{text:"\\c"}},Wn={"\xe1":"a\u0301","\xe0":"a\u0300","\xe4":"a\u0308","\u01df":"a\u0308\u0304","\xe3":"a\u0303","\u0101":"a\u0304","\u0103":"a\u0306","\u1eaf":"a\u0306\u0301","\u1eb1":"a\u0306\u0300","\u1eb5":"a\u0306\u0303","\u01ce":"a\u030c","\xe2":"a\u0302","\u1ea5":"a\u0302\u0301","\u1ea7":"a\u0302\u0300","\u1eab":"a\u0302\u0303","\u0227":"a\u0307","\u01e1":"a\u0307\u0304","\xe5":"a\u030a","\u01fb":"a\u030a\u0301","\u1e03":"b\u0307","\u0107":"c\u0301","\u1e09":"c\u0327\u0301","\u010d":"c\u030c","\u0109":"c\u0302","\u010b":"c\u0307","\xe7":"c\u0327","\u010f":"d\u030c","\u1e0b":"d\u0307","\u1e11":"d\u0327","\xe9":"e\u0301","\xe8":"e\u0300","\xeb":"e\u0308","\u1ebd":"e\u0303","\u0113":"e\u0304","\u1e17":"e\u0304\u0301","\u1e15":"e\u0304\u0300","\u0115":"e\u0306","\u1e1d":"e\u0327\u0306","\u011b":"e\u030c","\xea":"e\u0302","\u1ebf":"e\u0302\u0301","\u1ec1":"e\u0302\u0300","\u1ec5":"e\u0302\u0303","\u0117":"e\u0307","\u0229":"e\u0327","\u1e1f":"f\u0307","\u01f5":"g\u0301","\u1e21":"g\u0304","\u011f":"g\u0306","\u01e7":"g\u030c","\u011d":"g\u0302","\u0121":"g\u0307","\u0123":"g\u0327","\u1e27":"h\u0308","\u021f":"h\u030c","\u0125":"h\u0302","\u1e23":"h\u0307","\u1e29":"h\u0327","\xed":"i\u0301","\xec":"i\u0300","\xef":"i\u0308","\u1e2f":"i\u0308\u0301","\u0129":"i\u0303","\u012b":"i\u0304","\u012d":"i\u0306","\u01d0":"i\u030c","\xee":"i\u0302","\u01f0":"j\u030c","\u0135":"j\u0302","\u1e31":"k\u0301","\u01e9":"k\u030c","\u0137":"k\u0327","\u013a":"l\u0301","\u013e":"l\u030c","\u013c":"l\u0327","\u1e3f":"m\u0301","\u1e41":"m\u0307","\u0144":"n\u0301","\u01f9":"n\u0300","\xf1":"n\u0303","\u0148":"n\u030c","\u1e45":"n\u0307","\u0146":"n\u0327","\xf3":"o\u0301","\xf2":"o\u0300","\xf6":"o\u0308","\u022b":"o\u0308\u0304","\xf5":"o\u0303","\u1e4d":"o\u0303\u0301","\u1e4f":"o\u0303\u0308","\u022d":"o\u0303\u0304","\u014d":"o\u0304","\u1e53":"o\u0304\u0301","\u1e51":"o\u0304\u0300","\u014f":"o\u0306","\u01d2":"o\u030c","\xf4":"o\u0302","\u1ed1":"o\u0302\u0301","\u1ed3":"o\u0302\u0300","\u1ed7":"o\u0302\u0303","\u022f":"o\u0307","\u0231":"o\u0307\u0304","\u0151":"o\u030b","\u1e55":"p\u0301","\u1e57":"p\u0307","\u0155":"r\u0301","\u0159":"r\u030c","\u1e59":"r\u0307","\u0157":"r\u0327","\u015b":"s\u0301","\u1e65":"s\u0301\u0307","\u0161":"s\u030c","\u1e67":"s\u030c\u0307","\u015d":"s\u0302","\u1e61":"s\u0307","\u015f":"s\u0327","\u1e97":"t\u0308","\u0165":"t\u030c","\u1e6b":"t\u0307","\u0163":"t\u0327","\xfa":"u\u0301","\xf9":"u\u0300","\xfc":"u\u0308","\u01d8":"u\u0308\u0301","\u01dc":"u\u0308\u0300","\u01d6":"u\u0308\u0304","\u01da":"u\u0308\u030c","\u0169":"u\u0303","\u1e79":"u\u0303\u0301","\u016b":"u\u0304","\u1e7b":"u\u0304\u0308","\u016d":"u\u0306","\u01d4":"u\u030c","\xfb":"u\u0302","\u016f":"u\u030a","\u0171":"u\u030b","\u1e7d":"v\u0303","\u1e83":"w\u0301","\u1e81":"w\u0300","\u1e85":"w\u0308","\u0175":"w\u0302","\u1e87":"w\u0307","\u1e98":"w\u030a","\u1e8d":"x\u0308","\u1e8b":"x\u0307","\xfd":"y\u0301","\u1ef3":"y\u0300","\xff":"y\u0308","\u1ef9":"y\u0303","\u0233":"y\u0304","\u0177":"y\u0302","\u1e8f":"y\u0307","\u1e99":"y\u030a","\u017a":"z\u0301","\u017e":"z\u030c","\u1e91":"z\u0302","\u017c":"z\u0307","\xc1":"A\u0301","\xc0":"A\u0300","\xc4":"A\u0308","\u01de":"A\u0308\u0304","\xc3":"A\u0303","\u0100":"A\u0304","\u0102":"A\u0306","\u1eae":"A\u0306\u0301","\u1eb0":"A\u0306\u0300","\u1eb4":"A\u0306\u0303","\u01cd":"A\u030c","\xc2":"A\u0302","\u1ea4":"A\u0302\u0301","\u1ea6":"A\u0302\u0300","\u1eaa":"A\u0302\u0303","\u0226":"A\u0307","\u01e0":"A\u0307\u0304","\xc5":"A\u030a","\u01fa":"A\u030a\u0301","\u1e02":"B\u0307","\u0106":"C\u0301","\u1e08":"C\u0327\u0301","\u010c":"C\u030c","\u0108":"C\u0302","\u010a":"C\u0307","\xc7":"C\u0327","\u010e":"D\u030c","\u1e0a":"D\u0307","\u1e10":"D\u0327","\xc9":"E\u0301","\xc8":"E\u0300","\xcb":"E\u0308","\u1ebc":"E\u0303","\u0112":"E\u0304","\u1e16":"E\u0304\u0301","\u1e14":"E\u0304\u0300","\u0114":"E\u0306","\u1e1c":"E\u0327\u0306","\u011a":"E\u030c","\xca":"E\u0302","\u1ebe":"E\u0302\u0301","\u1ec0":"E\u0302\u0300","\u1ec4":"E\u0302\u0303","\u0116":"E\u0307","\u0228":"E\u0327","\u1e1e":"F\u0307","\u01f4":"G\u0301","\u1e20":"G\u0304","\u011e":"G\u0306","\u01e6":"G\u030c","\u011c":"G\u0302","\u0120":"G\u0307","\u0122":"G\u0327","\u1e26":"H\u0308","\u021e":"H\u030c","\u0124":"H\u0302","\u1e22":"H\u0307","\u1e28":"H\u0327","\xcd":"I\u0301","\xcc":"I\u0300","\xcf":"I\u0308","\u1e2e":"I\u0308\u0301","\u0128":"I\u0303","\u012a":"I\u0304","\u012c":"I\u0306","\u01cf":"I\u030c","\xce":"I\u0302","\u0130":"I\u0307","\u0134":"J\u0302","\u1e30":"K\u0301","\u01e8":"K\u030c","\u0136":"K\u0327","\u0139":"L\u0301","\u013d":"L\u030c","\u013b":"L\u0327","\u1e3e":"M\u0301","\u1e40":"M\u0307","\u0143":"N\u0301","\u01f8":"N\u0300","\xd1":"N\u0303","\u0147":"N\u030c","\u1e44":"N\u0307","\u0145":"N\u0327","\xd3":"O\u0301","\xd2":"O\u0300","\xd6":"O\u0308","\u022a":"O\u0308\u0304","\xd5":"O\u0303","\u1e4c":"O\u0303\u0301","\u1e4e":"O\u0303\u0308","\u022c":"O\u0303\u0304","\u014c":"O\u0304","\u1e52":"O\u0304\u0301","\u1e50":"O\u0304\u0300","\u014e":"O\u0306","\u01d1":"O\u030c","\xd4":"O\u0302","\u1ed0":"O\u0302\u0301","\u1ed2":"O\u0302\u0300","\u1ed6":"O\u0302\u0303","\u022e":"O\u0307","\u0230":"O\u0307\u0304","\u0150":"O\u030b","\u1e54":"P\u0301","\u1e56":"P\u0307","\u0154":"R\u0301","\u0158":"R\u030c","\u1e58":"R\u0307","\u0156":"R\u0327","\u015a":"S\u0301","\u1e64":"S\u0301\u0307","\u0160":"S\u030c","\u1e66":"S\u030c\u0307","\u015c":"S\u0302","\u1e60":"S\u0307","\u015e":"S\u0327","\u0164":"T\u030c","\u1e6a":"T\u0307","\u0162":"T\u0327","\xda":"U\u0301","\xd9":"U\u0300","\xdc":"U\u0308","\u01d7":"U\u0308\u0301","\u01db":"U\u0308\u0300","\u01d5":"U\u0308\u0304","\u01d9":"U\u0308\u030c","\u0168":"U\u0303","\u1e78":"U\u0303\u0301","\u016a":"U\u0304","\u1e7a":"U\u0304\u0308","\u016c":"U\u0306","\u01d3":"U\u030c","\xdb":"U\u0302","\u016e":"U\u030a","\u0170":"U\u030b","\u1e7c":"V\u0303","\u1e82":"W\u0301","\u1e80":"W\u0300","\u1e84":"W\u0308","\u0174":"W\u0302","\u1e86":"W\u0307","\u1e8c":"X\u0308","\u1e8a":"X\u0307","\xdd":"Y\u0301","\u1ef2":"Y\u0300","\u0178":"Y\u0308","\u1ef8":"Y\u0303","\u0232":"Y\u0304","\u0176":"Y\u0302","\u1e8e":"Y\u0307","\u0179":"Z\u0301","\u017d":"Z\u030c","\u1e90":"Z\u0302","\u017b":"Z\u0307","\u03ac":"\u03b1\u0301","\u1f70":"\u03b1\u0300","\u1fb1":"\u03b1\u0304","\u1fb0":"\u03b1\u0306","\u03ad":"\u03b5\u0301","\u1f72":"\u03b5\u0300","\u03ae":"\u03b7\u0301","\u1f74":"\u03b7\u0300","\u03af":"\u03b9\u0301","\u1f76":"\u03b9\u0300","\u03ca":"\u03b9\u0308","\u0390":"\u03b9\u0308\u0301","\u1fd2":"\u03b9\u0308\u0300","\u1fd1":"\u03b9\u0304","\u1fd0":"\u03b9\u0306","\u03cc":"\u03bf\u0301","\u1f78":"\u03bf\u0300","\u03cd":"\u03c5\u0301","\u1f7a":"\u03c5\u0300","\u03cb":"\u03c5\u0308","\u03b0":"\u03c5\u0308\u0301","\u1fe2":"\u03c5\u0308\u0300","\u1fe1":"\u03c5\u0304","\u1fe0":"\u03c5\u0306","\u03ce":"\u03c9\u0301","\u1f7c":"\u03c9\u0300","\u038e":"\u03a5\u0301","\u1fea":"\u03a5\u0300","\u03ab":"\u03a5\u0308","\u1fe9":"\u03a5\u0304","\u1fe8":"\u03a5\u0306","\u038f":"\u03a9\u0301","\u1ffa":"\u03a9\u0300"},_n=function(){function e(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new Gn(e,t,this.mode),this.settings=t,this.leftrightDepth=0}var t=e.prototype;return t.expect=function(e,t){if(void 0===t&&(t=!0),this.fetch().text!==e)throw new n("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()},t.consume=function(){this.nextToken=null},t.fetch=function(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken},t.switchMode=function(e){this.mode=e,this.gullet.switchMode(e)},t.parse=function(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}},t.subparse=function(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new Lr("}")),this.gullet.pushTokens(e);var r=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,r},t.parseExpression=function(t,r){for(var n=[];;){"math"===this.mode&&this.consumeSpaces();var a=this.fetch();if(-1!==e.endOfExpression.indexOf(a.text))break;if(r&&a.text===r)break;if(t&&qn[a.text]&&qn[a.text].infix)break;var i=this.parseAtom(r);if(!i)break;"internal"!==i.type&&n.push(i)}return"text"===this.mode&&this.formLigatures(n),this.handleInfixNodes(n)},t.handleInfixNodes=function(e){for(var t,r=-1,a=0;a<e.length;a++)if("infix"===e[a].type){if(-1!==r)throw new n("only one infix operator per group",e[a].token);r=a,t=e[a].replaceWith}if(-1!==r&&t){var i,o,s=e.slice(0,r),l=e.slice(r+1);return i=1===s.length&&"ordgroup"===s[0].type?s[0]:{type:"ordgroup",mode:this.mode,body:s},o=1===l.length&&"ordgroup"===l[0].type?l[0]:{type:"ordgroup",mode:this.mode,body:l},["\\\\abovefrac"===t?this.callFunction(t,[i,e[r],o],[]):this.callFunction(t,[i,o],[])]}return e},t.handleSupSubscript=function(e){var t=this.fetch(),r=t.text;this.consume(),this.consumeSpaces();var a=this.parseGroup(e);if(!a)throw new n("Expected group after '"+r+"'",t);return a},t.formatUnsupportedCmd=function(e){for(var t=[],r=0;r<e.length;r++)t.push({type:"textord",mode:"text",text:e[r]});var n={type:"text",mode:this.mode,body:t};return{type:"color",mode:this.mode,color:this.settings.errorColor,body:[n]}},t.parseAtom=function(t){var r,a,i=this.parseGroup("atom",t);if("text"===this.mode)return i;for(;;){this.consumeSpaces();var o=this.fetch();if("\\limits"===o.text||"\\nolimits"===o.text){if(i&&"op"===i.type){var s="\\limits"===o.text;i.limits=s,i.alwaysHandleSupSub=!0}else{if(!i||"operatorname"!==i.type)throw new n("Limit controls must follow a math operator",o);i.alwaysHandleSupSub&&(i.limits="\\limits"===o.text)}this.consume()}else if("^"===o.text){if(r)throw new n("Double superscript",o);r=this.handleSupSubscript("superscript")}else if("_"===o.text){if(a)throw new n("Double subscript",o);a=this.handleSupSubscript("subscript")}else if("'"===o.text){if(r)throw new n("Double superscript",o);var l={type:"textord",mode:this.mode,text:"\\prime"},h=[l];for(this.consume();"'"===this.fetch().text;)h.push(l),this.consume();"^"===this.fetch().text&&h.push(this.handleSupSubscript("superscript")),r={type:"ordgroup",mode:this.mode,body:h}}else{if(!Yn[o.text])break;var m=Yn[o.text],c=Un.test(o.text);for(this.consume();;){var u=this.fetch().text;if(!Yn[u])break;if(Un.test(u)!==c)break;this.consume(),m+=Yn[u]}var p=new e(m,this.settings).parse();c?a={type:"ordgroup",mode:"math",body:p}:r={type:"ordgroup",mode:"math",body:p}}}return r||a?{type:"supsub",mode:this.mode,base:i,sup:r,sub:a}:i},t.parseFunction=function(e,t){var r=this.fetch(),a=r.text,i=qn[a];if(!i)return null;if(this.consume(),t&&"atom"!==t&&!i.allowedInArgument)throw new n("Got function '"+a+"' with no arguments"+(t?" as "+t:""),r);if("text"===this.mode&&!i.allowedInText)throw new n("Can't use function '"+a+"' in text mode",r);if("math"===this.mode&&!1===i.allowedInMath)throw new n("Can't use function '"+a+"' in math mode",r);var o=this.parseArguments(a,i),s=o.args,l=o.optArgs;return this.callFunction(a,s,l,r,e)},t.callFunction=function(e,t,r,a,i){var o={funcName:e,parser:this,token:a,breakOnTokenText:i},s=qn[e];if(s&&s.handler)return s.handler(o,t,r);throw new n("No function handler for "+e)},t.parseArguments=function(e,t){var r=t.numArgs+t.numOptionalArgs;if(0===r)return{args:[],optArgs:[]};for(var a=[],i=[],o=0;o<r;o++){var s=t.argTypes&&t.argTypes[o],l=o<t.numOptionalArgs;(t.primitive&&null==s||"sqrt"===t.type&&1===o&&null==i[0])&&(s="primitive");var h=this.parseGroupOfType("argument to '"+e+"'",s,l);if(l)i.push(h);else{if(null==h)throw new n("Null argument, please report this as a bug");a.push(h)}}return{args:a,optArgs:i}},t.parseGroupOfType=function(e,t,r){switch(t){case"color":return this.parseColorGroup(r);case"size":return this.parseSizeGroup(r);case"url":return this.parseUrlGroup(r);case"math":case"text":return this.parseArgumentGroup(r,t);case"hbox":var a=this.parseArgumentGroup(r,"text");return null!=a?{type:"styling",mode:a.mode,body:[a],style:"text"}:null;case"raw":var i=this.parseStringGroup("raw",r);return null!=i?{type:"raw",mode:"text",string:i.text}:null;case"primitive":if(r)throw new n("A primitive argument cannot be optional");var o=this.parseGroup(e);if(null==o)throw new n("Expected group as "+e,this.fetch());return o;case"original":case null:case void 0:return this.parseArgumentGroup(r);default:throw new n("Unknown group type as "+e,this.fetch())}},t.consumeSpaces=function(){for(;" "===this.fetch().text;)this.consume()},t.parseStringGroup=function(e,t){var r=this.gullet.scanArgument(t);if(null==r)return null;for(var n,a="";"EOF"!==(n=this.fetch()).text;)a+=n.text,this.consume();return this.consume(),r.text=a,r},t.parseRegexGroup=function(e,t){for(var r,a=this.fetch(),i=a,o="";"EOF"!==(r=this.fetch()).text&&e.test(o+r.text);)o+=(i=r).text,this.consume();if(""===o)throw new n("Invalid "+t+": '"+a.text+"'",a);return a.range(i,o)},t.parseColorGroup=function(e){var t=this.parseStringGroup("color",e);if(null==t)return null;var r=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);if(!r)throw new n("Invalid color: '"+t.text+"'",t);var a=r[0];return/^[0-9a-f]{6}$/i.test(a)&&(a="#"+a),{type:"color-token",mode:this.mode,color:a}},t.parseSizeGroup=function(e){var t,r=!1;if(this.gullet.consumeSpaces(),!(t=e||"{"===this.gullet.future().text?this.parseStringGroup("size",e):this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size")))return null;e||0!==t.text.length||(t.text="0pt",r=!0);var a=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!a)throw new n("Invalid size: '"+t.text+"'",t);var i={number:+(a[1]+a[2]),unit:a[3]};if(!P(i))throw new n("Invalid unit: '"+i.unit+"'",t);return{type:"size",mode:this.mode,value:i,isBlank:r}},t.parseUrlGroup=function(e){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var t=this.parseStringGroup("url",e);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),null==t)return null;var r=t.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:r}},t.parseArgumentGroup=function(e,t){var r=this.gullet.scanArgument(e);if(null==r)return null;var n=this.mode;t&&this.switchMode(t),this.gullet.beginGroup();var a=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var i={type:"ordgroup",mode:this.mode,loc:r.loc,body:a};return t&&this.switchMode(n),i},t.parseGroup=function(e,t){var r,a=this.fetch(),i=a.text;if("{"===i||"\\begingroup"===i){this.consume();var o="{"===i?"}":"\\endgroup";this.gullet.beginGroup();var s=this.parseExpression(!1,o),l=this.fetch();this.expect(o),this.gullet.endGroup(),r={type:"ordgroup",mode:this.mode,loc:Er.range(a,l),body:s,semisimple:"\\begingroup"===i||void 0}}else if(null==(r=this.parseFunction(t,e)||this.parseSymbol())&&"\\"===i[0]&&!Vn.hasOwnProperty(i)){if(this.settings.throwOnError)throw new n("Undefined control sequence: "+i,a);r=this.formatUnsupportedCmd(i),this.consume()}return r},t.formLigatures=function(e){for(var t=e.length-1,r=0;r<t;++r){var n=e[r],a=n.text;"-"===a&&"-"===e[r+1].text&&(r+1<t&&"-"===e[r+2].text?(e.splice(r,3,{type:"textord",mode:"text",loc:Er.range(n,e[r+2]),text:"---"}),t-=2):(e.splice(r,2,{type:"textord",mode:"text",loc:Er.range(n,e[r+1]),text:"--"}),t-=1)),"'"!==a&&"`"!==a||e[r+1].text!==a||(e.splice(r,2,{type:"textord",mode:"text",loc:Er.range(n,e[r+1]),text:a+a}),t-=1)}},t.parseSymbol=function(){var e=this.fetch(),t=e.text;if(/^\\verb[^a-zA-Z]/.test(t)){this.consume();var r=t.slice(5),a="*"===r.charAt(0);if(a&&(r=r.slice(1)),r.length<2||r.charAt(0)!==r.slice(-1))throw new n("\\verb assertion failed --\n please report what input caused this bug");return{type:"verb",mode:"text",body:r=r.slice(1,-1),star:a}}Wn.hasOwnProperty(t[0])&&!ae[this.mode][t[0]]&&(this.settings.strict&&"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+t[0]+'" used in math mode',e),t=Wn[t[0]]+t.substr(1));var i,o=Nn.exec(t);if(o&&("i"===(t=t.substring(0,o.index))?t="\u0131":"j"===t&&(t="\u0237")),ae[this.mode][t]){this.settings.strict&&"math"===this.mode&&Ee.indexOf(t)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var s,l=ae[this.mode][t].group,h=Er.range(e);if(te.hasOwnProperty(l)){var m=l;s={type:"atom",mode:this.mode,family:m,loc:h,text:t}}else s={type:l,mode:this.mode,loc:h,text:t};i=s}else{if(!(t.charCodeAt(0)>=128))return null;this.settings.strict&&(S(t.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'" ('+t.charCodeAt(0)+")",e)),i={type:"textord",mode:"text",loc:Er.range(e),text:t}}if(this.consume(),o)for(var c=0;c<o[0].length;c++){var u=o[0][c];if(!Xn[u])throw new n("Unknown accent ' "+u+"'",e);var p=Xn[u][this.mode]||Xn[u].text;if(!p)throw new n("Accent "+u+" unsupported in "+this.mode+" mode",e);i={type:"accent",mode:this.mode,loc:Er.range(e),label:p,isStretchy:!1,isShifty:!0,base:i}}return i},e}();_n.endOfExpression=["}","\\endgroup","\\end","\\right","&"];var jn=function(e,t){if(!("string"===typeof e||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var r=new _n(e,t);delete r.gullet.macros.current["\\df@tag"];var a=r.parse();if(delete r.gullet.macros.current["\\current@color"],delete r.gullet.macros.current["\\color"],r.gullet.macros.get("\\df@tag")){if(!t.displayMode)throw new n("\\tag works only in display equations");a=[{type:"tag",mode:"text",body:a,tag:r.subparse([new Lr("\\df@tag")])}]}return a},$n=function(e,t,r){t.textContent="";var n=Kn(e,r).toNode();t.appendChild(n)};"undefined"!==typeof document&&"CSS1Compat"!==document.compatMode&&("undefined"!==typeof console&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),$n=function(){throw new n("KaTeX doesn't work in quirks mode.")});var Zn=function(e,t,r){if(r.throwOnError||!(e instanceof n))throw e;var a=Ke.makeSpan(["katex-error"],[new Z(t)]);return a.setAttribute("title",e.toString()),a.setAttribute("style","color:"+r.errorColor),a},Kn=function(e,t){var r=new c(t);try{return function(e,t,r){var n,a=Ht(r);if("mathml"===r.output)return Ot(e,t,a,r.displayMode,!0);if("html"===r.output){var i=St(e,a);n=Ke.makeSpan(["katex"],[i])}else{var o=Ot(e,t,a,r.displayMode,!1),s=St(e,a);n=Ke.makeSpan(["katex"],[o,s])}return Et(n,r)}(jn(e,r),e,r)}catch(n){return Zn(n,e,r)}},Jn={version:"0.16.0",render:$n,renderToString:function(e,t){return Kn(e,t).toMarkup()},ParseError:n,SETTINGS_SCHEMA:h,__parse:function(e,t){var r=new c(t);return jn(e,r)},__renderToDomTree:Kn,__renderToHTMLTree:function(e,t){var r=new c(t);try{return function(e,t,r){var n=St(e,Ht(r)),a=Ke.makeSpan(["katex"],[n]);return Et(a,r)}(jn(e,r),0,r)}catch(n){return Zn(n,e,r)}},__setFontMetrics:function(e,t){T[e]=t},__defineSymbol:ie,__defineMacro:Hr,__domTree:{Span:W,Anchor:_,SymbolNode:Z,SvgNode:K,PathNode:J,LineNode:Q}};return t=t.default}()},e.exports=n()}}]);\ No newline at end of filediff --git a/apps/mobile/web.bundle/static/js/3.7fb602fe.chunk.js b/apps/mobile/web.bundle/static/js/3.7fb602fe.chunk.jsnew file mode 100644index 000000000..20dc7eeca--- /dev/null+++ b/apps/mobile/web.bundle/static/js/3.7fb602fe.chunk.js@@ -0,0 +1,2 @@+/*! For license information please see 3.7fb602fe.chunk.js.LICENSE.txt */+(this.webpackJsonptiptap=this.webpackJsonptiptap||[]).push([[3],[function(e,t,n){"use strict";e.exports=n(83)},function(e,t,n){"use strict";e.exports=n(77)},function(e,t,n){"use strict";n.r(t),n.d(t,"AllSelection",(function(){return w})),n.d(t,"EditorState",(function(){return E})),n.d(t,"NodeSelection",(function(){return y})),n.d(t,"Plugin",(function(){return T})),n.d(t,"PluginKey",(function(){return P})),n.d(t,"Selection",(function(){return f})),n.d(t,"SelectionRange",(function(){return p})),n.d(t,"TextSelection",(function(){return v})),n.d(t,"Transaction",(function(){return S}));var r=n(13),o=n(12),i=n(10),a=n(11),s=n(4),l=n(5),u=n(3),c=n(8),d=Object.create(null),f=function(){function e(t,n,r){Object(s.a)(this,e),this.$anchor=t,this.$head=n,this.ranges=r||[new p(t.min(n),t.max(n))]}return Object(l.a)(e,[{key:"anchor",get:function(){return this.$anchor.pos}},{key:"head",get:function(){return this.$head.pos}},{key:"from",get:function(){return this.$from.pos}},{key:"to",get:function(){return this.$to.pos}},{key:"$from",get:function(){return this.ranges[0].$from}},{key:"$to",get:function(){return this.ranges[0].$to}},{key:"empty",get:function(){for(var e=this.ranges,t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}},{key:"content",value:function(){return this.$from.doc.slice(this.from,this.to,!0)}},{key:"replace",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.Slice.empty,n=t.content.lastChild,r=null,o=0;o<t.openEnd;o++)r=n,n=n.lastChild;for(var i=e.steps.length,a=this.ranges,s=0;s<a.length;s++){var l=a[s],c=l.$from,d=l.$to,f=e.mapping.slice(i);e.replaceRange(f.map(c.pos),f.map(d.pos),s?u.Slice.empty:t),0==s&&O(e,i,(n?n.isInline:r&&r.isTextblock)?-1:1)}}},{key:"replaceWith",value:function(e,t){for(var n=e.steps.length,r=this.ranges,o=0;o<r.length;o++){var i=r[o],a=i.$from,s=i.$to,l=e.mapping.slice(n),u=l.map(a.pos),c=l.map(s.pos);o?e.deleteRange(u,c):(e.replaceRangeWith(u,c,t),O(e,n,t.isInline?-1:1))}}},{key:"getBookmark",value:function(){return v.between(this.$anchor,this.$head).getBookmark()}}],[{key:"findFrom",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=e.parent.inlineContent?new v(e):x(e.node(0),e.parent,e.pos,e.index(),t,n);if(r)return r;for(var o=e.depth-1;o>=0;o--){var i=t<0?x(e.node(0),e.node(o),e.before(o+1),e.index(o),t,n):x(e.node(0),e.node(o),e.after(o+1),e.index(o)+1,t,n);if(i)return i}return null}},{key:"near",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this.findFrom(e,t)||this.findFrom(e,-t)||new w(e.node(0))}},{key:"atStart",value:function(e){return x(e,e,0,0,1)||new w(e)}},{key:"atEnd",value:function(e){return x(e,e,e.content.size,e.childCount,-1)||new w(e)}},{key:"fromJSON",value:function(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");var n=d[t.type];if(!n)throw new RangeError("No selection type ".concat(t.type," defined"));return n.fromJSON(e,t)}},{key:"jsonID",value:function(e,t){if(e in d)throw new RangeError("Duplicate use of selection JSON ID "+e);return d[e]=t,t.prototype.jsonID=e,t}}]),e}();f.prototype.visible=!0;var p=Object(l.a)((function e(t,n){Object(s.a)(this,e),this.$from=t,this.$to=n})),h=!1;function m(e){h||e.parent.inlineContent||(h=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}var v=function(e){Object(i.a)(n,e);var t=Object(a.a)(n);function n(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return Object(s.a)(this,n),m(e),m(r),t.call(this,e,r)}return Object(l.a)(n,[{key:"$cursor",get:function(){return this.$anchor.pos==this.$head.pos?this.$head:null}},{key:"map",value:function(e,t){var r=e.resolve(t.map(this.head));if(!r.parent.inlineContent)return f.near(r);var o=e.resolve(t.map(this.anchor));return new n(o.parent.inlineContent?o:r,r)}},{key:"replace",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.Slice.empty;if(Object(r.a)(Object(o.a)(n.prototype),"replace",this).call(this,e,t),t==u.Slice.empty){var i=this.$from.marksAcross(this.$to);i&&e.ensureMarks(i)}}},{key:"eq",value:function(e){return e instanceof n&&e.anchor==this.anchor&&e.head==this.head}},{key:"getBookmark",value:function(){return new g(this.anchor,this.head)}},{key:"toJSON",value:function(){return{type:"text",anchor:this.anchor,head:this.head}}}],[{key:"fromJSON",value:function(e,t){if("number"!=typeof t.anchor||"number"!=typeof t.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new n(e.resolve(t.anchor),e.resolve(t.head))}},{key:"create",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))}},{key:"between",value:function(e,t,r){var o=e.pos-t.pos;if(r&&!o||(r=o>=0?1:-1),!t.parent.inlineContent){var i=f.findFrom(t,r,!0)||f.findFrom(t,-r,!0);if(!i)return f.near(t,r);t=i.$head}return e.parent.inlineContent||(0==o||(e=(f.findFrom(e,-r,!0)||f.findFrom(e,r,!0)).$anchor).pos<t.pos!=o<0)&&(e=t),new n(e,t)}}]),n}(f);f.jsonID("text",v);var g=function(){function e(t,n){Object(s.a)(this,e),this.anchor=t,this.head=n}return Object(l.a)(e,[{key:"map",value:function(t){return new e(t.map(this.anchor),t.map(this.head))}},{key:"resolve",value:function(e){return v.between(e.resolve(this.anchor),e.resolve(this.head))}}]),e}(),y=function(e){Object(i.a)(n,e);var t=Object(a.a)(n);function n(e){var r;Object(s.a)(this,n);var o=e.nodeAfter,i=e.node(0).resolve(e.pos+o.nodeSize);return(r=t.call(this,e,i)).node=o,r}return Object(l.a)(n,[{key:"map",value:function(e,t){var r=t.mapResult(this.anchor),o=r.deleted,i=r.pos,a=e.resolve(i);return o?f.near(a):new n(a)}},{key:"content",value:function(){return new u.Slice(u.Fragment.from(this.node),0,0)}},{key:"eq",value:function(e){return e instanceof n&&e.anchor==this.anchor}},{key:"toJSON",value:function(){return{type:"node",anchor:this.anchor}}},{key:"getBookmark",value:function(){return new b(this.anchor)}}],[{key:"fromJSON",value:function(e,t){if("number"!=typeof t.anchor)throw new RangeError("Invalid input for NodeSelection.fromJSON");return new n(e.resolve(t.anchor))}},{key:"create",value:function(e,t){return new n(e.resolve(t))}},{key:"isSelectable",value:function(e){return!e.isText&&!1!==e.type.spec.selectable}}]),n}(f);y.prototype.visible=!1,f.jsonID("node",y);var b=function(){function e(t){Object(s.a)(this,e),this.anchor=t}return Object(l.a)(e,[{key:"map",value:function(t){var n=t.mapResult(this.anchor),r=n.deleted,o=n.pos;return r?new g(o,o):new e(o)}},{key:"resolve",value:function(e){var t=e.resolve(this.anchor),n=t.nodeAfter;return n&&y.isSelectable(n)?new y(t):f.near(t)}}]),e}(),w=function(e){Object(i.a)(n,e);var t=Object(a.a)(n);function n(e){return Object(s.a)(this,n),t.call(this,e.resolve(0),e.resolve(e.content.size))}return Object(l.a)(n,[{key:"replace",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.Slice.empty;if(t==u.Slice.empty){e.delete(0,e.doc.content.size);var i=f.atStart(e.doc);i.eq(e.selection)||e.setSelection(i)}else Object(r.a)(Object(o.a)(n.prototype),"replace",this).call(this,e,t)}},{key:"toJSON",value:function(){return{type:"all"}}},{key:"map",value:function(e){return new n(e)}},{key:"eq",value:function(e){return e instanceof n}},{key:"getBookmark",value:function(){return k}}],[{key:"fromJSON",value:function(e){return new n(e)}}]),n}(f);f.jsonID("all",w);var k={map:function(){return this},resolve:function(e){return new w(e)}};function x(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(t.inlineContent)return v.create(e,n);for(var a=r-(o>0?0:1);o>0?a<t.childCount:a>=0;a+=o){var s=t.child(a);if(s.isAtom){if(!i&&y.isSelectable(s))return y.create(e,n-(o<0?s.nodeSize:0))}else{var l=x(e,s,n+o,o<0?s.childCount:0,o,i);if(l)return l}n+=s.nodeSize*o}return null}function O(e,t,n){var r=e.steps.length-1;if(!(r<t)){var o,i=e.steps[r];if(i instanceof c.c||i instanceof c.b)e.mapping.maps[r].forEach((function(e,t,n,r){null==o&&(o=r)})),e.setSelection(f.near(e.doc.resolve(o),n))}}var S=function(e){Object(i.a)(n,e);var t=Object(a.a)(n);function n(e){var r;return Object(s.a)(this,n),(r=t.call(this,e.doc)).curSelectionFor=0,r.updated=0,r.meta=Object.create(null),r.time=Date.now(),r.curSelection=e.selection,r.storedMarks=e.storedMarks,r}return Object(l.a)(n,[{key:"selection",get:function(){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}},{key:"setSelection",value:function(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=-3&(1|this.updated),this.storedMarks=null,this}},{key:"selectionSet",get:function(){return(1&this.updated)>0}},{key:"setStoredMarks",value:function(e){return this.storedMarks=e,this.updated|=2,this}},{key:"ensureMarks",value:function(e){return u.Mark.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}},{key:"addStoredMark",value:function(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}},{key:"removeStoredMark",value:function(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}},{key:"storedMarksSet",get:function(){return(2&this.updated)>0}},{key:"addStep",value:function(e,t){Object(r.a)(Object(o.a)(n.prototype),"addStep",this).call(this,e,t),this.updated=-3&this.updated,this.storedMarks=null}},{key:"setTime",value:function(e){return this.time=e,this}},{key:"replaceSelection",value:function(e){return this.selection.replace(this,e),this}},{key:"replaceSelectionWith",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.selection;return t&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||u.Mark.none))),n.replaceWith(this,e),this}},{key:"deleteSelection",value:function(){return this.selection.replace(this),this}},{key:"insertText",value:function(e,t,n){var r=this.doc.type.schema;if(null==t)return e?this.replaceSelectionWith(r.text(e),!0):this.deleteSelection();if(null==n&&(n=t),n=null==n?t:n,!e)return this.deleteRange(t,n);var o=this.storedMarks;if(!o){var i=this.doc.resolve(t);o=n==t?i.marks():i.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,r.text(e,o)),this.selection.empty||this.setSelection(f.near(this.selection.$to)),this}},{key:"setMeta",value:function(e,t){return this.meta["string"==typeof e?e:e.key]=t,this}},{key:"getMeta",value:function(e){return this.meta["string"==typeof e?e:e.key]}},{key:"isGeneric",get:function(){for(var e in this.meta)return!1;return!0}},{key:"scrollIntoView",value:function(){return this.updated|=4,this}},{key:"scrolledIntoView",get:function(){return(4&this.updated)>0}}]),n}(c.e);function C(e,t){return t&&e?e.bind(t):e}var j=Object(l.a)((function e(t,n,r){Object(s.a)(this,e),this.name=t,this.init=C(n.init,r),this.apply=C(n.apply,r)})),D=[new j("doc",{init:function(e){return e.doc||e.schema.topNodeType.createAndFill()},apply:function(e){return e.doc}}),new j("selection",{init:function(e,t){return e.selection||f.atStart(t.doc)},apply:function(e){return e.selection}}),new j("storedMarks",{init:function(e){return e.storedMarks||null},apply:function(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new j("scrollToSelection",{init:function(){return 0},apply:function(e,t){return e.scrolledIntoView?t+1:t}})],A=Object(l.a)((function e(t,n){var r=this;Object(s.a)(this,e),this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=D.slice(),n&&n.forEach((function(e){if(r.pluginsByKey[e.key])throw new RangeError("Adding different instances of a keyed plugin ("+e.key+")");r.plugins.push(e),r.pluginsByKey[e.key]=e,e.spec.state&&r.fields.push(new j(e.key,e.spec.state,e))}))})),E=function(){function e(t){Object(s.a)(this,e),this.config=t}return Object(l.a)(e,[{key:"schema",get:function(){return this.config.schema}},{key:"plugins",get:function(){return this.config.plugins}},{key:"apply",value:function(e){return this.applyTransaction(e).state}},{key:"filterTransaction",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=0;n<this.config.plugins.length;n++)if(n!=t){var r=this.config.plugins[n];if(r.spec.filterTransaction&&!r.spec.filterTransaction.call(r,e,this))return!1}return!0}},{key:"applyTransaction",value:function(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};for(var t=[e],n=this.applyInner(e),r=null;;){for(var o=!1,i=0;i<this.config.plugins.length;i++){var a=this.config.plugins[i];if(a.spec.appendTransaction){var s=r?r[i].n:0,l=r?r[i].state:this,u=s<t.length&&a.spec.appendTransaction.call(a,s?t.slice(s):t,l,n);if(u&&n.filterTransaction(u,i)){if(u.setMeta("appendedTransaction",e),!r){r=[];for(var c=0;c<this.config.plugins.length;c++)r.push(c<i?{state:n,n:t.length}:{state:this,n:0})}t.push(u),n=n.applyInner(u),o=!0}r&&(r[i]={state:n,n:t.length})}}if(!o)return{state:n,transactions:t}}}},{key:"applyInner",value:function(t){if(!t.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");for(var n=new e(this.config),r=this.config.fields,o=0;o<r.length;o++){var i=r[o];n[i.name]=i.apply(t,this[i.name],this,n)}return n}},{key:"tr",get:function(){return new S(this)}},{key:"reconfigure",value:function(t){for(var n=new A(this.schema,t.plugins),r=n.fields,o=new e(n),i=0;i<r.length;i++){var a=r[i].name;o[a]=this.hasOwnProperty(a)?this[a]:r[i].init(t,o)}return o}},{key:"toJSON",value:function(e){var t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map((function(e){return e.toJSON()}))),e&&"object"==typeof e)for(var n in e){if("doc"==n||"selection"==n)throw new RangeError("The JSON fields `doc` and `selection` are reserved");var r=e[n],o=r.spec.state;o&&o.toJSON&&(t[n]=o.toJSON.call(r,this[r.key]))}return t}}],[{key:"create",value:function(t){for(var n=new A(t.doc?t.doc.type.schema:t.schema,t.plugins),r=new e(n),o=0;o<n.fields.length;o++)r[n.fields[o].name]=n.fields[o].init(t,r);return r}},{key:"fromJSON",value:function(t,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");var o=new A(t.schema,t.plugins),i=new e(o);return o.fields.forEach((function(e){if("doc"==e.name)i.doc=u.Node.fromJSON(t.schema,n.doc);else if("selection"==e.name)i.selection=f.fromJSON(i.doc,n.selection);else if("storedMarks"==e.name)n.storedMarks&&(i.storedMarks=n.storedMarks.map(t.schema.markFromJSON));else{if(r)for(var o in r){var a=r[o],s=a.spec.state;if(a.key==e.name&&s&&s.fromJSON&&Object.prototype.hasOwnProperty.call(n,o))return void(i[e.name]=s.fromJSON.call(a,t,n[o],i))}i[e.name]=e.init(t,i)}})),i}}]),e}();function M(e,t,n){for(var r in e){var o=e[r];o instanceof Function?o=o.bind(t):"handleDOMEvents"==r&&(o=M(o,t,{})),n[r]=o}return n}var T=function(){function e(t){Object(s.a)(this,e),this.spec=t,this.props={},t.props&&M(t.props,this,this.props),this.key=t.key?t.key.key:N("plugin")}return Object(l.a)(e,[{key:"getState",value:function(e){return e[this.key]}}]),e}(),L=Object.create(null);function N(e){return e in L?e+"$"+ ++L[e]:(L[e]=0,e+"$")}var P=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"key";Object(s.a)(this,e),this.key=N(t)}return Object(l.a)(e,[{key:"get",value:function(e){return e.config.pluginsByKey[this.key]}},{key:"getState",value:function(e){return e[this.key]}}]),e}()},function(e,t,n){"use strict";n.r(t),n.d(t,"ContentMatch",(function(){return I})),n.d(t,"DOMParser",(function(){return oe})),n.d(t,"DOMSerializer",(function(){return he})),n.d(t,"Fragment",(function(){return h})),n.d(t,"Mark",(function(){return y})),n.d(t,"MarkType",(function(){return te})),n.d(t,"Node",(function(){return V})),n.d(t,"NodeRange",(function(){return H})),n.d(t,"NodeType",(function(){return Q})),n.d(t,"ReplaceError",(function(){return b})),n.d(t,"ResolvedPos",(function(){return L})),n.d(t,"Schema",(function(){return ne})),n.d(t,"Slice",(function(){return w}));var r=n(13),o=n(12),i=n(10),a=n(11),s=n(47),l=n(4),u=n(5);function c(e){this.content=e}c.prototype={constructor:c,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-1==t?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,o=r.find(e),i=r.content.slice();return-1==o?i.push(n||e,t):(i[o+1]=t,n&&(i[o]=n)),new c(i)},remove:function(e){var t=this.find(e);if(-1==t)return this;var n=this.content.slice();return n.splice(t,2),new c(n)},addToStart:function(e,t){return new c([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new c(n)},addBefore:function(e,t,n){var r=this.remove(t),o=r.content.slice(),i=r.find(e);return o.splice(-1==i?o.length:i,0,t,n),new c(o)},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=c.from(e)).size?new c(e.content.concat(this.subtract(e).content)):this},append:function(e){return(e=c.from(e)).size?new c(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=c.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},get size(){return this.content.length>>1}},c.from=function(e){if(e instanceof c)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new c(t)};var d=c;function f(e,t,n){for(var r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;var o=e.child(r),i=t.child(r);if(o!=i){if(!o.sameMarkup(i))return n;if(o.isText&&o.text!=i.text){for(var a=0;o.text[a]==i.text[a];a++)n++;return n}if(o.content.size||i.content.size){var s=f(o.content,i.content,n+1);if(null!=s)return s}n+=o.nodeSize}else n+=o.nodeSize}}function p(e,t,n,r){for(var o=e.childCount,i=t.childCount;;){if(0==o||0==i)return o==i?null:{a:n,b:r};var a=e.child(--o),s=t.child(--i),l=a.nodeSize;if(a!=s){if(!a.sameMarkup(s))return{a:n,b:r};if(a.isText&&a.text!=s.text){for(var u=0,c=Math.min(a.text.length,s.text.length);u<c&&a.text[a.text.length-u-1]==s.text[s.text.length-u-1];)u++,n--,r--;return{a:n,b:r}}if(a.content.size||s.content.size){var d=p(a.content,s.content,n-1,r-1);if(d)return d}n-=l,r-=l}else n-=l,r-=l}}var h=function(){function e(t,n){if(Object(l.a)(this,e),this.content=t,this.size=n||0,null==n)for(var r=0;r<t.length;r++)this.size+=t[r].nodeSize}return Object(u.a)(e,[{key:"nodesBetween",value:function(e,t,n){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4?arguments[4]:void 0,i=0,a=0;a<t;i++){var s=this.content[i],l=a+s.nodeSize;if(l>e&&!1!==n(s,r+a,o||null,i)&&s.content.size){var u=a+1;s.nodesBetween(Math.max(0,e-u),Math.min(s.content.size,t-u),n,r+u)}a=l}}},{key:"descendants",value:function(e){this.nodesBetween(0,this.size,e)}},{key:"textBetween",value:function(e,t,n,r){var o="",i=!0;return this.nodesBetween(e,t,(function(a,s){a.isText?(o+=a.text.slice(Math.max(e,s)-s,t-s),i=!n):a.isLeaf?(r?o+="function"===typeof r?r(a):r:a.type.spec.leafText&&(o+=a.type.spec.leafText(a)),i=!n):!i&&a.isBlock&&(o+=n,i=!0)}),0),o}},{key:"append",value:function(t){if(!t.size)return this;if(!this.size)return t;var n=this.lastChild,r=t.firstChild,o=this.content.slice(),i=0;for(n.isText&&n.sameMarkup(r)&&(o[o.length-1]=n.withText(n.text+r.text),i=1);i<t.content.length;i++)o.push(t.content[i]);return new e(o,this.size+t.size)}},{key:"cut",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.size;if(0==t&&n==this.size)return this;var r=[],o=0;if(n>t)for(var i=0,a=0;a<n;i++){var s=this.content[i],l=a+s.nodeSize;l>t&&((a<t||l>n)&&(s=s.isText?s.cut(Math.max(0,t-a),Math.min(s.text.length,n-a)):s.cut(Math.max(0,t-a-1),Math.min(s.content.size,n-a-1))),r.push(s),o+=s.nodeSize),a=l}return new e(r,o)}},{key:"cutByIndex",value:function(t,n){return t==n?e.empty:0==t&&n==this.content.length?this:new e(this.content.slice(t,n))}},{key:"replaceChild",value:function(t,n){var r=this.content[t];if(r==n)return this;var o=this.content.slice(),i=this.size+n.nodeSize-r.nodeSize;return o[t]=n,new e(o,i)}},{key:"addToStart",value:function(t){return new e([t].concat(this.content),this.size+t.nodeSize)}},{key:"addToEnd",value:function(t){return new e(this.content.concat(t),this.size+t.nodeSize)}},{key:"eq",value:function(e){if(this.content.length!=e.content.length)return!1;for(var t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}},{key:"firstChild",get:function(){return this.content.length?this.content[0]:null}},{key:"lastChild",get:function(){return this.content.length?this.content[this.content.length-1]:null}},{key:"childCount",get:function(){return this.content.length}},{key:"child",value:function(e){var t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}},{key:"maybeChild",value:function(e){return this.content[e]||null}},{key:"forEach",value:function(e){for(var t=0,n=0;t<this.content.length;t++){var r=this.content[t];e(r,n,t),n+=r.nodeSize}}},{key:"findDiffStart",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return f(this,e,t)}},{key:"findDiffEnd",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.size,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.size;return p(this,e,t,n)}},{key:"findIndex",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;if(0==e)return v(0,e);if(e==this.size)return v(this.content.length,e);if(e>this.size||e<0)throw new RangeError("Position ".concat(e," outside of fragment (").concat(this,")"));for(var n=0,r=0;;n++){var o=this.child(n),i=r+o.nodeSize;if(i>=e)return i==e||t>0?v(n+1,i):v(n,r);r=i}}},{key:"toString",value:function(){return"<"+this.toStringInner()+">"}},{key:"toStringInner",value:function(){return this.content.join(", ")}},{key:"toJSON",value:function(){return this.content.length?this.content.map((function(e){return e.toJSON()})):null}}],[{key:"fromJSON",value:function(t,n){if(!n)return e.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new e(n.map(t.nodeFromJSON))}},{key:"fromArray",value:function(t){if(!t.length)return e.empty;for(var n,r=0,o=0;o<t.length;o++){var i=t[o];r+=i.nodeSize,o&&i.isText&&t[o-1].sameMarkup(i)?(n||(n=t.slice(0,o)),n[n.length-1]=i.withText(n[n.length-1].text+i.text)):n&&n.push(i)}return new e(n||t,r)}},{key:"from",value:function(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 new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}]),e}();h.empty=new h([],0);var m={index:0,offset:0};function v(e,t){return m.index=e,m.offset=t,m}function g(e,t){if(e===t)return!0;if(!e||"object"!=typeof e||!t||"object"!=typeof t)return!1;var n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(var r=0;r<e.length;r++)if(!g(e[r],t[r]))return!1}else{for(var o in e)if(!(o in t)||!g(e[o],t[o]))return!1;for(var i in t)if(!(i in e))return!1}return!0}var y=function(){function e(t,n){Object(l.a)(this,e),this.type=t,this.attrs=n}return Object(u.a)(e,[{key:"addToSet",value:function(e){for(var t,n=!1,r=0;r<e.length;r++){var o=e[r];if(this.eq(o))return e;if(this.type.excludes(o.type))t||(t=e.slice(0,r));else{if(o.type.excludes(this.type))return e;!n&&o.type.rank>this.type.rank&&(t||(t=e.slice(0,r)),t.push(this),n=!0),t&&t.push(o)}}return t||(t=e.slice()),n||t.push(this),t}},{key:"removeFromSet",value:function(e){for(var t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}},{key:"isInSet",value:function(e){for(var t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}},{key:"eq",value:function(e){return this==e||this.type==e.type&&g(this.attrs,e.attrs)}},{key:"toJSON",value:function(){var e={type:this.type.name};for(var t in this.attrs){e.attrs=this.attrs;break}return e}}],[{key:"fromJSON",value:function(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");var n=e.marks[t.type];if(!n)throw new RangeError("There is no mark type ".concat(t.type," in this schema"));return n.create(t.attrs)}},{key:"sameSet",value:function(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0}},{key:"setFrom",value:function(t){if(!t||Array.isArray(t)&&0==t.length)return e.none;if(t instanceof e)return[t];var n=t.slice();return n.sort((function(e,t){return e.type.rank-t.type.rank})),n}}]),e}();y.none=[];var b=function(e){Object(i.a)(n,e);var t=Object(a.a)(n);function n(){return Object(l.a)(this,n),t.apply(this,arguments)}return Object(u.a)(n)}(Object(s.a)(Error)),w=function(){function e(t,n,r){Object(l.a)(this,e),this.content=t,this.openStart=n,this.openEnd=r}return Object(u.a)(e,[{key:"size",get:function(){return this.content.size-this.openStart-this.openEnd}},{key:"insertAt",value:function(t,n){var r=x(this.content,t+this.openStart,n);return r&&new e(r,this.openStart,this.openEnd)}},{key:"removeBetween",value:function(t,n){return new e(k(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}},{key:"eq",value:function(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}},{key:"toString",value:function(){return this.content+"("+this.openStart+","+this.openEnd+")"}},{key:"toJSON",value:function(){if(!this.content.size)return null;var e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}}],[{key:"fromJSON",value:function(t,n){if(!n)return e.empty;var r=n.openStart||0,o=n.openEnd||0;if("number"!=typeof r||"number"!=typeof o)throw new RangeError("Invalid input for Slice.fromJSON");return new e(h.fromJSON(t,n.content),r,o)}},{key:"maxOpen",value:function(t){for(var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=0,o=0,i=t.firstChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.firstChild)r++;for(var a=t.lastChild;a&&!a.isLeaf&&(n||!a.type.spec.isolating);a=a.lastChild)o++;return new e(t,r,o)}}]),e}();function k(e,t,n){var r=e.findIndex(t),o=r.index,i=r.offset,a=e.maybeChild(o),s=e.findIndex(n),l=s.index,u=s.offset;if(i==t||a.isText){if(u!=n&&!e.child(l).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(o!=l)throw new RangeError("Removing non-flat range");return e.replaceChild(o,a.copy(k(a.content,t-i-1,n-i-1)))}function x(e,t,n,r){var o=e.findIndex(t),i=o.index,a=o.offset,s=e.maybeChild(i);if(a==t||s.isText)return r&&!r.canReplace(i,i,n)?null:e.cut(0,t).append(n).append(e.cut(t));var l=x(s.content,t-a-1,n);return l&&e.replaceChild(i,s.copy(l))}function O(e,t,n){if(n.openStart>e.depth)throw new b("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new b("Inconsistent open depths");return S(e,t,n,0)}function S(e,t,n,r){var o=e.index(r),i=e.node(r);if(o==t.index(r)&&r<e.depth-n.openStart){var a=S(e,t,n,r+1);return i.copy(i.content.replaceChild(o,a))}if(n.content.size){if(n.openStart||n.openEnd||e.depth!=r||t.depth!=r){var s=function(e,t){for(var n=t.depth-e.openStart,r=t.node(n).copy(e.content),o=n-1;o>=0;o--)r=t.node(o).copy(h.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}(n,e);return E(i,M(e,s.start,s.end,t,r))}var l=e.parent,u=l.content;return E(l,u.cut(0,e.parentOffset).append(n.content).append(u.cut(t.parentOffset)))}return E(i,T(e,t,r))}function C(e,t){if(!t.type.compatibleContent(e.type))throw new b("Cannot join "+t.type.name+" onto "+e.type.name)}function j(e,t,n){var r=e.node(n);return C(r,t.node(n)),r}function D(e,t){var 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 A(e,t,n,r){var o=(t||e).node(n),i=0,a=t?t.index(n):o.childCount;e&&(i=e.index(n),e.depth>n?i++:e.textOffset&&(D(e.nodeAfter,r),i++));for(var s=i;s<a;s++)D(o.child(s),r);t&&t.depth==n&&t.textOffset&&D(t.nodeBefore,r)}function E(e,t){if(!e.type.validContent(t))throw new b("Invalid content for node "+e.type.name);return e.copy(t)}function M(e,t,n,r,o){var i=e.depth>o&&j(e,t,o+1),a=r.depth>o&&j(n,r,o+1),s=[];return A(null,e,o,s),i&&a&&t.index(o)==n.index(o)?(C(i,a),D(E(i,M(e,t,n,r,o+1)),s)):(i&&D(E(i,T(e,t,o+1)),s),A(t,n,o,s),a&&D(E(a,T(n,r,o+1)),s)),A(r,null,o,s),new h(s)}function T(e,t,n){var r=[];(A(null,e,n,r),e.depth>n)&&D(E(j(e,t,n+1),T(e,t,n+1)),r);return A(t,null,n,r),new h(r)}w.empty=new w(h.empty,0,0);var L=function(){function e(t,n,r){Object(l.a)(this,e),this.pos=t,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}return Object(u.a)(e,[{key:"resolveDepth",value:function(e){return null==e?this.depth:e<0?this.depth+e:e}},{key:"parent",get:function(){return this.node(this.depth)}},{key:"doc",get:function(){return this.node(0)}},{key:"node",value:function(e){return this.path[3*this.resolveDepth(e)]}},{key:"index",value:function(e){return this.path[3*this.resolveDepth(e)+1]}},{key:"indexAfter",value:function(e){return e=this.resolveDepth(e),this.index(e)+(e!=this.depth||this.textOffset?1:0)}},{key:"start",value:function(e){return 0==(e=this.resolveDepth(e))?0:this.path[3*e-1]+1}},{key:"end",value:function(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}},{key:"before",value:function(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]}},{key:"after",value:function(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]+this.path[3*e].nodeSize}},{key:"textOffset",get:function(){return this.pos-this.path[this.path.length-1]}},{key:"nodeAfter",get:function(){var e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;var n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r}},{key:"nodeBefore",get:function(){var e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):0==e?null:this.parent.child(e-1)}},{key:"posAtIndex",value:function(e,t){t=this.resolveDepth(t);for(var n=this.path[3*t],r=0==t?0:this.path[3*t-1]+1,o=0;o<e;o++)r+=n.child(o).nodeSize;return r}},{key:"marks",value:function(){var e=this.parent,t=this.index();if(0==e.content.size)return y.none;if(this.textOffset)return e.child(t).marks;var n=e.maybeChild(t-1),r=e.maybeChild(t);if(!n){var o=n;n=r,r=o}for(var i=n.marks,a=0;a<i.length;a++)!1!==i[a].type.spec.inclusive||r&&i[a].isInSet(r.marks)||(i=i[a--].removeFromSet(i));return i}},{key:"marksAcross",value:function(e){var t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;for(var n=t.marks,r=e.parent.maybeChild(e.index()),o=0;o<n.length;o++)!1!==n[o].type.spec.inclusive||r&&n[o].isInSet(r.marks)||(n=n[o--].removeFromSet(n));return n}},{key:"sharedDepth",value:function(e){for(var t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}},{key:"blockRange",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this,t=arguments.length>1?arguments[1]:void 0;if(e.pos<this.pos)return e.blockRange(this);for(var 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 H(this,e,n);return null}},{key:"sameParent",value:function(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}},{key:"max",value:function(e){return e.pos>this.pos?e:this}},{key:"min",value:function(e){return e.pos<this.pos?e:this}},{key:"toString",value:function(){for(var e="",t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}}],[{key:"resolve",value:function(t,n){if(!(n>=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");for(var r=[],o=0,i=n,a=t;;){var s=a.content.findIndex(i),l=s.index,u=s.offset,c=i-u;if(r.push(a,l,o+u),!c)break;if((a=a.child(l)).isText)break;i=c-1,o+=u+1}return new e(n,r,i)}},{key:"resolveCached",value:function(t,n){for(var r=0;r<N.length;r++){var o=N[r];if(o.pos==n&&o.doc==t)return o}var i=N[P]=e.resolve(t,n);return P=(P+1)%R,i}}]),e}(),N=[],P=0,R=12,H=function(){function e(t,n,r){Object(l.a)(this,e),this.$from=t,this.$to=n,this.depth=r}return Object(u.a)(e,[{key:"start",get:function(){return this.$from.before(this.depth+1)}},{key:"end",get:function(){return this.$to.after(this.depth+1)}},{key:"parent",get:function(){return this.$from.node(this.depth)}},{key:"startIndex",get:function(){return this.$from.index(this.depth)}},{key:"endIndex",get:function(){return this.$to.indexAfter(this.depth)}}]),e}(),F=Object.create(null),V=function(){function e(t,n,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:y.none;Object(l.a)(this,e),this.type=t,this.attrs=n,this.marks=o,this.content=r||h.empty}return Object(u.a)(e,[{key:"nodeSize",get:function(){return this.isLeaf?1:2+this.content.size}},{key:"childCount",get:function(){return this.content.childCount}},{key:"child",value:function(e){return this.content.child(e)}},{key:"maybeChild",value:function(e){return this.content.maybeChild(e)}},{key:"forEach",value:function(e){this.content.forEach(e)}},{key:"nodesBetween",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;this.content.nodesBetween(e,t,n,r,this)}},{key:"descendants",value:function(e){this.nodesBetween(0,this.content.size,e)}},{key:"textContent",get:function(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}},{key:"textBetween",value:function(e,t,n,r){return this.content.textBetween(e,t,n,r)}},{key:"firstChild",get:function(){return this.content.firstChild}},{key:"lastChild",get:function(){return this.content.lastChild}},{key:"eq",value:function(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}},{key:"sameMarkup",value:function(e){return this.hasMarkup(e.type,e.attrs,e.marks)}},{key:"hasMarkup",value:function(e,t,n){return this.type==e&&g(this.attrs,t||e.defaultAttrs||F)&&y.sameSet(this.marks,n||y.none)}},{key:"copy",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t==this.content?this:new e(this.type,this.attrs,t,this.marks)}},{key:"mark",value:function(t){return t==this.marks?this:new e(this.type,this.attrs,this.content,t)}},{key:"cut",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.content.size;return 0==e&&t==this.content.size?this:this.copy(this.content.cut(e,t))}},{key:"slice",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.content.size,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e==t)return w.empty;var r=this.resolve(e),o=this.resolve(t),i=n?0:r.sharedDepth(t),a=r.start(i),s=r.node(i),l=s.content.cut(r.pos-a,o.pos-a);return new w(l,r.depth-i,o.depth-i)}},{key:"replace",value:function(e,t,n){return O(this.resolve(e),this.resolve(t),n)}},{key:"nodeAt",value:function(e){for(var t=this;;){var n=t.content.findIndex(e),r=n.index,o=n.offset;if(!(t=t.maybeChild(r)))return null;if(o==e||t.isText)return t;e-=o+1}}},{key:"childAfter",value:function(e){var t=this.content.findIndex(e),n=t.index,r=t.offset;return{node:this.content.maybeChild(n),index:n,offset:r}}},{key:"childBefore",value:function(e){if(0==e)return{node:null,index:0,offset:0};var t=this.content.findIndex(e),n=t.index,r=t.offset;if(r<e)return{node:this.content.child(n),index:n,offset:r};var o=this.content.child(n-1);return{node:o,index:n-1,offset:r-o.nodeSize}}},{key:"resolve",value:function(e){return L.resolveCached(this,e)}},{key:"resolveNoCache",value:function(e){return L.resolve(this,e)}},{key:"rangeHasMark",value:function(e,t,n){var r=!1;return t>e&&this.nodesBetween(e,t,(function(e){return n.isInSet(e.marks)&&(r=!0),!r})),r}},{key:"isBlock",get:function(){return this.type.isBlock}},{key:"isTextblock",get:function(){return this.type.isTextblock}},{key:"inlineContent",get:function(){return this.type.inlineContent}},{key:"isInline",get:function(){return this.type.isInline}},{key:"isText",get:function(){return this.type.isText}},{key:"isLeaf",get:function(){return this.type.isLeaf}},{key:"isAtom",get:function(){return this.type.isAtom}},{key:"toString",value:function(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);var e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),B(this.marks,e)}},{key:"contentMatchAt",value:function(e){var t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}},{key:"canReplace",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h.empty,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:n.childCount,i=this.contentMatchAt(e).matchFragment(n,r,o),a=i&&i.matchFragment(this.content,t);if(!a||!a.validEnd)return!1;for(var s=r;s<o;s++)if(!this.type.allowsMarks(n.child(s).marks))return!1;return!0}},{key:"canReplaceWith",value:function(e,t,n,r){if(r&&!this.type.allowsMarks(r))return!1;var o=this.contentMatchAt(e).matchType(n),i=o&&o.matchFragment(this.content,t);return!!i&&i.validEnd}},{key:"canAppend",value:function(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}},{key:"check",value:function(){if(!this.type.validContent(this.content))throw new RangeError("Invalid content for node ".concat(this.type.name,": ").concat(this.content.toString().slice(0,50)));for(var e=y.none,t=0;t<this.marks.length;t++)e=this.marks[t].addToSet(e);if(!y.sameSet(e,this.marks))throw new RangeError("Invalid collection of marks for node ".concat(this.type.name,": ").concat(this.marks.map((function(e){return e.type.name}))));this.content.forEach((function(e){return e.check()}))}},{key:"toJSON",value:function(){var e={type:this.type.name};for(var 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((function(e){return e.toJSON()}))),e}}],[{key:"fromJSON",value:function(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");var n=null;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=t.marks.map(e.markFromJSON)}if("text"==t.type){if("string"!=typeof t.text)throw new RangeError("Invalid text node in JSON");return e.text(t.text,n)}var r=h.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,r,n)}}]),e}();V.prototype.text=void 0;var z=function(e){Object(i.a)(n,e);var t=Object(a.a)(n);function n(e,r,o,i){var a;if(Object(l.a)(this,n),a=t.call(this,e,r,null,i),!o)throw new RangeError("Empty text nodes are not allowed");return a.text=o,a}return Object(u.a)(n,[{key:"toString",value:function(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):B(this.marks,JSON.stringify(this.text))}},{key:"textContent",get:function(){return this.text}},{key:"textBetween",value:function(e,t){return this.text.slice(e,t)}},{key:"nodeSize",get:function(){return this.text.length}},{key:"mark",value:function(e){return e==this.marks?this:new n(this.type,this.attrs,this.text,e)}},{key:"withText",value:function(e){return e==this.text?this:new n(this.type,this.attrs,e,this.marks)}},{key:"cut",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.text.length;return 0==e&&t==this.text.length?this:this.withText(this.text.slice(e,t))}},{key:"eq",value:function(e){return this.sameMarkup(e)&&this.text==e.text}},{key:"toJSON",value:function(){var e=Object(r.a)(Object(o.a)(n.prototype),"toJSON",this).call(this);return e.text=this.text,e}}]),n}(V);function B(e,t){for(var n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}var I=function(){function e(t){Object(l.a)(this,e),this.validEnd=t,this.next=[],this.wrapCache=[]}return Object(u.a)(e,[{key:"matchType",value:function(e){for(var t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}},{key:"matchFragment",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.childCount,r=this,o=t;r&&o<n;o++)r=r.matchType(e.child(o).type);return r}},{key:"inlineContent",get:function(){return this.next.length&&this.next[0].type.isInline}},{key:"defaultType",get:function(){for(var e=0;e<this.next.length;e++){var t=this.next[e].type;if(!t.isText&&!t.hasRequiredAttrs())return t}return null}},{key:"compatible",value:function(e){for(var t=0;t<this.next.length;t++)for(var n=0;n<e.next.length;n++)if(this.next[t].type==e.next[n].type)return!0;return!1}},{key:"fillBefore",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=[this];function o(i,a){var s=i.matchFragment(e,n);if(s&&(!t||s.validEnd))return h.from(a.map((function(e){return e.createAndFill()})));for(var l=0;l<i.next.length;l++){var u=i.next[l],c=u.type,d=u.next;if(!c.isText&&!c.hasRequiredAttrs()&&-1==r.indexOf(d)){r.push(d);var f=o(d,a.concat(c));if(f)return f}}return null}return o(this,[])}},{key:"findWrapping",value:function(e){for(var t=0;t<this.wrapCache.length;t+=2)if(this.wrapCache[t]==e)return this.wrapCache[t+1];var n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}},{key:"computeWrapping",value:function(e){for(var t=Object.create(null),n=[{match:this,type:null,via:null}];n.length;){var r=n.shift(),o=r.match;if(o.matchType(e)){for(var i=[],a=r;a.type;a=a.via)i.push(a.type);return i.reverse()}for(var s=0;s<o.next.length;s++){var l=o.next[s],u=l.type,c=l.next;u.isLeaf||u.hasRequiredAttrs()||u.name in t||r.type&&!c.validEnd||(n.push({match:u.contentMatch,type:u,via:r}),t[u.name]=!0)}}return null}},{key:"edgeCount",get:function(){return this.next.length}},{key:"edge",value:function(e){if(e>=this.next.length)throw new RangeError("There's no ".concat(e,"th edge in this content match"));return this.next[e]}},{key:"toString",value:function(){var e=[];return function t(n){e.push(n);for(var r=0;r<n.next.length;r++)-1==e.indexOf(n.next[r].next)&&t(n.next[r].next)}(this),e.map((function(t,n){for(var r=n+(t.validEnd?"*":" ")+" ",o=0;o<t.next.length;o++)r+=(o?", ":"")+t.next[o].type.name+"->"+e.indexOf(t.next[o].next);return r})).join("\n")}}],[{key:"parse",value:function(t,n){var r=new _(t,n);if(null==r.next)return e.empty;var o=$(r);r.next&&r.err("Unexpected trailing text");var i=function(e){var t=Object.create(null);return n(J(e,0));function n(r){var o=[];r.forEach((function(t){e[t].forEach((function(t){var n=t.term,r=t.to;if(n){for(var i,a=0;a<o.length;a++)o[a][0]==n&&(i=o[a][1]);J(e,r).forEach((function(e){i||o.push([n,i=[]]),-1==i.indexOf(e)&&i.push(e)}))}}))}));for(var i=t[r.join(",")]=new I(r.indexOf(e.length-1)>-1),a=0;a<o.length;a++){var s=o[a][1].sort(G);i.next.push({type:o[a][0],next:t[s.join(",")]||n(s)})}return i}}(function(e){var t=[[]];return o(i(e,0),n()),t;function n(){return t.push([])-1}function r(e,n,r){var o={term:r,to:n};return t[e].push(o),o}function o(e,t){e.forEach((function(e){return e.to=t}))}function i(e,t){if("choice"==e.type)return e.exprs.reduce((function(e,n){return e.concat(i(n,t))}),[]);if("seq"!=e.type){if("star"==e.type){var a=n();return r(t,a),o(i(e.expr,a),a),[r(a)]}if("plus"==e.type){var s=n();return o(i(e.expr,t),s),o(i(e.expr,s),s),[r(s)]}if("opt"==e.type)return[r(t)].concat(i(e.expr,t));if("range"==e.type){for(var l=t,u=0;u<e.min;u++){var c=n();o(i(e.expr,l),c),l=c}if(-1==e.max)o(i(e.expr,l),l);else for(var d=e.min;d<e.max;d++){var f=n();r(l,f),o(i(e.expr,l),f),l=f}return[r(l)]}if("name"==e.type)return[r(t,void 0,e.value)];throw new Error("Unknown expr type")}for(var p=0;;p++){var h=i(e.exprs[p],t);if(p==e.exprs.length-1)return h;o(h,t=n())}}}(o));return function(e,t){for(var n=0,r=[e];n<r.length;n++){for(var o=r[n],i=!o.validEnd,a=[],s=0;s<o.next.length;s++){var l=o.next[s],u=l.type,c=l.next;a.push(u.name),!i||u.isText||u.hasRequiredAttrs()||(i=!1),-1==r.indexOf(c)&&r.push(c)}i&&t.err("Only non-generatable nodes ("+a.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(i,r),i}}]),e}();I.empty=new I(!0);var _=function(){function e(t,n){Object(l.a)(this,e),this.string=t,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()}return Object(u.a)(e,[{key:"next",get:function(){return this.tokens[this.pos]}},{key:"eat",value:function(e){return this.next==e&&(this.pos++||!0)}},{key:"err",value:function(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}]),e}();function $(e){var t=[];do{t.push(q(e))}while(e.eat("|"));return 1==t.length?t[0]:{type:"choice",exprs:t}}function q(e){var t=[];do{t.push(W(e))}while(e.next&&")"!=e.next&&"|"!=e.next);return 1==t.length?t[0]:{type:"seq",exprs:t}}function W(e){for(var t=function(e){if(e.eat("(")){var t=$(e);return e.eat(")")||e.err("Missing closing paren"),t}if(!/\W/.test(e.next)){var n=function(e,t){var n=e.nodeTypes,r=n[t];if(r)return[r];var o=[];for(var i in n){var a=n[i];a.groups.indexOf(t)>-1&&o.push(a)}0==o.length&&e.err("No node type or group '"+t+"' found");return o}(e,e.next).map((function(t){return null==e.inline?e.inline=t.isInline:e.inline!=t.isInline&&e.err("Mixing inline and block content"),{type:"name",value:t}}));return e.pos++,1==n.length?n[0]:{type:"choice",exprs:n}}e.err("Unexpected token '"+e.next+"'")}(e);;)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("{"))break;t=K(e,t)}return t}function U(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");var t=Number(e.next);return e.pos++,t}function K(e,t){var n=U(e),r=n;return e.eat(",")&&(r="}"!=e.next?U(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function G(e,t){return t-e}function J(e,t){var n=[];return function t(r){var o=e[r];if(1==o.length&&!o[0].term)return t(o[0].to);n.push(r);for(var i=0;i<o.length;i++){var a=o[i],s=a.term,l=a.to;s||-1!=n.indexOf(l)||t(l)}}(t),n.sort(G)}function Y(e){var t=Object.create(null);for(var n in e){var r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function Z(e,t){var n=Object.create(null);for(var r in e){var o=t&&t[r];if(void 0===o){var i=e[r];if(!i.hasDefault)throw new RangeError("No value supplied for attribute "+r);o=i.default}n[r]=o}return n}function X(e){var t=Object.create(null);if(e)for(var n in e)t[n]=new ee(e[n]);return t}var Q=function(){function e(t,n,r){Object(l.a)(this,e),this.name=t,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=X(r.attrs),this.defaultAttrs=Y(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||"text"==t),this.isText="text"==t}return Object(u.a)(e,[{key:"isInline",get:function(){return!this.isBlock}},{key:"isTextblock",get:function(){return this.isBlock&&this.inlineContent}},{key:"isLeaf",get:function(){return this.contentMatch==I.empty}},{key:"isAtom",get:function(){return this.isLeaf||!!this.spec.atom}},{key:"whitespace",get:function(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}},{key:"hasRequiredAttrs",value:function(){for(var e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}},{key:"compatibleContent",value:function(e){return this==e||this.contentMatch.compatible(e.contentMatch)}},{key:"computeAttrs",value:function(e){return!e&&this.defaultAttrs?this.defaultAttrs:Z(this.attrs,e)}},{key:"create",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new V(this,this.computeAttrs(e),h.from(t),y.setFrom(n))}},{key:"createChecked",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;if(t=h.from(t),!this.validContent(t))throw new RangeError("Invalid content for node "+this.name);return new V(this,this.computeAttrs(e),t,y.setFrom(n))}},{key:"createAndFill",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;if(e=this.computeAttrs(e),(t=h.from(t)).size){var r=this.contentMatch.fillBefore(t);if(!r)return null;t=r.append(t)}var o=this.contentMatch.matchFragment(t),i=o&&o.fillBefore(h.empty,!0);return i?new V(this,e,t.append(i),y.setFrom(n)):null}},{key:"validContent",value:function(e){var t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(var n=0;n<e.childCount;n++)if(!this.allowsMarks(e.child(n).marks))return!1;return!0}},{key:"allowsMarkType",value:function(e){return null==this.markSet||this.markSet.indexOf(e)>-1}},{key:"allowsMarks",value:function(e){if(null==this.markSet)return!0;for(var t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}},{key:"allowedMarks",value:function(e){if(null==this.markSet)return e;for(var t,n=0;n<e.length;n++)this.allowsMarkType(e[n].type)?t&&t.push(e[n]):t||(t=e.slice(0,n));return t?t.length?t:y.none:e}}],[{key:"compile",value:function(t,n){var r=Object.create(null);t.forEach((function(t,o){return r[t]=new e(t,n,o)}));var o=n.spec.topNode||"doc";if(!r[o])throw new RangeError("Schema is missing its top node type ('"+o+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(var i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}}]),e}(),ee=function(){function e(t){Object(l.a)(this,e),this.hasDefault=Object.prototype.hasOwnProperty.call(t,"default"),this.default=t.default}return Object(u.a)(e,[{key:"isRequired",get:function(){return!this.hasDefault}}]),e}(),te=function(){function e(t,n,r,o){Object(l.a)(this,e),this.name=t,this.rank=n,this.schema=r,this.spec=o,this.attrs=X(o.attrs),this.excluded=null;var i=Y(this.attrs);this.instance=i?new y(this,i):null}return Object(u.a)(e,[{key:"create",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return!e&&this.instance?this.instance:new y(this,Z(this.attrs,e))}},{key:"removeFromSet",value:function(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}},{key:"isInSet",value:function(e){for(var t=0;t<e.length;t++)if(e[t].type==this)return e[t]}},{key:"excludes",value:function(e){return this.excluded.indexOf(e)>-1}}],[{key:"compile",value:function(t,n){var r=Object.create(null),o=0;return t.forEach((function(t,i){return r[t]=new e(t,o++,n,i)})),r}}]),e}(),ne=function(){function e(t){Object(l.a)(this,e),this.cached=Object.create(null),this.spec={nodes:d.from(t.nodes),marks:d.from(t.marks||{}),topNode:t.topNode},this.nodes=Q.compile(this.spec.nodes,this),this.marks=te.compile(this.spec.marks,this);var n=Object.create(null);for(var r in this.nodes){if(r in this.marks)throw new RangeError(r+" can not be both a node and a mark");var o=this.nodes[r],i=o.spec.content||"",a=o.spec.marks;o.contentMatch=n[i]||(n[i]=I.parse(i,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.markSet="_"==a?null:a?re(this,a.split(" ")):""!=a&&o.inlineContent?null:[]}for(var s in this.marks){var u=this.marks[s],c=u.spec.excludes;u.excluded=null==c?[u]:""==c?[]:re(this,c.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}return Object(u.a)(e,[{key:"node",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;if("string"==typeof e)e=this.nodeType(e);else{if(!(e instanceof Q))throw new RangeError("Invalid node type: "+e);if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}return e.createChecked(t,n,r)}},{key:"text",value:function(e,t){var n=this.nodes.text;return new z(n,n.defaultAttrs,e,y.setFrom(t))}},{key:"mark",value:function(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)}},{key:"nodeFromJSON",value:function(e){return V.fromJSON(this,e)}},{key:"markFromJSON",value:function(e){return y.fromJSON(this,e)}},{key:"nodeType",value:function(e){var t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}]),e}();function re(e,t){for(var n=[],r=0;r<t.length;r++){var o=t[r],i=e.marks[o],a=i;if(i)n.push(i);else for(var s in e.marks){var l=e.marks[s];("_"==o||l.spec.group&&l.spec.group.split(" ").indexOf(o)>-1)&&n.push(a=l)}if(!a)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}var oe=function(){function e(t,n){var r=this;Object(l.a)(this,e),this.schema=t,this.rules=n,this.tags=[],this.styles=[],n.forEach((function(e){e.tag?r.tags.push(e):e.style&&r.styles.push(e)})),this.normalizeLists=!this.tags.some((function(e){if(!/^(ul|ol)\b/.test(e.tag)||!e.node)return!1;var n=t.nodes[e.node];return n.contentMatch.matchType(n)}))}return Object(u.a)(e,[{key:"parse",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new ce(this,t,!1);return n.addAll(e,t.from,t.to),n.finish()}},{key:"parseSlice",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new ce(this,t,!0);return n.addAll(e,t.from,t.to),w.maxOpen(n.finish())}},{key:"matchTag",value:function(e,t,n){for(var r=n?this.tags.indexOf(n)+1:0;r<this.tags.length;r++){var o=this.tags[r];if(de(e,o.tag)&&(void 0===o.namespace||e.namespaceURI==o.namespace)&&(!o.context||t.matchesContext(o.context))){if(o.getAttrs){var i=o.getAttrs(e);if(!1===i)continue;o.attrs=i||void 0}return o}}}},{key:"matchStyle",value:function(e,t,n,r){for(var o=r?this.styles.indexOf(r)+1:0;o<this.styles.length;o++){var i=this.styles[o],a=i.style;if(!(0!=a.indexOf(e)||i.context&&!n.matchesContext(i.context)||a.length>e.length&&(61!=a.charCodeAt(e.length)||a.slice(e.length+1)!=t))){if(i.getAttrs){var s=i.getAttrs(t);if(!1===s)continue;i.attrs=s||void 0}return i}}}}],[{key:"schemaRules",value:function(e){var t=[];function n(e){for(var n=null==e.priority?50:e.priority,r=0;r<t.length;r++){var o=t[r];if((null==o.priority?50:o.priority)<n)break}t.splice(r,0,e)}var r=function(t){var r=e.marks[t].spec.parseDOM;r&&r.forEach((function(e){n(e=fe(e)),e.mark=t}))};for(var o in e.marks)r(o);var i=function(t){var r=e.nodes[t].spec.parseDOM;r&&r.forEach((function(e){n(e=fe(e)),e.node=t}))};for(var a in e.nodes)i(a);return t}},{key:"fromSchema",value:function(t){return t.cached.domParser||(t.cached.domParser=new e(t,e.schemaRules(t)))}}]),e}(),ie={address:!0,article:!0,aside:!0,blockquote:!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},ae={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},se={ol:!0,ul:!0};function le(e,t,n){return null!=t?(t?1:0)|("full"===t?2:0):e&&"pre"==e.whitespace?3:-5&n}var ue=function(){function e(t,n,r,o,i,a,s){Object(l.a)(this,e),this.type=t,this.attrs=n,this.marks=r,this.pendingMarks=o,this.solid=i,this.options=s,this.content=[],this.activeMarks=y.none,this.stashMarks=[],this.match=a||(4&s?null:t.contentMatch)}return Object(u.a)(e,[{key:"findWrapping",value:function(e){if(!this.match){if(!this.type)return[];var t=this.type.contentMatch.fillBefore(h.from(e));if(!t){var n,r=this.type.contentMatch;return(n=r.findWrapping(e.type))?(this.match=r,n):null}this.match=this.type.contentMatch.matchFragment(t)}return this.match.findWrapping(e.type)}},{key:"finish",value:function(e){if(!(1&this.options)){var t,n=this.content[this.content.length-1];if(n&&n.isText&&(t=/[ \t\r\n\u000c]+$/.exec(n.text))){var r=n;n.text.length==t[0].length?this.content.pop():this.content[this.content.length-1]=r.withText(r.text.slice(0,r.text.length-t[0].length))}}var o=h.from(this.content);return!e&&this.match&&(o=o.append(this.match.fillBefore(h.empty,!0))),this.type?this.type.create(this.attrs,o,this.marks):o}},{key:"popFromStashMark",value:function(e){for(var t=this.stashMarks.length-1;t>=0;t--)if(e.eq(this.stashMarks[t]))return this.stashMarks.splice(t,1)[0]}},{key:"applyPending",value:function(e){for(var t=0,n=this.pendingMarks;t<n.length;t++){var r=n[t];(this.type?this.type.allowsMarkType(r.type):pe(r.type,e))&&!r.isInSet(this.activeMarks)&&(this.activeMarks=r.addToSet(this.activeMarks),this.pendingMarks=r.removeFromSet(this.pendingMarks))}}},{key:"inlineContext",value:function(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!ie.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}]),e}(),ce=function(){function e(t,n,r){Object(l.a)(this,e),this.parser=t,this.options=n,this.isOpen=r,this.open=0;var o,i=n.topNode,a=le(null,n.preserveWhitespace,0)|(r?4:0);o=i?new ue(i.type,i.attrs,y.none,y.none,!0,n.topMatch||i.type.contentMatch,a):new ue(r?null:t.schema.topNodeType,null,y.none,y.none,!0,null,a),this.nodes=[o],this.find=n.findPositions,this.needsBlock=!1}return Object(u.a)(e,[{key:"top",get:function(){return this.nodes[this.open]}},{key:"addDOM",value:function(e){if(3==e.nodeType)this.addTextNode(e);else if(1==e.nodeType){var t=e.getAttribute("style"),n=t?this.readStyles(function(e){var t,n=/\s*([\w-]+)\s*:\s*([^;]+)/g,r=[];for(;t=n.exec(e);)r.push(t[1],t[2].trim());return r}(t)):null,r=this.top;if(null!=n)for(var o=0;o<n.length;o++)this.addPendingMark(n[o]);if(this.addElement(e),null!=n)for(var i=0;i<n.length;i++)this.removePendingMark(n[i],r)}}},{key:"addTextNode",value:function(e){var t=e.nodeValue,n=this.top;if(2&n.options||n.inlineContext(e)||/[^ \t\r\n\u000c]/.test(t)){if(1&n.options)t=2&n.options?t.replace(/\r\n?/g,"\n"):t.replace(/\r?\n|\r/g," ");else if(t=t.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(t)&&this.open==this.nodes.length-1){var r=n.content[n.content.length-1],o=e.previousSibling;(!r||o&&"BR"==o.nodeName||r.isText&&/[ \t\r\n\u000c]$/.test(r.text))&&(t=t.slice(1))}t&&this.insertNode(this.parser.schema.text(t)),this.findInText(e)}else this.findInside(e)}},{key:"addElement",value:function(e,t){var n,r=e.nodeName.toLowerCase();se.hasOwnProperty(r)&&this.parser.normalizeLists&&function(e){for(var t=e.firstChild,n=null;t;t=t.nextSibling){var r=1==t.nodeType?t.nodeName.toLowerCase():null;r&&se.hasOwnProperty(r)&&n?(n.appendChild(t),t=n):"li"==r?n=t:r&&(n=null)}}(e);var o=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(n=this.parser.matchTag(e,this,t));if(o?o.ignore:ae.hasOwnProperty(r))this.findInside(e),this.ignoreFallback(e);else if(!o||o.skip||o.closeParent){o&&o.closeParent?this.open=Math.max(0,this.open-1):o&&o.skip.nodeType&&(e=o.skip);var i,a=this.top,s=this.needsBlock;if(ie.hasOwnProperty(r))i=!0,a.type||(this.needsBlock=!0);else if(!e.firstChild)return void this.leafFallback(e);this.addAll(e),i&&this.sync(a),this.needsBlock=s}else this.addElementByRule(e,o,!1===o.consuming?n:void 0)}},{key:"leafFallback",value:function(e){"BR"==e.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode("\n"))}},{key:"ignoreFallback",value:function(e){"BR"!=e.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"))}},{key:"readStyles",value:function(e){var t=y.none;e:for(var n=0;n<e.length;n+=2)for(var r=void 0;;){var o=this.parser.matchStyle(e[n],e[n+1],this,r);if(!o)continue e;if(o.ignore)return null;if(t=this.parser.schema.marks[o.mark].create(o.attrs).addToSet(t),!1!==o.consuming)break;r=o}return t}},{key:"addElementByRule",value:function(e,t,n){var r,o,i,a=this;t.node?(o=this.parser.schema.nodes[t.node]).isLeaf?this.insertNode(o.create(t.attrs))||this.leafFallback(e):r=this.enter(o,t.attrs||null,t.preserveWhitespace):(i=this.parser.schema.marks[t.mark].create(t.attrs),this.addPendingMark(i));var s=this.top;if(o&&o.isLeaf)this.findInside(e);else if(n)this.addElement(e,n);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach((function(e){return a.insertNode(e)}));else{var l=e;"string"==typeof t.contentElement?l=e.querySelector(t.contentElement):"function"==typeof t.contentElement?l=t.contentElement(e):t.contentElement&&(l=t.contentElement),this.findAround(e,l,!0),this.addAll(l)}r&&this.sync(s)&&this.open--,i&&this.removePendingMark(i,s)}},{key:"addAll",value:function(e,t,n){for(var r=t||0,o=t?e.childNodes[t]:e.firstChild,i=null==n?null:e.childNodes[n];o!=i;o=o.nextSibling,++r)this.findAtPoint(e,r),this.addDOM(o);this.findAtPoint(e,r)}},{key:"findPlace",value:function(e){for(var t,n,r=this.open;r>=0;r--){var o=this.nodes[r],i=o.findWrapping(e);if(i&&(!t||t.length>i.length)&&(t=i,n=o,!i.length))break;if(o.solid)break}if(!t)return!1;this.sync(n);for(var a=0;a<t.length;a++)this.enterInner(t[a],null,!1);return!0}},{key:"insertNode",value:function(e){if(e.isInline&&this.needsBlock&&!this.top.type){var t=this.textblockFromContext();t&&this.enterInner(t)}if(this.findPlace(e)){this.closeExtra();var n=this.top;n.applyPending(e.type),n.match&&(n.match=n.match.matchType(e.type));for(var r=n.activeMarks,o=0;o<e.marks.length;o++)n.type&&!n.type.allowsMarkType(e.marks[o].type)||(r=e.marks[o].addToSet(r));return n.content.push(e.mark(r)),!0}return!1}},{key:"enter",value:function(e,t,n){var r=this.findPlace(e.create(t));return r&&this.enterInner(e,t,!0,n),r}},{key:"enterInner",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3?arguments[3]:void 0;this.closeExtra();var o=this.top;o.applyPending(e),o.match=o.match&&o.match.matchType(e);var i=le(e,r,o.options);4&o.options&&0==o.content.length&&(i|=4),this.nodes.push(new ue(e,t,o.activeMarks,o.pendingMarks,n,null,i)),this.open++}},{key:"closeExtra",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],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}}},{key:"finish",value:function(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}},{key:"sync",value:function(e){for(var t=this.open;t>=0;t--)if(this.nodes[t]==e)return this.open=t,!0;return!1}},{key:"currentPos",get:function(){this.closeExtra();for(var e=0,t=this.open;t>=0;t--){for(var n=this.nodes[t].content,r=n.length-1;r>=0;r--)e+=n[r].nodeSize;t&&e++}return e}},{key:"findAtPoint",value:function(e,t){if(this.find)for(var n=0;n<this.find.length;n++)this.find[n].node==e&&this.find[n].offset==t&&(this.find[n].pos=this.currentPos)}},{key:"findInside",value:function(e){if(this.find)for(var t=0;t<this.find.length;t++)null==this.find[t].pos&&1==e.nodeType&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}},{key:"findAround",value:function(e,t,n){if(e!=t&&this.find)for(var r=0;r<this.find.length;r++){if(null==this.find[r].pos&&1==e.nodeType&&e.contains(this.find[r].node))t.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}}},{key:"findInText",value:function(e){if(this.find)for(var 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))}},{key:"matchesContext",value:function(e){var t=this;if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);var n=e.split("/"),r=this.options.context,o=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(o?0:1);return function e(a,s){for(;a>=0;a--){var l=n[a];if(""==l){if(a==n.length-1||0==a)continue;for(;s>=i;s--)if(e(a-1,s))return!0;return!1}var u=s>0||0==s&&o?t.nodes[s].type:r&&s>=i?r.node(s-i).type:null;if(!u||u.name!=l&&-1==u.groups.indexOf(l))return!1;s--}return!0}(n.length-1,this.open)}},{key:"textblockFromContext",value:function(){var e=this.options.context;if(e)for(var t=e.depth;t>=0;t--){var n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(var r in this.parser.schema.nodes){var o=this.parser.schema.nodes[r];if(o.isTextblock&&o.defaultAttrs)return o}}},{key:"addPendingMark",value:function(e){var t=function(e,t){for(var n=0;n<t.length;n++)if(e.eq(t[n]))return t[n]}(e,this.top.pendingMarks);t&&this.top.stashMarks.push(t),this.top.pendingMarks=e.addToSet(this.top.pendingMarks)}},{key:"removePendingMark",value:function(e,t){for(var n=this.open;n>=0;n--){var r=this.nodes[n];if(r.pendingMarks.lastIndexOf(e)>-1)r.pendingMarks=e.removeFromSet(r.pendingMarks);else{r.activeMarks=e.removeFromSet(r.activeMarks);var o=r.popFromStashMark(e);o&&r.type&&r.type.allowsMarkType(o.type)&&(r.activeMarks=o.addToSet(r.activeMarks))}if(r==t)break}}}]),e}();function de(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function fe(e){var t={};for(var n in e)t[n]=e[n];return t}function pe(e,t){var n=t.schema.nodes,r=function(r){var o=n[r];if(!o.allowsMarkType(e))return"continue";var i=[];return function e(n){i.push(n);for(var r=0;r<n.edgeCount;r++){var o=n.edge(r),a=o.type,s=o.next;if(a==t)return!0;if(i.indexOf(s)<0&&e(s))return!0}}(o.contentMatch)?{v:!0}:void 0};for(var o in n){var i=r(o);if("continue"!==i&&"object"===typeof i)return i.v}}var he=function(){function e(t,n){Object(l.a)(this,e),this.nodes=t,this.marks=n}return Object(u.a)(e,[{key:"serializeFragment",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;r||(r=ve(n).createDocumentFragment());var o=r,i=[];return e.forEach((function(e){if(i.length||e.marks.length){for(var r=0,a=0;r<i.length&&a<e.marks.length;){var s=e.marks[a];if(t.marks[s.type.name]){if(!s.eq(i[r][0])||!1===s.type.spec.spanning)break;r++,a++}else a++}for(;r<i.length;)o=i.pop()[1];for(;a<e.marks.length;){var l=e.marks[a++],u=t.serializeMark(l,e.isInline,n);u&&(i.push([l,o]),o.appendChild(u.dom),o=u.contentDOM||u.dom)}}o.appendChild(t.serializeNodeInner(e,n))})),r}},{key:"serializeNodeInner",value:function(t,n){var r=e.renderSpec(ve(n),this.nodes[t.type.name](t)),o=r.dom,i=r.contentDOM;if(i){if(t.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(t.content,n,i)}return o}},{key:"serializeNode",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.serializeNodeInner(e,t),r=e.marks.length-1;r>=0;r--){var o=this.serializeMark(e.marks[r],e.isInline,t);o&&((o.contentDOM||o.dom).appendChild(n),n=o.dom)}return n}},{key:"serializeMark",value:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=this.marks[t.type.name];return o&&e.renderSpec(ve(r),o(t,n))}}],[{key:"renderSpec",value:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if("string"==typeof n)return{dom:t.createTextNode(n)};if(null!=n.nodeType)return{dom:n};if(n.dom&&null!=n.dom.nodeType)return n;var o,i=n[0],a=i.indexOf(" ");a>0&&(r=i.slice(0,a),i=i.slice(a+1));var s=r?t.createElementNS(r,i):t.createElement(i),l=n[1],u=1;if(l&&"object"==typeof l&&null==l.nodeType&&!Array.isArray(l))for(var c in u=2,l)if(null!=l[c]){var d=c.indexOf(" ");d>0?s.setAttributeNS(c.slice(0,d),c.slice(d+1),l[c]):s.setAttribute(c,l[c])}for(var f=u;f<n.length;f++){var p=n[f];if(0===p){if(f<n.length-1||f>u)throw new RangeError("Content hole must be the only child of its parent node");return{dom:s,contentDOM:s}}var h=e.renderSpec(t,p,r),m=h.dom,v=h.contentDOM;if(s.appendChild(m),v){if(o)throw new RangeError("Multiple content holes");o=v}}return{dom:s,contentDOM:o}}},{key:"fromSchema",value:function(t){return t.cached.domSerializer||(t.cached.domSerializer=new e(this.nodesFromSchema(t),this.marksFromSchema(t)))}},{key:"nodesFromSchema",value:function(e){var t=me(e.nodes);return t.text||(t.text=function(e){return e.text}),t}},{key:"marksFromSchema",value:function(e){return me(e.marks)}}]),e}();function me(e){var t={};for(var n in e){var r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function ve(e){return e.document||window.document}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}n.d(t,"a",(function(){return o}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(34);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(l){s=!0,o=l}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||Object(r.a)(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(17);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return p})),n.d(t,"b",(function(){return k})),n.d(t,"c",(function(){return w})),n.d(t,"d",(function(){return f})),n.d(t,"e",(function(){return Y})),n.d(t,"f",(function(){return N})),n.d(t,"g",(function(){return T})),n.d(t,"h",(function(){return F})),n.d(t,"i",(function(){return C})),n.d(t,"j",(function(){return R})),n.d(t,"k",(function(){return S})),n.d(t,"l",(function(){return V}));var r=n(47),o=n(10),i=n(11),a=n(4),s=n(5),l=n(3),u=Math.pow(2,16);function c(e){return 65535&e}var d=function(){function e(t,n,r){Object(a.a)(this,e),this.pos=t,this.delInfo=n,this.recover=r}return Object(s.a)(e,[{key:"deleted",get:function(){return(8&this.delInfo)>0}},{key:"deletedBefore",get:function(){return(5&this.delInfo)>0}},{key:"deletedAfter",get:function(){return(6&this.delInfo)>0}},{key:"deletedAcross",get:function(){return(4&this.delInfo)>0}}]),e}(),f=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(Object(a.a)(this,e),this.ranges=t,this.inverted=n,!t.length&&e.empty)return e.empty}return Object(s.a)(e,[{key:"recover",value:function(e){var t=0,n=c(e);if(!this.inverted)for(var r=0;r<n;r++)t+=this.ranges[3*r+2]-this.ranges[3*r+1];return this.ranges[3*n]+t+function(e){return(e-(65535&e))/u}(e)}},{key:"mapResult",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this._map(e,t,!1)}},{key:"map",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this._map(e,t,!0)}},{key:"_map",value:function(e,t,n){for(var r=0,o=this.inverted?2:1,i=this.inverted?1:2,a=0;a<this.ranges.length;a+=3){var s=this.ranges[a]-(this.inverted?r:0);if(s>e)break;var l=this.ranges[a+o],c=this.ranges[a+i],f=s+l;if(e<=f){var p=s+r+((l?e==s?-1:e==f?1:t:t)<0?0:c);if(n)return p;var h=e==(t<0?s:f)?null:a/3+(e-s)*u,m=e==s?2:e==f?1:4;return(t<0?e!=s:e!=f)&&(m|=8),new d(p,m,h)}r+=c-l}return n?e+r:new d(e+r,0,null)}},{key:"touches",value:function(e,t){for(var n=0,r=c(t),o=this.inverted?2:1,i=this.inverted?1:2,a=0;a<this.ranges.length;a+=3){var s=this.ranges[a]-(this.inverted?n:0);if(s>e)break;var l=this.ranges[a+o];if(e<=s+l&&a==3*r)return!0;n+=this.ranges[a+i]-l}return!1}},{key:"forEach",value:function(e){for(var t=this.inverted?2:1,n=this.inverted?1:2,r=0,o=0;r<this.ranges.length;r+=3){var i=this.ranges[r],a=i-(this.inverted?o:0),s=i+(this.inverted?0:o),l=this.ranges[r+t],u=this.ranges[r+n];e(a,a+l,s,s+u),o+=u-l}}},{key:"invert",value:function(){return new e(this.ranges,!this.inverted)}},{key:"toString",value:function(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}}],[{key:"offset",value:function(t){return 0==t?e.empty:new e(t<0?[0,-t,0]:[0,0,t])}}]),e}();f.empty=new f([]);var p=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.length;Object(a.a)(this,e),this.maps=t,this.mirror=n,this.from=r,this.to=o}return Object(s.a)(e,[{key:"slice",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.maps.length;return new e(this.maps,this.mirror,t,n)}},{key:"copy",value:function(){return new e(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}},{key:"appendMap",value:function(e,t){this.to=this.maps.push(e),null!=t&&this.setMirror(this.maps.length-1,t)}},{key:"appendMapping",value:function(e){for(var t=0,n=this.maps.length;t<e.maps.length;t++){var r=e.getMirror(t);this.appendMap(e.maps[t],null!=r&&r<t?n+r:void 0)}}},{key:"getMirror",value:function(e){if(this.mirror)for(var t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}},{key:"setMirror",value:function(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}},{key:"appendMappingInverted",value:function(e){for(var t=e.maps.length-1,n=this.maps.length+e.maps.length;t>=0;t--){var r=e.getMirror(t);this.appendMap(e.maps[t].invert(),null!=r&&r>t?n-r-1:void 0)}}},{key:"invert",value:function(){var t=new e;return t.appendMappingInverted(this),t}},{key:"map",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(this.mirror)return this._map(e,t,!0);for(var n=this.from;n<this.to;n++)e=this.maps[n].map(e,t);return e}},{key:"mapResult",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this._map(e,t,!1)}},{key:"_map",value:function(e,t,n){for(var r=0,o=this.from;o<this.to;o++){var i=this.maps[o].mapResult(e,t);if(null!=i.recover){var a=this.getMirror(o);if(null!=a&&a>o&&a<this.to){o=a,e=this.maps[a].recover(i.recover);continue}}r|=i.delInfo,e=i.pos}return n?e:new d(e,r,null)}}]),e}(),h=Object.create(null),m=function(){function e(){Object(a.a)(this,e)}return Object(s.a)(e,[{key:"getMap",value:function(){return f.empty}},{key:"merge",value:function(e){return null}}],[{key:"fromJSON",value:function(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");var n=h[t.stepType];if(!n)throw new RangeError("No step type ".concat(t.stepType," defined"));return n.fromJSON(e,t)}},{key:"jsonID",value:function(e,t){if(e in h)throw new RangeError("Duplicate use of step JSON ID "+e);return h[e]=t,t.prototype.jsonID=e,t}}]),e}(),v=function(){function e(t,n){Object(a.a)(this,e),this.doc=t,this.failed=n}return Object(s.a)(e,null,[{key:"ok",value:function(t){return new e(t,null)}},{key:"fail",value:function(t){return new e(null,t)}},{key:"fromReplace",value:function(t,n,r,o){try{return e.ok(t.replace(n,r,o))}catch(i){if(i instanceof l.ReplaceError)return e.fail(i.message);throw i}}}]),e}();function g(e,t,n){for(var r=[],o=0;o<e.childCount;o++){var i=e.child(o);i.content.size&&(i=i.copy(g(i.content,t,i))),i.isInline&&(i=t(i,n,o)),r.push(i)}return l.Fragment.fromArray(r)}var y=function(e){Object(o.a)(n,e);var t=Object(i.a)(n);function n(e,r,o){var i;return Object(a.a)(this,n),(i=t.call(this)).from=e,i.to=r,i.mark=o,i}return Object(s.a)(n,[{key:"apply",value:function(e){var t=this,n=e.slice(this.from,this.to),r=e.resolve(this.from),o=r.node(r.sharedDepth(this.to)),i=new l.Slice(g(n.content,(function(e,n){return e.isAtom&&n.type.allowsMarkType(t.mark.type)?e.mark(t.mark.addToSet(e.marks)):e}),o),n.openStart,n.openEnd);return v.fromReplace(e,this.from,this.to,i)}},{key:"invert",value:function(){return new b(this.from,this.to,this.mark)}},{key:"map",value:function(e){var t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new n(t.pos,r.pos,this.mark)}},{key:"merge",value:function(e){return e instanceof n&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new n(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}},{key:"toJSON",value:function(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}}],[{key:"fromJSON",value:function(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new n(t.from,t.to,e.markFromJSON(t.mark))}}]),n}(m);m.jsonID("addMark",y);var b=function(e){Object(o.a)(n,e);var t=Object(i.a)(n);function n(e,r,o){var i;return Object(a.a)(this,n),(i=t.call(this)).from=e,i.to=r,i.mark=o,i}return Object(s.a)(n,[{key:"apply",value:function(e){var t=this,n=e.slice(this.from,this.to),r=new l.Slice(g(n.content,(function(e){return e.mark(t.mark.removeFromSet(e.marks))}),e),n.openStart,n.openEnd);return v.fromReplace(e,this.from,this.to,r)}},{key:"invert",value:function(){return new y(this.from,this.to,this.mark)}},{key:"map",value:function(e){var t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new n(t.pos,r.pos,this.mark)}},{key:"merge",value:function(e){return e instanceof n&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new n(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}},{key:"toJSON",value:function(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}}],[{key:"fromJSON",value:function(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new n(t.from,t.to,e.markFromJSON(t.mark))}}]),n}(m);m.jsonID("removeMark",b);var w=function(e){Object(o.a)(n,e);var t=Object(i.a)(n);function n(e,r,o){var i,s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return Object(a.a)(this,n),(i=t.call(this)).from=e,i.to=r,i.slice=o,i.structure=s,i}return Object(s.a)(n,[{key:"apply",value:function(e){return this.structure&&x(e,this.from,this.to)?v.fail("Structure replace would overwrite content"):v.fromReplace(e,this.from,this.to,this.slice)}},{key:"getMap",value:function(){return new f([this.from,this.to-this.from,this.slice.size])}},{key:"invert",value:function(e){return new n(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}},{key:"map",value:function(e){var t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deletedAcross&&r.deletedAcross?null:new n(t.pos,Math.max(t.pos,r.pos),this.slice)}},{key:"merge",value:function(e){if(!(e instanceof n)||e.structure||this.structure)return null;if(this.from+this.slice.size!=e.from||this.slice.openEnd||e.slice.openStart){if(e.to!=this.from||this.slice.openStart||e.slice.openEnd)return null;var t=this.slice.size+e.slice.size==0?l.Slice.empty:new l.Slice(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new n(e.from,this.to,t,this.structure)}var r=this.slice.size+e.slice.size==0?l.Slice.empty:new l.Slice(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new n(this.from,this.to+(e.to-e.from),r,this.structure)}},{key:"toJSON",value:function(){var e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}}],[{key:"fromJSON",value:function(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new n(t.from,t.to,l.Slice.fromJSON(e,t.slice),!!t.structure)}}]),n}(m);m.jsonID("replace",w);var k=function(e){Object(o.a)(n,e);var t=Object(i.a)(n);function n(e,r,o,i,s,l){var u,c=arguments.length>6&&void 0!==arguments[6]&&arguments[6];return Object(a.a)(this,n),(u=t.call(this)).from=e,u.to=r,u.gapFrom=o,u.gapTo=i,u.slice=s,u.insert=l,u.structure=c,u}return Object(s.a)(n,[{key:"apply",value:function(e){if(this.structure&&(x(e,this.from,this.gapFrom)||x(e,this.gapTo,this.to)))return v.fail("Structure gap-replace would overwrite content");var t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return v.fail("Gap is not a flat range");var n=this.slice.insertAt(this.insert,t.content);return n?v.fromReplace(e,this.from,this.to,n):v.fail("Content does not fit in gap")}},{key:"getMap",value:function(){return new f([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}},{key:"invert",value:function(e){var t=this.gapTo-this.gapFrom;return new n(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}},{key:"map",value:function(e){var t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),o=e.map(this.gapFrom,-1),i=e.map(this.gapTo,1);return t.deletedAcross&&r.deletedAcross||o<t.pos||i>r.pos?null:new n(t.pos,r.pos,o,i,this.slice,this.insert,this.structure)}},{key:"toJSON",value:function(){var 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}}],[{key:"fromJSON",value:function(e,t){if("number"!=typeof t.from||"number"!=typeof t.to||"number"!=typeof t.gapFrom||"number"!=typeof t.gapTo||"number"!=typeof t.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new n(t.from,t.to,t.gapFrom,t.gapTo,l.Slice.fromJSON(e,t.slice),t.insert,!!t.structure)}}]),n}(m);function x(e,t,n){for(var r=e.resolve(t),o=n-t,i=r.depth;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0)for(var a=r.node(i).maybeChild(r.indexAfter(i));o>0;){if(!a||a.isLeaf)return!0;a=a.firstChild,o--}return!1}function O(e,t,n){return(0==t||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function S(e){for(var t=e.parent.content.cutByIndex(e.startIndex,e.endIndex),n=e.depth;;--n){var r=e.$from.node(n),o=e.$from.index(n),i=e.$to.indexAfter(n);if(n<e.depth&&r.canReplace(o,i,t))return n;if(0==n||r.type.spec.isolating||!O(r,o,i))break}return null}function C(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e,o=D(e,t),i=o&&A(r,t);return i?o.map(j).concat({type:t,attrs:n}).concat(i.map(j)):null}function j(e){return{type:e,attrs:null}}function D(e,t){var n=e.parent,r=e.startIndex,o=e.endIndex,i=n.contentMatchAt(r).findWrapping(t);if(!i)return null;var a=i.length?i[0]:t;return n.canReplaceWith(r,o,a)?i:null}function A(e,t){var n=e.parent,r=e.startIndex,o=e.endIndex,i=n.child(r),a=t.contentMatch.findWrapping(i.type);if(!a)return null;for(var s=(a.length?a[a.length-1]:t).contentMatch,l=r;s&&l<o;l++)s=s.matchType(n.child(l).type);return s&&s.validEnd?a:null}function E(e,t,n,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");var i=e.steps.length;e.doc.nodesBetween(t,n,(function(t,n){if(t.isTextblock&&!t.hasMarkup(r,o)&&function(e,t,n){var r=e.resolve(t),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}(e.doc,e.mapping.slice(i).map(n),r)){e.clearIncompatible(e.mapping.slice(i).map(n,1),r);var a=e.mapping.slice(i),s=a.map(n,1),u=a.map(n+t.nodeSize,1);return e.step(new k(s,u,s+1,u-1,new l.Slice(l.Fragment.from(r.create(o,null,t.marks)),0,0),1,!0)),!1}}))}function M(e,t,n,r,o){var i=e.doc.nodeAt(t);if(!i)throw new RangeError("No node at given position");n||(n=i.type);var a=n.create(r,null,o||i.marks);if(i.isLeaf)return e.replaceWith(t,t+i.nodeSize,a);if(!n.validContent(i.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new k(t,t+i.nodeSize,t+1,t+i.nodeSize-1,new l.Slice(l.Fragment.from(a),0,0),1,!0))}function T(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3?arguments[3]:void 0,o=e.resolve(t),i=o.depth-n,a=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!a.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(var s=o.depth-1,l=n-2;s>i;s--,l--){var u=o.node(s),c=o.index(s);if(u.type.spec.isolating)return!1;var d=u.content.cutByIndex(c,u.childCount),f=r&&r[l]||u;if(f!=u&&(d=d.replaceChild(0,f.type.create(f.attrs))),!u.canReplace(c+1,u.childCount)||!f.type.validContent(d))return!1}var p=o.indexAfter(i),h=r&&r[0];return o.node(i).canReplaceWith(p,p,h?h.type:o.node(i+1).type)}function L(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3?arguments[3]:void 0,o=e.doc.resolve(t),i=l.Fragment.empty,a=l.Fragment.empty,s=o.depth,u=o.depth-n,c=n-1;s>u;s--,c--){i=l.Fragment.from(o.node(s).copy(i));var d=r&&r[c];a=l.Fragment.from(d?d.type.create(d.attrs,a):o.node(s).copy(a))}e.step(new w(t,t,new l.Slice(i.append(a),n,n),!0))}function N(e,t){var n=e.resolve(t),r=n.index();return P(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function P(e,t){return!(!e||!t||e.isLeaf||!e.canAppend(t))}function R(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,r=e.resolve(t),o=r.depth;;o--){var i=void 0,a=void 0,s=r.index(o);if(o==r.depth?(i=r.nodeBefore,a=r.nodeAfter):n>0?(i=r.node(o+1),s++,a=r.node(o).maybeChild(s)):(i=r.node(o).maybeChild(s-1),a=r.node(o+1)),i&&!i.isTextblock&&P(i,a)&&r.node(o).canReplace(s,s+1))return t;if(0==o)break;t=n<0?r.before(o):r.after(o)}}function H(e,t,n){var r=new w(t-n,t+n,l.Slice.empty,!0);e.step(r)}function F(e,t,n){var r=e.resolve(t);if(!n.content.size)return t;for(var o=n.content,i=0;i<n.openStart;i++)o=o.firstChild.content;for(var a=1;a<=(0==n.openStart&&n.size?2:1);a++)for(var s=r.depth;s>=0;s--){var l=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,u=r.index(s)+(l>0?1:0),c=r.node(s),d=!1;if(1==a)d=c.canReplace(u,u,o);else{var f=c.contentMatchAt(u).findWrapping(o.firstChild.type);d=f&&c.canReplaceWith(u,u,f[0])}if(d)return 0==l?r.pos:l<0?r.before(s+1):r.after(s+1)}return null}function V(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:l.Slice.empty;if(t==n&&!r.size)return null;var o=e.resolve(t),i=e.resolve(n);return z(o,i,r)?new w(t,n,r):new B(o,i,r).fit()}function z(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}m.jsonID("replaceAround",k);var B=function(){function e(t,n,r){Object(a.a)(this,e),this.$from=t,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=l.Fragment.empty;for(var o=0;o<=t.depth;o++){var i=t.node(o);this.frontier.push({type:i.type,match:i.contentMatchAt(t.indexAfter(o))})}for(var s=t.depth;s>0;s--)this.placed=l.Fragment.from(t.node(s).copy(this.placed))}return Object(s.a)(e,[{key:"depth",get:function(){return this.frontier.length-1}},{key:"fit",value:function(){for(;this.unplaced.size;){var e=this.findFittable();e?this.placeNodes(e):this.openMore()||this.dropNode()}var t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,o=this.close(t<0?this.$to:r.doc.resolve(t));if(!o)return null;for(var i=this.placed,a=r.depth,s=o.depth;a&&s&&1==i.childCount;)i=i.firstChild.content,a--,s--;var u=new l.Slice(i,a,s);return t>-1?new k(r.pos,t,this.$to.pos,this.$to.end(),u,n):u.size||r.pos!=this.$to.pos?new w(r.pos,o.pos,u):null}},{key:"findFittable",value:function(){for(var e=1;e<=2;e++)for(var t=this.unplaced.openStart;t>=0;t--)for(var n=null,r=(t?(n=$(this.unplaced.content,t-1).firstChild).content:this.unplaced.content).firstChild,o=this.depth;o>=0;o--){var i=this.frontier[o],a=i.type,s=i.match,u=void 0,c=null;if(1==e&&(r?s.matchType(r.type)||(c=s.fillBefore(l.Fragment.from(r),!1)):n&&a.compatibleContent(n.type)))return{sliceDepth:t,frontierDepth:o,parent:n,inject:c};if(2==e&&r&&(u=s.findWrapping(r.type)))return{sliceDepth:t,frontierDepth:o,parent:n,wrap:u};if(n&&s.matchType(n.type))break}}},{key:"openMore",value:function(){var e=this.unplaced,t=e.content,n=e.openStart,r=e.openEnd,o=$(t,n);return!(!o.childCount||o.firstChild.isLeaf)&&(this.unplaced=new l.Slice(t,n+1,Math.max(r,o.size+n>=t.size-r?n+1:0)),!0)}},{key:"dropNode",value:function(){var e=this.unplaced,t=e.content,n=e.openStart,r=e.openEnd,o=$(t,n);if(o.childCount<=1&&n>0){var i=t.size-n<=n+o.size;this.unplaced=new l.Slice(I(t,n-1,1),n-1,i?n-1:r)}else this.unplaced=new l.Slice(I(t,n,1),n,r)}},{key:"placeNodes",value:function(e){for(var t=e.sliceDepth,n=e.frontierDepth,r=e.parent,o=e.inject,i=e.wrap;this.depth>n;)this.closeFrontierNode();if(i)for(var a=0;a<i.length;a++)this.openFrontierNode(i[a]);var s=this.unplaced,u=r?r.content:s.content,c=s.openStart-t,d=0,f=[],p=this.frontier[n],h=p.match,m=p.type;if(o){for(a=0;a<o.childCount;a++)f.push(o.child(a));h=h.matchFragment(o)}for(var v=u.size+t-(s.content.size-s.openEnd);d<u.childCount;){var g=u.child(d),y=h.matchType(g.type);if(!y)break;(++d>1||0==c||g.content.size)&&(h=y,f.push(q(g.mark(m.allowedMarks(g.marks)),1==d?c:0,d==u.childCount?v:-1)))}var b=d==u.childCount;b||(v=-1),this.placed=_(this.placed,n,l.Fragment.from(f)),this.frontier[n].match=h,b&&v<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(var w=0,k=u;w<v;w++){var x=k.lastChild;this.frontier.push({type:x.type,match:x.contentMatchAt(x.childCount)}),k=x.content}this.unplaced=b?0==t?l.Slice.empty:new l.Slice(I(s.content,t-1,1),t-1,v<0?s.openEnd:t-1):new l.Slice(I(s.content,t,d),s.openStart,s.openEnd)}},{key:"mustMoveInline",value:function(){if(!this.$to.parent.isTextblock)return-1;var e,t=this.frontier[this.depth];if(!t.type.isTextblock||!W(this.$to,this.$to.depth,t.type,t.match,!1)||this.$to.depth==this.depth&&(e=this.findCloseLevel(this.$to))&&e.depth==this.depth)return-1;for(var n=this.$to.depth,r=this.$to.after(n);n>1&&r==this.$to.end(--n);)++r;return r}},{key:"findCloseLevel",value:function(e){e:for(var t=Math.min(this.depth,e.depth);t>=0;t--){var n=this.frontier[t],r=n.match,o=n.type,i=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),a=W(e,t,o,r,i);if(a){for(var s=t-1;s>=0;s--){var l=this.frontier[s],u=l.match,c=W(e,s,l.type,u,!0);if(!c||c.childCount)continue e}return{depth:t,fit:a,move:i?e.doc.resolve(e.after(t+1)):e}}}}},{key:"close",value:function(e){var t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=_(this.placed,t.depth,t.fit)),e=t.move;for(var n=t.depth+1;n<=e.depth;n++){var r=e.node(n),o=r.type.contentMatch.fillBefore(r.content,!0,e.index(n));this.openFrontierNode(r.type,r.attrs,o)}return e}},{key:"openFrontierNode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2?arguments[2]:void 0,r=this.frontier[this.depth];r.match=r.match.matchType(e),this.placed=_(this.placed,this.depth,l.Fragment.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})}},{key:"closeFrontierNode",value:function(){var e=this.frontier.pop().match.fillBefore(l.Fragment.empty,!0);e.childCount&&(this.placed=_(this.placed,this.frontier.length,e))}}]),e}();function I(e,t,n){return 0==t?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(I(e.firstChild.content,t-1,n)))}function _(e,t,n){return 0==t?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(_(e.lastChild.content,t-1,n)))}function $(e,t){for(var n=0;n<t;n++)e=e.firstChild.content;return e}function q(e,t,n){if(t<=0)return e;var r=e.content;return t>1&&(r=r.replaceChild(0,q(r.firstChild,t-1,1==r.childCount?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(l.Fragment.empty,!0)))),e.copy(r)}function W(e,t,n,r,o){var i=e.node(t),a=o?e.indexAfter(t):e.index(t);if(a==i.childCount&&!n.compatibleContent(i.type))return null;var s=r.fillBefore(i.content,!0,a);return s&&!function(e,t,n){for(var r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}(n,i.content,a)?s:null}function U(e){return e.spec.defining||e.spec.definingForContent}function K(e,t,n,r,o){if(t<n){var i=e.firstChild;e=e.replaceChild(0,i.copy(K(i.content,t+1,n,r,i)))}if(t>r){var a=o.contentMatchAt(0),s=a.fillBefore(e).append(e);e=s.append(a.matchFragment(s).fillBefore(l.Fragment.empty,!0))}return e}function G(e,t){for(var n=[],r=Math.min(e.depth,t.depth);r>=0;r--){var o=e.start(r);if(o<e.pos-(e.depth-r)||t.end(r)>t.pos+(t.depth-r)||e.node(r).type.spec.isolating||t.node(r).type.spec.isolating)break;(o==t.start(r)||r==e.depth&&r==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&r&&t.start(r-1)==o-1)&&n.push(r)}return n}var J=Error;((J=function e(t){var n=Error.call(this,t);return n.__proto__=e.prototype,n}).prototype=Object.create(Error.prototype)).constructor=J,J.prototype.name="TransformError";var Y=function(){function e(t){Object(a.a)(this,e),this.doc=t,this.steps=[],this.docs=[],this.mapping=new p}return Object(s.a)(e,[{key:"before",get:function(){return this.docs.length?this.docs[0]:this.doc}},{key:"step",value:function(e){var t=this.maybeStep(e);if(t.failed)throw new J(t.failed);return this}},{key:"maybeStep",value:function(e){var t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}},{key:"docChanged",get:function(){return this.steps.length>0}},{key:"addStep",value:function(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}},{key:"replace",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.Slice.empty,r=V(this.doc,e,t,n);return r&&this.step(r),this}},{key:"replaceWith",value:function(e,t,n){return this.replace(e,t,new l.Slice(l.Fragment.from(n),0,0))}},{key:"delete",value:function(e,t){return this.replace(e,t,l.Slice.empty)}},{key:"insert",value:function(e,t){return this.replaceWith(e,e,t)}},{key:"replaceRange",value:function(e,t,n){return function(e,t,n,r){if(!r.size)return e.deleteRange(t,n);var o=e.doc.resolve(t),i=e.doc.resolve(n);if(z(o,i,r))return e.step(new w(t,n,r));var a=G(o,e.doc.resolve(n));0==a[a.length-1]&&a.pop();var s=-(o.depth+1);a.unshift(s);for(var u=o.depth,c=o.pos-1;u>0;u--,c--){var d=o.node(u).type.spec;if(d.defining||d.definingAsContext||d.isolating)break;a.indexOf(u)>-1?s=u:o.before(u)==c&&a.splice(1,0,-u)}for(var f=a.indexOf(s),p=[],h=r.openStart,m=r.content,v=0;;v++){var g=m.firstChild;if(p.push(g),v==r.openStart)break;m=g.content}for(var y=h-1;y>=0;y--){var b=p[y].type,k=U(b);if(k&&o.node(f).type!=b)h=y;else if(k||!b.isTextblock)break}for(var x=r.openStart;x>=0;x--){var O=(x+h+1)%(r.openStart+1),S=p[O];if(S)for(var C=0;C<a.length;C++){var j=a[(C+f)%a.length],D=!0;j<0&&(D=!1,j=-j);var A=o.node(j-1),E=o.index(j-1);if(A.canReplaceWith(E,E,S.type,S.marks))return e.replace(o.before(j),D?i.after(j):n,new l.Slice(K(r.content,0,r.openStart,O),O,r.openEnd))}}for(var M=e.steps.length,T=a.length-1;T>=0&&(e.replace(t,n,r),!(e.steps.length>M));T--){var L=a[T];L<0||(t=o.before(L),n=i.after(L))}}(this,e,t,n),this}},{key:"replaceRangeWith",value:function(e,t,n){return function(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){var o=function(e,t,n){var r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(0==r.parentOffset)for(var o=r.depth-1;o>=0;o--){var i=r.index(o);if(r.node(o).canReplaceWith(i,i,n))return r.before(o+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(var a=r.depth-1;a>=0;a--){var s=r.indexAfter(a);if(r.node(a).canReplaceWith(s,s,n))return r.after(a+1);if(s<r.node(a).childCount)return null}return null}(e.doc,t,r.type);null!=o&&(t=n=o)}e.replaceRange(t,n,new l.Slice(l.Fragment.from(r),0,0))}(this,e,t,n),this}},{key:"deleteRange",value:function(e,t){return function(e,t,n){for(var r=e.doc.resolve(t),o=e.doc.resolve(n),i=G(r,o),a=0;a<i.length;a++){var s=i[a],l=a==i.length-1;if(l&&0==s||r.node(s).type.contentMatch.validEnd)return e.delete(r.start(s),o.end(s));if(s>0&&(l||r.node(s-1).canReplace(r.index(s-1),o.indexAfter(s-1))))return e.delete(r.before(s),o.after(s))}for(var u=1;u<=r.depth&&u<=o.depth;u++)if(t-r.start(u)==r.depth-u&&n>r.end(u)&&o.end(u)-n!=o.depth-u)return e.delete(r.before(u),n);e.delete(t,n)}(this,e,t),this}},{key:"lift",value:function(e,t){return function(e,t,n){for(var r=t.$from,o=t.$to,i=t.depth,a=r.before(i+1),s=o.after(i+1),u=a,c=s,d=l.Fragment.empty,f=0,p=i,h=!1;p>n;p--)h||r.index(p)>0?(h=!0,d=l.Fragment.from(r.node(p).copy(d)),f++):u--;for(var m=l.Fragment.empty,v=0,g=i,y=!1;g>n;g--)y||o.after(g+1)<o.end(g)?(y=!0,m=l.Fragment.from(o.node(g).copy(m)),v++):c++;e.step(new k(u,c,a,s,new l.Slice(d.append(m),f,v),d.size-f,!0))}(this,e,t),this}},{key:"join",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return H(this,e,t),this}},{key:"wrap",value:function(e,t){return function(e,t,n){for(var r=l.Fragment.empty,o=n.length-1;o>=0;o--){if(r.size){var i=n[o].type.contentMatch.matchFragment(r);if(!i||!i.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=l.Fragment.from(n[o].type.create(n[o].attrs,r))}var a=t.start,s=t.end;e.step(new k(a,s,a,s,new l.Slice(r,0,0),n.length,!0))}(this,e,t),this}},{key:"setBlockType",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return E(this,e,t,n,r),this}},{key:"setNodeMarkup",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];return M(this,e,t,n,r),this}},{key:"split",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2?arguments[2]:void 0;return L(this,e,t,n),this}},{key:"addMark",value:function(e,t,n){return function(e,t,n,r){var o,i,a=[],s=[];e.doc.nodesBetween(t,n,(function(e,l,u){if(e.isInline){var c=e.marks;if(!r.isInSet(c)&&u.type.allowsMarkType(r.type)){for(var d=Math.max(l,t),f=Math.min(l+e.nodeSize,n),p=r.addToSet(c),h=0;h<c.length;h++)c[h].isInSet(p)||(o&&o.to==d&&o.mark.eq(c[h])?o.to=f:a.push(o=new b(d,f,c[h])));i&&i.to==d?i.to=f:s.push(i=new y(d,f,r))}}})),a.forEach((function(t){return e.step(t)})),s.forEach((function(t){return e.step(t)}))}(this,e,t,n),this}},{key:"removeMark",value:function(e,t,n){return function(e,t,n,r){var o=[],i=0;e.doc.nodesBetween(t,n,(function(e,a){if(e.isInline){i++;var s=null;if(r instanceof l.MarkType)for(var u,c=e.marks;u=r.isInSet(c);)(s||(s=[])).push(u),c=u.removeFromSet(c);else r?r.isInSet(e.marks)&&(s=[r]):s=e.marks;if(s&&s.length)for(var d=Math.min(a+e.nodeSize,n),f=0;f<s.length;f++){for(var p=s[f],h=void 0,m=0;m<o.length;m++){var v=o[m];v.step==i-1&&p.eq(o[m].style)&&(h=v)}h?(h.to=d,h.step=i):o.push({style:p,from:Math.max(a,t),to:d,step:i})}}})),o.forEach((function(t){return e.step(new b(t.from,t.to,t.style))}))}(this,e,t,n),this}},{key:"clearIncompatible",value:function(e,t,n){return function(e,t,n){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n.contentMatch,o=e.doc.nodeAt(t),i=[],a=t+1,s=0;s<o.childCount;s++){var u=o.child(s),c=a+u.nodeSize,d=r.matchType(u.type);if(d){r=d;for(var f=0;f<u.marks.length;f++)n.allowsMarkType(u.marks[f].type)||e.step(new b(a,c,u.marks[f]))}else i.push(new w(a,c,l.Slice.empty));a=c}if(!r.validEnd){var p=r.fillBefore(l.Fragment.empty,!0);e.replace(a,a,new l.Slice(p,0,0))}for(var h=i.length-1;h>=0;h--)e.step(i[h])}(this,e,t,n),this}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(37);var o=n(34);function i(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Object(o.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(29);function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Object(r.a)(e,t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(12),o=n(42),i=n(43),a=n(16);function s(e,t){if(t&&("object"===Object(i.a)(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Object(a.a)(e)}function l(e){var t=Object(o.a)();return function(){var n,o=Object(r.a)(e);if(t){var i=Object(r.a)(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return s(this,n)}}},function(e,t,n){"use strict";function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(12);function o(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Object(r.a)(e)););return e}function i(){return i="undefined"!==typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=o(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},i.apply(this,arguments)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(34);function o(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Object(r.a)(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){l=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(l)throw a}}}}},,function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.r(t),n.d(t,"get",(function(){return u})),n.d(t,"createParser",(function(){return c})),n.d(t,"createStyleFunction",(function(){return p})),n.d(t,"compose",(function(){return m})),n.d(t,"system",(function(){return h})),n.d(t,"margin",(function(){return I})),n.d(t,"padding",(function(){return _})),n.d(t,"space",(function(){return $})),n.d(t,"color",(function(){return b})),n.d(t,"layout",(function(){return v})),n.d(t,"typography",(function(){return k})),n.d(t,"flexbox",(function(){return O})),n.d(t,"border",(function(){return E})),n.d(t,"background",(function(){return L})),n.d(t,"position",(function(){return R})),n.d(t,"grid",(function(){return j})),n.d(t,"shadow",(function(){return q})),n.d(t,"boxShadow",(function(){return W})),n.d(t,"textShadow",(function(){return W})),n.d(t,"variant",(function(){return K})),n.d(t,"buttonStyle",(function(){return G})),n.d(t,"textStyle",(function(){return J})),n.d(t,"colorStyle",(function(){return Y})),n.d(t,"borders",(function(){return M})),n.d(t,"width",(function(){return Z})),n.d(t,"height",(function(){return X})),n.d(t,"minWidth",(function(){return Q})),n.d(t,"minHeight",(function(){return ee})),n.d(t,"maxWidth",(function(){return te})),n.d(t,"maxHeight",(function(){return ne})),n.d(t,"size",(function(){return re})),n.d(t,"verticalAlign",(function(){return oe})),n.d(t,"display",(function(){return ie})),n.d(t,"overflow",(function(){return ae})),n.d(t,"overflowX",(function(){return se})),n.d(t,"overflowY",(function(){return le})),n.d(t,"opacity",(function(){return ue})),n.d(t,"fontSize",(function(){return ce})),n.d(t,"fontFamily",(function(){return de})),n.d(t,"fontWeight",(function(){return fe})),n.d(t,"lineHeight",(function(){return pe})),n.d(t,"textAlign",(function(){return he})),n.d(t,"fontStyle",(function(){return me})),n.d(t,"letterSpacing",(function(){return ve})),n.d(t,"alignItems",(function(){return ge})),n.d(t,"alignContent",(function(){return ye})),n.d(t,"justifyItems",(function(){return be})),n.d(t,"justifyContent",(function(){return we})),n.d(t,"flexWrap",(function(){return ke})),n.d(t,"flexDirection",(function(){return xe})),n.d(t,"flex",(function(){return Oe})),n.d(t,"flexGrow",(function(){return Se})),n.d(t,"flexShrink",(function(){return Ce})),n.d(t,"flexBasis",(function(){return je})),n.d(t,"justifySelf",(function(){return De})),n.d(t,"alignSelf",(function(){return Ae})),n.d(t,"order",(function(){return Ee})),n.d(t,"gridGap",(function(){return Me})),n.d(t,"gridColumnGap",(function(){return Te})),n.d(t,"gridRowGap",(function(){return Le})),n.d(t,"gridColumn",(function(){return Ne})),n.d(t,"gridRow",(function(){return Pe})),n.d(t,"gridAutoFlow",(function(){return Re})),n.d(t,"gridAutoColumns",(function(){return He})),n.d(t,"gridAutoRows",(function(){return Fe})),n.d(t,"gridTemplateColumns",(function(){return Ve})),n.d(t,"gridTemplateRows",(function(){return ze})),n.d(t,"gridTemplateAreas",(function(){return Be})),n.d(t,"gridArea",(function(){return Ie})),n.d(t,"borderWidth",(function(){return _e})),n.d(t,"borderStyle",(function(){return $e})),n.d(t,"borderColor",(function(){return qe})),n.d(t,"borderTop",(function(){return We})),n.d(t,"borderRight",(function(){return Ue})),n.d(t,"borderBottom",(function(){return Ke})),n.d(t,"borderLeft",(function(){return Ge})),n.d(t,"borderRadius",(function(){return Je})),n.d(t,"backgroundImage",(function(){return Ye})),n.d(t,"backgroundSize",(function(){return Ze})),n.d(t,"backgroundPosition",(function(){return Xe})),n.d(t,"backgroundRepeat",(function(){return Qe})),n.d(t,"zIndex",(function(){return et})),n.d(t,"top",(function(){return tt})),n.d(t,"right",(function(){return nt})),n.d(t,"bottom",(function(){return rt})),n.d(t,"left",(function(){return ot})),n.d(t,"style",(function(){return it}));var r=n(20),o=n.n(r),i=function(e,t){var n=o()({},e,t);for(var r in e){var i;e[r]&&"object"===typeof t[r]&&o()(n,((i={})[r]=o()(e[r],t[r]),i))}return n},a={breakpoints:[40,52,64].map((function(e){return e+"em"}))},s=function(e){return"@media screen and (min-width: "+e+")"},l=function(e,t){return u(t,e,e)},u=function(e,t,n,r,o){for(t=t&&t.split?t.split("."):[t],r=0;r<t.length;r++)e=e?e[t[r]]:o;return e===o?n:e},c=function e(t){var n={},r=function(e){var r={},l=!1,c=e.theme&&e.theme.disableStyledSystemCache;for(var p in e)if(t[p]){var h=t[p],m=e[p],v=u(e.theme,h.scale,h.defaults);if("object"!==typeof m)o()(r,h(m,v,e));else{if(n.breakpoints=!c&&n.breakpoints||u(e.theme,"breakpoints",a.breakpoints),Array.isArray(m)){n.media=!c&&n.media||[null].concat(n.breakpoints.map(s)),r=i(r,d(n.media,h,v,m,e));continue}null!==m&&(r=i(r,f(n.breakpoints,h,v,m,e)),l=!0)}}return l&&(r=function(e){var t={};return Object.keys(e).sort((function(e,t){return e.localeCompare(t,void 0,{numeric:!0,sensitivity:"base"})})).forEach((function(n){t[n]=e[n]})),t}(r)),r};r.config=t,r.propNames=Object.keys(t),r.cache=n;var l=Object.keys(t).filter((function(e){return"config"!==e}));return l.length>1&&l.forEach((function(n){var o;r[n]=e(((o={})[n]=t[n],o))})),r},d=function(e,t,n,r,i){var a={};return r.slice(0,e.length).forEach((function(r,s){var l,u=e[s],c=t(r,n,i);u?o()(a,((l={})[u]=o()({},a[u],c),l)):o()(a,c)})),a},f=function(e,t,n,r,i){var a={};for(var l in r){var u=e[l],c=t(r[l],n,i);if(u){var d,f=s(u);o()(a,((d={})[f]=o()({},a[f],c),d))}else o()(a,c)}return a},p=function(e){var t=e.properties,n=e.property,r=e.scale,o=e.transform,i=void 0===o?l:o,a=e.defaultScale;t=t||[n];var s=function(e,n,r){var o={},a=i(e,n,r);if(null!==a)return t.forEach((function(e){o[e]=a})),o};return s.scale=r,s.defaults=a,s},h=function(e){void 0===e&&(e={});var t={};return Object.keys(e).forEach((function(n){var r=e[n];t[n]=!0!==r?"function"!==typeof r?p(r):r:p({property:n,scale:n})})),c(t)},m=function(){for(var e={},t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];n.forEach((function(t){t&&t.config&&o()(e,t.config)}));var i=c(e);return i},v=h({width:{property:"width",scale:"sizes",transform:function(e,t){return u(t,e,!function(e){return"number"===typeof e&&!isNaN(e)}(e)||e>1?e:100*e+"%")}},height:{property:"height",scale:"sizes"},minWidth:{property:"minWidth",scale:"sizes"},minHeight:{property:"minHeight",scale:"sizes"},maxWidth:{property:"maxWidth",scale:"sizes"},maxHeight:{property:"maxHeight",scale:"sizes"},size:{properties:["width","height"],scale:"sizes"},overflow:!0,overflowX:!0,overflowY:!0,display:!0,verticalAlign:!0}),g=v,y={color:{property:"color",scale:"colors"},backgroundColor:{property:"backgroundColor",scale:"colors"},opacity:!0};y.bg=y.backgroundColor;var b=h(y),w=b,k=h({fontFamily:{property:"fontFamily",scale:"fonts"},fontSize:{property:"fontSize",scale:"fontSizes",defaultScale:[12,14,16,20,24,32,48,64,72]},fontWeight:{property:"fontWeight",scale:"fontWeights"},lineHeight:{property:"lineHeight",scale:"lineHeights"},letterSpacing:{property:"letterSpacing",scale:"letterSpacings"},textAlign:!0,fontStyle:!0}),x=k,O=h({alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:!0,flex:!0,flexGrow:!0,flexShrink:!0,flexBasis:!0,justifySelf:!0,alignSelf:!0,order:!0}),S=O,C={space:[0,4,8,16,32,64,128,256,512]},j=h({gridGap:{property:"gridGap",scale:"space",defaultScale:C.space},gridColumnGap:{property:"gridColumnGap",scale:"space",defaultScale:C.space},gridRowGap:{property:"gridRowGap",scale:"space",defaultScale:C.space},gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridAutoRows:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0}),D=j,A={border:{property:"border",scale:"borders"},borderWidth:{property:"borderWidth",scale:"borderWidths"},borderStyle:{property:"borderStyle",scale:"borderStyles"},borderColor:{property:"borderColor",scale:"colors"},borderRadius:{property:"borderRadius",scale:"radii"},borderTop:{property:"borderTop",scale:"borders"},borderTopLeftRadius:{property:"borderTopLeftRadius",scale:"radii"},borderTopRightRadius:{property:"borderTopRightRadius",scale:"radii"},borderRight:{property:"borderRight",scale:"borders"},borderBottom:{property:"borderBottom",scale:"borders"},borderBottomLeftRadius:{property:"borderBottomLeftRadius",scale:"radii"},borderBottomRightRadius:{property:"borderBottomRightRadius",scale:"radii"},borderLeft:{property:"borderLeft",scale:"borders"},borderX:{properties:["borderLeft","borderRight"],scale:"borders"},borderY:{properties:["borderTop","borderBottom"],scale:"borders"},borderTopWidth:{property:"borderTopWidth",scale:"borderWidths"},borderTopColor:{property:"borderTopColor",scale:"colors"},borderTopStyle:{property:"borderTopStyle",scale:"borderStyles"}};A.borderTopLeftRadius={property:"borderTopLeftRadius",scale:"radii"},A.borderTopRightRadius={property:"borderTopRightRadius",scale:"radii"},A.borderBottomWidth={property:"borderBottomWidth",scale:"borderWidths"},A.borderBottomColor={property:"borderBottomColor",scale:"colors"},A.borderBottomStyle={property:"borderBottomStyle",scale:"borderStyles"},A.borderBottomLeftRadius={property:"borderBottomLeftRadius",scale:"radii"},A.borderBottomRightRadius={property:"borderBottomRightRadius",scale:"radii"},A.borderLeftWidth={property:"borderLeftWidth",scale:"borderWidths"},A.borderLeftColor={property:"borderLeftColor",scale:"colors"},A.borderLeftStyle={property:"borderLeftStyle",scale:"borderStyles"},A.borderRightWidth={property:"borderRightWidth",scale:"borderWidths"},A.borderRightColor={property:"borderRightColor",scale:"colors"},A.borderRightStyle={property:"borderRightStyle",scale:"borderStyles"};var E=h(A),M=E,T={background:!0,backgroundImage:!0,backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0};T.bgImage=T.backgroundImage,T.bgSize=T.backgroundSize,T.bgPosition=T.backgroundPosition,T.bgRepeat=T.backgroundRepeat;var L=h(T),N=L,P={space:[0,4,8,16,32,64,128,256,512]},R=h({position:!0,zIndex:{property:"zIndex",scale:"zIndices"},top:{property:"top",scale:"space",defaultScale:P.space},right:{property:"right",scale:"space",defaultScale:P.space},bottom:{property:"bottom",scale:"space",defaultScale:P.space},left:{property:"left",scale:"space",defaultScale:P.space}}),H=R,F={space:[0,4,8,16,32,64,128,256,512]},V=function(e){return"number"===typeof e&&!isNaN(e)},z=function(e,t){if(!V(e))return u(t,e,e);var n=e<0,r=Math.abs(e),o=u(t,r,r);return V(o)?o*(n?-1:1):n?"-"+o:o},B={};B.margin={margin:{property:"margin",scale:"space",transform:z,defaultScale:F.space},marginTop:{property:"marginTop",scale:"space",transform:z,defaultScale:F.space},marginRight:{property:"marginRight",scale:"space",transform:z,defaultScale:F.space},marginBottom:{property:"marginBottom",scale:"space",transform:z,defaultScale:F.space},marginLeft:{property:"marginLeft",scale:"space",transform:z,defaultScale:F.space},marginX:{properties:["marginLeft","marginRight"],scale:"space",transform:z,defaultScale:F.space},marginY:{properties:["marginTop","marginBottom"],scale:"space",transform:z,defaultScale:F.space}},B.margin.m=B.margin.margin,B.margin.mt=B.margin.marginTop,B.margin.mr=B.margin.marginRight,B.margin.mb=B.margin.marginBottom,B.margin.ml=B.margin.marginLeft,B.margin.mx=B.margin.marginX,B.margin.my=B.margin.marginY,B.padding={padding:{property:"padding",scale:"space",defaultScale:F.space},paddingTop:{property:"paddingTop",scale:"space",defaultScale:F.space},paddingRight:{property:"paddingRight",scale:"space",defaultScale:F.space},paddingBottom:{property:"paddingBottom",scale:"space",defaultScale:F.space},paddingLeft:{property:"paddingLeft",scale:"space",defaultScale:F.space},paddingX:{properties:["paddingLeft","paddingRight"],scale:"space",defaultScale:F.space},paddingY:{properties:["paddingTop","paddingBottom"],scale:"space",defaultScale:F.space}},B.padding.p=B.padding.padding,B.padding.pt=B.padding.paddingTop,B.padding.pr=B.padding.paddingRight,B.padding.pb=B.padding.paddingBottom,B.padding.pl=B.padding.paddingLeft,B.padding.px=B.padding.paddingX,B.padding.py=B.padding.paddingY;var I=h(B.margin),_=h(B.padding),$=m(I,_),q=h({boxShadow:{property:"boxShadow",scale:"shadows"},textShadow:{property:"textShadow",scale:"shadows"}}),W=q,U=n(40),K=function(e){var t,n,r=e.scale,o=e.prop,i=void 0===o?"variant":o,a=e.variants,s=void 0===a?{}:a,l=e.key;n=Object.keys(s).length?function(e,t,n){return Object(U.default)(u(t,e,null))(n.theme)}:function(e,t){return u(t,e,null)},n.scale=r||l,n.defaults=s;var d=((t={})[i]=n,t);return c(d)},G=K({key:"buttons"}),J=K({key:"textStyles",prop:"textStyle"}),Y=K({key:"colorStyles",prop:"colors"}),Z=g.width,X=g.height,Q=g.minWidth,ee=g.minHeight,te=g.maxWidth,ne=g.maxHeight,re=g.size,oe=g.verticalAlign,ie=g.display,ae=g.overflow,se=g.overflowX,le=g.overflowY,ue=w.opacity,ce=x.fontSize,de=x.fontFamily,fe=x.fontWeight,pe=x.lineHeight,he=x.textAlign,me=x.fontStyle,ve=x.letterSpacing,ge=S.alignItems,ye=S.alignContent,be=S.justifyItems,we=S.justifyContent,ke=S.flexWrap,xe=S.flexDirection,Oe=S.flex,Se=S.flexGrow,Ce=S.flexShrink,je=S.flexBasis,De=S.justifySelf,Ae=S.alignSelf,Ee=S.order,Me=D.gridGap,Te=D.gridColumnGap,Le=D.gridRowGap,Ne=D.gridColumn,Pe=D.gridRow,Re=D.gridAutoFlow,He=D.gridAutoColumns,Fe=D.gridAutoRows,Ve=D.gridTemplateColumns,ze=D.gridTemplateRows,Be=D.gridTemplateAreas,Ie=D.gridArea,_e=M.borderWidth,$e=M.borderStyle,qe=M.borderColor,We=M.borderTop,Ue=M.borderRight,Ke=M.borderBottom,Ge=M.borderLeft,Je=M.borderRadius,Ye=N.backgroundImage,Ze=N.backgroundSize,Xe=N.backgroundPosition,Qe=N.backgroundRepeat,et=H.zIndex,tt=H.top,nt=H.right,rt=H.bottom,ot=H.left,it=function(e){var t=e.prop,n=e.cssProperty,r=e.alias,o=e.key,i=e.transformValue,a=e.scale,s=e.properties,l={};return l[t]=p({properties:s,property:n||t,scale:o,defaultScale:a,transform:i}),r&&(l[r]=l[t]),c(l)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Flex=t.Box=void 0;l(n(1));var r=l(n(56)),o=n(18),i=function(e){if(e&&e.__esModule)return e;var t=s();if(t&&t.has(e))return t.get(e);var n={};if(null!=e){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}}n.default=e,t&&t.set(e,n);return n}(n(40)),a=l(n(41));function s(){if("function"!==typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function l(e){return e&&e.__esModule?e:{default:e}}var u=(0,r.default)("div",{shouldForwardProp:a.default})({boxSizing:"border-box",margin:0,minWidth:0},(function(e){return(0,i.default)(e.__css)(e.theme)}),(function(e){var t=e.theme,n=e.variant,r=e.tx,o=void 0===r?"variants":r;return(0,i.default)((0,i.get)(t,o+"."+n,(0,i.get)(t,n)))(t)}),(function(e){return(0,i.default)(e.sx)(e.theme)}),(function(e){return e.css}),(0,o.compose)(o.space,o.layout,o.typography,o.color,o.flexbox));t.Box=u;var c=(0,r.default)(u)({display:"flex"});t.Flex=c},function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(o){return!1}}()?Object.assign:function(e,t){for(var n,s,l=a(e),u=1;u<arguments.length;u++){for(var c in n=Object(arguments[u]))o.call(n,c)&&(l[c]=n[c]);if(r){s=r(n);for(var d=0;d<s.length;d++)i.call(n,s[d])&&(l[s[d]]=n[s[d]])}}return l}},,,function(e,t,n){"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(78)},function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)},o={animationIterationCount: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,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},i=n(35),a=/[A-Z]|^ms/g,s=/_EMO_([^_]+?)_([^]*?)_EMO_/g,l=function(e){return 45===e.charCodeAt(1)},u=function(e){return null!=e&&"boolean"!==typeof e},c=Object(i.a)((function(e){return l(e)?e:e.replace(a,"-$&").toLowerCase()})),d=function(e,t){switch(e){case"animation":case"animationName":if("string"===typeof t)return t.replace(s,(function(e,t,n){return p={name:t,styles:n,next:p},t}))}return 1===o[e]||l(e)||"number"!==typeof t||0===t?t:t+"px"};function f(e,t,n,r){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return p={name:n.name,styles:n.styles,next:p},n.name;if(void 0!==n.styles){var o=n.next;if(void 0!==o)for(;void 0!==o;)p={name:o.name,styles:o.styles,next:p},o=o.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=f(e,t,n[o],!1);else for(var i in n){var a=n[i];if("object"!==typeof a)null!=t&&void 0!==t[a]?r+=i+"{"+t[a]+"}":u(a)&&(r+=c(i)+":"+d(i,a)+";");else if(!Array.isArray(a)||"string"!==typeof a[0]||null!=t&&void 0!==t[a[0]]){var s=f(e,t,a,!1);switch(i){case"animation":case"animationName":r+=c(i)+":"+s+";";break;default:r+=i+"{"+s+"}"}}else for(var l=0;l<a.length;l++)u(a[l])&&(r+=c(i)+":"+d(i,a[l])+";")}return r}(e,t,n);case"function":if(void 0!==e){var i=p,a=n(e);return p=i,f(e,t,a,r)}}if(null==t)return n;var s=t[n];return void 0===s||r?n:s}var p,h=/label:\s*([^\s;\n{]+)\s*;/g;var m=function(e,t,n){if(1===e.length&&"object"===typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var o=!0,i="";p=void 0;var a=e[0];null==a||void 0===a.raw?(o=!1,i+=f(n,t,a,!1)):i+=a[0];for(var s=1;s<e.length;s++)i+=f(n,t,e[s],46===i.charCodeAt(i.length-1)),o&&(i+=a[s]);h.lastIndex=0;for(var l,u="";null!==(l=h.exec(i));)u+="-"+l[1];return{name:r(i)+u,styles:i,next:p}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o}));function r(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]):r+=n+" "})),r}var o=function(e,t,n){var r=e.key+"-"+t.name;if(!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles),void 0===e.inserted[t.name]){var o=t;do{e.insert("."+r,o,e.sheet,!0);o=o.next}while(void 0!==o)}}},function(e,t,n){var r;!function(o){var i=/^\s+/,a=/\s+$/,s=0,l=o.round,u=o.min,c=o.max,d=o.random;function f(e,t){if(t=t||{},(e=e||"")instanceof f)return e;if(!(this instanceof f))return new f(e,t);var n=function(e){var t={r:0,g:0,b:0},n=1,r=null,s=null,l=null,d=!1,f=!1;"string"==typeof e&&(e=function(e){e=e.replace(i,"").replace(a,"").toLowerCase();var t,n=!1;if(M[e])e=M[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};if(t=B.rgb.exec(e))return{r:t[1],g:t[2],b:t[3]};if(t=B.rgba.exec(e))return{r:t[1],g:t[2],b:t[3],a:t[4]};if(t=B.hsl.exec(e))return{h:t[1],s:t[2],l:t[3]};if(t=B.hsla.exec(e))return{h:t[1],s:t[2],l:t[3],a:t[4]};if(t=B.hsv.exec(e))return{h:t[1],s:t[2],v:t[3]};if(t=B.hsva.exec(e))return{h:t[1],s:t[2],v:t[3],a:t[4]};if(t=B.hex8.exec(e))return{r:R(t[1]),g:R(t[2]),b:R(t[3]),a:z(t[4]),format:n?"name":"hex8"};if(t=B.hex6.exec(e))return{r:R(t[1]),g:R(t[2]),b:R(t[3]),format:n?"name":"hex"};if(t=B.hex4.exec(e))return{r:R(t[1]+""+t[1]),g:R(t[2]+""+t[2]),b:R(t[3]+""+t[3]),a:z(t[4]+""+t[4]),format:n?"name":"hex8"};if(t=B.hex3.exec(e))return{r:R(t[1]+""+t[1]),g:R(t[2]+""+t[2]),b:R(t[3]+""+t[3]),format:n?"name":"hex"};return!1}(e));"object"==typeof e&&(I(e.r)&&I(e.g)&&I(e.b)?(p=e.r,h=e.g,m=e.b,t={r:255*N(p,255),g:255*N(h,255),b:255*N(m,255)},d=!0,f="%"===String(e.r).substr(-1)?"prgb":"rgb"):I(e.h)&&I(e.s)&&I(e.v)?(r=F(e.s),s=F(e.v),t=function(e,t,n){e=6*N(e,360),t=N(t,100),n=N(n,100);var r=o.floor(e),i=e-r,a=n*(1-t),s=n*(1-i*t),l=n*(1-(1-i)*t),u=r%6;return{r:255*[n,s,a,a,l,n][u],g:255*[l,n,n,s,a,a][u],b:255*[a,a,l,n,n,s][u]}}(e.h,r,s),d=!0,f="hsv"):I(e.h)&&I(e.s)&&I(e.l)&&(r=F(e.s),l=F(e.l),t=function(e,t,n){var r,o,i;function a(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=N(e,360),t=N(t,100),n=N(n,100),0===t)r=o=i=n;else{var s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;r=a(l,s,e+1/3),o=a(l,s,e),i=a(l,s,e-1/3)}return{r:255*r,g:255*o,b:255*i}}(e.h,r,l),d=!0,f="hsl"),e.hasOwnProperty("a")&&(n=e.a));var p,h,m;return n=L(n),{ok:d,format:e.format||f,r:u(255,c(t.r,0)),g:u(255,c(t.g,0)),b:u(255,c(t.b,0)),a:n}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=l(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=l(this._r)),this._g<1&&(this._g=l(this._g)),this._b<1&&(this._b=l(this._b)),this._ok=n.ok,this._tc_id=s++}function p(e,t,n){e=N(e,255),t=N(t,255),n=N(n,255);var r,o,i=c(e,t,n),a=u(e,t,n),s=(i+a)/2;if(i==a)r=o=0;else{var l=i-a;switch(o=s>.5?l/(2-i-a):l/(i+a),i){case e:r=(t-n)/l+(t<n?6:0);break;case t:r=(n-e)/l+2;break;case n:r=(e-t)/l+4}r/=6}return{h:r,s:o,l:s}}function h(e,t,n){e=N(e,255),t=N(t,255),n=N(n,255);var r,o,i=c(e,t,n),a=u(e,t,n),s=i,l=i-a;if(o=0===i?0:l/i,i==a)r=0;else{switch(i){case e:r=(t-n)/l+(t<n?6:0);break;case t:r=(n-e)/l+2;break;case n:r=(e-t)/l+4}r/=6}return{h:r,s:o,v:s}}function m(e,t,n,r){var o=[H(l(e).toString(16)),H(l(t).toString(16)),H(l(n).toString(16))];return r&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function v(e,t,n,r){return[H(V(r)),H(l(e).toString(16)),H(l(t).toString(16)),H(l(n).toString(16))].join("")}function g(e,t){t=0===t?0:t||10;var n=f(e).toHsl();return n.s-=t/100,n.s=P(n.s),f(n)}function y(e,t){t=0===t?0:t||10;var n=f(e).toHsl();return n.s+=t/100,n.s=P(n.s),f(n)}function b(e){return f(e).desaturate(100)}function w(e,t){t=0===t?0:t||10;var n=f(e).toHsl();return n.l+=t/100,n.l=P(n.l),f(n)}function k(e,t){t=0===t?0:t||10;var n=f(e).toRgb();return n.r=c(0,u(255,n.r-l(-t/100*255))),n.g=c(0,u(255,n.g-l(-t/100*255))),n.b=c(0,u(255,n.b-l(-t/100*255))),f(n)}function x(e,t){t=0===t?0:t||10;var n=f(e).toHsl();return n.l-=t/100,n.l=P(n.l),f(n)}function O(e,t){var n=f(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,f(n)}function S(e){var t=f(e).toHsl();return t.h=(t.h+180)%360,f(t)}function C(e){var t=f(e).toHsl(),n=t.h;return[f(e),f({h:(n+120)%360,s:t.s,l:t.l}),f({h:(n+240)%360,s:t.s,l:t.l})]}function j(e){var t=f(e).toHsl(),n=t.h;return[f(e),f({h:(n+90)%360,s:t.s,l:t.l}),f({h:(n+180)%360,s:t.s,l:t.l}),f({h:(n+270)%360,s:t.s,l:t.l})]}function D(e){var t=f(e).toHsl(),n=t.h;return[f(e),f({h:(n+72)%360,s:t.s,l:t.l}),f({h:(n+216)%360,s:t.s,l:t.l})]}function A(e,t,n){t=t||6,n=n||30;var r=f(e).toHsl(),o=360/n,i=[f(e)];for(r.h=(r.h-(o*t>>1)+720)%360;--t;)r.h=(r.h+o)%360,i.push(f(r));return i}function E(e,t){t=t||6;for(var n=f(e).toHsv(),r=n.h,o=n.s,i=n.v,a=[],s=1/t;t--;)a.push(f({h:r,s:o,v:i})),i=(i+s)%1;return a}f.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:o.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:o.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:o.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=L(e),this._roundA=l(100*this._a)/100,this},toHsv:function(){var e=h(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=h(this._r,this._g,this._b),t=l(360*e.h),n=l(100*e.s),r=l(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=p(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=p(this._r,this._g,this._b),t=l(360*e.h),n=l(100*e.s),r=l(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return m(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,o){var i=[H(l(e).toString(16)),H(l(t).toString(16)),H(l(n).toString(16)),H(V(r))];if(o&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1))return i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0);return i.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:l(this._r),g:l(this._g),b:l(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+l(this._r)+", "+l(this._g)+", "+l(this._b)+")":"rgba("+l(this._r)+", "+l(this._g)+", "+l(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:l(100*N(this._r,255))+"%",g:l(100*N(this._g,255))+"%",b:l(100*N(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+l(100*N(this._r,255))+"%, "+l(100*N(this._g,255))+"%, "+l(100*N(this._b,255))+"%)":"rgba("+l(100*N(this._r,255))+"%, "+l(100*N(this._g,255))+"%, "+l(100*N(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(T[m(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+v(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var o=f(e);n="#"+v(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return f(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(w,arguments)},brighten:function(){return this._applyModification(k,arguments)},darken:function(){return this._applyModification(x,arguments)},desaturate:function(){return this._applyModification(g,arguments)},saturate:function(){return this._applyModification(y,arguments)},greyscale:function(){return this._applyModification(b,arguments)},spin:function(){return this._applyModification(O,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(A,arguments)},complement:function(){return this._applyCombination(S,arguments)},monochromatic:function(){return this._applyCombination(E,arguments)},splitcomplement:function(){return this._applyCombination(D,arguments)},triad:function(){return this._applyCombination(C,arguments)},tetrad:function(){return this._applyCombination(j,arguments)}},f.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:F(e[r]));e=n}return f(e,t)},f.equals=function(e,t){return!(!e||!t)&&f(e).toRgbString()==f(t).toRgbString()},f.random=function(){return f.fromRatio({r:d(),g:d(),b:d()})},f.mix=function(e,t,n){n=0===n?0:n||50;var r=f(e).toRgb(),o=f(t).toRgb(),i=n/100;return f({r:(o.r-r.r)*i+r.r,g:(o.g-r.g)*i+r.g,b:(o.b-r.b)*i+r.b,a:(o.a-r.a)*i+r.a})},f.readability=function(e,t){var n=f(e),r=f(t);return(o.max(n.getLuminance(),r.getLuminance())+.05)/(o.min(n.getLuminance(),r.getLuminance())+.05)},f.isReadable=function(e,t,n){var r,o,i=f.readability(e,t);switch(o=!1,(r=function(e){var t,n;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==n&&"large"!==n&&(n="small");return{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":o=i>=4.5;break;case"AAlarge":o=i>=3;break;case"AAAsmall":o=i>=7}return o},f.mostReadable=function(e,t,n){var r,o,i,a,s=null,l=0;o=(n=n||{}).includeFallbackColors,i=n.level,a=n.size;for(var u=0;u<t.length;u++)(r=f.readability(e,t[u]))>l&&(l=r,s=f(t[u]));return f.isReadable(e,s,{level:i,size:a})||!o?s:(n.includeFallbackColors=!1,f.mostReadable(e,["#fff","#000"],n))};var M=f.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},T=f.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(M);function L(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function N(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"===typeof e&&-1!=e.indexOf("%")}(e);return e=u(t,c(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),o.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function P(e){return u(1,c(0,e))}function R(e){return parseInt(e,16)}function H(e){return 1==e.length?"0"+e:""+e}function F(e){return e<=1&&(e=100*e+"%"),e}function V(e){return o.round(255*parseFloat(e)).toString(16)}function z(e){return R(e)/255}var B=function(){var e="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",t="[\\s|\\(]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")\\s*\\)?",n="[\\s|\\(]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")\\s*\\)?";return{CSS_UNIT:new RegExp(e),rgb:new RegExp("rgb"+t),rgba:new RegExp("rgba"+n),hsl:new RegExp("hsl"+t),hsla:new RegExp("hsla"+n),hsv:new RegExp("hsv"+t),hsva:new RegExp("hsva"+n),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function I(e){return!!B.CSS_UNIT.exec(e)}e.exports?e.exports=f:void 0===(r=function(){return f}.call(t,n,t,e))||(e.exports=r)}(Math)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Flex=t.Box=void 0;l(n(1));var r=l(n(56)),o=n(18),i=function(e){if(e&&e.__esModule)return e;var t=s();if(t&&t.has(e))return t.get(e);var n={};if(null!=e){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}}n.default=e,t&&t.set(e,n);return n}(n(40)),a=l(n(41));function s(){if("function"!==typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function l(e){return e&&e.__esModule?e:{default:e}}var u=(0,r.default)("div",{shouldForwardProp:a.default})({boxSizing:"border-box",margin:0,minWidth:0},(function(e){return(0,i.default)(e.__css)(e.theme)}),(function(e){var t=e.theme,n=e.variant,r=e.tx,o=void 0===r?"variants":r;return(0,i.default)((0,i.get)(t,o+"."+n,(0,i.get)(t,n)))(t)}),(function(e){return(0,i.default)(e.sx)(e.theme)}),(function(e){return e.css}),(0,o.compose)(o.space,o.layout,o.typography,o.color,o.flexbox));t.Box=u;var c=(0,r.default)(u)({display:"flex"});t.Flex=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o=n(3),i=function(e,t){return function(n){Array.isArray(e)||(e=[e]);for(var r=0,o=e.length;r<o;r++){var i=x(e[r])(n.selection);if(i){var a=p(i.pos,t)(n);if(a!==n)return a}}return n}},a=function(e){return function(t){if(c(t.selection)){var n=t.selection,i=n.$from,a=n.$to;if(e instanceof o.Fragment&&i.parent.canReplace(i.index(),i.indexAfter(),e)||i.parent.canReplaceWith(i.index(),i.indexAfter(),e.type))return f(t.replaceWith(i.pos,a.pos,e).setSelection(new r.NodeSelection(t.doc.resolve(i.pos))))}return t}},s=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return function(n){var o=r.Selection.findFrom(n.doc.resolve(e),t,!0);return o?n.setSelection(o):n}},l=function(e){return e.type&&e.type.spec.selectable},u=function(e,t,n){return function(e){return l(e)&&e.type.isLeaf}(e)?n.setSelection(new r.NodeSelection(n.doc.resolve(t))):s(t)(n)},c=function(e){return e instanceof r.NodeSelection},d=function(e,t){return Array.isArray(e)&&e.indexOf(t.type)>-1||t.type===e},f=function(e){return Object.assign(Object.create(e),e).setTime(Date.now())},p=function(e,t){return function(n){var r=n.doc.nodeAt(e),o=n.doc.resolve(e);if(h(o,t)){var i=(n=n.replaceWith(e,e+r.nodeSize,t)).selection.$from.pos-1;return n=s(Math.max(i,0),-1)(n),n=s(n.selection.$from.start())(n),f(n)}return n}},h=function(e,t){var n=e.node(e.depth);return n&&n.type.validContent(t instanceof o.Fragment?t:o.Fragment.from(t))},m=function(e){return function(t){var n=t.doc.nodeAt(e);return f(t.delete(e,e+n.nodeSize))}},v=function(e,t){var n=e.index();return t instanceof o.Fragment?e.parent.canReplace(n,n,t):t instanceof o.Node&&e.parent.canReplaceWith(n,n,t.type)},g=function(e){return!e||"paragraph"===e.type.name&&2===e.nodeSize},y=function(e){return function(t){var n=t.$from;return b(n,e)}},b=function(e,t){for(var n=e.depth;n>0;n--){var r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}},w=function(e,t){return function(n){var r=y(e)(n);if(r)return S(r.pos,t)}},k=function(e){return function(t){return!!y(e)(t)}},x=function(e){return function(t){return y((function(t){return d(e,t)}))(t)}},O=function(e){var t=e.$from.nodeBefore,n=r.Selection.findFrom(e.$from,-1);if(n&&t){var o=x(t.type)(n);return o?o.pos:n.$from.pos}},S=function(e,t){var n=t(e),r=n.node.childNodes[n.offset];return n.node.nodeType===Node.TEXT_NODE?n.node.parentNode:r&&r.nodeType!==Node.TEXT_NODE?r:n.node},C=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!e)throw new Error('Invalid "node" parameter');var n=[];return e.descendants((function(e,r){if(n.push({node:e,pos:r}),!t)return!1})),n},j=function(e,t,n){if(!e)throw new Error('Invalid "node" parameter');if(!t)throw new Error('Invalid "predicate" parameter');return C(e,n).filter((function(e){return t(e.node)}))},D=function(e,t,n){return j(e,(function(e){return e.type===t}),n)};t.isNodeSelection=c,t.canInsert=v,t.findParentNode=y,t.findParentNodeClosestToPos=b,t.findParentDomRef=w,t.hasParentNode=k,t.findParentNodeOfType=x,t.findParentNodeOfTypeClosestToPos=function(e,t){return b(e,(function(e){return d(t,e)}))},t.hasParentNodeOfType=function(e){return function(t){return k((function(t){return d(e,t)}))(t)}},t.findParentDomRefOfType=function(e,t){return function(n){return w((function(t){return d(e,t)}),t)(n)}},t.findSelectedNodeOfType=function(e){return function(t){if(c(t)){var n=t.node,r=t.$from;if(d(e,n))return{node:n,pos:r.pos,depth:r.depth}}}},t.findPositionOfNodeBefore=O,t.findDomRefAtPos=S,t.flatten=C,t.findChildren=j,t.findTextNodes=function(e,t){return j(e,(function(e){return e.isText}),t)},t.findInlineNodes=function(e,t){return j(e,(function(e){return e.isInline}),t)},t.findBlockNodes=function(e,t){return j(e,(function(e){return e.isBlock}),t)},t.findChildrenByAttr=function(e,t,n){return j(e,(function(e){return!!t(e.attrs)}),n)},t.findChildrenByType=D,t.findChildrenByMark=function(e,t,n){return j(e,(function(e){return t.isInSet(e.marks)}),n)},t.contains=function(e,t){return!!D(e,t).length},t.removeParentNodeOfType=function(e){return function(t){var n=x(e)(t.selection);return n?m(n.pos)(t):t}},t.replaceParentNodeOfType=i,t.removeSelectedNode=function(e){if(c(e.selection)){var t=e.selection.$from.pos,n=e.selection.$to.pos;return f(e.delete(t,n))}return e},t.replaceSelectedNode=a,t.setTextSelection=s,t.safeInsert=function(e,t,n){return function(r){var o="number"===typeof t,s=r.selection.$from,d=o?r.doc.resolve(t):c(r.selection)?r.doc.resolve(s.pos+1):s,p=d.parent;if(c(r.selection)&&n&&r!==(r=a(e)(r)))return r;if(g(p)&&r!==(r=i(p.type,e)(r))){var h=l(e)?d.before(d.depth):d.pos;return u(e,h,r)}if(v(d,e)){r.insert(d.pos,e);var m=o?d.pos:l(e)?r.selection.$anchor.pos-1:r.selection.$anchor.pos;return f(u(e,m,r))}for(var y=d.depth;y>0;y--){var b=d.after(y),w=r.doc.resolve(b);if(v(w,e))return r.insert(b,e),f(u(e,b,r))}return r}},t.setParentNodeMarkup=function(e,t,n,r){return function(o){var i=x(e)(o.selection);return i?f(o.setNodeMarkup(i.pos,t,Object.assign({},i.node.attrs,n),r)):o}},t.selectParentNodeOfType=function(e){return function(t){if(!c(t.selection)){var n=x(e)(t.selection);if(n)return f(t.setSelection(r.NodeSelection.create(t.doc,n.pos)))}return t}},t.removeNodeBefore=function(e){var t=O(e.selection);return"number"===typeof t?m(t)(e):e}},function(e,t,n){"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return m})),n.d(t,"b",(function(){return v}));var r=n(29);var o=n(1);var i=function(){function e(e){this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.before=null}var t=e.prototype;return t.insert=function(e){if(this.ctr%(this.isSpeedy?65e3:1)===0){var t,n=function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t}(this);t=0===this.tags.length?this.before:this.tags[this.tags.length-1].nextSibling,this.container.insertBefore(n,t),this.tags.push(n)}var r=this.tags[this.tags.length-1];if(this.isSpeedy){var o=function(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]}(r);try{var i=105===e.charCodeAt(1)&&64===e.charCodeAt(0);o.insertRule(e,i?0:o.cssRules.length)}catch(a){0}}else r.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}();var a=function(e){function t(e,r,l,u,f){for(var p,h,m,v,w,x=0,O=0,S=0,C=0,j=0,L=0,P=m=p=0,H=0,F=0,V=0,z=0,B=l.length,I=B-1,_="",$="",q="",W="";H<B;){if(h=l.charCodeAt(H),H===I&&0!==O+C+S+x&&(0!==O&&(h=47===O?10:47),C=S=x=0,B++,I++),0===O+C+S+x){if(H===I&&(0<F&&(_=_.replace(d,"")),0<_.trim().length)){switch(h){case 32:case 9:case 59:case 13:case 10:break;default:_+=l.charAt(H)}h=59}switch(h){case 123:for(p=(_=_.trim()).charCodeAt(0),m=1,z=++H;H<B;){switch(h=l.charCodeAt(H)){case 123:m++;break;case 125:m--;break;case 47:switch(h=l.charCodeAt(H+1)){case 42:case 47:e:{for(P=H+1;P<I;++P)switch(l.charCodeAt(P)){case 47:if(42===h&&42===l.charCodeAt(P-1)&&H+2!==P){H=P+1;break e}break;case 10:if(47===h){H=P+1;break e}}H=P}}break;case 91:h++;case 40:h++;case 34:case 39:for(;H++<I&&l.charCodeAt(H)!==h;);}if(0===m)break;H++}if(m=l.substring(z,H),0===p&&(p=(_=_.replace(c,"").trim()).charCodeAt(0)),64===p){switch(0<F&&(_=_.replace(d,"")),h=_.charCodeAt(1)){case 100:case 109:case 115:case 45:F=r;break;default:F=T}if(z=(m=t(r,F,m,h,f+1)).length,0<N&&(w=s(3,m,F=n(T,_,V),r,A,D,z,h,f,u),_=F.join(""),void 0!==w&&0===(z=(m=w.trim()).length)&&(h=0,m="")),0<z)switch(h){case 115:_=_.replace(k,a);case 100:case 109:case 45:m=_+"{"+m+"}";break;case 107:m=(_=_.replace(g,"$1 $2"))+"{"+m+"}",m=1===M||2===M&&i("@"+m,3)?"@-webkit-"+m+"@"+m:"@"+m;break;default:m=_+m,112===u&&($+=m,m="")}else m=""}else m=t(r,n(r,_,V),m,u,f+1);q+=m,m=V=F=P=p=0,_="",h=l.charCodeAt(++H);break;case 125:case 59:if(1<(z=(_=(0<F?_.replace(d,""):_).trim()).length))switch(0===P&&(p=_.charCodeAt(0),45===p||96<p&&123>p)&&(z=(_=_.replace(" ",":")).length),0<N&&void 0!==(w=s(1,_,r,e,A,D,$.length,u,f,u))&&0===(z=(_=w.trim()).length)&&(_="\0\0"),p=_.charCodeAt(0),h=_.charCodeAt(1),p){case 0:break;case 64:if(105===h||99===h){W+=_+l.charAt(H);break}default:58!==_.charCodeAt(z-1)&&($+=o(_,p,h,_.charCodeAt(2)))}V=F=P=p=0,_="",h=l.charCodeAt(++H)}}switch(h){case 13:case 10:47===O?O=0:0===1+p&&107!==u&&0<_.length&&(F=1,_+="\0"),0<N*R&&s(0,_,r,e,A,D,$.length,u,f,u),D=1,A++;break;case 59:case 125:if(0===O+C+S+x){D++;break}default:switch(D++,v=l.charAt(H),h){case 9:case 32:if(0===C+x+O)switch(j){case 44:case 58:case 9:case 32:v="";break;default:32!==h&&(v=" ")}break;case 0:v="\\0";break;case 12:v="\\f";break;case 11:v="\\v";break;case 38:0===C+O+x&&(F=V=1,v="\f"+v);break;case 108:if(0===C+O+x+E&&0<P)switch(H-P){case 2:112===j&&58===l.charCodeAt(H-3)&&(E=j);case 8:111===L&&(E=L)}break;case 58:0===C+O+x&&(P=H);break;case 44:0===O+S+C+x&&(F=1,v+="\r");break;case 34:case 39:0===O&&(C=C===h?0:0===C?h:C);break;case 91:0===C+O+S&&x++;break;case 93:0===C+O+S&&x--;break;case 41:0===C+O+x&&S--;break;case 40:if(0===C+O+x){if(0===p)if(2*j+3*L===533);else p=1;S++}break;case 64:0===O+S+C+x+P+m&&(m=1);break;case 42:case 47:if(!(0<C+x+S))switch(O){case 0:switch(2*h+3*l.charCodeAt(H+1)){case 235:O=47;break;case 220:z=H,O=42}break;case 42:47===h&&42===j&&z+2!==H&&(33===l.charCodeAt(z+2)&&($+=l.substring(z,H+1)),v="",O=0)}}0===O&&(_+=v)}L=j,j=h,H++}if(0<(z=$.length)){if(F=r,0<N&&(void 0!==(w=s(2,$,F,e,A,D,z,u,f,u))&&0===($=w).length))return W+$+q;if($=F.join(",")+"{"+$+"}",0!==M*E){switch(2!==M||i($,2)||(E=0),E){case 111:$=$.replace(b,":-moz-$1")+$;break;case 112:$=$.replace(y,"::-webkit-input-$1")+$.replace(y,"::-moz-$1")+$.replace(y,":-ms-input-$1")+$}E=0}}return W+$+q}function n(e,t,n){var o=t.trim().split(m);t=o;var i=o.length,a=e.length;switch(a){case 0:case 1:var s=0;for(e=0===a?"":e[0]+" ";s<i;++s)t[s]=r(e,t[s],n).trim();break;default:var l=s=0;for(t=[];s<i;++s)for(var u=0;u<a;++u)t[l++]=r(e[u]+" ",o[s],n).trim()}return t}function r(e,t,n){var r=t.charCodeAt(0);switch(33>r&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(v,"$1"+e.trim());case 58:return e.trim()+t.replace(v,"$1"+e.trim());default:if(0<1*n&&0<t.indexOf("\f"))return t.replace(v,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function o(e,t,n,r){var a=e+";",s=2*t+3*n+4*r;if(944===s){e=a.indexOf(":",9)+1;var l=a.substring(e,a.length-1).trim();return l=a.substring(0,e).trim()+l+";",1===M||2===M&&i(l,1)?"-webkit-"+l+l:l}if(0===M||2===M&&!i(a,1))return a;switch(s){case 1015:return 97===a.charCodeAt(10)?"-webkit-"+a+a:a;case 951:return 116===a.charCodeAt(3)?"-webkit-"+a+a:a;case 963:return 110===a.charCodeAt(5)?"-webkit-"+a+a:a;case 1009:if(100!==a.charCodeAt(4))break;case 969:case 942:return"-webkit-"+a+a;case 978:return"-webkit-"+a+"-moz-"+a+a;case 1019:case 983:return"-webkit-"+a+"-moz-"+a+"-ms-"+a+a;case 883:if(45===a.charCodeAt(8))return"-webkit-"+a+a;if(0<a.indexOf("image-set(",11))return a.replace(j,"$1-webkit-$2")+a;break;case 932:if(45===a.charCodeAt(4))switch(a.charCodeAt(5)){case 103:return"-webkit-box-"+a.replace("-grow","")+"-webkit-"+a+"-ms-"+a.replace("grow","positive")+a;case 115:return"-webkit-"+a+"-ms-"+a.replace("shrink","negative")+a;case 98:return"-webkit-"+a+"-ms-"+a.replace("basis","preferred-size")+a}return"-webkit-"+a+"-ms-"+a+a;case 964:return"-webkit-"+a+"-ms-flex-"+a+a;case 1023:if(99!==a.charCodeAt(8))break;return"-webkit-box-pack"+(l=a.substring(a.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+a+"-ms-flex-pack"+l+a;case 1005:return p.test(a)?a.replace(f,":-webkit-")+a.replace(f,":-moz-")+a:a;case 1e3:switch(t=(l=a.substring(13).trim()).indexOf("-")+1,l.charCodeAt(0)+l.charCodeAt(t)){case 226:l=a.replace(w,"tb");break;case 232:l=a.replace(w,"tb-rl");break;case 220:l=a.replace(w,"lr");break;default:return a}return"-webkit-"+a+"-ms-"+l+a;case 1017:if(-1===a.indexOf("sticky",9))break;case 975:switch(t=(a=e).length-10,s=(l=(33===a.charCodeAt(t)?a.substring(0,t):a).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|l.charCodeAt(7))){case 203:if(111>l.charCodeAt(8))break;case 115:a=a.replace(l,"-webkit-"+l)+";"+a;break;case 207:case 102:a=a.replace(l,"-webkit-"+(102<s?"inline-":"")+"box")+";"+a.replace(l,"-webkit-"+l)+";"+a.replace(l,"-ms-"+l+"box")+";"+a}return a+";";case 938:if(45===a.charCodeAt(5))switch(a.charCodeAt(6)){case 105:return l=a.replace("-items",""),"-webkit-"+a+"-webkit-box-"+l+"-ms-flex-"+l+a;case 115:return"-webkit-"+a+"-ms-flex-item-"+a.replace(O,"")+a;default:return"-webkit-"+a+"-ms-flex-line-pack"+a.replace("align-content","").replace(O,"")+a}break;case 973:case 989:if(45!==a.charCodeAt(3)||122===a.charCodeAt(4))break;case 931:case 953:if(!0===C.test(e))return 115===(l=e.substring(e.indexOf(":")+1)).charCodeAt(0)?o(e.replace("stretch","fill-available"),t,n,r).replace(":fill-available",":stretch"):a.replace(l,"-webkit-"+l)+a.replace(l,"-moz-"+l.replace("fill-",""))+a;break;case 962:if(a="-webkit-"+a+(102===a.charCodeAt(5)?"-ms-"+a:"")+a,211===n+r&&105===a.charCodeAt(13)&&0<a.indexOf("transform",10))return a.substring(0,a.indexOf(";",27)+1).replace(h,"$1-webkit-$2")+a}return a}function i(e,t){var n=e.indexOf(1===t?":":"{"),r=e.substring(0,3!==t?n:10);return n=e.substring(n+1,e.length-1),P(2!==t?r:r.replace(S,"$1"),n,t)}function a(e,t){var n=o(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return n!==t+";"?n.replace(x," or ($1)").substring(4):"("+t+")"}function s(e,t,n,r,o,i,a,s,l,c){for(var d,f=0,p=t;f<N;++f)switch(d=L[f].call(u,e,p,n,r,o,i,a,s,l,c)){case void 0:case!1:case!0:case null:break;default:p=d}if(p!==t)return p}function l(e){return void 0!==(e=e.prefix)&&(P=null,e?"function"!==typeof e?M=1:(M=2,P=e):M=0),l}function u(e,n){var r=e;if(33>r.charCodeAt(0)&&(r=r.trim()),r=[r],0<N){var o=s(-1,n,r,r,A,D,0,0,0,0);void 0!==o&&"string"===typeof o&&(n=o)}var i=t(T,r,n,0,0);return 0<N&&(void 0!==(o=s(-2,i,r,r,A,D,i.length,0,0,0))&&(i=o)),"",E=0,D=A=1,i}var c=/^\0+/g,d=/[\0\r\f]/g,f=/: */g,p=/zoo|gra/,h=/([,: ])(transform)/g,m=/,\r+?/g,v=/([\t\r\n ])*\f?&/g,g=/@(k\w+)\s*(\S*)\s*/,y=/::(place)/g,b=/:(read-only)/g,w=/[svh]\w+-[tblr]{2}/,k=/\(\s*(.*)\s*\)/g,x=/([\s\S]*?);/g,O=/-self|flex-/g,S=/[^]*?(:[rp][el]a[\w-]+)[^]*/,C=/stretch|:\s*\w+\-(?:conte|avail)/,j=/([^-])(image-set\()/,D=1,A=1,E=0,M=1,T=[],L=[],N=0,P=null,R=0;return u.use=function e(t){switch(t){case void 0:case null:N=L.length=0;break;default:if("function"===typeof t)L[N++]=t;else if("object"===typeof t)for(var n=0,r=t.length;n<r;++n)e(t[n]);else R=0|!!t}return e},u.set=l,void 0!==e&&l(e),u},s=(n(44),"/*|*/");function l(e){e&&u.current.insert(e+"}")}var u={current:null},c=function(e,t,n,r,o,i,a,c,d,f){switch(e){case 1:switch(t.charCodeAt(0)){case 64:return u.current.insert(t+";"),"";case 108:if(98===t.charCodeAt(2))return""}break;case 2:if(0===c)return t+s;break;case 3:switch(c){case 102:case 112:return u.current.insert(n[0]+t),"";default:return t+(0===f?s:"")}case-2:t.split("/*|*/}").forEach(l)}},d=function(e){void 0===e&&(e={});var t,n=e.key||"css";void 0!==e.prefix&&(t={prefix:e.prefix});var r=new a(t);var o,s={};o=e.container||document.head;var l,d=document.querySelectorAll("style[data-emotion-"+n+"]");Array.prototype.forEach.call(d,(function(e){e.getAttribute("data-emotion-"+n).split(" ").forEach((function(e){s[e]=!0})),e.parentNode!==o&&o.appendChild(e)})),r.use(e.stylisPlugins)(c),l=function(e,t,n,o){var i=t.name;u.current=n,r(e,t.styles),o&&(f.inserted[i]=!0)};var f={key:n,sheet:new i({key:n,container:o,nonce:e.nonce,speedy:e.speedy}),nonce:e.nonce,inserted:s,registered:{},insert:l};return f},f=(n(84),n(25)),p=n(24),h=(Object.prototype.hasOwnProperty,Object(o.createContext)("undefined"!==typeof HTMLElement?d():null)),m=Object(o.createContext)({}),v=(h.Provider,function(e){var t=function(t,n){return Object(o.createElement)(h.Consumer,null,(function(r){return e(t,r,n)}))};return Object(o.forwardRef)(t)});o.Component;var g=function e(t){for(var n=t.length,r=0,o="";r<n;r++){var i=t[r];if(null!=i){var a=void 0;switch(typeof i){case"boolean":break;case"object":if(Array.isArray(i))a=e(i);else for(var s in a="",i)i[s]&&s&&(a&&(a+=" "),a+=s);break;default:a=i}a&&(o&&(o+=" "),o+=a)}}return o};function y(e,t,n){var r=[],o=Object(f.a)(e,r,n);return r.length<2?n:o+t(r)}var b=function(){return null};v((function(e,t){return Object(o.createElement)(m.Consumer,null,(function(n){var r=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o=Object(p.a)(n,t.registered);return Object(f.b)(t,o,!1),t.key+"-"+o.name},i={css:r,cx:function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return y(t.registered,r,g(n))},theme:n},a=e.children(i);var s=Object(o.createElement)(b,null);return Object(o.createElement)(o.Fragment,null,s,a)}))}))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}e.exports=n},,function(e,t,n){"use strict";n.d(t,"e",(function(){return DM})),n.d(t,"b",(function(){return cC})),n.d(t,"d",(function(){return hM})),n.d(t,"a",(function(){return Jd})),n.d(t,"c",(function(){return KO}));var r={};n.r(r),n.d(r,"boolean",(function(){return UC})),n.d(r,"booleanish",(function(){return KC})),n.d(r,"overloadedBoolean",(function(){return GC})),n.d(r,"number",(function(){return JC})),n.d(r,"spaceSeparated",(function(){return YC})),n.d(r,"commaSeparated",(function(){return ZC})),n.d(r,"commaOrSpaceSeparated",(function(){return XC}));var o=n(9),i=n(6),a=n(16),s=n(10),l=n(11),u=n(17),c=n(4),d=n(5),f=n(7),p=n(2),h=n(13),m=n(12),v=n(3),g=n(8),y="undefined"!=typeof navigator?navigator:null,b="undefined"!=typeof document?document:null,w=y&&y.userAgent||"",k=/Edge\/(\d+)/.exec(w),x=/MSIE \d/.exec(w),O=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(w),S=!!(x||O||k),C=x?document.documentMode:O?+O[1]:k?+k[1]:0,j=!S&&/gecko\/(\d+)/i.test(w);j&&(/Firefox\/(\d+)/.exec(w)||[0,0])[1];var D=!S&&/Chrome\/(\d+)/.exec(w),A=!!D,E=D?+D[1]:0,M=!S&&!!y&&/Apple Computer/.test(y.vendor),T=M&&(/Mobile\/\w+/.test(w)||!!y&&y.maxTouchPoints>2),L=T||!!y&&/Mac/.test(y.platform),N=/Android \d/.test(w),P=!!b&&"webkitFontSmoothing"in b.documentElement.style,R=P?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,H=function(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t},F=function(e){var t=e.assignedSlot||e.parentNode;return t&&11==t.nodeType?t.host:t},V=null,z=function(e,t,n){var r=V||(V=document.createRange());return r.setEnd(e,null==n?e.nodeValue.length:n),r.setStart(e,t||0),r},B=function(e,t,n,r){return n&&(_(e,t,n,r,-1)||_(e,t,n,r,1))},I=/^(img|br|input|textarea|hr)$/i;function _(e,t,n,r,o){for(;;){if(e==n&&t==r)return!0;if(t==(o<0?0:$(e))){var i=e.parentNode;if(!i||1!=i.nodeType||W(e)||I.test(e.nodeName)||"false"==e.contentEditable)return!1;t=H(e)+(o<0?0:1),e=i}else{if(1!=e.nodeType)return!1;if("false"==(e=e.childNodes[t+(o<0?-1:0)]).contentEditable)return!1;t=o<0?$(e):0}}}function $(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function q(e,t,n){for(var r=0==t,o=t==$(e);r||o;){if(e==n)return!0;var i=H(e);if(!(e=e.parentNode))return!1;r=r&&0==i,o=o&&i==$(e)}}function W(e){for(var t,n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}var U=function(e){var t=e.isCollapsed;return t&&A&&e.rangeCount&&!e.getRangeAt(0).collapsed&&(t=!1),t};function K(e,t){var n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function G(e){return{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function J(e,t){return"number"==typeof e?e:e[t]}function Y(e){var 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 Z(e,t,n){for(var r=e.someProp("scrollThreshold")||0,o=e.someProp("scrollMargin")||5,i=e.dom.ownerDocument,a=n||e.dom;a;a=F(a))if(1==a.nodeType){var s=a,l=s==i.body,u=l?G(i):Y(s),c=0,d=0;if(t.top<u.top+J(r,"top")?d=-(u.top-t.top+J(o,"top")):t.bottom>u.bottom-J(r,"bottom")&&(d=t.bottom-u.bottom+J(o,"bottom")),t.left<u.left+J(r,"left")?c=-(u.left-t.left+J(o,"left")):t.right>u.right-J(r,"right")&&(c=t.right-u.right+J(o,"right")),c||d)if(l)i.defaultView.scrollBy(c,d);else{var f=s.scrollLeft,p=s.scrollTop;d&&(s.scrollTop+=d),c&&(s.scrollLeft+=c);var h=s.scrollLeft-f,m=s.scrollTop-p;t={left:t.left-h,top:t.top-m,right:t.right-h,bottom:t.bottom-m}}if(l)break}}function X(e){for(var t=[],n=e.ownerDocument,r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=F(r));return t}function Q(e,t){for(var n=0;n<e.length;n++){var r=e[n],o=r.dom,i=r.top,a=r.left;o.scrollTop!=i+t&&(o.scrollTop=i+t),o.scrollLeft!=a&&(o.scrollLeft=a)}}var ee=null;function te(e,t){for(var n,r,o=2e8,i=0,a=t.top,s=t.top,l=e.firstChild,u=0;l;l=l.nextSibling,u++){var c=void 0;if(1==l.nodeType)c=l.getClientRects();else{if(3!=l.nodeType)continue;c=z(l).getClientRects()}for(var d=0;d<c.length;d++){var f=c[d];if(f.top<=a&&f.bottom>=s){a=Math.max(f.bottom,a),s=Math.min(f.top,s);var p=f.left>t.left?f.left-t.left:f.right<t.left?t.left-f.right:0;if(p<o){n=l,o=p,r=p&&3==n.nodeType?{left:f.right<t.left?f.right:f.left,top:t.top}:t,1==l.nodeType&&p&&(i=u+(t.left>=(f.left+f.right)/2?1:0));continue}}!n&&(t.left>=f.right&&t.top>=f.top||t.left>=f.left&&t.top>=f.bottom)&&(i=u+1)}}return n&&3==n.nodeType?function(e,t){for(var n=e.nodeValue.length,r=document.createRange(),o=0;o<n;o++){r.setEnd(e,o+1),r.setStart(e,o);var i=ie(r,1);if(i.top!=i.bottom&&ne(t,i))return{node:e,offset:o+(t.left>=(i.left+i.right)/2?1:0)}}return{node:e,offset:0}}(n,r):!n||o&&1==n.nodeType?{node:e,offset:i}:te(n,r)}function ne(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function re(e,t,n){var r=e.childNodes.length;if(r&&n.top<n.bottom)for(var o=Math.max(0,Math.min(r-1,Math.floor(r*(t.top-n.top)/(n.bottom-n.top))-2)),i=o;;){var a=e.childNodes[i];if(1==a.nodeType)for(var s=a.getClientRects(),l=0;l<s.length;l++){var u=s[l];if(ne(t,u))return re(a,t,u)}if((i=(i+1)%r)==o)break}return e}function oe(e,t){var n,r=e.dom.ownerDocument,o=0;if(r.caretPositionFromPoint)try{var i=r.caretPositionFromPoint(t.left,t.top);i&&(n=i.offsetNode,o=i.offset)}catch(h){}if(!n&&r.caretRangeFromPoint){var a=r.caretRangeFromPoint(t.left,t.top);a&&(n=a.startContainer,o=a.startOffset)}var s,l=(e.root.elementFromPoint?e.root:r).elementFromPoint(t.left,t.top+1);if(!l||!e.dom.contains(1!=l.nodeType?l.parentNode:l)){var u=e.dom.getBoundingClientRect();if(!ne(t,u))return null;if(!(l=re(e.dom,t,u)))return null}if(M)for(var c=l;n&&c;c=F(c))c.draggable&&(n=void 0);if(l=function(e,t){var n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left?n:e}(l,t),n){if(j&&1==n.nodeType&&(o=Math.min(o,n.childNodes.length))<n.childNodes.length){var d,f=n.childNodes[o];"IMG"==f.nodeName&&(d=f.getBoundingClientRect()).right<=t.left&&d.bottom>t.top&&o++}n==e.dom&&o==n.childNodes.length-1&&1==n.lastChild.nodeType&&t.top>n.lastChild.getBoundingClientRect().bottom?s=e.state.doc.content.size:0!=o&&1==n.nodeType&&"BR"==n.childNodes[o-1].nodeName||(s=function(e,t,n,r){for(var o=-1,i=t;i!=e.dom;){var a=e.docView.nearestDesc(i,!0);if(!a)return null;if(a.node.isBlock&&a.parent){var s=a.dom.getBoundingClientRect();if(s.left>r.left||s.top>r.top)o=a.posBefore;else{if(!(s.right<r.left||s.bottom<r.top))break;o=a.posAfter}}i=a.dom.parentNode}return o>-1?o:e.docView.posFromDOM(t,n,1)}(e,n,o,t))}null==s&&(s=function(e,t,n){var r=te(t,n),o=r.node,i=r.offset,a=-1;if(1==o.nodeType&&!o.firstChild){var s=o.getBoundingClientRect();a=s.left!=s.right&&n.left>(s.left+s.right)/2?1:-1}return e.docView.posFromDOM(o,i,a)}(e,l,t));var p=e.docView.nearestDesc(l,!0);return{pos:s,inside:p?p.posAtStart-p.border:-1}}function ie(e,t){var n=e.getClientRects();return n.length?n[t<0?0:n.length-1]:e.getBoundingClientRect()}var ae=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function se(e,t,n){var r=e.docView.domFromPos(t,n<0?-1:1),o=r.node,i=r.offset,a=P||j;if(3==o.nodeType){if(!a||!ae.test(o.nodeValue)&&(n<0?i:i!=o.nodeValue.length)){var s=i,l=i,u=n<0?1:-1;return n<0&&!i?(l++,u=-1):n>=0&&i==o.nodeValue.length?(s--,u=1):n<0?s--:l++,le(ie(z(o,s,l),u),u<0)}var c=ie(z(o,i,i),n);if(j&&i&&/\s/.test(o.nodeValue[i-1])&&i<o.nodeValue.length){var d=ie(z(o,i-1,i-1),-1);if(d.top==c.top){var f=ie(z(o,i,i+1),-1);if(f.top!=c.top)return le(f,f.left<d.left)}}return c}if(!e.state.doc.resolve(t).parent.inlineContent){if(i&&(n<0||i==$(o))){var p=o.childNodes[i-1];if(1==p.nodeType)return ue(p.getBoundingClientRect(),!1)}if(i<$(o)){var h=o.childNodes[i];if(1==h.nodeType)return ue(h.getBoundingClientRect(),!0)}return ue(o.getBoundingClientRect(),n>=0)}if(i&&(n<0||i==$(o))){var m=o.childNodes[i-1],v=3==m.nodeType?z(m,$(m)-(a?0:1)):1!=m.nodeType||"BR"==m.nodeName&&m.nextSibling?null:m;if(v)return le(ie(v,1),!1)}if(i<$(o)){for(var g=o.childNodes[i];g.pmViewDesc&&g.pmViewDesc.ignoreForCoords;)g=g.nextSibling;var y=g?3==g.nodeType?z(g,0,a?0:1):1==g.nodeType?g:null:null;if(y)return le(ie(y,-1),!0)}return le(ie(3==o.nodeType?z(o):o,-n),n>=0)}function le(e,t){if(0==e.width)return e;var n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function ue(e,t){if(0==e.height)return e;var n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function ce(e,t,n){var r=e.state,o=e.root.activeElement;r!=t&&e.updateState(t),o!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),o!=e.dom&&o&&o.focus()}}var de=/[\u0590-\u08ac]/;var fe=null,pe=null,he=!1;function me(e,t,n){return fe==t&&pe==n?he:(fe=t,pe=n,he="up"==n||"down"==n?function(e,t,n){var r=t.selection,o="up"==n?r.$from:r.$to;return ce(e,t,(function(){for(var t=e.docView.domFromPos(o.pos,"up"==n?-1:1).node;;){var r=e.docView.nearestDesc(t,!0);if(!r)break;if(r.node.isBlock){t=r.dom;break}t=r.dom.parentNode}for(var i=se(e,o.pos,1),a=t.firstChild;a;a=a.nextSibling){var s=void 0;if(1==a.nodeType)s=a.getClientRects();else{if(3!=a.nodeType)continue;s=z(a,0,a.nodeValue.length).getClientRects()}for(var l=0;l<s.length;l++){var u=s[l];if(u.bottom>u.top+1&&("up"==n?i.top-u.top>2*(u.bottom-i.top):u.bottom-i.bottom>2*(i.bottom-u.top)))return!1}}return!0}))}(e,t,n):function(e,t,n){var r=t.selection.$head;if(!r.parent.isTextblock)return!1;var o=r.parentOffset,i=!o,a=o==r.parent.content.size,s=e.domSelection();return de.test(r.parent.textContent)&&s.modify?ce(e,t,(function(){var t=s.getRangeAt(0),o=s.focusNode,i=s.focusOffset,a=s.caretBidiLevel;s.modify("move",n,"character");var l=!(r.depth?e.docView.domAfterPos(r.before()):e.dom).contains(1==s.focusNode.nodeType?s.focusNode:s.focusNode.parentNode)||o==s.focusNode&&i==s.focusOffset;return s.removeAllRanges(),s.addRange(t),null!=a&&(s.caretBidiLevel=a),l})):"left"==n||"backward"==n?i:a}(e,t,n))}var ve=function(){function e(t,n,r,o){Object(c.a)(this,e),this.parent=t,this.children=n,this.dom=r,this.contentDOM=o,this.dirty=0,r.pmViewDesc=this}return Object(d.a)(e,[{key:"matchesWidget",value:function(e){return!1}},{key:"matchesMark",value:function(e){return!1}},{key:"matchesNode",value:function(e,t,n){return!1}},{key:"matchesHack",value:function(e){return!1}},{key:"parseRule",value:function(){return null}},{key:"stopEvent",value:function(e){return!1}},{key:"size",get:function(){for(var e=0,t=0;t<this.children.length;t++)e+=this.children[t].size;return e}},{key:"border",get:function(){return 0}},{key:"destroy",value:function(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(var e=0;e<this.children.length;e++)this.children[e].destroy()}},{key:"posBeforeChild",value:function(e){for(var t=0,n=this.posAtStart;;t++){var r=this.children[t];if(r==e)return n;n+=r.size}}},{key:"posBefore",get:function(){return this.parent.posBeforeChild(this)}},{key:"posAtStart",get:function(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}},{key:"posAfter",get:function(){return this.posBefore+this.size}},{key:"posAtEnd",get:function(){return this.posAtStart+this.size-2*this.border}},{key:"localPosFromDOM",value:function(e,t,n){if(this.contentDOM&&this.contentDOM.contains(1==e.nodeType?e:e.parentNode)){if(n<0){var r,o;if(e==this.contentDOM)r=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;r=e.previousSibling}for(;r&&(!(o=r.pmViewDesc)||o.parent!=this);)r=r.previousSibling;return r?this.posBeforeChild(o)+o.size:this.posAtStart}var i,a;if(e==this.contentDOM)i=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.nextSibling}for(;i&&(!(a=i.pmViewDesc)||a.parent!=this);)i=i.nextSibling;return i?this.posBeforeChild(a):this.posAtEnd}var s;if(e==this.dom&&this.contentDOM)s=t>H(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))s=2&e.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==t)for(var l=e;;l=l.parentNode){if(l==this.dom){s=!1;break}if(l.previousSibling)break}if(null==s&&t==e.childNodes.length)for(var u=e;;u=u.parentNode){if(u==this.dom){s=!0;break}if(u.nextSibling)break}}return(null==s?n>0:s)?this.posAtEnd:this.posAtStart}},{key:"nearestDesc",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!0,r=e;r;r=r.parentNode){var o=this.getDesc(r),i=void 0;if(o&&(!t||o.node)){if(!n||!(i=o.nodeDOM)||(1==i.nodeType?i.contains(1==e.nodeType?e:e.parentNode):i==e))return o;n=!1}}}},{key:"getDesc",value:function(e){for(var t=e.pmViewDesc,n=t;n;n=n.parent)if(n==this)return t}},{key:"posFromDOM",value:function(e,t,n){for(var r=e;r;r=r.parentNode){var o=this.getDesc(r);if(o)return o.localPosFromDOM(e,t,n)}return-1}},{key:"descAt",value:function(e){for(var t=0,n=0;t<this.children.length;t++){var r=this.children[t],o=n+r.size;if(n==e&&o!=n){for(;!r.border&&r.children.length;)r=r.children[0];return r}if(e<o)return r.descAt(e-n-r.border);n=o}}},{key:"domFromPos",value:function(e,t){if(!this.contentDOM)return{node:this.dom,offset:0};for(var n,r=0,o=0,i=0;r<this.children.length;r++){var a=this.children[r],s=i+a.size;if(s>e||a instanceof Oe){o=e-i;break}i=s}if(o)return this.children[r].domFromPos(o-this.children[r].border,t);for(;r&&!(n=this.children[r-1]).size&&n instanceof ge&&n.side>=0;r--);if(t<=0){for(var l,u=!0;(l=r?this.children[r-1]:null)&&l.dom.parentNode!=this.contentDOM;r--,u=!1);return l&&t&&u&&!l.border&&!l.domAtom?l.domFromPos(l.size,t):{node:this.contentDOM,offset:l?H(l.dom)+1:0}}for(var c,d=!0;(c=r<this.children.length?this.children[r]:null)&&c.dom.parentNode!=this.contentDOM;r++,d=!1);return c&&d&&!c.border&&!c.domAtom?c.domFromPos(0,t):{node:this.contentDOM,offset:c?H(c.dom):this.contentDOM.childNodes.length}}},{key:"parseRange",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(0==this.children.length)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};for(var r=-1,o=-1,i=n,a=0;;a++){var s=this.children[a],l=i+s.size;if(-1==r&&e<=l){var u=i+s.border;if(e>=u&&t<=l-s.border&&s.node&&s.contentDOM&&this.contentDOM.contains(s.contentDOM))return s.parseRange(e,t,u);e=i;for(var c=a;c>0;c--){var d=this.children[c-1];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(1)){r=H(d.dom)+1;break}e-=d.size}-1==r&&(r=0)}if(r>-1&&(l>t||a==this.children.length-1)){t=l;for(var f=a+1;f<this.children.length;f++){var p=this.children[f];if(p.size&&p.dom.parentNode==this.contentDOM&&!p.emptyChildAt(-1)){o=H(p.dom);break}t+=p.size}-1==o&&(o=this.contentDOM.childNodes.length);break}i=l}return{node:this.contentDOM,from:e,to:t,fromOffset:r,toOffset:o}}},{key:"emptyChildAt",value:function(e){if(this.border||!this.contentDOM||!this.children.length)return!1;var t=this.children[e<0?0:this.children.length-1];return 0==t.size||t.emptyChildAt(e)}},{key:"domAfterPos",value:function(e){var t=this.domFromPos(e,0),n=t.node,r=t.offset;if(1!=n.nodeType||r==n.childNodes.length)throw new RangeError("No node after pos "+e);return n.childNodes[r]}},{key:"setSelection",value:function(e,t,n){for(var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=Math.min(e,t),i=Math.max(e,t),a=0,s=0;a<this.children.length;a++){var l=this.children[a],u=s+l.size;if(o>s&&i<u)return l.setSelection(e-s-l.border,t-s-l.border,n,r);s=u}var c=this.domFromPos(e,e?-1:1),d=t==e?c:this.domFromPos(t,t?-1:1),f=n.getSelection(),p=!1;if((j||M)&&e==t){var h=c,m=h.node,v=h.offset;if(3==m.nodeType){if((p=!(!v||"\n"!=m.nodeValue[v-1]))&&v==m.nodeValue.length)for(var g,y=m;y;y=y.parentNode){if(g=y.nextSibling){"BR"==g.nodeName&&(c=d={node:g.parentNode,offset:H(g)+1});break}var b=y.pmViewDesc;if(b&&b.node&&b.node.isBlock)break}}else{var w=m.childNodes[v-1];p=w&&("BR"==w.nodeName||"false"==w.contentEditable)}}if(j&&f.focusNode&&f.focusNode!=d.node&&1==f.focusNode.nodeType){var k=f.focusNode.childNodes[f.focusOffset];k&&"false"==k.contentEditable&&(r=!0)}if(r||p&&M||!B(c.node,c.offset,f.anchorNode,f.anchorOffset)||!B(d.node,d.offset,f.focusNode,f.focusOffset)){var x=!1;if((f.extend||e==t)&&!p){f.collapse(c.node,c.offset);try{e!=t&&f.extend(d.node,d.offset),x=!0}catch(C){if(!(C instanceof DOMException))throw C}}if(!x){if(e>t){var O=c;c=d,d=O}var S=document.createRange();S.setEnd(d.node,d.offset),S.setStart(c.node,c.offset),f.removeAllRanges(),f.addRange(S)}}}},{key:"ignoreMutation",value:function(e){return!this.contentDOM&&"selection"!=e.type}},{key:"contentLost",get:function(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}},{key:"markDirty",value:function(e,t){for(var n=0,r=0;r<this.children.length;r++){var o=this.children[r],i=n+o.size;if(n==i?e<=i&&t>=n:e<i&&t>n){var a=n+o.border,s=i-o.border;if(e>=a&&t<=s)return this.dirty=e==n||t==i?2:1,void(e!=a||t!=s||!o.contentLost&&o.dom.parentNode==this.contentDOM?o.markDirty(e-a,t-a):o.dirty=3);o.dirty=o.dom!=o.contentDOM||o.dom.parentNode!=this.contentDOM||o.children.length?3:2}n=i}this.dirty=2}},{key:"markParentsDirty",value:function(){for(var e=1,t=this.parent;t;t=t.parent,e++){var n=1==e?2:1;t.dirty<n&&(t.dirty=n)}}},{key:"domAtom",get:function(){return!1}},{key:"ignoreForCoords",get:function(){return!1}}]),e}(),ge=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e,r,o,i){var s;Object(c.a)(this,n);var l,u=r.type.toDOM;if("function"==typeof u&&(u=u(o,(function(){return l?l.parent?l.parent.posBeforeChild(l):void 0:i}))),!r.type.spec.raw){if(1!=u.nodeType){var d=document.createElement("span");d.appendChild(u),u=d}u.contentEditable="false",u.classList.add("ProseMirror-widget")}return(s=t.call(this,e,[],u,null)).widget=r,s.widget=r,l=Object(a.a)(s),s}return Object(d.a)(n,[{key:"matchesWidget",value:function(e){return 0==this.dirty&&e.type.eq(this.widget.type)}},{key:"parseRule",value:function(){return{ignore:!0}}},{key:"stopEvent",value:function(e){var t=this.widget.spec.stopEvent;return!!t&&t(e)}},{key:"ignoreMutation",value:function(e){return"selection"!=e.type||this.widget.spec.ignoreSelection}},{key:"destroy",value:function(){this.widget.type.destroy(this.dom),Object(h.a)(Object(m.a)(n.prototype),"destroy",this).call(this)}},{key:"domAtom",get:function(){return!0}},{key:"side",get:function(){return this.widget.type.side}}]),n}(ve),ye=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e,r,o,i){var a;return Object(c.a)(this,n),(a=t.call(this,e,[],r,null)).textDOM=o,a.text=i,a}return Object(d.a)(n,[{key:"size",get:function(){return this.text.length}},{key:"localPosFromDOM",value:function(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t}},{key:"domFromPos",value:function(e){return{node:this.textDOM,offset:e}}},{key:"ignoreMutation",value:function(e){return"characterData"===e.type&&e.target.nodeValue==e.oldValue}}]),n}(ve),be=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e,r,o,i){var a;return Object(c.a)(this,n),(a=t.call(this,e,[],o,i)).mark=r,a}return Object(d.a)(n,[{key:"parseRule",value:function(){return 3&this.dirty||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM||void 0}}},{key:"matchesMark",value:function(e){return 3!=this.dirty&&this.mark.eq(e)}},{key:"markDirty",value:function(e,t){if(Object(h.a)(Object(m.a)(n.prototype),"markDirty",this).call(this,e,t),0!=this.dirty){for(var r=this.parent;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=0}}},{key:"slice",value:function(e,t,r){var o=n.create(this.parent,this.mark,!0,r),i=this.children,a=this.size;t<a&&(i=He(i,t,a,r)),e>0&&(i=He(i,0,e,r));for(var s=0;s<i.length;s++)i[s].parent=o;return o.children=i,o}}],[{key:"create",value:function(e,t,r,o){var i=o.nodeViews[t.type.name],a=i&&i(t,o,r);return a&&a.dom||(a=v.DOMSerializer.renderSpec(document,t.type.spec.toDOM(t,r))),new n(e,t,a.dom,a.contentDOM||a.dom)}}]),n}(ve),we=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e,r,o,i,a,s,l,u,d){var f;return Object(c.a)(this,n),(f=t.call(this,e,[],a,s)).node=r,f.outerDeco=o,f.innerDeco=i,f.nodeDOM=l,s&&f.updateChildren(u,d),f}return Object(d.a)(n,[{key:"parseRule",value:function(){var e=this;if(this.node.type.spec.reparseInView)return null;var t={node:this.node.type.name,attrs:this.node.attrs};if("pre"==this.node.type.whitespace&&(t.preserveWhitespace="full"),this.contentDOM)if(this.contentLost){for(var n=this.children.length-1;n>=0;n--){var r=this.children[n];if(this.dom.contains(r.dom.parentNode)){t.contentElement=r.dom.parentNode;break}}t.contentElement||(t.getContent=function(){return v.Fragment.empty})}else t.contentElement=this.contentDOM;else t.getContent=function(){return e.node.content};return t}},{key:"matchesNode",value:function(e,t,n){return 0==this.dirty&&e.eq(this.node)&&Le(t,this.outerDeco)&&n.eq(this.innerDeco)}},{key:"size",get:function(){return this.node.nodeSize}},{key:"border",get:function(){return this.node.isLeaf?0:1}},{key:"updateChildren",value:function(e,t){var n=this,r=this.node.inlineContent,o=t,i=e.composing?this.localCompositionInfo(e,t):null,a=i&&i.pos>-1?i:null,s=i&&i.pos<0,l=new Pe(this,a&&a.node);!function(e,t,n,r){var o=t.locals(e),i=0;if(0==o.length){for(var a=0;a<e.childCount;a++){var s=e.child(a);r(s,o,t.forChild(i,s),a),i+=s.nodeSize}return}for(var l=0,u=[],c=null,d=0;;){if(l<o.length&&o[l].to==i){for(var f=o[l++],p=void 0;l<o.length&&o[l].to==i;)(p||(p=[f])).push(o[l++]);if(p){p.sort(Re);for(var h=0;h<p.length;h++)n(p[h],d,!!c)}else n(f,d,!!c)}var m=void 0,v=void 0;if(c)v=-1,m=c,c=null;else{if(!(d<e.childCount))break;v=d,m=e.child(d++)}for(var g=0;g<u.length;g++)u[g].to<=i&&u.splice(g--,1);for(;l<o.length&&o[l].from<=i&&o[l].to>i;)u.push(o[l++]);var y=i+m.nodeSize;if(m.isText){var b=y;l<o.length&&o[l].from<b&&(b=o[l].from);for(var w=0;w<u.length;w++)u[w].to<b&&(b=u[w].to);b<y&&(c=m.cut(b-i),m=m.cut(0,b-i),y=b,v=-1)}r(m,m.isInline&&!m.isLeaf?u.filter((function(e){return!e.inline})):u.slice(),t.forChild(i,m),v),i=y}}(this.node,this.innerDeco,(function(t,i,a){t.spec.marks?l.syncToMarks(t.spec.marks,r,e):t.type.side>=0&&!a&&l.syncToMarks(i==n.node.childCount?v.Mark.none:n.node.child(i).marks,r,e),l.placeWidget(t,e,o)}),(function(t,n,a,u){var c;l.syncToMarks(t.marks,r,e),l.findNodeMatch(t,n,a,u)||s&&e.state.selection.from>o&&e.state.selection.to<o+t.nodeSize&&(c=l.findIndexWithChild(i.node))>-1&&l.updateNodeAt(t,n,a,c,e)||l.updateNextNode(t,n,a,e,u)||l.addNode(t,n,a,e,o),o+=t.nodeSize})),l.syncToMarks([],r,e),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||2==this.dirty)&&(a&&this.protectLocalComposition(e,a),Ce(this.contentDOM,this.children,e),T&&function(e){if("UL"==e.nodeName||"OL"==e.nodeName){var t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}(this.dom))}},{key:"localCompositionInfo",value:function(e,t){var n=e.state.selection,r=n.from,o=n.to;if(!(e.state.selection instanceof p.TextSelection)||r<t||o>t+this.node.content.size)return null;var i=e.domSelection(),a=function(e,t){for(;;){if(3==e.nodeType)return e;if(1==e.nodeType&&t>0){if(e.childNodes.length>t&&3==e.childNodes[t].nodeType)return e.childNodes[t];t=$(e=e.childNodes[t-1])}else{if(!(1==e.nodeType&&t<e.childNodes.length))return null;e=e.childNodes[t],t=0}}}(i.focusNode,i.focusOffset);if(!a||!this.dom.contains(a.parentNode))return null;if(this.node.inlineContent){var s=a.nodeValue,l=function(e,t,n,r){for(var o=0,i=0;o<e.childCount&&i<=r;){var a=e.child(o++),s=i;if(i+=a.nodeSize,a.isText){for(var l=a.text;o<e.childCount;){var u=e.child(o++);if(i+=u.nodeSize,!u.isText)break;l+=u.text}if(i>=n){var c=s<r?l.lastIndexOf(t,r-s-1):-1;if(c>=0&&c+t.length+s>=n)return s+c;if(n==r&&l.length>=r+t.length-s&&l.slice(r-s,r-s+t.length)==t)return r}}}return-1}(this.node.content,s,r-t,o-t);return l<0?null:{node:a,pos:l,text:s}}return{node:a,pos:-1,text:""}}},{key:"protectLocalComposition",value:function(e,t){var n=t.node,r=t.pos,o=t.text;if(!this.getDesc(n)){for(var i=n;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&&(i.pmViewDesc=void 0)}var a=new ye(this,i,n,o);e.input.compositionNodes.push(a),this.children=He(this.children,r,r+o.length,e,a)}}},{key:"update",value:function(e,t,n,r){return!(3==this.dirty||!e.sameMarkup(this.node))&&(this.updateInner(e,t,n,r),!0)}},{key:"updateInner",value:function(e,t,n,r){this.updateOuterDeco(t),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=0}},{key:"updateOuterDeco",value:function(e){if(!Le(e,this.outerDeco)){var t=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=Ee(this.dom,this.nodeDOM,Ae(this.outerDeco,this.node,t),Ae(e,this.node,t)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}}},{key:"selectNode",value:function(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!0)}},{key:"deselectNode",value:function(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.dom.removeAttribute("draggable")}},{key:"domAtom",get:function(){return this.node.isAtom}}],[{key:"create",value:function(e,t,r,o,i,a){var s,l=i.nodeViews[t.type.name],u=l&&l(t,i,(function(){return s?s.parent?s.parent.posBeforeChild(s):void 0:a}),r,o),c=u&&u.dom,d=u&&u.contentDOM;if(t.isText)if(c){if(3!=c.nodeType)throw new RangeError("Text must be rendered as a DOM text node")}else c=document.createTextNode(t.text);else if(!c){var f=v.DOMSerializer.renderSpec(document,t.type.spec.toDOM(t));c=f.dom,d=f.contentDOM}d||t.isText||"BR"==c.nodeName||(c.hasAttribute("contenteditable")||(c.contentEditable="false"),t.type.spec.draggable&&(c.draggable=!0));var p=c;return c=Te(c,r,t),u?s=new Se(e,t,r,o,c,d||null,p,u,i,a+1):t.isText?new xe(e,t,r,o,c,p,i):new n(e,t,r,o,c,d||null,p,i,a+1)}}]),n}(ve);function ke(e,t,n,r,o){return Te(r,t,e),new we(void 0,e,t,n,r,r,r,o,0)}var xe=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e,r,o,i,a,s,l){return Object(c.a)(this,n),t.call(this,e,r,o,i,a,null,s,l,0)}return Object(d.a)(n,[{key:"parseRule",value:function(){for(var e=this.nodeDOM.parentNode;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}},{key:"update",value:function(e,t,n,r){return!(3==this.dirty||0!=this.dirty&&!this.inParent()||!e.sameMarkup(this.node))&&(this.updateOuterDeco(t),0==this.dirty&&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=0,!0)}},{key:"inParent",value:function(){for(var e=this.parent.contentDOM,t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}},{key:"domFromPos",value:function(e){return{node:this.nodeDOM,offset:e}}},{key:"localPosFromDOM",value:function(e,t,r){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):Object(h.a)(Object(m.a)(n.prototype),"localPosFromDOM",this).call(this,e,t,r)}},{key:"ignoreMutation",value:function(e){return"characterData"!=e.type&&"selection"!=e.type}},{key:"slice",value:function(e,t,r){var o=this.node.cut(e,t),i=document.createTextNode(o.text);return new n(this.parent,o,this.outerDeco,this.innerDeco,i,i,r)}},{key:"markDirty",value:function(e,t){Object(h.a)(Object(m.a)(n.prototype),"markDirty",this).call(this,e,t),this.dom==this.nodeDOM||0!=e&&t!=this.nodeDOM.nodeValue.length||(this.dirty=3)}},{key:"domAtom",get:function(){return!1}}]),n}(we),Oe=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(){return Object(c.a)(this,n),t.apply(this,arguments)}return Object(d.a)(n,[{key:"parseRule",value:function(){return{ignore:!0}}},{key:"matchesHack",value:function(e){return 0==this.dirty&&this.dom.nodeName==e}},{key:"domAtom",get:function(){return!0}},{key:"ignoreForCoords",get:function(){return"IMG"==this.dom.nodeName}}]),n}(ve),Se=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e,r,o,i,a,s,l,u,d,f){var p;return Object(c.a)(this,n),(p=t.call(this,e,r,o,i,a,s,l,d,f)).spec=u,p}return Object(d.a)(n,[{key:"update",value:function(e,t,r,o){if(3==this.dirty)return!1;if(this.spec.update){var i=this.spec.update(e,t,r);return i&&this.updateInner(e,t,r,o),i}return!(!this.contentDOM&&!e.isLeaf)&&Object(h.a)(Object(m.a)(n.prototype),"update",this).call(this,e,t,r,o)}},{key:"selectNode",value:function(){this.spec.selectNode?this.spec.selectNode():Object(h.a)(Object(m.a)(n.prototype),"selectNode",this).call(this)}},{key:"deselectNode",value:function(){this.spec.deselectNode?this.spec.deselectNode():Object(h.a)(Object(m.a)(n.prototype),"deselectNode",this).call(this)}},{key:"setSelection",value:function(e,t,r,o){this.spec.setSelection?this.spec.setSelection(e,t,r):Object(h.a)(Object(m.a)(n.prototype),"setSelection",this).call(this,e,t,r,o)}},{key:"destroy",value:function(){this.spec.destroy&&this.spec.destroy(),Object(h.a)(Object(m.a)(n.prototype),"destroy",this).call(this)}},{key:"stopEvent",value:function(e){return!!this.spec.stopEvent&&this.spec.stopEvent(e)}},{key:"ignoreMutation",value:function(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):Object(h.a)(Object(m.a)(n.prototype),"ignoreMutation",this).call(this,e)}}]),n}(we);function Ce(e,t,n){for(var r=e.firstChild,o=!1,i=0;i<t.length;i++){var a=t[i],s=a.dom;if(s.parentNode==e){for(;s!=r;)r=Ne(r),o=!0;r=r.nextSibling}else o=!0,e.insertBefore(s,r);if(a instanceof be){var l=r?r.previousSibling:e.lastChild;Ce(a.contentDOM,a.children,n),r=l?l.nextSibling:e.firstChild}}for(;r;)r=Ne(r),o=!0;o&&n.trackWrites==e&&(n.trackWrites=null)}var je=function(e){e&&(this.nodeName=e)};je.prototype=Object.create(null);var De=[new je];function Ae(e,t,n){if(0==e.length)return De;for(var r=n?De[0]:new je,o=[r],i=0;i<e.length;i++){var a=e[i].type.attrs;if(a)for(var s in a.nodeName&&o.push(r=new je(a.nodeName)),a){var l=a[s];null!=l&&(n&&1==o.length&&o.push(r=new je(t.isInline?"span":"div")),"class"==s?r.class=(r.class?r.class+" ":"")+l:"style"==s?r.style=(r.style?r.style+";":"")+l:"nodeName"!=s&&(r[s]=l))}}return o}function Ee(e,t,n,r){if(n==De&&r==De)return t;for(var o=t,i=0;i<r.length;i++){var a=r[i],s=n[i];if(i){var l=void 0;s&&s.nodeName==a.nodeName&&o!=e&&(l=o.parentNode)&&l.nodeName.toLowerCase()==a.nodeName||((l=document.createElement(a.nodeName)).pmIsDeco=!0,l.appendChild(o),s=De[0]),o=l}Me(o,s||De[0],a)}return o}function Me(e,t,n){for(var r in t)"class"==r||"style"==r||"nodeName"==r||r in n||e.removeAttribute(r);for(var o in n)"class"!=o&&"style"!=o&&"nodeName"!=o&&n[o]!=t[o]&&e.setAttribute(o,n[o]);if(t.class!=n.class){for(var i=t.class?t.class.split(" ").filter(Boolean):[],a=n.class?n.class.split(" ").filter(Boolean):[],s=0;s<i.length;s++)-1==a.indexOf(i[s])&&e.classList.remove(i[s]);for(var l=0;l<a.length;l++)-1==i.indexOf(a[l])&&e.classList.add(a[l]);0==e.classList.length&&e.removeAttribute("class")}if(t.style!=n.style){if(t.style)for(var u,c=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g;u=c.exec(t.style);)e.style.removeProperty(u[1]);n.style&&(e.style.cssText+=n.style)}}function Te(e,t,n){return Ee(e,e,De,Ae(t,n,1!=e.nodeType))}function Le(e,t){if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function Ne(e){var t=e.nextSibling;return e.parentNode.removeChild(e),t}var Pe=function(){function e(t,n){Object(c.a)(this,e),this.lock=n,this.index=0,this.stack=[],this.changed=!1,this.top=t,this.preMatch=function(e,t){var n=t,r=n.children.length,o=e.childCount,i=new Map,a=[];e:for(;o>0;){for(var s=void 0;;)if(r){var l=n.children[r-1];if(!(l instanceof be)){s=l,r--;break}n=l,r=l.children.length}else{if(n==t)break e;r=n.parent.children.indexOf(n),n=n.parent}var u=s.node;if(u){if(u!=e.child(o-1))break;--o,i.set(s,o),a.push(s)}}return{index:o,matched:i,matches:a.reverse()}}(t.node.content,t)}return Object(d.a)(e,[{key:"destroyBetween",value:function(e,t){if(e!=t){for(var n=e;n<t;n++)this.top.children[n].destroy();this.top.children.splice(e,t-e),this.changed=!0}}},{key:"destroyRest",value:function(){this.destroyBetween(this.index,this.top.children.length)}},{key:"syncToMarks",value:function(e,t,n){for(var r=0,o=this.stack.length>>1,i=Math.min(o,e.length);r<i&&(r==o-1?this.top:this.stack[r+1<<1]).matchesMark(e[r])&&!1!==e[r].type.spec.spanning;)r++;for(;r<o;)this.destroyRest(),this.top.dirty=0,this.index=this.stack.pop(),this.top=this.stack.pop(),o--;for(;o<e.length;){this.stack.push(this.top,this.index+1);for(var a=-1,s=this.index;s<Math.min(this.index+3,this.top.children.length);s++)if(this.top.children[s].matchesMark(e[o])){a=s;break}if(a>-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{var l=be.create(this.top,e[o],t,n);this.top.children.splice(this.index,0,l),this.top=l,this.changed=!0}this.index=0,o++}}},{key:"findNodeMatch",value:function(e,t,n,r){var o,i=-1;if(r>=this.preMatch.index&&(o=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&o.matchesNode(e,t,n))i=this.top.children.indexOf(o,this.index);else for(var a=this.index,s=Math.min(this.top.children.length,a+5);a<s;a++){var l=this.top.children[a];if(l.matchesNode(e,t,n)&&!this.preMatch.matched.has(l)){i=a;break}}return!(i<0)&&(this.destroyBetween(this.index,i),this.index++,!0)}},{key:"updateNodeAt",value:function(e,t,n,r,o){var i=this.top.children[r];return 3==i.dirty&&i.dom==i.contentDOM&&(i.dirty=2),!!i.update(e,t,n,o)&&(this.destroyBetween(this.index,r),this.index=r+1,!0)}},{key:"findIndexWithChild",value:function(e){for(;;){var t=e.parentNode;if(!t)return-1;if(t==this.top.contentDOM){var n=e.pmViewDesc;if(n)for(var r=this.index;r<this.top.children.length;r++)if(this.top.children[r]==n)return r;return-1}e=t}}},{key:"updateNextNode",value:function(e,t,n,r,o){for(var i=this.index;i<this.top.children.length;i++){var a=this.top.children[i];if(a instanceof we){var s=this.preMatch.matched.get(a);if(null!=s&&s!=o)return!1;var l=a.dom;if(!(this.lock&&(l==this.lock||1==l.nodeType&&l.contains(this.lock.parentNode))&&!(e.isText&&a.node&&a.node.isText&&a.nodeDOM.nodeValue==e.text&&3!=a.dirty&&Le(t,a.outerDeco)))&&a.update(e,t,n,r))return this.destroyBetween(this.index,i),a.dom!=l&&(this.changed=!0),this.index++,!0;break}}return!1}},{key:"addNode",value:function(e,t,n,r,o){this.top.children.splice(this.index++,0,we.create(this.top,e,t,n,r,o)),this.changed=!0}},{key:"placeWidget",value:function(e,t,n){var 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){var o=new ge(this.top,e,t,n);this.top.children.splice(this.index++,0,o),this.changed=!0}else this.index++}},{key:"addTextblockHacks",value:function(){for(var e=this.top.children[this.index-1],t=this.top;e instanceof be;)e=(t=e).children[t.children.length-1];e&&e instanceof xe&&!/\n$/.test(e.node.text)||((M||A)&&e&&"false"==e.dom.contentEditable&&this.addHackNode("IMG",t),this.addHackNode("BR",this.top))}},{key:"addHackNode",value:function(e,t){if(t==this.top&&this.index<t.children.length&&t.children[this.index].matchesHack(e))this.index++;else{var n=document.createElement(e);"IMG"==e&&(n.className="ProseMirror-separator",n.alt=""),"BR"==e&&(n.className="ProseMirror-trailingBreak");var r=new Oe(this.top,[],n,null);t!=this.top?t.children.push(r):t.children.splice(this.index++,0,r),this.changed=!0}}}]),e}();function Re(e,t){return e.type.side-t.type.side}function He(e,t,n,r,o){for(var i=[],a=0,s=0;a<e.length;a++){var l=e[a],u=s,c=s+=l.size;u>=n||c<=t?i.push(l):(u<t&&i.push(l.slice(0,t-u,r)),o&&(i.push(o),o=void 0),c>n&&i.push(l.slice(n-u,l.size,r)))}return i}function Fe(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=e.domSelection(),r=e.state.doc;if(!n.focusNode)return null;var o=e.docView.nearestDesc(n.focusNode),i=o&&0==o.size,a=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(a<0)return null;var s,l,u=r.resolve(a);if(U(n)){for(s=u;o&&!o.node;)o=o.parent;var c=o.node;if(o&&c.isAtom&&p.NodeSelection.isSelectable(c)&&o.parent&&(!c.isInline||!q(n.focusNode,n.focusOffset,o.dom))){var d=o.posBefore;l=new p.NodeSelection(a==d?u:r.resolve(d))}}else{var f=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(f<0)return null;s=r.resolve(f)}if(!l){var h="pointer"==t||e.state.selection.head<u.pos&&!i?1:-1;l=Ge(e,s,u,h)}return l}function Ve(e){return e.editable?e.hasFocus():Ye(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function ze(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.state.selection;if(Ue(e,n),Ve(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&A){var r=e.domSelection(),o=e.domObserver.currentSelection;if(r.anchorNode&&o.anchorNode&&B(r.anchorNode,r.anchorOffset,o.anchorNode,o.anchorOffset))return e.input.mouseDown.delayedSelectionSync=!0,void e.domObserver.setCurSelection()}if(e.domObserver.disconnectSelection(),e.cursorWrapper)We(e);else{var i,a,s=n.anchor,l=n.head;!Be||n instanceof p.TextSelection||(n.$from.parent.inlineContent||(i=Ie(e,n.from)),n.empty||n.$from.parent.inlineContent||(a=Ie(e,n.to))),e.docView.setSelection(s,l,e.root,t),Be&&(i&&$e(i),a&&$e(a)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&qe(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}var Be=M||A&&E<63;function Ie(e,t){var n=e.docView.domFromPos(t,0),r=n.node,o=n.offset,i=o<r.childNodes.length?r.childNodes[o]:null,a=o?r.childNodes[o-1]:null;if(M&&i&&"false"==i.contentEditable)return _e(i);if((!i||"false"==i.contentEditable)&&(!a||"false"==a.contentEditable)){if(i)return _e(i);if(a)return _e(a)}}function _e(e){return e.contentEditable="true",M&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function $e(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function qe(e){var t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.input.hideSelectionGuard);var n=e.domSelection(),r=n.anchorNode,o=n.anchorOffset;t.addEventListener("selectionchange",e.input.hideSelectionGuard=function(){n.anchorNode==r&&n.anchorOffset==o||(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout((function(){Ve(e)&&!e.state.selection.visible||e.dom.classList.remove("ProseMirror-hideselection")}),20))})}function We(e){var t=e.domSelection(),n=document.createRange(),r=e.cursorWrapper.dom,o="IMG"==r.nodeName;o?n.setEnd(r.parentNode,H(r)+1):n.setEnd(r,0),n.collapse(!1),t.removeAllRanges(),t.addRange(n),!o&&!e.state.selection.visible&&S&&C<=11&&(r.disabled=!0,r.disabled=!1)}function Ue(e,t){if(t instanceof p.NodeSelection){var n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(Ke(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else Ke(e)}function Ke(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function Ge(e,t,n,r){return e.someProp("createSelectionBetween",(function(r){return r(e,t,n)}))||p.TextSelection.between(t,n,r)}function Je(e){return(!e.editable||e.root.activeElement==e.dom)&&Ye(e)}function Ye(e){var t=e.domSelection();if(!t.anchorNode)return!1;try{return e.dom.contains(3==t.anchorNode.nodeType?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(3==t.focusNode.nodeType?t.focusNode.parentNode:t.focusNode))}catch(n){return!1}}function Ze(e,t){var n=e.selection,r=n.$anchor,o=n.$head,i=t>0?r.max(o):r.min(o),a=i.parent.inlineContent?i.depth?e.doc.resolve(t>0?i.after():i.before()):null:i;return a&&p.Selection.findFrom(a,t)}function Xe(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function Qe(e,t,n){var r=e.state.selection;if(!(r instanceof p.TextSelection)){if(r instanceof p.NodeSelection&&r.node.isInline)return Xe(e,new p.TextSelection(t>0?r.$to:r.$from));var o=Ze(e.state,t);return!!o&&Xe(e,o)}if(!r.empty||n.indexOf("s")>-1)return!1;if(e.endOfTextblock(t>0?"right":"left")){var i=Ze(e.state,t);return!!(i&&i instanceof p.NodeSelection)&&Xe(e,i)}if(!(L&&n.indexOf("m")>-1)){var a,s=r.$head,l=s.textOffset?null:t<0?s.nodeBefore:s.nodeAfter;if(!l||l.isText)return!1;var u=t<0?s.pos-l.nodeSize:s.pos;return!!(l.isAtom||(a=e.docView.descAt(u))&&!a.contentDOM)&&(p.NodeSelection.isSelectable(l)?Xe(e,new p.NodeSelection(t<0?e.state.doc.resolve(s.pos-l.nodeSize):s)):!!P&&Xe(e,new p.TextSelection(e.state.doc.resolve(t<0?u:u+l.nodeSize))))}}function et(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function tt(e){var t=e.pmViewDesc;return t&&0==t.size&&(e.nextSibling||"BR"!=e.nodeName)}function nt(e){var t=e.domSelection(),n=t.focusNode,r=t.focusOffset;if(n){var o,i,a=!1;for(j&&1==n.nodeType&&r<et(n)&&tt(n.childNodes[r])&&(a=!0);;)if(r>0){if(1!=n.nodeType)break;var s=n.childNodes[r-1];if(tt(s))o=n,i=--r;else{if(3!=s.nodeType)break;r=(n=s).nodeValue.length}}else{if(ot(n))break;for(var l=n.previousSibling;l&&tt(l);)o=n.parentNode,i=H(l),l=l.previousSibling;if(l)r=et(n=l);else{if((n=n.parentNode)==e.dom)break;r=0}}a?it(e,t,n,r):o&&it(e,t,o,i)}}function rt(e){var t=e.domSelection(),n=t.focusNode,r=t.focusOffset;if(n){for(var o,i,a=et(n);;)if(r<a){if(1!=n.nodeType)break;if(!tt(n.childNodes[r]))break;o=n,i=++r}else{if(ot(n))break;for(var s=n.nextSibling;s&&tt(s);)o=s.parentNode,i=H(s)+1,s=s.nextSibling;if(s)r=0,a=et(n=s);else{if((n=n.parentNode)==e.dom)break;r=a=0}}o&&it(e,t,o,i)}}function ot(e){var t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function it(e,t,n,r){if(U(t)){var o=document.createRange();o.setEnd(n,r),o.setStart(n,r),t.removeAllRanges(),t.addRange(o)}else t.extend&&t.extend(n,r);e.domObserver.setCurSelection();var i=e.state;setTimeout((function(){e.state==i&&ze(e)}),50)}function at(e,t,n){var r=e.state.selection;if(r instanceof p.TextSelection&&!r.empty||n.indexOf("s")>-1)return!1;if(L&&n.indexOf("m")>-1)return!1;var o=r.$from,i=r.$to;if(!o.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){var a=Ze(e.state,t);if(a&&a instanceof p.NodeSelection)return Xe(e,a)}if(!o.parent.inlineContent){var s=t<0?o:i,l=r instanceof p.AllSelection?p.Selection.near(s,t):p.Selection.findFrom(s,t);return!!l&&Xe(e,l)}return!1}function st(e,t){if(!(e.state.selection instanceof p.TextSelection))return!0;var n=e.state.selection,r=n.$head,o=n.$anchor,i=n.empty;if(!r.sameParent(o))return!0;if(!i)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;var a=!r.textOffset&&(t<0?r.nodeBefore:r.nodeAfter);if(a&&!a.isText){var s=e.state.tr;return t<0?s.delete(r.pos-a.nodeSize,r.pos):s.delete(r.pos,r.pos+a.nodeSize),e.dispatch(s),!0}return!1}function lt(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function ut(e,t){var n=t.keyCode,r=function(e){var t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}(t);return 8==n||L&&72==n&&"c"==r?st(e,-1)||nt(e):46==n||L&&68==n&&"c"==r?st(e,1)||rt(e):13==n||27==n||(37==n||L&&66==n&&"c"==r?Qe(e,-1,r)||nt(e):39==n||L&&70==n&&"c"==r?Qe(e,1,r)||rt(e):38==n||L&&80==n&&"c"==r?at(e,-1,r)||nt(e):40==n||L&&78==n&&"c"==r?function(e){if(!M||e.state.selection.$head.parentOffset>0)return!1;var t=e.domSelection(),n=t.focusNode,r=t.focusOffset;if(n&&1==n.nodeType&&0==r&&n.firstChild&&"false"==n.firstChild.contentEditable){var o=n.firstChild;lt(e,o,"true"),setTimeout((function(){return lt(e,o,"false")}),20)}return!1}(e)||at(e,1,r)||rt(e):r==(L?"m":"c")&&(66==n||73==n||89==n||90==n))}function ct(e,t){for(var n=[],r=t.content,o=t.openStart,i=t.openEnd;o>1&&i>1&&1==r.childCount&&1==r.firstChild.childCount;){o--,i--;var a=r.firstChild;n.push(a.type.name,a.attrs!=a.type.defaultAttrs?a.attrs:null),r=a.content}var s=e.someProp("clipboardSerializer")||v.DOMSerializer.fromSchema(e.state.schema),l=wt(),u=l.createElement("div");u.appendChild(s.serializeFragment(r,{document:l}));for(var c,d=u.firstChild,f=0;d&&1==d.nodeType&&(c=yt[d.nodeName.toLowerCase()]);){for(var p=c.length-1;p>=0;p--){for(var h=l.createElement(c[p]);u.firstChild;)h.appendChild(u.firstChild);u.appendChild(h),f++}d=u.firstChild}return d&&1==d.nodeType&&d.setAttribute("data-pm-slice","".concat(o," ").concat(i).concat(f?" -".concat(f):""," ").concat(JSON.stringify(n))),{dom:u,text:e.someProp("clipboardTextSerializer",(function(e){return e(t)}))||t.content.textBetween(0,t.content.size,"\n\n")}}function dt(e,t,n,r,o){var i,a,s=o.parent.type.spec.code;if(!n&&!t)return null;var l=t&&(r||s||!n);if(l){if(e.someProp("transformPastedText",(function(e){t=e(t,s||r)})),s)return t?new v.Slice(v.Fragment.from(e.state.schema.text(t.replace(/\r\n?/g,"\n"))),0,0):v.Slice.empty;var u=e.someProp("clipboardTextParser",(function(e){return e(t,o,r)}));if(u)a=u;else{var c=o.marks(),d=e.state.schema,f=v.DOMSerializer.fromSchema(d);i=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach((function(e){var t=i.appendChild(document.createElement("p"));e&&t.appendChild(f.serializeNode(d.text(e,c)))}))}}else e.someProp("transformPastedHTML",(function(e){n=e(n)})),i=function(e){var t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));var n,r=wt().createElement("div"),o=/<([a-z][^>\s]+)/i.exec(e);(n=o&&yt[o[1].toLowerCase()])&&(e=n.map((function(e){return"<"+e+">"})).join("")+e+n.map((function(e){return"</"+e+">"})).reverse().join(""));if(r.innerHTML=e,n)for(var i=0;i<n.length;i++)r=r.querySelector(n[i])||r;return r}(n),P&&function(e){for(var t=e.querySelectorAll(A?"span:not([class]):not([style])":"span.Apple-converted-space"),n=0;n<t.length;n++){var r=t[n];1==r.childNodes.length&&"\xa0"==r.textContent&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),r)}}(i);var p=i&&i.querySelector("[data-pm-slice]"),h=p&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(p.getAttribute("data-pm-slice")||"");if(h&&h[3])for(var m=+h[3];m>0&&i.firstChild;m--)i=i.firstChild;if(!a){var g=e.someProp("clipboardParser")||e.someProp("domParser")||v.DOMParser.fromSchema(e.state.schema);a=g.parseSlice(i,{preserveWhitespace:!(!l&&!h),context:o,ruleFromNode:function(e){return"BR"!=e.nodeName||e.nextSibling||!e.parentNode||ft.test(e.parentNode.nodeName)?null:{ignore:!0}}})}if(h)a=function(e,t){if(!e.size)return e;var n,r=e.content.firstChild.type.schema;try{n=JSON.parse(t)}catch(u){return e}for(var o=e.content,i=e.openStart,a=e.openEnd,s=n.length-2;s>=0;s-=2){var l=r.nodes[n[s]];if(!l||l.hasRequiredAttrs())break;o=v.Fragment.from(l.create(n[s+1],o)),i++,a++}return new v.Slice(o,i,a)}(gt(a,+h[1],+h[2]),h[4]);else if(a=v.Slice.maxOpen(function(e,t){if(e.childCount<2)return e;for(var n=function(n){var r=t.node(n).contentMatchAt(t.index(n)),o=void 0,i=[];if(e.forEach((function(e){if(i){var t,n=r.findWrapping(e.type);if(!n)return i=null;if(t=i.length&&o.length&&ht(n,o,e,i[i.length-1],0))i[i.length-1]=t;else{i.length&&(i[i.length-1]=mt(i[i.length-1],o.length));var a=pt(e,n);i.push(a),r=r.matchType(a.type),o=n}}})),i)return{v:v.Fragment.from(i)}},r=t.depth;r>=0;r--){var o=n(r);if("object"===typeof o)return o.v}return e}(a.content,o),!0),a.openStart||a.openEnd){for(var y=0,b=0,w=a.content.firstChild;y<a.openStart&&!w.type.spec.isolating;y++,w=w.firstChild);for(var k=a.content.lastChild;b<a.openEnd&&!k.type.spec.isolating;b++,k=k.lastChild);a=gt(a,y,b)}return e.someProp("transformPasted",(function(e){a=e(a)})),a}var ft=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function pt(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=t.length-1;r>=n;r--)e=t[r].create(null,v.Fragment.from(e));return e}function ht(e,t,n,r,o){if(o<e.length&&o<t.length&&e[o]==t[o]){var i=ht(e,t,n,r.lastChild,o+1);if(i)return r.copy(r.content.replaceChild(r.childCount-1,i));if(r.contentMatchAt(r.childCount).matchType(o==e.length-1?n.type:e[o+1]))return r.copy(r.content.append(v.Fragment.from(pt(n,e,o+1))))}}function mt(e,t){if(0==t)return e;var n=e.content.replaceChild(e.childCount-1,mt(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(v.Fragment.empty,!0);return e.copy(n.append(r))}function vt(e,t,n,r,o,i){var a=t<0?e.firstChild:e.lastChild,s=a.content;return o<r-1&&(s=vt(s,t,n,r,o+1,i)),o>=n&&(s=t<0?a.contentMatchAt(0).fillBefore(s,e.childCount>1||i<=o).append(s):s.append(a.contentMatchAt(a.childCount).fillBefore(v.Fragment.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,a.copy(s))}function gt(e,t,n){return t<e.openStart&&(e=new v.Slice(vt(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new v.Slice(vt(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}var yt={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]},bt=null;function wt(){return bt||(bt=document.implementation.createHTMLDocument("title"))}var kt={},xt={},Ot=Object(d.a)((function e(){Object(c.a)(this,e),this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastAndroidDelete=0,this.composing=!1,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}));function St(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function Ct(e){e.someProp("handleDOMEvents",(function(t){for(var n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=function(t){return jt(e,t)})}))}function jt(e,t){return e.someProp("handleDOMEvents",(function(n){var r=n[t.type];return!!r&&(r(e,t)||t.defaultPrevented)}))}function Dt(e){return{left:e.clientX,top:e.clientY}}function At(e,t,n,r,o){if(-1==r)return!1;for(var i=e.state.doc.resolve(r),a=function(r){if(e.someProp(t,(function(t){return r>i.depth?t(e,n,i.nodeAfter,i.before(r),o,!0):t(e,n,i.node(r),i.before(r),o,!1)})))return{v:!0}},s=i.depth+1;s>0;s--){var l=a(s);if("object"===typeof l)return l.v}return!1}function Et(e,t,n){e.focused||e.focus();var r=e.state.tr.setSelection(t);"pointer"==n&&r.setMeta("pointer",!0),e.dispatch(r)}function Mt(e,t,n,r,o){return At(e,"handleClickOn",t,n,r)||e.someProp("handleClick",(function(n){return n(e,t,r)}))||(o?function(e,t){if(-1==t)return!1;var n,r,o=e.state.selection;o instanceof p.NodeSelection&&(n=o.node);for(var i=e.state.doc.resolve(t),a=i.depth+1;a>0;a--){var s=a>i.depth?i.nodeAfter:i.node(a);if(p.NodeSelection.isSelectable(s)){r=n&&o.$from.depth>0&&a>=o.$from.depth&&i.before(o.$from.depth+1)==o.$from.pos?i.before(o.$from.depth):i.before(a);break}}return null!=r&&(Et(e,p.NodeSelection.create(e.state.doc,r),"pointer"),!0)}(e,n):function(e,t){if(-1==t)return!1;var n=e.state.doc.resolve(t),r=n.nodeAfter;return!!(r&&r.isAtom&&p.NodeSelection.isSelectable(r))&&(Et(e,new p.NodeSelection(n),"pointer"),!0)}(e,n))}function Tt(e,t,n,r){return At(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",(function(n){return n(e,t,r)}))}function Lt(e,t,n,r){return At(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",(function(n){return n(e,t,r)}))||function(e,t,n){if(0!=n.button)return!1;var r=e.state.doc;if(-1==t)return!!r.inlineContent&&(Et(e,p.TextSelection.create(r,0,r.content.size),"pointer"),!0);for(var o=r.resolve(t),i=o.depth+1;i>0;i--){var a=i>o.depth?o.nodeAfter:o.node(i),s=o.before(i);if(a.inlineContent)Et(e,p.TextSelection.create(r,s+1,s+1+a.content.size),"pointer");else{if(!p.NodeSelection.isSelectable(a))continue;Et(e,p.NodeSelection.create(r,s),"pointer")}return!0}}(e,n,r)}function Nt(e){return Bt(e)}xt.keydown=function(e,t){var n=t;if(e.input.shiftKey=16==n.keyCode||n.shiftKey,!Ht(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!N||!A||13!=n.keyCode))if(229!=n.keyCode&&e.domObserver.forceFlush(),!T||13!=n.keyCode||n.ctrlKey||n.altKey||n.metaKey)e.someProp("handleKeyDown",(function(t){return t(e,n)}))||ut(e,n)?n.preventDefault():St(e,"key");else{var r=Date.now();e.input.lastIOSEnter=r,e.input.lastIOSEnterFallbackTimeout=setTimeout((function(){e.input.lastIOSEnter==r&&(e.someProp("handleKeyDown",(function(t){return t(e,K(13,"Enter"))})),e.input.lastIOSEnter=0)}),200)}},xt.keyup=function(e,t){16==t.keyCode&&(e.input.shiftKey=!1)},xt.keypress=function(e,t){var n=t;if(!(Ht(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||L&&n.metaKey))if(e.someProp("handleKeyPress",(function(t){return t(e,n)})))n.preventDefault();else{var r=e.state.selection;if(!(r instanceof p.TextSelection)||!r.$from.sameParent(r.$to)){var o=String.fromCharCode(n.charCode);e.someProp("handleTextInput",(function(t){return t(e,r.$from.pos,r.$to.pos,o)}))||e.dispatch(e.state.tr.insertText(o).scrollIntoView()),n.preventDefault()}}};var Pt=L?"metaKey":"ctrlKey";kt.mousedown=function(e,t){var n=t;e.input.shiftKey=n.shiftKey;var r=Nt(e),o=Date.now(),i="singleClick";o-e.input.lastClick.time<500&&function(e,t){var n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}(n,e.input.lastClick)&&!n[Pt]&&("singleClick"==e.input.lastClick.type?i="doubleClick":"doubleClick"==e.input.lastClick.type&&(i="tripleClick")),e.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:i};var a=e.posAtCoords(Dt(n));a&&("singleClick"==i?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new Rt(e,a,n,!!r)):("doubleClick"==i?Tt:Lt)(e,a.pos,a.inside,n)?n.preventDefault():St(e,"pointer"))};var Rt=function(){function e(t,n,r,o){var i,a,s=this;if(Object(c.a)(this,e),this.view=t,this.pos=n,this.event=r,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!r[Pt],this.allowDefault=r.shiftKey,n.inside>-1)i=t.state.doc.nodeAt(n.inside),a=n.inside;else{var l=t.state.doc.resolve(n.pos);i=l.parent,a=l.depth?l.before():0}var u=o?null:r.target,d=u?t.docView.nearestDesc(u,!0):null;this.target=d?d.dom:null;var f=t.state.selection;(0==r.button&&i.type.spec.draggable&&!1!==i.type.spec.selectable||f instanceof p.NodeSelection&&f.from<=a&&f.to>a)&&(this.mightDrag={node:i,pos:a,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!j||this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout((function(){s.view.input.mouseDown==s&&s.target.setAttribute("contentEditable","false")}),20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),St(t,"pointer")}return Object(d.a)(e,[{key:"done",value:function(){var e=this;this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout((function(){return ze(e.view)})),this.view.input.mouseDown=null}},{key:"up",value:function(e){if(this.done(),this.view.dom.contains(e.target)){var t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(Dt(e))),this.allowDefault||!t?St(this.view,"pointer"):Mt(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():0==e.button&&(this.flushed||M&&this.mightDrag&&!this.mightDrag.node.isAtom||A&&!(this.view.state.selection instanceof p.TextSelection)&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(Et(this.view,p.Selection.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):St(this.view,"pointer")}}},{key:"move",value:function(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0),St(this.view,"pointer"),0==e.buttons&&this.done()}}]),e}();function Ht(e,t){return!!e.composing||!!(M&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500)&&(e.input.compositionEndedAt=-2e8,!0)}kt.touchdown=function(e){Nt(e),St(e,"pointer")},kt.contextmenu=function(e){return Nt(e)};var Ft=N?5e3:-1;function Vt(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout((function(){return Bt(e)}),t))}function zt(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=function(){var e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function Bt(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!(N&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),zt(e),t||e.docView&&e.docView.dirty){var n=Fe(e);return n&&!n.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(n)):e.updateState(e.state),!0}return!1}}xt.compositionstart=xt.compositionupdate=function(e){if(!e.composing){e.domObserver.flush();var t=e.state,n=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some((function(e){return!1===e.type.spec.inclusive}))))e.markCursor=e.state.storedMarks||n.marks(),Bt(e,!0),e.markCursor=null;else if(Bt(e),j&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length)for(var r=e.domSelection(),o=r.focusNode,i=r.focusOffset;o&&1==o.nodeType&&0!=i;){var a=i<0?o.lastChild:o.childNodes[i-1];if(!a)break;if(3==a.nodeType){r.collapse(a,a.nodeValue.length);break}o=a,i=-1}e.input.composing=!0}Vt(e,Ft)},xt.compositionend=function(e,t){e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,Vt(e,20))};var It=S&&C<15||T&&R<604;function _t(e,t,n,r){var o=dt(e,t,n,e.input.shiftKey,e.state.selection.$from);if(e.someProp("handlePaste",(function(t){return t(e,r,o||v.Slice.empty)})))return!0;if(!o)return!1;var i=function(e){return 0==e.openStart&&0==e.openEnd&&1==e.content.childCount?e.content.firstChild:null}(o),a=i?e.state.tr.replaceSelectionWith(i,e.input.shiftKey):e.state.tr.replaceSelection(o);return e.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}kt.copy=xt.cut=function(e,t){var n=t,r=e.state.selection,o="cut"==n.type;if(!r.empty){var i=It?null:n.clipboardData,a=ct(e,r.content()),s=a.dom,l=a.text;i?(n.preventDefault(),i.clearData(),i.setData("text/html",s.innerHTML),i.setData("text/plain",l)):function(e,t){if(e.dom.parentNode){var n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";var r=getSelection(),o=document.createRange();o.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout((function(){n.parentNode&&n.parentNode.removeChild(n),e.focus()}),50)}}(e,s),o&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))}},xt.paste=function(e,t){var n=t;if(!e.composing||N){var r=It?null:n.clipboardData;r&&_t(e,r.getData("text/plain"),r.getData("text/html"),n)?n.preventDefault():function(e,t){if(e.dom.parentNode){var n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus(),setTimeout((function(){e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?_t(e,r.value,null,t):_t(e,r.textContent,r.innerHTML,t)}),50)}}(e,n)}};var $t=Object(d.a)((function e(t,n){Object(c.a)(this,e),this.slice=t,this.move=n})),qt=L?"altKey":"ctrlKey";for(var Wt in kt.dragstart=function(e,t){var n=t,r=e.input.mouseDown;if(r&&r.done(),n.dataTransfer){var o=e.state.selection,i=o.empty?null:e.posAtCoords(Dt(n));if(i&&i.pos>=o.from&&i.pos<=(o instanceof p.NodeSelection?o.to-1:o.to));else if(r&&r.mightDrag)e.dispatch(e.state.tr.setSelection(p.NodeSelection.create(e.state.doc,r.mightDrag.pos)));else if(n.target&&1==n.target.nodeType){var a=e.docView.nearestDesc(n.target,!0);a&&a.node.type.spec.draggable&&a!=e.docView&&e.dispatch(e.state.tr.setSelection(p.NodeSelection.create(e.state.doc,a.posBefore)))}var s=e.state.selection.content(),l=ct(e,s),u=l.dom,c=l.text;n.dataTransfer.clearData(),n.dataTransfer.setData(It?"Text":"text/html",u.innerHTML),n.dataTransfer.effectAllowed="copyMove",It||n.dataTransfer.setData("text/plain",c),e.dragging=new $t(s,!n[qt])}},kt.dragend=function(e){var t=e.dragging;window.setTimeout((function(){e.dragging==t&&(e.dragging=null)}),50)},xt.dragover=xt.dragenter=function(e,t){return t.preventDefault()},xt.drop=function(e,t){var n=t,r=e.dragging;if(e.dragging=null,n.dataTransfer){var o=e.posAtCoords(Dt(n));if(o){var i=e.state.doc.resolve(o.pos);if(i){var a=r&&r.slice;a?e.someProp("transformPasted",(function(e){a=e(a)})):a=dt(e,n.dataTransfer.getData(It?"Text":"text/plain"),It?null:n.dataTransfer.getData("text/html"),!1,i);var s=!(!r||n[qt]);if(e.someProp("handleDrop",(function(t){return t(e,n,a||v.Slice.empty,s)})))n.preventDefault();else if(a){n.preventDefault();var l=a?Object(g.h)(e.state.doc,i.pos,a):i.pos;null==l&&(l=i.pos);var u=e.state.tr;s&&u.deleteSelection();var c=u.mapping.map(l),d=0==a.openStart&&0==a.openEnd&&1==a.content.childCount,f=u.doc;if(d?u.replaceRangeWith(c,c,a.content.firstChild):u.replaceRange(c,c,a),!u.doc.eq(f)){var h=u.doc.resolve(c);if(d&&p.NodeSelection.isSelectable(a.content.firstChild)&&h.nodeAfter&&h.nodeAfter.sameMarkup(a.content.firstChild))u.setSelection(new p.NodeSelection(h));else{var m=u.mapping.map(l);u.mapping.maps[u.mapping.maps.length-1].forEach((function(e,t,n,r){return m=r})),u.setSelection(Ge(e,h,u.doc.resolve(m)))}e.focus(),e.dispatch(u.setMeta("uiEvent","drop"))}}}}}},kt.focus=function(e){e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout((function(){e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelection())&&ze(e)}),20))},kt.blur=function(e,t){var n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)},kt.beforeinput=function(e,t){if(A&&N&&"deleteContentBackward"==t.inputType){e.domObserver.flushSoon();var n=e.input.domChangeCount;setTimeout((function(){if(e.input.domChangeCount==n&&(e.dom.blur(),e.focus(),!e.someProp("handleKeyDown",(function(t){return t(e,K(8,"Backspace"))})))){var t=e.state.selection.$cursor;t&&t.pos>0&&e.dispatch(e.state.tr.delete(t.pos-1,t.pos).scrollIntoView())}}),50)}},xt)kt[Wt]=xt[Wt];function Ut(e,t){if(e==t)return!0;for(var n in e)if(e[n]!==t[n])return!1;for(var r in t)if(!(r in e))return!1;return!0}var Kt=function(){function e(t,n){Object(c.a)(this,e),this.toDOM=t,this.spec=n||Xt,this.side=this.spec.side||0}return Object(d.a)(e,[{key:"map",value:function(e,t,n,r){var o=e.mapResult(t.from+r,this.side<0?-1:1),i=o.pos;return o.deleted?null:new Yt(i-n,i-n,this)}},{key:"valid",value:function(){return!0}},{key:"eq",value:function(t){return this==t||t instanceof e&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&Ut(this.spec,t.spec))}},{key:"destroy",value:function(e){this.spec.destroy&&this.spec.destroy(e)}}]),e}(),Gt=function(){function e(t,n){Object(c.a)(this,e),this.attrs=t,this.spec=n||Xt}return Object(d.a)(e,[{key:"map",value:function(e,t,n,r){var o=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-n,i=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-n;return o>=i?null:new Yt(o,i,this)}},{key:"valid",value:function(e,t){return t.from<t.to}},{key:"eq",value:function(t){return this==t||t instanceof e&&Ut(this.attrs,t.attrs)&&Ut(this.spec,t.spec)}},{key:"destroy",value:function(){}}],[{key:"is",value:function(t){return t.type instanceof e}}]),e}(),Jt=function(){function e(t,n){Object(c.a)(this,e),this.attrs=t,this.spec=n||Xt}return Object(d.a)(e,[{key:"map",value:function(e,t,n,r){var o=e.mapResult(t.from+r,1);if(o.deleted)return null;var i=e.mapResult(t.to+r,-1);return i.deleted||i.pos<=o.pos?null:new Yt(o.pos-n,i.pos-n,this)}},{key:"valid",value:function(e,t){var n,r=e.content.findIndex(t.from),o=r.index,i=r.offset;return i==t.from&&!(n=e.child(o)).isText&&i+n.nodeSize==t.to}},{key:"eq",value:function(t){return this==t||t instanceof e&&Ut(this.attrs,t.attrs)&&Ut(this.spec,t.spec)}},{key:"destroy",value:function(){}}]),e}(),Yt=function(){function e(t,n,r){Object(c.a)(this,e),this.from=t,this.to=n,this.type=r}return Object(d.a)(e,[{key:"copy",value:function(t,n){return new e(t,n,this.type)}},{key:"eq",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}},{key:"map",value:function(e,t,n){return this.type.map(e,this,t,n)}},{key:"spec",get:function(){return this.type.spec}},{key:"inline",get:function(){return this.type instanceof Gt}}],[{key:"widget",value:function(t,n,r){return new e(t,t,new Kt(n,r))}},{key:"inline",value:function(t,n,r,o){return new e(t,n,new Gt(r,o))}},{key:"node",value:function(t,n,r,o){return new e(t,n,new Jt(r,o))}}]),e}(),Zt=[],Xt={},Qt=function(){function e(t,n){Object(c.a)(this,e),this.local=t.length?t:Zt,this.children=n.length?n:Zt}return Object(d.a)(e,[{key:"find",value:function(e,t,n){var r=[];return this.findInner(null==e?0:e,null==t?1e9:t,r,0,n),r}},{key:"findInner",value:function(e,t,n,r,o){for(var i=0;i<this.local.length;i++){var a=this.local[i];a.from<=t&&a.to>=e&&(!o||o(a.spec))&&n.push(a.copy(a.from+r,a.to+r))}for(var s=0;s<this.children.length;s+=3)if(this.children[s]<t&&this.children[s+1]>e){var l=this.children[s]+1;this.children[s+2].findInner(e-l,t-l,n,r+l,o)}}},{key:"map",value:function(e,t,n){return this==en||0==e.maps.length?this:this.mapInner(e,t,0,0,n||Xt)}},{key:"mapInner",value:function(t,n,r,o,i){for(var a,s=0;s<this.local.length;s++){var l=this.local[s].map(t,r,o);l&&l.type.valid(n,l)?(a||(a=[])).push(l):i.onRemove&&i.onRemove(this.local[s].spec)}return this.children.length?function(e,t,n,r,o,i,a){for(var s=e.slice(),l=function(e,t,n,r){for(var a=0;a<s.length;a+=3){var l=s[a+1],u=void 0;if(!(l<0||e>l+i)){var c=s[a]+i;t>=c?s[a+1]=e<=c?-2:-1:n>=o&&(u=r-n-(t-e))&&(s[a]+=u,s[a+1]+=u)}}},u=0;u<n.maps.length;u++)n.maps[u].forEach(l);for(var c=!1,d=0;d<s.length;d+=3)if(s[d+1]<0){if(-2==s[d+1]){c=!0,s[d+1]=-1;continue}var f=n.map(e[d]+i),p=f-o;if(p<0||p>=r.content.size){c=!0;continue}var h=n.map(e[d+1]+i,-1)-o,m=r.content.findIndex(p),v=m.index,g=m.offset,y=r.maybeChild(v);if(y&&g==p&&g+y.nodeSize==h){var b=s[d+2].mapInner(n,y,f+1,e[d]+i+1,a);b!=en?(s[d]=p,s[d+1]=h,s[d+2]=b):(s[d+1]=-2,c=!0)}else c=!0}if(c){var w=function(e,t,n,r,o,i,a){function s(e,t){for(var i=0;i<e.local.length;i++){var l=e.local[i].map(r,o,t);l?n.push(l):a.onRemove&&a.onRemove(e.local[i].spec)}for(var u=0;u<e.children.length;u+=3)s(e.children[u+2],e.children[u]+t+1)}for(var l=0;l<e.length;l+=3)-1==e[l+1]&&s(e[l+2],t[l]+i+1);return n}(s,e,t,n,o,i,a),k=an(w,r,0,a);t=k.local;for(var x=0;x<s.length;x+=3)s[x+1]<0&&(s.splice(x,3),x-=3);for(var O=0,S=0;O<k.children.length;O+=3){for(var C=k.children[O];S<s.length&&s[S]<C;)S+=3;s.splice(S,0,k.children[O],k.children[O+1],k.children[O+2])}}return new Qt(t.sort(sn),s)}(this.children,a||[],t,n,r,o,i):a?new e(a.sort(sn),Zt):en}},{key:"add",value:function(t,n){return n.length?this==en?e.create(t,n):this.addInner(t,n,0):this}},{key:"addInner",value:function(t,n,r){var o,i=this,a=0;t.forEach((function(e,t){var s,l=t+r;if(s=rn(n,e,l)){for(o||(o=i.children.slice());a<o.length&&o[a]<t;)a+=3;o[a]==t?o[a+2]=o[a+2].addInner(e,s,l+1):o.splice(a,0,t,t+e.nodeSize,an(s,e,l+1,Xt)),a+=3}}));for(var s=nn(a?on(n):n,-r),l=0;l<s.length;l++)s[l].type.valid(t,s[l])||s.splice(l--,1);return new e(s.length?this.local.concat(s).sort(sn):this.local,o||this.children)}},{key:"remove",value:function(e){return 0==e.length||this==en?this:this.removeInner(e,0)}},{key:"removeInner",value:function(t,n){for(var r=this.children,o=this.local,i=0;i<r.length;i+=3){for(var a,s=void 0,l=r[i]+n,u=r[i+1]+n,c=0;c<t.length;c++)(a=t[c])&&a.from>l&&a.to<u&&(t[c]=null,(s||(s=[])).push(a));if(s){r==this.children&&(r=this.children.slice());var d=r[i+2].removeInner(s,l+1);d!=en?r[i+2]=d:(r.splice(i,3),i-=3)}}if(o.length)for(var f,p=0;p<t.length;p++)if(f=t[p])for(var h=0;h<o.length;h++)o[h].eq(f,n)&&(o==this.local&&(o=this.local.slice()),o.splice(h--,1));return r==this.children&&o==this.local?this:o.length||r.length?new e(o,r):en}},{key:"forChild",value:function(t,n){if(this==en)return this;if(n.isLeaf)return e.empty;for(var r,o,i=0;i<this.children.length;i+=3)if(this.children[i]>=t){this.children[i]==t&&(r=this.children[i+2]);break}for(var a=t+1,s=a+n.content.size,l=0;l<this.local.length;l++){var u=this.local[l];if(u.from<s&&u.to>a&&u.type instanceof Gt){var c=Math.max(a,u.from)-a,d=Math.min(s,u.to)-a;c<d&&(o||(o=[])).push(u.copy(c,d))}}if(o){var f=new e(o.sort(sn),Zt);return r?new tn([f,r]):f}return r||en}},{key:"eq",value:function(t){if(this==t)return!0;if(!(t instanceof e)||this.local.length!=t.local.length||this.children.length!=t.children.length)return!1;for(var n=0;n<this.local.length;n++)if(!this.local[n].eq(t.local[n]))return!1;for(var r=0;r<this.children.length;r+=3)if(this.children[r]!=t.children[r]||this.children[r+1]!=t.children[r+1]||!this.children[r+2].eq(t.children[r+2]))return!1;return!0}},{key:"locals",value:function(e){return ln(this.localsInner(e))}},{key:"localsInner",value:function(e){if(this==en)return Zt;if(e.inlineContent||!this.local.some(Gt.is))return this.local;for(var t=[],n=0;n<this.local.length;n++)this.local[n].type instanceof Gt||t.push(this.local[n]);return t}}],[{key:"create",value:function(e,t){return t.length?an(t,e,0,Xt):en}}]),e}();Qt.empty=new Qt([],[]),Qt.removeOverlap=ln;var en=Qt.empty,tn=function(){function e(t){Object(c.a)(this,e),this.members=t}return Object(d.a)(e,[{key:"map",value:function(t,n){var r=this.members.map((function(e){return e.map(t,n,Xt)}));return e.from(r)}},{key:"forChild",value:function(t,n){if(n.isLeaf)return Qt.empty;for(var r=[],o=0;o<this.members.length;o++){var i=this.members[o].forChild(t,n);i!=en&&(i instanceof e?r=r.concat(i.members):r.push(i))}return e.from(r)}},{key:"eq",value:function(t){if(!(t instanceof e)||t.members.length!=this.members.length)return!1;for(var n=0;n<this.members.length;n++)if(!this.members[n].eq(t.members[n]))return!1;return!0}},{key:"locals",value:function(e){for(var t,n=!0,r=0;r<this.members.length;r++){var o=this.members[r].localsInner(e);if(o.length)if(t){n&&(t=t.slice(),n=!1);for(var i=0;i<o.length;i++)t.push(o[i])}else t=o}return t?ln(n?t:t.sort(sn)):Zt}}],[{key:"from",value:function(t){switch(t.length){case 0:return en;case 1:return t[0];default:return new e(t)}}}]),e}();function nn(e,t){if(!t||!e.length)return e;for(var n=[],r=0;r<e.length;r++){var o=e[r];n.push(new Yt(o.from+t,o.to+t,o.type))}return n}function rn(e,t,n){if(t.isLeaf)return null;for(var r,o=n+t.nodeSize,i=null,a=0;a<e.length;a++)(r=e[a])&&r.from>n&&r.to<o&&((i||(i=[])).push(r),e[a]=null);return i}function on(e){for(var t=[],n=0;n<e.length;n++)null!=e[n]&&t.push(e[n]);return t}function an(e,t,n,r){var o=[],i=!1;t.forEach((function(t,a){var s=rn(e,t,a+n);if(s){i=!0;var l=an(s,t,n+a+1,r);l!=en&&o.push(a,a+t.nodeSize,l)}}));for(var a=nn(i?on(e):e,-n).sort(sn),s=0;s<a.length;s++)a[s].type.valid(t,a[s])||(r.onRemove&&r.onRemove(a[s].spec),a.splice(s--,1));return a.length||o.length?new Qt(a,o):en}function sn(e,t){return e.from-t.from||e.to-t.to}function ln(e){for(var t=e,n=0;n<t.length-1;n++){var r=t[n];if(r.from!=r.to)for(var o=n+1;o<t.length;o++){var i=t[o];if(i.from!=r.from){i.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,i.from),un(t,o,r.copy(i.from,r.to)));break}i.to!=r.to&&(t==e&&(t=e.slice()),t[o]=i.copy(i.from,r.to),un(t,o+1,i.copy(r.to,i.to)))}}return t}function un(e,t,n){for(;t<e.length&&sn(n,e[t])>0;)t++;e.splice(t,0,n)}function cn(e){var t=[];return e.someProp("decorations",(function(n){var r=n(e.state);r&&r!=en&&t.push(r)})),e.cursorWrapper&&t.push(Qt.create(e.state.doc,[e.cursorWrapper.deco])),tn.from(t)}var dn={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},fn=S&&C<=11,pn=function(){function e(){Object(c.a)(this,e),this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}return Object(d.a)(e,[{key:"set",value:function(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}},{key:"clear",value:function(){this.anchorNode=this.focusNode=null}},{key:"eq",value:function(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}]),e}(),hn=function(){function e(t,n){var r=this;Object(c.a)(this,e),this.view=t,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new pn,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.observer=window.MutationObserver&&new window.MutationObserver((function(e){for(var t=0;t<e.length;t++)r.queue.push(e[t]);S&&C<=11&&e.some((function(e){return"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length}))?r.flushSoon():r.flush()})),fn&&(this.onCharData=function(e){r.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),r.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}return Object(d.a)(e,[{key:"flushSoon",value:function(){var e=this;this.flushingSoon<0&&(this.flushingSoon=window.setTimeout((function(){e.flushingSoon=-1,e.flush()}),20))}},{key:"forceFlush",value:function(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}},{key:"start",value:function(){this.observer&&this.observer.observe(this.view.dom,dn),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}},{key:"stop",value:function(){var e=this;if(this.observer){var t=this.observer.takeRecords();if(t.length){for(var n=0;n<t.length;n++)this.queue.push(t[n]);window.setTimeout((function(){return e.flush()}),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}},{key:"connectSelection",value:function(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}},{key:"disconnectSelection",value:function(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}},{key:"suppressSelectionUpdates",value:function(){var e=this;this.suppressingSelectionUpdates=!0,setTimeout((function(){return e.suppressingSelectionUpdates=!1}),50)}},{key:"onSelectionChange",value:function(){if(Je(this.view)){if(this.suppressingSelectionUpdates)return ze(this.view);if(S&&C<=11&&!this.view.state.selection.empty){var e=this.view.domSelection();if(e.focusNode&&B(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}},{key:"setCurSelection",value:function(){this.currentSelection.set(this.view.domSelection())}},{key:"ignoreSelectionChange",value:function(e){if(0==e.rangeCount)return!0;var t=e.getRangeAt(0).commonAncestorContainer,n=this.view.docView.nearestDesc(t);return n&&n.ignoreMutation({type:"selection",target:3==t.nodeType?t.parentNode:t})?(this.setCurSelection(),!0):void 0}},{key:"flush",value:function(){if(this.view.docView&&!(this.flushingSoon>-1)){var e=this.observer?this.observer.takeRecords():[];this.queue.length&&(e=this.queue.concat(e),this.queue.length=0);var t=this.view.domSelection(),n=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(t)&&Je(this.view)&&!this.ignoreSelectionChange(t),r=-1,o=-1,i=!1,a=[];if(this.view.editable)for(var s=0;s<e.length;s++){var l=this.registerMutation(e[s],a);l&&(r=r<0?l.from:Math.min(l.from,r),o=o<0?l.to:Math.max(l.to,o),l.typeOver&&(i=!0))}if(j&&a.length>1){var u=a.filter((function(e){return"BR"==e.nodeName}));if(2==u.length){var c=u[0],d=u[1];c.parentNode&&c.parentNode.parentNode==d.parentNode?d.remove():c.remove()}}(r>-1||n)&&(r>-1&&(this.view.docView.markDirty(r,o),function(e){if(mn)return;mn=!0,"normal"==getComputedStyle(e.dom).whiteSpace&&console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package.")}(this.view)),this.handleDOMChange(r,o,i,a),this.view.docView&&this.view.docView.dirty?this.view.updateState(this.view.state):this.currentSelection.eq(t)||ze(this.view),this.currentSelection.set(t))}}},{key:"registerMutation",value:function(e,t){if(t.indexOf(e.target)>-1)return null;var n=this.view.docView.nearestDesc(e.target);if("attributes"==e.type&&(n==this.view.docView||"contenteditable"==e.attributeName||"style"==e.attributeName&&!e.oldValue&&!e.target.getAttribute("style")))return null;if(!n||n.ignoreMutation(e))return null;if("childList"==e.type){for(var r=0;r<e.addedNodes.length;r++)t.push(e.addedNodes[r]);if(n.contentDOM&&n.contentDOM!=n.dom&&!n.contentDOM.contains(e.target))return{from:n.posBefore,to:n.posAfter};var o=e.previousSibling,i=e.nextSibling;if(S&&C<=11&&e.addedNodes.length)for(var a=0;a<e.addedNodes.length;a++){var s=e.addedNodes[a],l=s.previousSibling,u=s.nextSibling;(!l||Array.prototype.indexOf.call(e.addedNodes,l)<0)&&(o=l),(!u||Array.prototype.indexOf.call(e.addedNodes,u)<0)&&(i=u)}var c=o&&o.parentNode==e.target?H(o)+1:0,d=n.localPosFromDOM(e.target,c,-1),f=i&&i.parentNode==e.target?H(i):e.target.childNodes.length;return{from:d,to:n.localPosFromDOM(e.target,f,1)}}return"attributes"==e.type?{from:n.posAtStart-n.border,to:n.posAtEnd+n.border}:{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}}}]),e}(),mn=!1;function vn(e){var t=e.pmViewDesc;if(t)return t.parseRule();if("BR"==e.nodeName&&e.parentNode){if(M&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){var n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}if(e.parentNode.lastChild==e||M&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if("IMG"==e.nodeName&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}function gn(e,t,n,r,o){if(t<0){var i=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,a=Fe(e,i);if(a&&!e.state.selection.eq(a)){var s=e.state.tr.setSelection(a);"pointer"==i?s.setMeta("pointer",!0):"key"==i&&s.scrollIntoView(),e.dispatch(s)}}else{var l=e.state.doc.resolve(t),u=l.sharedDepth(n);t=l.before(u+1),n=e.state.doc.resolve(n).after(u+1);var c=e.state.selection,d=function(e,t,n){var r,o=e.docView.parseRange(t,n),i=o.node,a=o.fromOffset,s=o.toOffset,l=o.from,u=o.to,c=e.domSelection(),d=c.anchorNode;if(d&&e.dom.contains(1==d.nodeType?d:d.parentNode)&&(r=[{node:d,offset:c.anchorOffset}],U(c)||r.push({node:c.focusNode,offset:c.focusOffset})),A&&8===e.input.lastKeyCode)for(var f=s;f>a;f--){var p=i.childNodes[f-1],h=p.pmViewDesc;if("BR"==p.nodeName&&!h){s=f;break}if(!h||h.size)break}var m=e.state.doc,g=e.someProp("domParser")||v.DOMParser.fromSchema(e.state.schema),y=m.resolve(l),b=null,w=g.parse(i,{topNode:y.parent,topMatch:y.parent.contentMatchAt(y.index()),topOpen:!0,from:a,to:s,preserveWhitespace:"pre"!=y.parent.type.whitespace||"full",findPositions:r,ruleFromNode:vn,context:y});if(r&&null!=r[0].pos){var k=r[0].pos,x=r[1]&&r[1].pos;null==x&&(x=k),b={anchor:k+l,head:x+l}}return{doc:w,sel:b,from:l,to:u}}(e,t,n);if(A&&e.cursorWrapper&&d.sel&&d.sel.anchor==e.cursorWrapper.deco.from){var f=e.cursorWrapper.deco.type.toDOM.nextSibling,h=f&&f.nodeValue?f.nodeValue.length:1;d.sel={anchor:d.sel.anchor+h,head:d.sel.anchor+h}}var m,g,y=e.state.doc,b=y.slice(d.from,d.to);8===e.input.lastKeyCode&&Date.now()-100<e.input.lastKeyCodeTime?(m=e.state.selection.to,g="end"):(m=e.state.selection.from,g="start"),e.input.lastKeyCode=null;var w=function(e,t,n,r,o){var i=e.findDiffStart(t,n);if(null==i)return null;var a=e.findDiffEnd(t,n+e.size,n+t.size),s=a.a,l=a.b;if("end"==o){r-=s+Math.max(0,i-Math.min(s,l))-i}if(s<i&&e.size<t.size){l=(i-=r<=i&&r>=s?i-r:0)+(l-s),s=i}else if(l<i){s=(i-=r<=i&&r>=l?i-r:0)+(s-l),l=i}return{start:i,endA:s,endB:l}}(b.content,d.doc.content,d.from,m,g);if((T&&e.input.lastIOSEnter>Date.now()-225||N)&&o.some((function(e){return"DIV"==e.nodeName||"P"==e.nodeName}))&&(!w||w.endA>=w.endB)&&e.someProp("handleKeyDown",(function(t){return t(e,K(13,"Enter"))})))e.input.lastIOSEnter=0;else{if(!w){if(!(r&&c instanceof p.TextSelection&&!c.empty&&c.$head.sameParent(c.$anchor))||e.composing||d.sel&&d.sel.anchor!=d.sel.head){if(d.sel){var k=yn(e,e.state.doc,d.sel);k&&!k.eq(e.state.selection)&&e.dispatch(e.state.tr.setSelection(k))}return}w={start:c.from,endA:c.to,endB:c.to}}e.input.domChangeCount++,e.state.selection.from<e.state.selection.to&&w.start==w.endB&&e.state.selection instanceof p.TextSelection&&(w.start>e.state.selection.from&&w.start<=e.state.selection.from+2&&e.state.selection.from>=d.from?w.start=e.state.selection.from:w.endA<e.state.selection.to&&w.endA>=e.state.selection.to-2&&e.state.selection.to<=d.to&&(w.endB+=e.state.selection.to-w.endA,w.endA=e.state.selection.to)),S&&C<=11&&w.endB==w.start+1&&w.endA==w.start&&w.start>d.from&&" \xa0"==d.doc.textBetween(w.start-d.from-1,w.start-d.from+1)&&(w.start--,w.endA--,w.endB--);var x,O=d.doc.resolveNoCache(w.start-d.from),j=d.doc.resolveNoCache(w.endB-d.from),D=y.resolve(w.start),E=O.sameParent(j)&&O.parent.inlineContent&&D.end()>=w.endA;if((T&&e.input.lastIOSEnter>Date.now()-225&&(!E||o.some((function(e){return"DIV"==e.nodeName||"P"==e.nodeName})))||!E&&O.pos<d.doc.content.size&&(x=p.Selection.findFrom(d.doc.resolve(O.pos+1),1,!0))&&x.head==j.pos)&&e.someProp("handleKeyDown",(function(t){return t(e,K(13,"Enter"))})))e.input.lastIOSEnter=0;else if(e.state.selection.anchor>w.start&&function(e,t,n,r,o){if(!r.parent.isTextblock||n-t<=o.pos-r.pos||bn(r,!0,!1)<o.pos)return!1;var i=e.resolve(t);if(i.parentOffset<i.parent.content.size||!i.parent.isTextblock)return!1;var a=e.resolve(bn(i,!0,!0));return!(!a.parent.isTextblock||a.pos>n||bn(a,!0,!1)<n)&&r.parent.content.cut(r.parentOffset).eq(a.parent.content)}(y,w.start,w.endA,O,j)&&e.someProp("handleKeyDown",(function(t){return t(e,K(8,"Backspace"))})))N&&A&&e.domObserver.suppressSelectionUpdates();else{A&&N&&w.endB==w.start&&(e.input.lastAndroidDelete=Date.now()),N&&!E&&O.start()!=j.start()&&0==j.parentOffset&&O.depth==j.depth&&d.sel&&d.sel.anchor==d.sel.head&&d.sel.head==w.endA&&(w.endB-=2,j=d.doc.resolveNoCache(w.endB-d.from),setTimeout((function(){e.someProp("handleKeyDown",(function(t){return t(e,K(13,"Enter"))}))}),20));var M,L,P,R=w.start,H=w.endA;if(E)if(O.pos==j.pos)S&&C<=11&&0==O.parentOffset&&(e.domObserver.suppressSelectionUpdates(),setTimeout((function(){return ze(e)}),20)),M=e.state.tr.delete(R,H),L=y.resolve(w.start).marksAcross(y.resolve(w.endA));else if(w.endA==w.endB&&(P=function(e,t){for(var n,r,o,i=e.firstChild.marks,a=t.firstChild.marks,s=i,l=a,u=0;u<a.length;u++)s=a[u].removeFromSet(s);for(var c=0;c<i.length;c++)l=i[c].removeFromSet(l);if(1==s.length&&0==l.length)r=s[0],n="add",o=function(e){return e.mark(r.addToSet(e.marks))};else{if(0!=s.length||1!=l.length)return null;r=l[0],n="remove",o=function(e){return e.mark(r.removeFromSet(e.marks))}}for(var d=[],f=0;f<t.childCount;f++)d.push(o(t.child(f)));if(v.Fragment.from(d).eq(e))return{mark:r,type:n}}(O.parent.content.cut(O.parentOffset,j.parentOffset),D.parent.content.cut(D.parentOffset,w.endA-D.start()))))M=e.state.tr,"add"==P.type?M.addMark(R,H,P.mark):M.removeMark(R,H,P.mark);else if(O.parent.child(O.index()).isText&&O.index()==j.index()-(j.textOffset?0:1)){var F=O.parent.textBetween(O.parentOffset,j.parentOffset);if(e.someProp("handleTextInput",(function(t){return t(e,R,H,F)})))return;M=e.state.tr.insertText(F,R,H)}if(M||(M=e.state.tr.replace(R,H,d.doc.slice(w.start-d.from,w.endB-d.from))),d.sel){var V=yn(e,M.doc,d.sel);V&&!(A&&N&&e.composing&&V.empty&&(w.start!=w.endB||e.input.lastAndroidDelete<Date.now()-100)&&(V.head==R||V.head==M.mapping.map(H)-1)||S&&V.empty&&V.head==R)&&M.setSelection(V)}L&&M.ensureMarks(L),e.dispatch(M.scrollIntoView())}}}}function yn(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:Ge(e,t.resolve(n.anchor),t.resolve(n.head))}function bn(e,t,n){for(var r=e.depth,o=t?e.end():e.pos;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,o++,t=!1;if(n)for(var i=e.node(r).maybeChild(e.indexAfter(r));i&&!i.isLeaf;)i=i.firstChild,o++;return o}var wn=function(){function e(t,n){var r=this;Object(c.a)(this,e),this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new Ot,this.prevDirectPlugins=[],this.pluginViews=[],this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(Cn),this.dispatch=this.dispatch.bind(this),this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):"function"==typeof t?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=On(this),xn(this),this.nodeViews=Sn(this),this.docView=ke(this.state.doc,kn(this),cn(this),this.dom,this),this.domObserver=new hn(this,(function(e,t,n,o){return gn(r,e,t,n,o)})),this.domObserver.start(),function(e){var t=function(t){var n=kt[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=function(t){!function(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(var n=t.target;n!=e.dom;n=n.parentNode)if(!n||11==n.nodeType||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}(e,t)||jt(e,t)||!e.editable&&t.type in xt||n(e,t)})};for(var n in kt)t(n);M&&e.dom.addEventListener("input",(function(){return null})),Ct(e)}(this),this.updatePluginViews()}return Object(d.a)(e,[{key:"composing",get:function(){return this.input.composing}},{key:"props",get:function(){if(this._props.state!=this.state){var e=this._props;for(var t in this._props={},e)this._props[t]=e[t];this._props.state=this.state}return this._props}},{key:"update",value:function(e){e.handleDOMEvents!=this._props.handleDOMEvents&&Ct(this),this._props=e,e.plugins&&(e.plugins.forEach(Cn),this.directPlugins=e.plugins),this.updateStateInner(e.state,!0)}},{key:"setProps",value:function(e){var t={};for(var n in this._props)t[n]=this._props[n];for(var r in t.state=this.state,e)t[r]=e[r];this.update(t)}},{key:"updateState",value:function(e){this.updateStateInner(e,this.state.plugins!=e.plugins)}},{key:"updateStateInner",value:function(e,t){var n=this,r=this.state,o=!1,i=!1;if(e.storedMarks&&this.composing&&(zt(this),i=!0),this.state=e,t){var a=Sn(this);(function(e,t){var n=0,r=0;for(var o in e){if(e[o]!=t[o])return!0;n++}for(var i in t)r++;return n!=r})(a,this.nodeViews)&&(this.nodeViews=a,o=!0),Ct(this)}this.editable=On(this),xn(this);var s=cn(this),l=kn(this),u=t?"reset":e.scrollToSelection>r.scrollToSelection?"to selection":"preserve",c=o||!this.docView.matchesNode(e.doc,l,s);!c&&e.selection.eq(r.selection)||(i=!0);var d="preserve"==u&&i&&null==this.dom.style.overflowAnchor&&function(e){for(var t,n,r=e.dom.getBoundingClientRect(),o=Math.max(0,r.top),i=(r.left+r.right)/2,a=o+1;a<Math.min(innerHeight,r.bottom);a+=5){var s=e.root.elementFromPoint(i,a);if(s&&s!=e.dom&&e.dom.contains(s)){var l=s.getBoundingClientRect();if(l.top>=o-20){t=s,n=l.top;break}}}return{refDOM:t,refTop:n,stack:X(e.dom)}}(this);if(i){this.domObserver.stop();var f=c&&(S||A)&&!this.composing&&!r.selection.empty&&!e.selection.empty&&function(e,t){var n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}(r.selection,e.selection);if(c){var h=A?this.trackWrites=this.domSelection().focusNode:null;!o&&this.docView.update(e.doc,l,s,this)||(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=ke(e.doc,l,s,this.dom,this)),h&&!this.trackWrites&&(f=!0)}f||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelection())&&function(e){var t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelection();return B(t.node,t.offset,n.anchorNode,n.anchorOffset)}(this))?ze(this,f):(Ue(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}if(this.updatePluginViews(r),"reset"==u)this.dom.scrollTop=0;else if("to selection"==u){var m=this.domSelection().focusNode;if(this.someProp("handleScrollToSelection",(function(e){return e(n)})));else if(e.selection instanceof p.NodeSelection){var v=this.docView.domAfterPos(e.selection.from);1==v.nodeType&&Z(this,v.getBoundingClientRect(),m)}else Z(this,this.coordsAtPos(e.selection.head,1),m)}else d&&function(e){var t=e.refDOM,n=e.refTop,r=e.stack,o=t?t.getBoundingClientRect().top:0;Q(r,0==o?0:o-n)}(d)}},{key:"destroyPluginViews",value:function(){for(var e;e=this.pluginViews.pop();)e.destroy&&e.destroy()}},{key:"updatePluginViews",value:function(e){if(e&&e.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(var t=0;t<this.pluginViews.length;t++){var n=this.pluginViews[t];n.update&&n.update(this,e)}else{this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(var r=0;r<this.directPlugins.length;r++){var o=this.directPlugins[r];o.spec.view&&this.pluginViews.push(o.spec.view(this))}for(var i=0;i<this.state.plugins.length;i++){var a=this.state.plugins[i];a.spec.view&&this.pluginViews.push(a.spec.view(this))}}}},{key:"someProp",value:function(e,t){var n,r=this._props&&this._props[e];if(null!=r&&(n=t?t(r):r))return n;for(var o=0;o<this.directPlugins.length;o++){var i=this.directPlugins[o].props[e];if(null!=i&&(n=t?t(i):i))return n}var a=this.state.plugins;if(a)for(var s=0;s<a.length;s++){var l=a[s].props[e];if(null!=l&&(n=t?t(l):l))return n}}},{key:"hasFocus",value:function(){return this.root.activeElement==this.dom}},{key:"focus",value:function(){this.domObserver.stop(),this.editable&&function(e){if(e.setActive)return e.setActive();if(ee)return e.focus(ee);var t=X(e);e.focus(null==ee?{get preventScroll(){return ee={preventScroll:!0},!0}}:void 0),ee||(ee=!1,Q(t,0))}(this.dom),ze(this),this.domObserver.start()}},{key:"root",get:function(){var e=this,t=this._root;if(null==t)for(var n=function(t){if(9==t.nodeType||11==t.nodeType&&t.host)return t.getSelection||(Object.getPrototypeOf(t).getSelection=function(){return t.ownerDocument.getSelection()}),{v:e._root=t}},r=this.dom.parentNode;r;r=r.parentNode){var o=n(r);if("object"===typeof o)return o.v}return t||document}},{key:"posAtCoords",value:function(e){return oe(this,e)}},{key:"coordsAtPos",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return se(this,e,t)}},{key:"domAtPos",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.docView.domFromPos(e,t)}},{key:"nodeDOM",value:function(e){var t=this.docView.descAt(e);return t?t.nodeDOM:null}},{key:"posAtDOM",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,r=this.docView.posFromDOM(e,t,n);if(null==r)throw new RangeError("DOM position not inside the editor");return r}},{key:"endOfTextblock",value:function(e,t){return me(this,t||this.state,e)}},{key:"destroy",value:function(){this.docView&&(!function(e){for(var t in e.domObserver.stop(),e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],cn(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)}},{key:"isDestroyed",get:function(){return null==this.docView}},{key:"dispatchEvent",value:function(e){return function(e,t){jt(e,t)||!kt[t.type]||!e.editable&&t.type in xt||kt[t.type](e,t)}(this,e)}},{key:"dispatch",value:function(e){var t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))}},{key:"domSelection",value:function(){return this.root.getSelection()}}]),e}();function kn(e){var t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),t.translate="no",e.someProp("attributes",(function(n){if("function"==typeof n&&(n=n(e.state)),n)for(var r in n)"class"==r&&(t.class+=" "+n[r]),"style"==r?t.style=(t.style?t.style+";":"")+n[r]:t[r]||"contenteditable"==r||"nodeName"==r||(t[r]=String(n[r]))})),[Yt.node(0,e.state.doc.content.size,t)]}function xn(e){if(e.markCursor){var t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:Yt.widget(e.state.selection.head,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function On(e){return!e.someProp("editable",(function(t){return!1===t(e.state)}))}function Sn(e){var t=Object.create(null);function n(e){for(var n in e)Object.prototype.hasOwnProperty.call(t,n)||(t[n]=e[n])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function Cn(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}for(var jn={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",229:"q"},Dn={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"',229:"Q"},An="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent),En="undefined"!=typeof navigator&&/Apple Computer/.test(navigator.vendor),Mn="undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent),Tn="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),Ln="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Nn=An&&(Tn||+An[1]<57)||Mn&&Tn,Pn=0;Pn<10;Pn++)jn[48+Pn]=jn[96+Pn]=String(Pn);for(Pn=1;Pn<=24;Pn++)jn[Pn+111]="F"+Pn;for(Pn=65;Pn<=90;Pn++)jn[Pn]=String.fromCharCode(Pn+32),Dn[Pn]=String.fromCharCode(Pn);for(var Rn in jn)Dn.hasOwnProperty(Rn)||(Dn[Rn]=jn[Rn]);var Hn="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function Fn(e){var t,n,r,o,i=e.split(/-(?!$)/),a=i[i.length-1];"Space"==a&&(a=" ");for(var s=0;s<i.length-1;s++){var l=i[s];if(/^(cmd|meta|m)$/i.test(l))o=!0;else if(/^a(lt)?$/i.test(l))t=!0;else if(/^(c|ctrl|control)$/i.test(l))n=!0;else if(/^s(hift)?$/i.test(l))r=!0;else{if(!/^mod$/i.test(l))throw new Error("Unrecognized modifier name: "+l);Hn?o=!0:n=!0}}return t&&(a="Alt-"+a),n&&(a="Ctrl-"+a),o&&(a="Meta-"+a),r&&(a="Shift-"+a),a}function Vn(e,t,n){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),!1!==n&&t.shiftKey&&(e="Shift-"+e),e}function zn(e){return new p.Plugin({props:{handleKeyDown:Bn(e)}})}function Bn(e){var t=function(e){var t=Object.create(null);for(var n in e)t[Fn(n)]=e[n];return t}(e);return function(e,n){var r,o=function(e){var t=!(Nn&&(e.ctrlKey||e.altKey||e.metaKey)||(En||Ln)&&e.shiftKey&&e.key&&1==e.key.length)&&e.key||(e.shiftKey?Dn:jn)[e.keyCode]||e.key||"Unidentified";return"Esc"==t&&(t="Escape"),"Del"==t&&(t="Delete"),"Left"==t&&(t="ArrowLeft"),"Up"==t&&(t="ArrowUp"),"Right"==t&&(t="ArrowRight"),"Down"==t&&(t="ArrowDown"),t}(n),i=1==o.length&&" "!=o,a=t[Vn(o,n,!i)];if(a&&a(e.state,e.dispatch,e))return!0;if(i&&(n.shiftKey||n.altKey||n.metaKey||o.charCodeAt(0)>127)&&(r=jn[n.keyCode])&&r!=o){var s=t[Vn(r,n,!0)];if(s&&s(e.state,e.dispatch,e))return!0}else if(i&&n.shiftKey){var l=t[Vn(o,n,!0)];if(l&&l(e.state,e.dispatch,e))return!0}return!1}}var In=function(e,t){return!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0)},_n=function(e,t,n){var r=e.selection.$cursor;if(!r||(n?!n.endOfTextblock("backward",e):r.parentOffset>0))return!1;var o=Wn(r);if(!o){var i=r.blockRange(),a=i&&Object(g.k)(i);return null!=a&&(t&&t(e.tr.lift(i,a).scrollIntoView()),!0)}var s=o.nodeBefore;if(!s.type.spec.isolating&&nr(e,o,t))return!0;if(0==r.parent.content.size&&($n(s,"end")||p.NodeSelection.isSelectable(s))){var l=Object(g.l)(e.doc,r.before(),r.after(),v.Slice.empty);if(l&&l.slice.size<l.to-l.from){if(t){var u=e.tr.step(l);u.setSelection($n(s,"end")?p.Selection.findFrom(u.doc.resolve(u.mapping.map(o.pos,-1)),-1):p.NodeSelection.create(u.doc,o.pos-s.nodeSize)),t(u.scrollIntoView())}return!0}}return!(!s.isAtom||o.depth!=r.depth-1)&&(t&&t(e.tr.delete(o.pos-s.nodeSize,o.pos).scrollIntoView()),!0)};function $n(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=e;r;r="start"==t?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&1!=r.childCount)return!1}return!1}var qn=function(e,t,n){var r=e.selection,o=r.$head,i=o;if(!r.empty)return!1;if(o.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):o.parentOffset>0)return!1;i=Wn(o)}var a=i&&i.nodeBefore;return!(!a||!p.NodeSelection.isSelectable(a))&&(t&&t(e.tr.setSelection(p.NodeSelection.create(e.doc,i.pos-a.nodeSize)).scrollIntoView()),!0)};function Wn(e){if(!e.parent.type.spec.isolating)for(var 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}var Un=function(e,t,n){var r=e.selection.$cursor;if(!r||(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size))return!1;var o=Gn(r);if(!o)return!1;var i=o.nodeAfter;if(nr(e,o,t))return!0;if(0==r.parent.content.size&&($n(i,"start")||p.NodeSelection.isSelectable(i))){var a=Object(g.l)(e.doc,r.before(),r.after(),v.Slice.empty);if(a&&a.slice.size<a.to-a.from){if(t){var s=e.tr.step(a);s.setSelection($n(i,"start")?p.Selection.findFrom(s.doc.resolve(s.mapping.map(o.pos)),1):p.NodeSelection.create(s.doc,s.mapping.map(o.pos))),t(s.scrollIntoView())}return!0}}return!(!i.isAtom||o.depth!=r.depth-1)&&(t&&t(e.tr.delete(o.pos,o.pos+i.nodeSize).scrollIntoView()),!0)},Kn=function(e,t,n){var r=e.selection,o=r.$head,i=o;if(!r.empty)return!1;if(o.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):o.parentOffset<o.parent.content.size)return!1;i=Gn(o)}var a=i&&i.nodeAfter;return!(!a||!p.NodeSelection.isSelectable(a))&&(t&&t(e.tr.setSelection(p.NodeSelection.create(e.doc,i.pos)).scrollIntoView()),!0)};function Gn(e){if(!e.parent.type.spec.isolating)for(var t=e.depth-1;t>=0;t--){var 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 Jn=function(e,t){var n=e.selection,r=n.$from,o=n.$to,i=r.blockRange(o),a=i&&Object(g.k)(i);return null!=a&&(t&&t(e.tr.lift(i,a).scrollIntoView()),!0)},Yn=function(e,t){var n=e.selection,r=n.$head,o=n.$anchor;return!(!r.parent.type.spec.code||!r.sameParent(o))&&(t&&t(e.tr.insertText("\n").scrollIntoView()),!0)};function Zn(e){for(var t=0;t<e.edgeCount;t++){var n=e.edge(t).type;if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}var Xn=function(e,t){var n=e.selection,r=n.$head,o=n.$anchor;if(!r.parent.type.spec.code||!r.sameParent(o))return!1;var i=r.node(-1),a=r.indexAfter(-1),s=Zn(i.contentMatchAt(a));if(!s||!i.canReplaceWith(a,a,s))return!1;if(t){var l=r.after(),u=e.tr.replaceWith(l,l,s.createAndFill());u.setSelection(p.Selection.near(u.doc.resolve(l),1)),t(u.scrollIntoView())}return!0},Qn=function(e,t){var n=e.selection,r=n.$from,o=n.$to;if(n instanceof p.AllSelection||r.parent.inlineContent||o.parent.inlineContent)return!1;var i=Zn(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(t){var a=(!r.parentOffset&&o.index()<o.parent.childCount?r:o).pos,s=e.tr.insert(a,i.createAndFill());s.setSelection(p.TextSelection.create(s.doc,a+1)),t(s.scrollIntoView())}return!0},er=function(e,t){var n=e.selection.$cursor;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){var r=n.before();if(Object(g.g)(e.doc,r))return t&&t(e.tr.split(r).scrollIntoView()),!0}var o=n.blockRange(),i=o&&Object(g.k)(o);return null!=i&&(t&&t(e.tr.lift(o,i).scrollIntoView()),!0)},tr=function(e,t){var n=e.selection,r=n.$from,o=n.$to;if(e.selection instanceof p.NodeSelection&&e.selection.node.isBlock)return!(!r.parentOffset||!Object(g.g)(e.doc,r.pos))&&(t&&t(e.tr.split(r.pos).scrollIntoView()),!0);if(!r.parent.isBlock)return!1;if(t){var i=o.parentOffset==o.parent.content.size,a=e.tr;(e.selection instanceof p.TextSelection||e.selection instanceof p.AllSelection)&&a.deleteSelection();var s=0==r.depth?null:Zn(r.node(-1).contentMatchAt(r.indexAfter(-1))),l=i&&s?[{type:s}]:void 0,u=Object(g.g)(a.doc,a.mapping.map(r.pos),1,l);if(l||u||!Object(g.g)(a.doc,a.mapping.map(r.pos),1,s?[{type:s}]:void 0)||(s&&(l=[{type:s}]),u=!0),u&&(a.split(a.mapping.map(r.pos),1,l),!i&&!r.parentOffset&&r.parent.type!=s)){var c=a.mapping.map(r.before()),d=a.doc.resolve(c);s&&r.node(-1).canReplaceWith(d.index(),d.index()+1,s)&&a.setNodeMarkup(a.mapping.map(r.before()),s)}t(a.scrollIntoView())}return!0};function nr(e,t,n){var r,o,i=t.nodeBefore,a=t.nodeAfter;if(i.type.spec.isolating||a.type.spec.isolating)return!1;if(function(e,t,n){var r=t.nodeBefore,o=t.nodeAfter,i=t.index();return!!(r&&o&&r.type.compatibleContent(o.type))&&(!r.content.size&&t.parent.canReplace(i-1,i)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),!0):!(!t.parent.canReplace(i,i+1)||!o.isTextblock&&!Object(g.f)(e.doc,t.pos))&&(n&&n(e.tr.clearIncompatible(t.pos,r.type,r.contentMatchAt(r.childCount)).join(t.pos).scrollIntoView()),!0))}(e,t,n))return!0;var s=t.parent.canReplace(t.index(),t.index()+1);if(s&&(r=(o=i.contentMatchAt(i.childCount)).findWrapping(a.type))&&o.matchType(r[0]||a.type).validEnd){if(n){for(var l=t.pos+a.nodeSize,u=v.Fragment.empty,c=r.length-1;c>=0;c--)u=v.Fragment.from(r[c].create(null,u));u=v.Fragment.from(i.copy(u));var d=e.tr.step(new g.b(t.pos-1,l,t.pos,l,new v.Slice(u,1,0),r.length,!0)),f=l+2*r.length;Object(g.f)(d.doc,f)&&d.join(f),n(d.scrollIntoView())}return!0}var h=p.Selection.findFrom(t,1),m=h&&h.$from.blockRange(h.$to),y=m&&Object(g.k)(m);if(null!=y&&y>=t.depth)return n&&n(e.tr.lift(m,y).scrollIntoView()),!0;if(s&&$n(a,"start",!0)&&$n(i,"end")){for(var b=i,w=[];w.push(b),!b.isTextblock;)b=b.lastChild;for(var k=a,x=1;!k.isTextblock;k=k.firstChild)x++;if(b.canReplace(b.childCount,b.childCount,k.content)){if(n){for(var O=v.Fragment.empty,S=w.length-1;S>=0;S--)O=v.Fragment.from(w[S].copy(O));n(e.tr.step(new g.b(t.pos-w.length,t.pos+a.nodeSize,t.pos+x,t.pos+a.nodeSize-x,new v.Slice(O,w.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function rr(e){return function(t,n){for(var r=t.selection,o=e<0?r.$from:r.$to,i=o.depth;o.node(i).isInline;){if(!i)return!1;i--}return!!o.node(i).isTextblock&&(n&&n(t.tr.setSelection(p.TextSelection.create(t.doc,e<0?o.start(i):o.end(i)))),!0)}}var or=rr(-1),ir=rr(1);function ar(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return function(n,r){var o=n.selection,i=o.$from,a=o.$to,s=i.blockRange(a),l=s&&Object(g.i)(s,e,t);return!!l&&(r&&r(n.tr.wrap(s,l).scrollIntoView()),!0)}}function sr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return function(n,r){var o=n.selection,i=o.from,a=o.to,s=!1;return n.doc.nodesBetween(i,a,(function(r,o){if(s)return!1;if(r.isTextblock&&!r.hasMarkup(e,t))if(r.type==e)s=!0;else{var i=n.doc.resolve(o),a=i.index();s=i.parent.canReplaceWith(a,a+1,e)}})),!!s&&(r&&r(n.tr.setBlockType(i,a,e,t).scrollIntoView()),!0)}}function lr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e,n,r){for(var o=0;o<t.length;o++)if(t[o](e,n,r))return!0;return!1}}var ur=lr(In,_n,qn),cr=lr(In,Un,Kn),dr={Enter:lr(Yn,Qn,er,tr),"Mod-Enter":Xn,Backspace:ur,"Mod-Backspace":ur,"Shift-Backspace":ur,Delete:cr,"Mod-Delete":cr,"Mod-a":function(e,t){return t&&t(e.tr.setSelection(new p.AllSelection(e.doc))),!0}},fr={"Ctrl-h":dr.Backspace,"Alt-Backspace":dr["Mod-Backspace"],"Ctrl-d":dr.Delete,"Ctrl-Alt-Backspace":dr["Mod-Delete"],"Alt-Delete":dr["Mod-Delete"],"Alt-d":dr["Mod-Delete"],"Ctrl-a":or,"Ctrl-e":ir};for(var pr in dr)fr[pr]=dr[pr];"undefined"!=typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!("undefined"==typeof os||!os.platform)&&os.platform();function hr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return function(n,r){var o=n.selection,i=o.$from,a=o.$to,s=i.blockRange(a),l=!1,u=s;if(!s)return!1;if(s.depth>=2&&i.node(s.depth-1).type.compatibleContent(e)&&0==s.startIndex){if(0==i.index(s.depth-1))return!1;var c=n.doc.resolve(s.start-2);u=new v.NodeRange(c,c,s.depth),s.endIndex<s.parent.childCount&&(s=new v.NodeRange(i,n.doc.resolve(a.end(s.depth)),s.depth)),l=!0}var d=Object(g.i)(u,e,t,s);return!!d&&(r&&r(mr(n.tr,s,d,l,e).scrollIntoView()),!0)}}function mr(e,t,n,r,o){for(var i=v.Fragment.empty,a=n.length-1;a>=0;a--)i=v.Fragment.from(n[a].type.create(n[a].attrs,i));e.step(new g.b(t.start-(r?2:0),t.end,t.start,t.end,new v.Slice(i,0,0),n.length,!0));for(var s=0,l=0;l<n.length;l++)n[l].type==o&&(s=l+1);for(var u=n.length-s,c=t.start+n.length-(r?2:0),d=t.parent,f=t.startIndex,p=t.endIndex,h=!0;f<p;f++,h=!1)!h&&Object(g.g)(e.doc,c,u)&&(e.split(c,u),c+=2*u),c+=d.child(f).nodeSize;return e}function vr(e){return function(t,n){var r=t.selection,o=r.$from,i=r.$to,a=o.blockRange(i,(function(t){return t.childCount>0&&t.firstChild.type==e}));return!!a&&(!n||(o.node(a.depth-1).type==e?function(e,t,n,r){var o=e.tr,i=r.end,a=r.$to.end(r.depth);i<a&&(o.step(new g.b(i-1,a,i,a,new v.Slice(v.Fragment.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new v.NodeRange(o.doc.resolve(r.$from.pos),o.doc.resolve(a),r.depth));return t(o.lift(r,Object(g.k)(r)).scrollIntoView()),!0}(t,n,e,a):function(e,t,n){for(var r=e.tr,o=n.parent,i=n.end,a=n.endIndex-1,s=n.startIndex;a>s;a--)i-=o.child(a).nodeSize,r.delete(i-1,i+1);var l=r.doc.resolve(n.start),u=l.nodeAfter;if(r.mapping.map(n.end)!=n.start+l.nodeAfter.nodeSize)return!1;var c=0==n.startIndex,d=n.endIndex==o.childCount,f=l.node(-1),p=l.index(-1);if(!f.canReplace(p+(c?0:1),p+1,u.content.append(d?v.Fragment.empty:v.Fragment.from(o))))return!1;var h=l.pos,m=h+u.nodeSize;return r.step(new g.b(h-(c?1:0),m+(d?1:0),h+1,m-1,new v.Slice((c?v.Fragment.empty:v.Fragment.from(o.copy(v.Fragment.empty))).append(d?v.Fragment.empty:v.Fragment.from(o.copy(v.Fragment.empty))),c?0:1,d?0:1),c?0:1)),t(r.scrollIntoView()),!0}(t,n,a)))}}function gr(e){var t=e.state,n=e.transaction,r=n.selection,o=n.doc,i=n.storedMarks;return Object(f.a)(Object(f.a)({},t),{},{apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),filterTransaction:t.filterTransaction,plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return i},get selection(){return r},get doc(){return o},get tr(){return r=n.selection,o=n.doc,i=n.storedMarks,n}})}var yr=function(){function e(t){Object(c.a)(this,e),this.editor=t.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=t.state}return Object(d.a)(e,[{key:"hasCustomState",get:function(){return!!this.customState}},{key:"state",get:function(){return this.customState||this.editor.state}},{key:"commands",get:function(){var e=this,t=this.rawCommands,n=this.editor,r=this.state,o=n.view,a=r.tr,s=this.buildProps(a);return Object.fromEntries(Object.entries(t).map((function(t){var n=Object(i.a)(t,2),r=n[0],l=n[1];return[r,function(){var t=l.apply(void 0,arguments)(s);return a.getMeta("preventDispatch")||e.hasCustomState||o.dispatch(a),t}]})))}},{key:"chain",get:function(){var e=this;return function(){return e.createChain()}}},{key:"can",get:function(){var e=this;return function(){return e.createCan()}}},{key:"createChain",value:function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=this.rawCommands,o=this.editor,a=this.state,s=o.view,l=[],u=!!e,c=e||a.tr,d=function(){return u||!n||c.getMeta("preventDispatch")||t.hasCustomState||s.dispatch(c),l.every((function(e){return!0===e}))},p=Object(f.a)(Object(f.a)({},Object.fromEntries(Object.entries(r).map((function(e){var r=Object(i.a)(e,2),o=r[0],a=r[1];return[o,function(){var e=t.buildProps(c,n),r=a.apply(void 0,arguments)(e);return l.push(r),p}]})))),{},{run:d});return p}},{key:"createCan",value:function(e){var t=this,n=this.rawCommands,r=this.state,o=void 0,a=e||r.tr,s=this.buildProps(a,o),l=Object.fromEntries(Object.entries(n).map((function(e){var t=Object(i.a)(e,2),n=t[0],r=t[1];return[n,function(){return r.apply(void 0,arguments)(Object(f.a)(Object(f.a)({},s),{},{dispatch:o}))}]})));return Object(f.a)(Object(f.a)({},l),{},{chain:function(){return t.createChain(a,o)}})}},{key:"buildProps",value:function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=this.rawCommands,o=this.editor,a=this.state,s=o.view;a.storedMarks&&e.setStoredMarks(a.storedMarks);var l={tr:e,editor:o,view:s,state:gr({state:a,transaction:e}),dispatch:n?function(){}:void 0,chain:function(){return t.createChain(e)},can:function(){return t.createCan(e)},get commands(){return Object.fromEntries(Object.entries(r).map((function(e){var t=Object(i.a)(e,2),n=t[0],r=t[1];return[n,function(){return r.apply(void 0,arguments)(l)}]})))}};return l}}]),e}(),br=function(){function e(){Object(c.a)(this,e),this.callbacks={}}return Object(d.a)(e,[{key:"on",value:function(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),this}},{key:"emit",value:function(e){for(var t=this,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];var i=this.callbacks[e];return i&&i.forEach((function(e){return e.apply(t,r)})),this}},{key:"off",value:function(e,t){var n=this.callbacks[e];return n&&(t?this.callbacks[e]=n.filter((function(e){return e!==t})):delete this.callbacks[e]),this}},{key:"removeAllListeners",value:function(){this.callbacks={}}}]),e}();function wr(e,t,n){return void 0===e.config[t]&&e.parent?wr(e.parent,t,n):"function"===typeof e.config[t]?e.config[t].bind(Object(f.a)(Object(f.a)({},n),{},{parent:e.parent?wr(e.parent,t,n):null})):e.config[t]}function kr(e){return{baseExtensions:e.filter((function(e){return"extension"===e.type})),nodeExtensions:e.filter((function(e){return"node"===e.type})),markExtensions:e.filter((function(e){return"mark"===e.type}))}}function xr(e){var t=[],n=kr(e),r=n.nodeExtensions,a=n.markExtensions,s=[].concat(Object(o.a)(r),Object(o.a)(a)),l={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return e.forEach((function(e){var n=wr(e,"addGlobalAttributes",{name:e.name,options:e.options,storage:e.storage});n&&n().forEach((function(e){e.types.forEach((function(n){Object.entries(e.attributes).forEach((function(e){var r=Object(i.a)(e,2),o=r[0],a=r[1];t.push({type:n,name:o,attribute:Object(f.a)(Object(f.a)({},l),a)})}))}))}))})),s.forEach((function(e){var n={name:e.name,options:e.options,storage:e.storage},r=wr(e,"addAttributes",n);if(r){var o=r();Object.entries(o).forEach((function(n){var r=Object(i.a)(n,2),o=r[0],a=r[1],s=Object(f.a)(Object(f.a)({},l),a);a.isRequired&&void 0===a.default&&delete s.default,t.push({type:e.name,name:o,attribute:s})}))}})),t}function Or(e,t){if("string"===typeof e){if(!t.nodes[e])throw Error("There is no node type named '".concat(e,"'. Maybe you forgot to add the extension?"));return t.nodes[e]}return e}function Sr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((function(e){return!!e})).reduce((function(e,t){var n=Object(f.a)({},e);return Object.entries(t).forEach((function(e){var t=Object(i.a)(e,2),r=t[0],o=t[1];n[r]?n[r]="class"===r?[n[r],o].join(" "):"style"===r?[n[r],o].join("; "):o:n[r]=o})),n}),{})}function Cr(e,t){return t.filter((function(e){return e.attribute.rendered})).map((function(t){return t.attribute.renderHTML?t.attribute.renderHTML(e.attrs)||{}:Object(u.a)({},t.name,e.attrs[t.name])})).reduce((function(e,t){return Sr(e,t)}),{})}function jr(e){return"function"===typeof e}function Dr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if(jr(e)){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return t?e.bind(t).apply(void 0,r):e.apply(void 0,r)}return e}function Ar(e,t){return e.style?e:Object(f.a)(Object(f.a)({},e),{},{getAttrs:function(n){var r=e.getAttrs?e.getAttrs(n):e.attrs;if(!1===r)return!1;var o=t.reduce((function(e,t){var r=t.attribute.parseHTML?t.attribute.parseHTML(n):function(e){return"string"!==typeof e?e:e.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(e):"true"===e||"false"!==e&&e}(n.getAttribute(t.name));return null===r||void 0===r?e:Object(f.a)(Object(f.a)({},e),{},Object(u.a)({},t.name,r))}),{});return Object(f.a)(Object(f.a)({},r),o)}})}function Er(e){return Object.fromEntries(Object.entries(e).filter((function(e){var t=Object(i.a)(e,2),n=t[0],r=t[1];return("attrs"!==n||!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 0===Object.keys(e).length&&e.constructor===Object}(r))&&(null!==r&&void 0!==r)})))}function Mr(e){var t,n=xr(e),r=kr(e),o=r.nodeExtensions,i=r.markExtensions,a=null===(t=o.find((function(e){return wr(e,"topNode")})))||void 0===t?void 0:t.name,s=Object.fromEntries(o.map((function(t){var r=n.filter((function(e){return e.type===t.name})),o={name:t.name,options:t.options,storage:t.storage},i=e.reduce((function(e,n){var r=wr(n,"extendNodeSchema",o);return Object(f.a)(Object(f.a)({},e),r?r(t):{})}),{}),a=Er(Object(f.a)(Object(f.a)({},i),{},{content:Dr(wr(t,"content",o)),marks:Dr(wr(t,"marks",o)),group:Dr(wr(t,"group",o)),inline:Dr(wr(t,"inline",o)),atom:Dr(wr(t,"atom",o)),selectable:Dr(wr(t,"selectable",o)),draggable:Dr(wr(t,"draggable",o)),code:Dr(wr(t,"code",o)),defining:Dr(wr(t,"defining",o)),isolating:Dr(wr(t,"isolating",o)),attrs:Object.fromEntries(r.map((function(e){var t;return[e.name,{default:null===(t=null===e||void 0===e?void 0:e.attribute)||void 0===t?void 0:t.default}]})))})),s=Dr(wr(t,"parseHTML",o));s&&(a.parseDOM=s.map((function(e){return Ar(e,r)})));var l=wr(t,"renderHTML",o);l&&(a.toDOM=function(e){return l({node:e,HTMLAttributes:Cr(e,r)})});var u=wr(t,"renderText",o);return u&&(a.toText=u),[t.name,a]}))),l=Object.fromEntries(i.map((function(t){var r=n.filter((function(e){return e.type===t.name})),o={name:t.name,options:t.options,storage:t.storage},i=e.reduce((function(e,n){var r=wr(n,"extendMarkSchema",o);return Object(f.a)(Object(f.a)({},e),r?r(t):{})}),{}),a=Er(Object(f.a)(Object(f.a)({},i),{},{inclusive:Dr(wr(t,"inclusive",o)),excludes:Dr(wr(t,"excludes",o)),group:Dr(wr(t,"group",o)),spanning:Dr(wr(t,"spanning",o)),code:Dr(wr(t,"code",o)),attrs:Object.fromEntries(r.map((function(e){var t;return[e.name,{default:null===(t=null===e||void 0===e?void 0:e.attribute)||void 0===t?void 0:t.default}]})))})),s=Dr(wr(t,"parseHTML",o));s&&(a.parseDOM=s.map((function(e){return Ar(e,r)})));var l=wr(t,"renderHTML",o);return l&&(a.toDOM=function(e){return l({mark:e,HTMLAttributes:Cr(e,r)})}),[t.name,a]})));return new v.Schema({topNode:a,nodes:s,marks:l})}function Tr(e,t){return t.nodes[e]||t.marks[e]||null}function Lr(e,t){return Array.isArray(t)?t.some((function(t){return("string"===typeof t?t:t.name)===e.name})):t}function Nr(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var Pr=Object(d.a)((function e(t){Object(c.a)(this,e),this.find=t.find,this.handler=t.handler}));function Rr(e){var t,n=e.editor,r=e.from,o=e.to,i=e.text,a=e.rules,s=e.plugin,l=n.view;if(l.composing)return!1;var u=l.state.doc.resolve(r);if(u.parent.type.spec.code||(null===(t=u.nodeBefore||u.nodeAfter)||void 0===t?void 0:t.marks.find((function(e){return e.type.spec.code}))))return!1;var c=!1,d=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n="";return e.parent.nodesBetween(Math.max(0,e.parentOffset-t),e.parentOffset,(function(t,r,o,i){var a,s,l;n+=(null===(s=(a=t.type.spec).toText)||void 0===s?void 0:s.call(a,{node:t,pos:r,parent:o,index:i}))||(null===(l=e.nodeBefore)||void 0===l?void 0:l.text)||"%leaf%"})),n}(u)+i;return a.forEach((function(e){if(!c){var t=function(e,t){if(Nr(t))return t.exec(e);var n=t(e);if(!n)return null;var r=[];return r.push(n.text),r.index=n.index,r.input=e,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r}(d,e.find);if(t){var a=l.state.tr,u=gr({state:l.state,transaction:a}),f={from:r-(t[0].length-i.length),to:o},p=new yr({editor:n,state:u}),h=p.commands,m=p.chain,v=p.can;null!==e.handler({state:u,range:f,match:t,commands:h,chain:m,can:v})&&a.steps.length&&(a.setMeta(s,{transform:a,from:r,to:o,text:i}),l.dispatch(a),c=!0)}}})),c}function Hr(e){var t=e.editor,n=e.rules,r=new p.Plugin({state:{init:function(){return null},apply:function(e,t){var n=e.getMeta(r);return n||(e.selectionSet||e.docChanged?null:t)}},props:{handleTextInput:function(e,o,i,a){return Rr({editor:t,from:o,to:i,text:a,rules:n,plugin:r})},handleDOMEvents:{compositionend:function(e){return setTimeout((function(){var o=e.state.selection.$cursor;o&&Rr({editor:t,from:o.pos,to:o.pos,text:"",rules:n,plugin:r})})),!1}},handleKeyDown:function(e,o){if("Enter"!==o.key)return!1;var i=e.state.selection.$cursor;return!!i&&Rr({editor:t,from:i.pos,to:i.pos,text:"\n",rules:n,plugin:r})}},isInputRules:!0});return r}var Fr=Object(d.a)((function e(t){Object(c.a)(this,e),this.find=t.find,this.handler=t.handler}));function Vr(e){var t=e.editor,n=e.state,r=e.from,i=e.to,a=e.rule,s=new yr({editor:t,state:n}),l=s.commands,u=s.chain,c=s.can,d=[];return n.doc.nodesBetween(r,i,(function(e,t){if(e.isTextblock&&!e.type.spec.code){var s=Math.max(r,t),f=Math.min(i,t+e.content.size);(function(e,t){if(Nr(t))return Object(o.a)(e.matchAll(t));var n=t(e);return n?n.map((function(t){var n=[];return n.push(t.text),n.index=t.index,n.input=e,n.data=t.data,t.replaceWith&&(t.text.includes(t.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),n.push(t.replaceWith)),n})):[]})(e.textBetween(s-t,f-t,void 0,"\ufffc"),a.find).forEach((function(e){if(void 0!==e.index){var t=s+e.index+1,r=t+e[0].length,o={from:n.tr.mapping.map(t),to:n.tr.mapping.map(r)},i=a.handler({state:n,range:o,match:e,commands:l,chain:u,can:c});d.push(i)}}))}})),d.every((function(e){return null!==e}))}var zr=function(){function e(t,n){var r=this;Object(c.a)(this,e),this.splittableMarks=[],this.editor=n,this.extensions=e.resolve(t),this.schema=Mr(this.extensions),this.extensions.forEach((function(e){var t;r.editor.extensionStorage[e.name]=e.storage;var n={name:e.name,options:e.options,storage:e.storage,editor:r.editor,type:Tr(e.name,r.schema)};"mark"===e.type&&((null===(t=Dr(wr(e,"keepOnSplit",n)))||void 0===t||t)&&r.splittableMarks.push(e.name));var o=wr(e,"onBeforeCreate",n);o&&r.editor.on("beforeCreate",o);var i=wr(e,"onCreate",n);i&&r.editor.on("create",i);var a=wr(e,"onUpdate",n);a&&r.editor.on("update",a);var s=wr(e,"onSelectionUpdate",n);s&&r.editor.on("selectionUpdate",s);var l=wr(e,"onTransaction",n);l&&r.editor.on("transaction",l);var u=wr(e,"onFocus",n);u&&r.editor.on("focus",u);var c=wr(e,"onBlur",n);c&&r.editor.on("blur",c);var d=wr(e,"onDestroy",n);d&&r.editor.on("destroy",d)}))}return Object(d.a)(e,[{key:"commands",get:function(){var e=this;return this.extensions.reduce((function(t,n){var r=wr(n,"addCommands",{name:n.name,options:n.options,storage:n.storage,editor:e.editor,type:Tr(n.name,e.schema)});return r?Object(f.a)(Object(f.a)({},t),r()):t}),{})}},{key:"plugins",get:function(){var t=this,n=this.editor,r=e.sort(Object(o.a)(this.extensions).reverse()),a=[],s=[],l=r.map((function(e){var r={name:e.name,options:e.options,storage:e.storage,editor:n,type:Tr(e.name,t.schema)},l=[],u=wr(e,"addKeyboardShortcuts",r);if(u){var c=zn(Object.fromEntries(Object.entries(u()).map((function(e){var t=Object(i.a)(e,2),r=t[0],o=t[1];return[r,function(){return o({editor:n})}]}))));l.push(c)}var d=wr(e,"addInputRules",r);Lr(e,n.options.enableInputRules)&&d&&a.push.apply(a,Object(o.a)(d()));var f=wr(e,"addPasteRules",r);Lr(e,n.options.enablePasteRules)&&f&&s.push.apply(s,Object(o.a)(f()));var p=wr(e,"addProseMirrorPlugins",r);if(p){var h=p();l.push.apply(l,Object(o.a)(h))}return l})).flat();return[Hr({editor:n,rules:a})].concat(Object(o.a)(function(e){var t=e.editor,n=e.rules,r=null,o=!1,i=!1;return n.map((function(e){return new p.Plugin({view:function(e){var t=function(t){var n;r=(null===(n=e.dom.parentElement)||void 0===n?void 0:n.contains(t.target))?e.dom.parentElement:null};return window.addEventListener("dragstart",t),{destroy:function(){window.removeEventListener("dragstart",t)}}},props:{handleDOMEvents:{drop:function(e){return i=r===e.dom.parentElement,!1},paste:function(e,t){var n,r=null===(n=t.clipboardData)||void 0===n?void 0:n.getData("text/html");return o=!!(null===r||void 0===r?void 0:r.includes("data-pm-slice")),!1}}},appendTransaction:function(n,r,a){var s=n[0],l="paste"===s.getMeta("uiEvent")&&!o,u="drop"===s.getMeta("uiEvent")&&!i;if(l||u){var c=r.doc.content.findDiffStart(a.doc.content),d=r.doc.content.findDiffEnd(a.doc.content);if("number"===typeof c&&d&&c!==d.b){var f=a.tr,p=gr({state:a,transaction:f});if(Vr({editor:t,state:p,from:Math.max(c-1,0),to:d.b,rule:e})&&f.steps.length)return f}}}})}))}({editor:n,rules:s})),Object(o.a)(l))}},{key:"attributes",get:function(){return xr(this.extensions)}},{key:"nodeViews",get:function(){var e=this,t=this.editor,n=kr(this.extensions).nodeExtensions;return Object.fromEntries(n.filter((function(e){return!!wr(e,"addNodeView")})).map((function(n){var r=e.attributes.filter((function(e){return e.type===n.name})),o={name:n.name,options:n.options,storage:n.storage,editor:t,type:Or(n.name,e.schema)},i=wr(n,"addNodeView",o);if(!i)return[];return[n.name,function(e,o,a,s){var l=Cr(e,r);return i()({editor:t,node:e,getPos:a,decorations:s,HTMLAttributes:l,extension:n})}]})))}}],[{key:"resolve",value:function(t){var n=e.sort(e.flatten(t)),r=function(e){var t=e.filter((function(t,n){return e.indexOf(t)!==n}));return Object(o.a)(new Set(t))}(n.map((function(e){return e.name})));return r.length&&console.warn("[tiptap warn]: Duplicate extension names found: [".concat(r.map((function(e){return"'".concat(e,"'")})).join(", "),"]. This can lead to issues.")),n}},{key:"flatten",value:function(e){var t=this;return e.map((function(e){var n=wr(e,"addExtensions",{name:e.name,options:e.options,storage:e.storage});return n?[e].concat(Object(o.a)(t.flatten(n()))):e})).flat(10)}},{key:"sort",value:function(e){return e.sort((function(e,t){var n=wr(e,"priority")||100,r=wr(t,"priority")||100;return n>r?-1:n<r?1:0}))}}]),e}();function Br(e){return"Object"===function(e){return Object.prototype.toString.call(e).slice(8,-1)}(e)&&(e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype)}function Ir(e,t){var n=Object(f.a)({},e);return Br(e)&&Br(t)&&Object.keys(t).forEach((function(r){Br(t[r])&&r in e?n[r]=Ir(e[r],t[r]):Object.assign(n,Object(u.a)({},r,t[r]))})),n}var _r=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(c.a)(this,e),this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config=Object(f.a)(Object(f.a)({},this.config),t),this.name=this.config.name,t.defaultOptions&&console.warn('[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "'.concat(this.name,'".')),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Dr(wr(this,"addOptions",{name:this.name}))),this.storage=Dr(wr(this,"addStorage",{name:this.name,options:this.options}))||{}}return Object(d.a)(e,[{key:"configure",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.extend();return t.options=Ir(this.options,e),t.storage=Dr(wr(t,"addStorage",{name:t.name,options:t.options})),t}},{key:"extend",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=new e(t);return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&console.warn('[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "'.concat(n.name,'".')),n.options=Dr(wr(n,"addOptions",{name:n.name})),n.storage=Dr(wr(n,"addStorage",{name:n.name,options:n.options})),n}}],[{key:"create",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new e(t)}}]),e}();function $r(e,t,n){var r=t.from,o=t.to,i=n||{},a=i.blockSeparator,s=void 0===a?"\n\n":a,l=i.textSerializers,u=void 0===l?{}:l,c="",d=!0;return e.nodesBetween(r,o,(function(e,n,i,a){var l,f=null===u||void 0===u?void 0:u[e.type.name];f?(e.isBlock&&!d&&(c+=s,d=!0),i&&(c+=f({node:e,pos:n,parent:i,index:a,range:t}))):e.isText?(c+=null===(l=null===e||void 0===e?void 0:e.text)||void 0===l?void 0:l.slice(Math.max(r,n)-n,o-n),d=!1):e.isBlock&&!d&&(c+=s,d=!0)})),c}function qr(e){return Object.fromEntries(Object.entries(e.nodes).filter((function(e){return Object(i.a)(e,2)[1].spec.toText})).map((function(e){var t=Object(i.a)(e,2);return[t[0],t[1].spec.toText]})))}var Wr=_r.create({name:"clipboardTextSerializer",addProseMirrorPlugins:function(){var e=this;return[new p.Plugin({key:new p.PluginKey("clipboardTextSerializer"),props:{clipboardTextSerializer:function(){var t=e.editor,n=t.state,r=t.schema,i=n.doc,a=n.selection.ranges,s=Math.min.apply(Math,Object(o.a)(a.map((function(e){return e.$from.pos})))),l=Math.max.apply(Math,Object(o.a)(a.map((function(e){return e.$to.pos}))));return $r(i,{from:s,to:l},{textSerializers:qr(r)})}}})]}});function Ur(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{strict:!0},r=Object.keys(t);return!r.length||r.every((function(r){return n.strict?t[r]===e[r]:Nr(t[r])?t[r].test(e[r]):t[r]===e[r]}))}function Kr(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e.find((function(e){return e.type===t&&Ur(e.attrs,n)}))}function Gr(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return!!Kr(e,t,n)}function Jr(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e&&t){var r=e.parent.childAfter(e.parentOffset);if(e.parentOffset===r.offset&&0!==r.offset&&(r=e.parent.childBefore(e.parentOffset)),r.node){var i=Kr(Object(o.a)(r.node.marks),t,n);if(i){var a=r.index,s=e.start()+r.offset,l=a+1,u=s+r.node.nodeSize;for(Kr(Object(o.a)(r.node.marks),t,n);a>0&&i.isInSet(e.parent.child(a-1).marks);)a-=1,s-=e.parent.child(a).nodeSize;for(;l<e.parent.childCount&&Gr(Object(o.a)(e.parent.child(l).marks),t,n);)u+=e.parent.child(l).nodeSize,l+=1;return{from:s,to:u}}}}}function Yr(e,t){if("string"===typeof e){if(!t.marks[e])throw Error("There is no mark type named '".concat(e,"'. Maybe you forgot to add the extension?"));return t.marks[e]}return e}function Zr(e){return e&&"object"===typeof e&&!Array.isArray(e)&&!function(e){var t;return"class"===(null===(t=e.constructor)||void 0===t?void 0:t.toString().substring(0,5))}(e)}function Xr(e){return Zr(e)&&e instanceof p.TextSelection}function Qr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return Math.min(Math.max(e,t),n)}function eo(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!t)return null;var n=p.Selection.atStart(e),r=p.Selection.atEnd(e);if("start"===t||!0===t)return n;if("end"===t)return r;var o=n.from,i=r.to;return"all"===t?p.TextSelection.create(e,Qr(0,o,i),Qr(e.content.size,o,i)):p.TextSelection.create(e,Qr(t,o,i),Qr(t,o,i))}function to(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}function no(e){var t="<body>".concat(e,"</body>");return(new window.DOMParser).parseFromString(t,"text/html").body}function ro(e,t,n){if(n=Object(f.a)({slice:!0,parseOptions:{}},n),"object"===typeof e&&null!==e)try{return Array.isArray(e)?v.Fragment.fromArray(e.map((function(e){return t.nodeFromJSON(e)}))):t.nodeFromJSON(e)}catch(o){return console.warn("[tiptap warn]: Invalid content.","Passed value:",e,"Error:",o),ro("",t,n)}if("string"===typeof e){var r=v.DOMParser.fromSchema(t);return n.slice?r.parseSlice(no(e),n.parseOptions).content:r.parse(no(e),n.parseOptions)}return ro("",t,n)}function oo(){return"undefined"!==typeof navigator&&/Mac/.test(navigator.platform)}function io(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=e.selection,o=r.from,i=r.to,a=r.empty,s=t?Or(t,e.schema):null,l=[];e.doc.nodesBetween(o,i,(function(e,t){if(!e.isText){var n=Math.max(o,t),r=Math.min(i,t+e.nodeSize);l.push({node:e,from:n,to:r})}}));var u=i-o,c=l.filter((function(e){return!s||s.name===e.node.type.name})).filter((function(e){return Ur(e.node.attrs,n,{strict:!1})}));if(a)return!!c.length;var d=c.reduce((function(e,t){return e+t.to-t.from}),0);return d>=u}function ao(e,t){return t.nodes[e]?"node":t.marks[e]?"mark":null}function so(e,t){var n="string"===typeof t?[t]:t;return Object.keys(e).reduce((function(t,r){return n.includes(r)||(t[r]=e[r]),t}),{})}function lo(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return ro(e,t,{slice:!1,parseOptions:n})}function uo(e,t){var n=Yr(t,e.schema),r=e.selection,i=r.from,a=r.to,s=r.empty,l=[];s?(e.storedMarks&&l.push.apply(l,Object(o.a)(e.storedMarks)),l.push.apply(l,Object(o.a)(e.selection.$head.marks()))):e.doc.nodesBetween(i,a,(function(e){l.push.apply(l,Object(o.a)(e.marks))}));var u=l.find((function(e){return e.type.name===n.name}));return u?Object(f.a)({},u.attrs):{}}function co(e,t,n){return Object.fromEntries(Object.entries(n).filter((function(n){var r=Object(i.a)(n,1)[0],o=e.find((function(e){return e.type===t&&e.name===r}));return!!o&&o.attribute.keepOnSplit})))}function fo(e){for(var t=0;t<e.edgeCount;t+=1){var n=e.edge(t).type;if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function po(e,t){var n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){var r=n.filter((function(e){return null===t||void 0===t?void 0:t.includes(e.type.name)}));e.tr.ensureMarks(r)}}function ho(e,t){for(var n=e.depth;n>0;n-=1){var r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}}function mo(e){return function(t){return ho(t.$from,e)}}function vo(e,t){var n=kr(t).nodeExtensions.find((function(t){return t.name===e}));if(!n)return!1;var r=Dr(wr(n,"group",{name:n.name,options:n.options,storage:n.storage}));return"string"===typeof r&&r.split(" ").includes("list")}var go=function(e,t){var n=mo((function(e){return e.type===t}))(e.selection);if(!n)return!0;var r=e.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(void 0===r)return!0;var o=e.doc.nodeAt(r);return n.node.type!==(null===o||void 0===o?void 0:o.type)||!Object(g.f)(e.doc,n.pos)||(e.join(n.pos),!0)},yo=function(e,t){var n=mo((function(e){return e.type===t}))(e.selection);if(!n)return!0;var r=e.doc.resolve(n.start).after(n.depth);if(void 0===r)return!0;var o=e.doc.nodeAt(r);return n.node.type!==(null===o||void 0===o?void 0:o.type)||!Object(g.f)(e.doc,r)||(e.join(r),!0)};function bo(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=e.selection,i=r.empty,a=r.ranges,s=t?Yr(t,e.schema):null;if(i)return!!(e.storedMarks||e.selection.$from.marks()).filter((function(e){return!s||s.name===e.type.name})).find((function(e){return Ur(e.attrs,n,{strict:!1})}));var l=0,u=[];if(a.forEach((function(t){var n=t.$from,r=t.$to,i=n.pos,a=r.pos;e.doc.nodesBetween(i,a,(function(e,t){if(e.isText||e.marks.length){var n=Math.max(i,t),r=Math.min(a,t+e.nodeSize);l+=r-n,u.push.apply(u,Object(o.a)(e.marks.map((function(e){return{mark:e,from:n,to:r}}))))}}))})),0===l)return!1;var c=u.filter((function(e){return!s||s.name===e.mark.type.name})).filter((function(e){return Ur(e.mark.attrs,n,{strict:!1})})).reduce((function(e,t){return e+t.to-t.from}),0),d=u.filter((function(e){return!s||e.mark.type!==s&&e.mark.type.excludes(s)})).reduce((function(e,t){return e+t.to-t.from}),0),f=c>0?c+d:c;return f>=l}var wo=Object.freeze({__proto__:null,blur:function(){return function(e){var t=e.editor,n=e.view;return requestAnimationFrame((function(){var e;t.isDestroyed||(n.dom.blur(),null===(e=null===window||void 0===window?void 0:window.getSelection())||void 0===e||e.removeAllRanges())})),!0}},clearContent:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return function(t){return t.commands.setContent("",e)}},clearNodes:function(){return function(e){var t=e.state,n=e.tr,r=e.dispatch,o=n.selection.ranges;return!r||(o.forEach((function(e){var r=e.$from,o=e.$to;t.doc.nodesBetween(r.pos,o.pos,(function(e,t){if(!e.type.isText){var r=n.doc,o=n.mapping,i=r.resolve(o.map(t)),a=r.resolve(o.map(t+e.nodeSize)),s=i.blockRange(a);if(s){var l=Object(g.k)(s);if(e.type.isTextblock){var u=i.parent.contentMatchAt(i.index()).defaultType;n.setNodeMarkup(s.start,u)}(l||0===l)&&n.lift(s,l)}}}))})),!0)}},command:function(e){return function(t){return e(t)}},createParagraphNear:function(){return function(e){var t=e.state,n=e.dispatch;return Qn(t,n)}},deleteNode:function(e){return function(t){for(var n=t.tr,r=t.state,o=t.dispatch,i=Or(e,r.schema),a=n.selection.$anchor,s=a.depth;s>0;s-=1){if(a.node(s).type===i){if(o){var l=a.before(s),u=a.after(s);n.delete(l,u).scrollIntoView()}return!0}}return!1}},deleteRange:function(e){return function(t){var n=t.tr,r=t.dispatch,o=e.from,i=e.to;return r&&n.delete(o,i),!0}},deleteSelection:function(){return function(e){var t=e.state,n=e.dispatch;return In(t,n)}},enter:function(){return function(e){return e.commands.keyboardShortcut("Enter")}},exitCode:function(){return function(e){var t=e.state,n=e.dispatch;return Xn(t,n)}},extendMarkRange:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=n.tr,o=n.state,i=n.dispatch,a=Yr(e,o.schema),s=r.doc,l=r.selection,u=l.$from,c=l.from,d=l.to;if(i){var f=Jr(u,a,t);if(f&&f.from<=c&&f.to>=d){var h=p.TextSelection.create(s,f.from,f.to);r.setSelection(h)}}return!0}},first:function(e){return function(t){for(var n="function"===typeof e?e(t):e,r=0;r<n.length;r+=1)if(n[r](t))return!0;return!1}},focus:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=n.editor,o=n.view,i=n.tr,a=n.dispatch;t=Object(f.a)({scrollIntoView:!0},t);var s=function(){to()&&o.dom.focus(),requestAnimationFrame((function(){r.isDestroyed||(o.focus(),(null===t||void 0===t?void 0:t.scrollIntoView)&&r.commands.scrollIntoView())}))};if(o.hasFocus()&&null===e||!1===e)return!0;if(a&&null===e&&!Xr(r.state.selection))return s(),!0;var l=eo(i.doc,e)||r.state.selection,u=r.state.selection.eq(l);return a&&(u||i.setSelection(l),u&&i.storedMarks&&i.setStoredMarks(i.storedMarks),s()),!0}},forEach:function(e,t){return function(n){return e.every((function(e,r){return t(e,Object(f.a)(Object(f.a)({},n),{},{index:r}))}))}},insertContent:function(e,t){return function(n){var r=n.tr;return n.commands.insertContentAt({from:r.selection.from,to:r.selection.to},e,t)}},insertContentAt:function(e,t,n){return function(r){var o=r.tr,i=r.dispatch,a=r.editor;if(i){n=Object(f.a)({parseOptions:{},updateSelection:!0},n);var s=ro(t,a.schema,{parseOptions:Object(f.a)({preserveWhitespace:"full"},n.parseOptions)});if("<>"===s.toString())return!0;var l="number"===typeof e?{from:e,to:e}:e,u=l.from,c=l.to,d=!0,h=!0;if((s.toString().startsWith("<")?s:[s]).forEach((function(e){e.check(),d=!!d&&(e.isText&&0===e.marks.length),h=!!h&&e.isBlock})),u===c&&h){var m=o.doc.resolve(u).parent;m.isTextblock&&!m.type.spec.code&&!m.childCount&&(u-=1,c+=1)}d?o.insertText(t,u,c):o.replaceWith(u,c,s),n.updateSelection&&function(e,t,n){var r=e.steps.length-1;if(!(r<t)){var o=e.steps[r];if(o instanceof g.c||o instanceof g.b){var i=e.mapping.maps[r],a=0;i.forEach((function(e,t,n,r){0===a&&(a=r)})),e.setSelection(p.Selection.near(e.doc.resolve(a),n))}}}(o,o.steps.length-1,-1)}return!0}},joinBackward:function(){return function(e){var t=e.state,n=e.dispatch;return _n(t,n)}},joinForward:function(){return function(e){var t=e.state,n=e.dispatch;return Un(t,n)}},keyboardShortcut:function(e){return function(t){var n=t.editor,r=t.view,o=t.tr,i=t.dispatch,a=function(e){var t,n,r,o,i=e.split(/-(?!$)/),a=i[i.length-1];"Space"===a&&(a=" ");for(var s=0;s<i.length-1;s+=1){var l=i[s];if(/^(cmd|meta|m)$/i.test(l))o=!0;else if(/^a(lt)?$/i.test(l))t=!0;else if(/^(c|ctrl|control)$/i.test(l))n=!0;else if(/^s(hift)?$/i.test(l))r=!0;else{if(!/^mod$/i.test(l))throw new Error("Unrecognized modifier name: ".concat(l));to()||oo()?o=!0:n=!0}}return t&&(a="Alt-".concat(a)),n&&(a="Ctrl-".concat(a)),o&&(a="Meta-".concat(a)),r&&(a="Shift-".concat(a)),a}(e).split(/-(?!$)/),s=a.find((function(e){return!["Alt","Ctrl","Meta","Shift"].includes(e)})),l=new KeyboardEvent("keydown",{key:"Space"===s?" ":s,altKey:a.includes("Alt"),ctrlKey:a.includes("Ctrl"),metaKey:a.includes("Meta"),shiftKey:a.includes("Shift"),bubbles:!0,cancelable:!0}),u=n.captureTransaction((function(){r.someProp("handleKeyDown",(function(e){return e(r,l)}))}));return null===u||void 0===u||u.steps.forEach((function(e){var t=e.map(o.mapping);t&&i&&o.maybeStep(t)})),!0}},lift:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=n.state,o=n.dispatch;return!!io(r,Or(e,r.schema),t)&&Jn(r,o)}},liftEmptyBlock:function(){return function(e){var t=e.state,n=e.dispatch;return er(t,n)}},liftListItem:function(e){return function(t){var n=t.state,r=t.dispatch;return vr(Or(e,n.schema))(n,r)}},newlineInCode:function(){return function(e){var t=e.state,n=e.dispatch;return Yn(t,n)}},resetAttributes:function(e,t){return function(n){var r=n.tr,o=n.state,i=n.dispatch,a=null,s=null,l=ao("string"===typeof e?e:e.name,o.schema);return!!l&&("node"===l&&(a=Or(e,o.schema)),"mark"===l&&(s=Yr(e,o.schema)),i&&r.selection.ranges.forEach((function(e){o.doc.nodesBetween(e.$from.pos,e.$to.pos,(function(e,n){a&&a===e.type&&r.setNodeMarkup(n,void 0,so(e.attrs,t)),s&&e.marks.length&&e.marks.forEach((function(o){s===o.type&&r.addMark(n,n+e.nodeSize,s.create(so(o.attrs,t)))}))}))})),!0)}},scrollIntoView:function(){return function(e){var t=e.tr;return e.dispatch&&t.scrollIntoView(),!0}},selectAll:function(){return function(e){var t=e.tr;return e.commands.setTextSelection({from:0,to:t.doc.content.size})}},selectNodeBackward:function(){return function(e){var t=e.state,n=e.dispatch;return qn(t,n)}},selectNodeForward:function(){return function(e){var t=e.state,n=e.dispatch;return Kn(t,n)}},selectParentNode:function(){return function(e){return function(e,t){var n,r=e.selection,o=r.$from,i=r.to,a=o.sharedDepth(i);return 0!=a&&(n=o.before(a),t&&t(e.tr.setSelection(p.NodeSelection.create(e.doc,n))),!0)}(e.state,e.dispatch)}},selectTextblockEnd:function(){return function(e){var t=e.state,n=e.dispatch;return ir(t,n)}},selectTextblockStart:function(){return function(e){var t=e.state,n=e.dispatch;return or(t,n)}},setContent:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(r){var o=r.tr,i=r.editor,a=r.dispatch,s=o.doc,l=lo(e,i.schema,n);return a&&o.replaceWith(0,s.content.size,l).setMeta("preventUpdate",!t),!0}},setMark:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=n.tr,o=n.state,i=n.dispatch,a=r.selection,s=a.empty,l=a.ranges,u=Yr(e,o.schema);if(i)if(s){var c=uo(o,u);r.addStoredMark(u.create(Object(f.a)(Object(f.a)({},c),t)))}else l.forEach((function(e){var n=e.$from.pos,i=e.$to.pos;o.doc.nodesBetween(n,i,(function(e,o){var a=Math.max(o,n),s=Math.min(o+e.nodeSize,i);e.marks.find((function(e){return e.type===u}))?e.marks.forEach((function(e){u===e.type&&r.addMark(a,s,u.create(Object(f.a)(Object(f.a)({},e.attrs),t)))})):r.addMark(a,s,u.create(t))}))}));return!0}},setMeta:function(e,t){return function(n){return n.tr.setMeta(e,t),!0}},setNode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=n.state,o=n.dispatch,i=n.chain,a=Or(e,r.schema);return a.isTextblock?i().command((function(e){var n=e.commands;return!!sr(a,t)(r)||n.clearNodes()})).command((function(e){var n=e.state;return sr(a,t)(n,o)})).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)}},setNodeSelection:function(e){return function(t){var n=t.tr;if(t.dispatch){var r=n.doc,o=p.Selection.atStart(r).from,i=p.Selection.atEnd(r).to,a=Qr(e,o,i),s=p.NodeSelection.create(r,a);n.setSelection(s)}return!0}},setTextSelection:function(e){return function(t){var n=t.tr;if(t.dispatch){var r=n.doc,o="number"===typeof e?{from:e,to:e}:e,i=o.from,a=o.to,s=p.TextSelection.atStart(r).from,l=p.TextSelection.atEnd(r).to,u=Qr(i,s,l),c=Qr(a,s,l),d=p.TextSelection.create(r,u,c);n.setSelection(d)}return!0}},sinkListItem:function(e){return function(t){var n,r=t.state,o=t.dispatch,i=Or(e,r.schema);return(n=i,function(e,t){var r=e.selection,o=r.$from,i=r.$to,a=o.blockRange(i,(function(e){return e.childCount>0&&e.firstChild.type==n}));if(!a)return!1;var s=a.startIndex;if(0==s)return!1;var l=a.parent,u=l.child(s-1);if(u.type!=n)return!1;if(t){var c=u.lastChild&&u.lastChild.type==l.type,d=v.Fragment.from(c?n.create():null),f=new v.Slice(v.Fragment.from(n.create(null,v.Fragment.from(l.type.create(null,d)))),c?3:1,0),p=a.start,h=a.end;t(e.tr.step(new g.b(p-(c?3:1),h,p,h,f,1,!0)).scrollIntoView())}return!0})(r,o)}},splitBlock:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.keepMarks,n=void 0===t||t;return function(e){var t=e.tr,r=e.state,o=e.dispatch,i=e.editor,a=t.selection,s=t.doc,l=a.$from,u=a.$to,c=co(i.extensionManager.attributes,l.node().type.name,l.node().attrs);if(a instanceof p.NodeSelection&&a.node.isBlock)return!(!l.parentOffset||!Object(g.g)(s,l.pos))&&(o&&(n&&po(r,i.extensionManager.splittableMarks),t.split(l.pos).scrollIntoView()),!0);if(!l.parent.isBlock)return!1;if(o){var d=u.parentOffset===u.parent.content.size;a instanceof p.TextSelection&&t.deleteSelection();var f=0===l.depth?void 0:fo(l.node(-1).contentMatchAt(l.indexAfter(-1))),h=d&&f?[{type:f,attrs:c}]:void 0,m=Object(g.g)(t.doc,t.mapping.map(l.pos),1,h);if(h||m||!Object(g.g)(t.doc,t.mapping.map(l.pos),1,f?[{type:f}]:void 0)||(m=!0,h=f?[{type:f,attrs:c}]:void 0),m&&(t.split(t.mapping.map(l.pos),1,h),f&&!d&&!l.parentOffset&&l.parent.type!==f)){var v=t.mapping.map(l.before()),y=t.doc.resolve(v);l.node(-1).canReplaceWith(y.index(),y.index()+1,f)&&t.setNodeMarkup(t.mapping.map(l.before()),f)}n&&po(r,i.extensionManager.splittableMarks),t.scrollIntoView()}return!0}},splitListItem:function(e){return function(t){var n,r=t.tr,o=t.state,i=t.dispatch,a=t.editor,s=Or(e,o.schema),l=o.selection,u=l.$from,c=l.$to,d=o.selection.node;if(d&&d.isBlock||u.depth<2||!u.sameParent(c))return!1;var f=u.node(-1);if(f.type!==s)return!1;var h=a.extensionManager.attributes;if(0===u.parent.content.size&&u.node(-1).childCount===u.indexAfter(-1)){if(2===u.depth||u.node(-3).type!==s||u.index(-2)!==u.node(-2).childCount-1)return!1;if(i){for(var m=v.Fragment.empty,y=u.index(-1)?1:u.index(-2)?2:3,b=u.depth-y;b>=u.depth-3;b-=1)m=v.Fragment.from(u.node(b).copy(m));var w=u.indexAfter(-1)<u.node(-2).childCount?1:u.indexAfter(-2)<u.node(-3).childCount?2:3,k=co(h,u.node().type.name,u.node().attrs),x=(null===(n=s.contentMatch.defaultType)||void 0===n?void 0:n.createAndFill(k))||void 0;m=m.append(v.Fragment.from(s.createAndFill(null,x)||void 0));var O=u.before(u.depth-(y-1));r.replace(O,u.after(-w),new v.Slice(m,4-y,0));var S=-1;r.doc.nodesBetween(O,r.doc.content.size,(function(e,t){if(S>-1)return!1;e.isTextblock&&0===e.content.size&&(S=t+1)})),S>-1&&r.setSelection(p.TextSelection.near(r.doc.resolve(S))),r.scrollIntoView()}return!0}var C=c.pos===u.end()?f.contentMatchAt(0).defaultType:null,j=co(h,f.type.name,f.attrs),D=co(h,u.node().type.name,u.node().attrs);r.delete(u.pos,c.pos);var A=C?[{type:s,attrs:j},{type:C,attrs:D}]:[{type:s,attrs:j}];return!!Object(g.g)(r.doc,u.pos,2)&&(i&&r.split(u.pos,2,A).scrollIntoView(),!0)}},toggleList:function(e,t){return function(n){var r=n.editor,o=n.tr,i=n.state,a=n.dispatch,s=n.chain,l=n.commands,u=n.can,c=r.extensionManager.extensions,d=Or(e,i.schema),f=Or(t,i.schema),p=i.selection,h=p.$from,m=p.$to,v=h.blockRange(m);if(!v)return!1;var g=mo((function(e){return vo(e.type.name,c)}))(p);if(v.depth>=1&&g&&v.depth-g.depth<=1){if(g.node.type===d)return l.liftListItem(f);if(vo(g.node.type.name,c)&&d.validContent(g.node.content)&&a)return s().command((function(){return o.setNodeMarkup(g.pos,d),!0})).command((function(){return go(o,d)})).command((function(){return yo(o,d)})).run()}return s().command((function(){return!!u().wrapInList(d)||l.clearNodes()})).wrapInList(d).command((function(){return go(o,d)})).command((function(){return yo(o,d)})).run()}},toggleMark:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(r){var o=r.state,i=r.commands,a=n.extendEmptyMarkRange,s=void 0!==a&&a,l=Yr(e,o.schema);return bo(o,l,t)?i.unsetMark(l,{extendEmptyMarkRange:s}):i.setMark(l,t)}},toggleNode:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(r){var o=r.state,i=r.commands,a=Or(e,o.schema),s=Or(t,o.schema);return io(o,a,n)?i.setNode(s):i.setNode(a,n)}},toggleWrap:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=n.state,o=n.commands,i=Or(e,r.schema);return io(r,i,t)?o.lift(i):o.wrapIn(i,t)}},undoInputRule:function(){return function(e){for(var t=e.state,n=e.dispatch,r=t.plugins,o=0;o<r.length;o+=1){var i=r[o],a=void 0;if(i.spec.isInputRules&&(a=i.getState(t))){if(n){for(var s=t.tr,l=a.transform,u=l.steps.length-1;u>=0;u-=1)s.step(l.steps[u].invert(l.docs[u]));if(a.text){var c=s.doc.resolve(a.from).marks();s.replaceWith(a.from,a.to,t.schema.text(a.text,c))}else s.delete(a.from,a.to)}return!0}}return!1}},unsetAllMarks:function(){return function(e){var t=e.tr,n=e.dispatch,r=t.selection,o=r.empty,i=r.ranges;return o||n&&i.forEach((function(e){t.removeMark(e.$from.pos,e.$to.pos)})),!0}},unsetMark:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r,o=n.tr,i=n.state,a=n.dispatch,s=t.extendEmptyMarkRange,l=void 0!==s&&s,u=o.selection,c=Yr(e,i.schema),d=u.$from,f=u.empty,p=u.ranges;if(!a)return!0;if(f&&l){var h=u.from,m=u.to,v=null===(r=d.marks().find((function(e){return e.type===c})))||void 0===r?void 0:r.attrs,g=Jr(d,c,v);g&&(h=g.from,m=g.to),o.removeMark(h,m,c)}else p.forEach((function(e){o.removeMark(e.$from.pos,e.$to.pos,c)}));return o.removeStoredMark(c),!0}},updateAttributes:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=n.tr,o=n.state,i=n.dispatch,a=null,s=null,l=ao("string"===typeof e?e:e.name,o.schema);return!!l&&("node"===l&&(a=Or(e,o.schema)),"mark"===l&&(s=Yr(e,o.schema)),i&&r.selection.ranges.forEach((function(e){var n=e.$from.pos,i=e.$to.pos;o.doc.nodesBetween(n,i,(function(e,o){a&&a===e.type&&r.setNodeMarkup(o,void 0,Object(f.a)(Object(f.a)({},e.attrs),t)),s&&e.marks.length&&e.marks.forEach((function(a){if(s===a.type){var l=Math.max(o,n),u=Math.min(o+e.nodeSize,i);r.addMark(l,u,s.create(Object(f.a)(Object(f.a)({},a.attrs),t)))}}))}))})),!0)}},wrapIn:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=n.state,o=n.dispatch;return ar(Or(e,r.schema),t)(r,o)}},wrapInList:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=n.state,o=n.dispatch;return hr(Or(e,r.schema),t)(r,o)}}}),ko=_r.create({name:"commands",addCommands:function(){return Object(f.a)({},wo)}}),xo=_r.create({name:"editable",addProseMirrorPlugins:function(){var e=this;return[new p.Plugin({key:new p.PluginKey("editable"),props:{editable:function(){return e.editor.options.editable}}})]}}),Oo=_r.create({name:"focusEvents",addProseMirrorPlugins:function(){var e=this.editor;return[new p.Plugin({key:new p.PluginKey("focusEvents"),props:{handleDOMEvents:{focus:function(t,n){e.isFocused=!0;var r=e.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1},blur:function(t,n){e.isFocused=!1;var r=e.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1}}}})]}}),So=_r.create({name:"keymap",addKeyboardShortcuts:function(){var e=this,t=function(){return e.editor.commands.first((function(e){var t=e.commands;return[function(){return t.undoInputRule()},function(){return t.command((function(e){var n=e.tr,r=n.selection,o=n.doc,i=r.empty,a=r.$anchor,s=a.pos,l=a.parent,u=p.Selection.atStart(o).from===s;return!(!(i&&u&&l.type.isTextblock)||l.textContent.length)&&t.clearNodes()}))},function(){return t.deleteSelection()},function(){return t.joinBackward()},function(){return t.selectNodeBackward()}]}))},n=function(){return e.editor.commands.first((function(e){var t=e.commands;return[function(){return t.deleteSelection()},function(){return t.joinForward()},function(){return t.selectNodeForward()}]}))},r={Enter:function(){return e.editor.commands.first((function(e){var t=e.commands;return[function(){return t.newlineInCode()},function(){return t.createParagraphNear()},function(){return t.liftEmptyBlock()},function(){return t.splitBlock()}]}))},"Mod-Enter":function(){return e.editor.commands.exitCode()},Backspace:t,"Mod-Backspace":t,"Shift-Backspace":t,Delete:n,"Mod-Delete":n,"Mod-a":function(){return e.editor.commands.selectAll()}},o=Object(f.a)({},r),i=Object(f.a)(Object(f.a)({},r),{},{"Ctrl-h":t,"Alt-Backspace":t,"Ctrl-d":n,"Ctrl-Alt-Backspace":n,"Alt-Delete":n,"Alt-d":n,"Ctrl-a":function(){return e.editor.commands.selectTextblockStart()},"Ctrl-e":function(){return e.editor.commands.selectTextblockEnd()}});return to()||oo()?i:o},addProseMirrorPlugins:function(){var e=this;return[new p.Plugin({key:new p.PluginKey("clearDocument"),appendTransaction:function(t,n,r){if(t.some((function(e){return e.docChanged}))){var o=n.selection,i=o.empty,a=o.from,s=o.to,l=p.Selection.atStart(n.doc).from,u=p.Selection.atEnd(n.doc).to;if(!i&&(a===l&&s===u))if(0===r.doc.textBetween(0,r.doc.content.size," "," ").length){var c=r.tr,d=gr({state:r,transaction:c});if(new yr({editor:e.editor,state:d}).commands.clearNodes(),c.steps.length)return c}}}})]}}),Co=_r.create({name:"tabindex",addProseMirrorPlugins:function(){return[new p.Plugin({key:new p.PluginKey("tabindex"),props:{attributes:this.editor.isEditable?{tabindex:"0"}:{}}})]}}),jo=Object.freeze({__proto__:null,ClipboardTextSerializer:Wr,Commands:ko,Editable:xo,FocusEvents:Oo,Keymap:So,Tabindex:Co});function Do(e,t){var n=ao("string"===typeof t?t:t.name,e.schema);return"node"===n?function(e,t){var n=Or(t,e.schema),r=e.selection,o=r.from,i=r.to,a=[];e.doc.nodesBetween(o,i,(function(e){a.push(e)}));var s=a.reverse().find((function(e){return e.type.name===n.name}));return s?Object(f.a)({},s.attrs):{}}(e,t):"mark"===n?uo(e,t):{}}function Ao(e,t){var n=v.DOMSerializer.fromSchema(t).serializeFragment(e),r=document.implementation.createHTMLDocument().createElement("div");return r.appendChild(n),r.innerHTML}function Eo(e,t){return $r(e,{from:0,to:e.content.size},t)}var Mo=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object(c.a)(this,n),(e=t.call(this)).isFocused=!1,e.extensionStorage={},e.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,onBeforeCreate:function(){return null},onCreate:function(){return null},onUpdate:function(){return null},onSelectionUpdate:function(){return null},onTransaction:function(){return null},onFocus:function(){return null},onBlur:function(){return null},onDestroy:function(){return null}},e.isCapturingTransaction=!1,e.capturedTransaction=null,e.setOptions(r),e.createExtensionManager(),e.createCommandManager(),e.createSchema(),e.on("beforeCreate",e.options.onBeforeCreate),e.emit("beforeCreate",{editor:Object(a.a)(e)}),e.createView(),e.injectCSS(),e.on("create",e.options.onCreate),e.on("update",e.options.onUpdate),e.on("selectionUpdate",e.options.onSelectionUpdate),e.on("transaction",e.options.onTransaction),e.on("focus",e.options.onFocus),e.on("blur",e.options.onBlur),e.on("destroy",e.options.onDestroy),window.setTimeout((function(){e.isDestroyed||(e.commands.focus(e.options.autofocus),e.emit("create",{editor:Object(a.a)(e)}))}),0),e}return Object(d.a)(n,[{key:"storage",get:function(){return this.extensionStorage}},{key:"commands",get:function(){return this.commandManager.commands}},{key:"chain",value:function(){return this.commandManager.chain()}},{key:"can",value:function(){return this.commandManager.can()}},{key:"injectCSS",value:function(){this.options.injectCSS&&document&&(this.css=function(e,t){var n=document.querySelector("style[data-tiptap-style]");if(null!==n)return n;var r=document.createElement("style");return t&&r.setAttribute("nonce",t),r.setAttribute("data-tiptap-style",""),r.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(r),r}('.ProseMirror {\n position: relative;\n}\n\n.ProseMirror {\n word-wrap: break-word;\n white-space: pre-wrap;\n white-space: break-spaces;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n font-feature-settings: "liga" 0; /* the above doesn\'t seem to work in Edge */\n}\n\n.ProseMirror [contenteditable="false"] {\n white-space: normal;\n}\n\n.ProseMirror [contenteditable="false"] [contenteditable="true"] {\n white-space: pre-wrap;\n}\n\n.ProseMirror pre {\n white-space: pre-wrap;\n}\n\nimg.ProseMirror-separator {\n display: inline !important;\n border: none !important;\n margin: 0 !important;\n width: 1px !important;\n height: 1px !important;\n}\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n margin: 0;\n}\n\n.ProseMirror-gapcursor:after {\n content: "";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n\n.ProseMirror-hideselection *::selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection * {\n caret-color: transparent;\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}\n\n.tippy-box[data-animation=fade][data-state=hidden] {\n opacity: 0\n}',this.options.injectNonce))}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.options=Object(f.a)(Object(f.a)({},this.options),e),this.view&&this.state&&!this.isDestroyed&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}},{key:"setEditable",value:function(e){this.setOptions({editable:e})}},{key:"isEditable",get:function(){return this.options.editable&&this.view&&this.view.editable}},{key:"state",get:function(){return this.view.state}},{key:"registerPlugin",value:function(e,t){var n=jr(t)?t(e,Object(o.a)(this.state.plugins)):[].concat(Object(o.a)(this.state.plugins),[e]),r=this.state.reconfigure({plugins:n});this.view.updateState(r)}},{key:"unregisterPlugin",value:function(e){if(!this.isDestroyed){var t="string"===typeof e?"".concat(e,"$"):e.key,n=this.state.reconfigure({plugins:this.state.plugins.filter((function(e){return!e.key.startsWith(t)}))});this.view.updateState(n)}}},{key:"createExtensionManager",value:function(){var e=this.options.enableCoreExtensions?Object.values(jo):[],t=[].concat(Object(o.a)(e),Object(o.a)(this.options.extensions)).filter((function(e){return["extension","node","mark"].includes(null===e||void 0===e?void 0:e.type)}));this.extensionManager=new zr(t,this)}},{key:"createCommandManager",value:function(){this.commandManager=new yr({editor:this})}},{key:"createSchema",value:function(){this.schema=this.extensionManager.schema}},{key:"createView",value:function(){var e=lo(this.options.content,this.schema,this.options.parseOptions),t=eo(e,this.options.autofocus);this.view=new wn(this.options.element,Object(f.a)(Object(f.a)({},this.options.editorProps),{},{dispatchTransaction:this.dispatchTransaction.bind(this),state:p.EditorState.create({doc:e,selection:t||void 0})}));var n=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(n),this.createNodeViews(),this.view.dom.editor=this}},{key:"createNodeViews",value:function(){this.view.setProps({nodeViews:this.extensionManager.nodeViews})}},{key:"captureTransaction",value:function(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;var t=this.capturedTransaction;return this.capturedTransaction=null,t}},{key:"dispatchTransaction",value:function(e){var t=this;if(this.isCapturingTransaction)return this.capturedTransaction?void e.steps.forEach((function(e){var n;return null===(n=t.capturedTransaction)||void 0===n?void 0:n.step(e)})):void(this.capturedTransaction=e);var n=this.state.apply(e),r=!this.state.selection.eq(n.selection);this.view.updateState(n),this.emit("transaction",{editor:this,transaction:e}),r&&this.emit("selectionUpdate",{editor:this,transaction:e});var o=e.getMeta("focus"),i=e.getMeta("blur");o&&this.emit("focus",{editor:this,event:o.event,transaction:e}),i&&this.emit("blur",{editor:this,event:i.event,transaction:e}),e.docChanged&&!e.getMeta("preventUpdate")&&this.emit("update",{editor:this,transaction:e})}},{key:"getAttributes",value:function(e){return Do(this.state,e)}},{key:"isActive",value:function(e,t){var n="string"===typeof e?e:null,r="string"===typeof e?t:e;return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!t)return io(e,null,n)||bo(e,null,n);var r=ao(t,e.schema);return"node"===r?io(e,t,n):"mark"===r&&bo(e,t,n)}(this.state,n,r)}},{key:"getJSON",value:function(){return this.state.doc.toJSON()}},{key:"getHTML",value:function(){return Ao(this.state.doc.content,this.schema)}},{key:"getText",value:function(e){var t=e||{},n=t.blockSeparator,r=void 0===n?"\n\n":n,o=t.textSerializers,i=void 0===o?{}:o;return Eo(this.state.doc,{blockSeparator:r,textSerializers:Object(f.a)(Object(f.a)({},i),qr(this.schema))})}},{key:"isEmpty",get:function(){return function(e){var t,n=null===(t=e.type.createAndFill())||void 0===t?void 0:t.toJSON(),r=e.toJSON();return JSON.stringify(n)===JSON.stringify(r)}(this.state.doc)}},{key:"getCharacterCount",value:function(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}},{key:"destroy",value:function(){this.emit("destroy"),this.view&&this.view.destroy(),this.removeAllListeners()}},{key:"isDestroyed",get:function(){var e;return!(null===(e=this.view)||void 0===e?void 0:e.docView)}}]),n}(br);function To(e,t){var n=[];return e.descendants((function(e,r){t(e)&&n.push({node:e,pos:r})})),n}function Lo(e,t,n){var r=[];return e.nodesBetween(t.from,t.to,(function(e,t){n(e)&&r.push({node:e,pos:t})})),r}function No(e){var t=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:JSON.stringify,n={};return e.filter((function(e){var r=t(e);return!Object.prototype.hasOwnProperty.call(n,r)&&(n[r]=!0)}))}(e);return 1===t.length?t:t.filter((function(e,n){return!t.filter((function(e,t){return t!==n})).some((function(t){return e.oldRange.from>=t.oldRange.from&&e.oldRange.to<=t.oldRange.to&&e.newRange.from>=t.newRange.from&&e.newRange.to<=t.newRange.to}))}))}function Po(e,t,n){var r=[];return e===t?n.resolve(e).marks().forEach((function(t){var o=Jr(n.resolve(e-1),t.type);o&&r.push(Object(f.a)({mark:t},o))})):n.nodesBetween(e,t,(function(e,t){r.push.apply(r,Object(o.a)(e.marks.map((function(n){return{from:t,to:t+e.nodeSize,mark:n}}))))})),r}function Ro(e){return new Pr({find:e.find,handler:function(t){var n=t.state,r=t.range,o=t.match,i=Dr(e.getAttributes,void 0,o);if(!1===i||null===i)return null;var a=n.tr,s=o[o.length-1],l=o[0],u=r.to;if(s){var c=l.search(/\S/),d=r.from+l.indexOf(s),f=d+s.length;if(Po(r.from,r.to,n.doc).filter((function(t){return t.mark.type.excluded.find((function(n){return n===e.type&&n!==t.mark.type}))})).filter((function(e){return e.to>d})).length)return null;f<r.to&&a.delete(f,r.to),d>r.from&&a.delete(r.from+c,d),u=r.from+c+s.length,a.addMark(r.from+c,u,e.type.create(i||{})),a.removeStoredMark(e.type)}}})}function Ho(e){return new Pr({find:e.find,handler:function(t){var n=t.state,r=t.range,o=t.match,i=Dr(e.getAttributes,void 0,o)||{},a=n.tr,s=r.from,l=r.to;if(o[1]){var u=s+o[0].lastIndexOf(o[1]);u>l?u=l:l=u+o[1].length;var c=o[0][o[0].length-1];a.insertText(c,s+o[0].length-1),a.replaceWith(u,l,e.type.create(i))}else o[0]&&a.replaceWith(s,l,e.type.create(i))}})}function Fo(e){return new Pr({find:e.find,handler:function(t){var n=t.state,r=t.range,o=t.match,i=n.doc.resolve(r.from),a=Dr(e.getAttributes,void 0,o)||{};if(!i.node(-1).canReplaceWith(i.index(-1),i.indexAfter(-1),e.type))return null;n.tr.delete(r.from,r.to).setBlockType(r.from,r.from,e.type,a)}})}function Vo(e){return new Pr({find:e.find,handler:function(t){var n=t.state,r=t.range,o=t.match,i=Dr(e.getAttributes,void 0,o)||{},a=n.tr.delete(r.from,r.to),s=a.doc.resolve(r.from).blockRange(),l=s&&Object(g.i)(s,e.type,i);if(!l)return null;a.wrap(s,l);var u=a.doc.resolve(r.from-1).nodeBefore;u&&u.type===e.type&&Object(g.f)(a.doc,r.from-1)&&(!e.joinPredicate||e.joinPredicate(o,u))&&a.join(r.from-1)}})}var zo=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(c.a)(this,e),this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config=Object(f.a)(Object(f.a)({},this.config),t),this.name=this.config.name,t.defaultOptions&&console.warn('[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "'.concat(this.name,'".')),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Dr(wr(this,"addOptions",{name:this.name}))),this.storage=Dr(wr(this,"addStorage",{name:this.name,options:this.options}))||{}}return Object(d.a)(e,[{key:"configure",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.extend();return t.options=Ir(this.options,e),t.storage=Dr(wr(t,"addStorage",{name:t.name,options:t.options})),t}},{key:"extend",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=new e(t);return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&console.warn('[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "'.concat(n.name,'".')),n.options=Dr(wr(n,"addOptions",{name:n.name})),n.storage=Dr(wr(n,"addStorage",{name:n.name,options:n.options})),n}}],[{key:"create",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new e(t)}}]),e}(),Bo=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(c.a)(this,e),this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config=Object(f.a)(Object(f.a)({},this.config),t),this.name=this.config.name,t.defaultOptions&&console.warn('[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "'.concat(this.name,'".')),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Dr(wr(this,"addOptions",{name:this.name}))),this.storage=Dr(wr(this,"addStorage",{name:this.name,options:this.options}))||{}}return Object(d.a)(e,[{key:"configure",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.extend();return t.options=Ir(this.options,e),t.storage=Dr(wr(t,"addStorage",{name:t.name,options:t.options})),t}},{key:"extend",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=new e(t);return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&console.warn('[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "'.concat(n.name,'".')),n.options=Dr(wr(n,"addOptions",{name:n.name})),n.storage=Dr(wr(n,"addStorage",{name:n.name,options:n.options})),n}}],[{key:"create",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new e(t)}}]),e}();function Io(e){return new Fr({find:e.find,handler:function(t){var n=t.state,r=t.range,o=t.match,i=Dr(e.getAttributes,void 0,o);if(!1===i||null===i)return null;var a=n.tr,s=o[o.length-1],l=o[0],u=r.to;if(s){var c=l.search(/\S/),d=r.from+l.indexOf(s),f=d+s.length;if(Po(r.from,r.to,n.doc).filter((function(t){return t.mark.type.excluded.find((function(n){return n===e.type&&n!==t.mark.type}))})).filter((function(e){return e.to>d})).length)return null;f<r.to&&a.delete(f,r.to),d>r.from&&a.delete(r.from+c,d),u=r.from+c+s.length,a.addMark(r.from+c,u,e.type.create(i||{})),a.removeStoredMark(e.type)}}})}var _o=_r.create({name:"characterCount",addOptions:function(){return{limit:null,mode:"textSize"}},addStorage:function(){return{characters:function(){return 0},words:function(){return 0}}},onBeforeCreate:function(){var e=this;this.storage.characters=function(t){var n=(null===t||void 0===t?void 0:t.node)||e.editor.state.doc;return"textSize"===((null===t||void 0===t?void 0:t.mode)||e.options.mode)?n.textBetween(0,n.content.size,void 0," ").length:n.nodeSize},this.storage.words=function(t){var n=(null===t||void 0===t?void 0:t.node)||e.editor.state.doc;return n.textBetween(0,n.content.size," "," ").split(" ").filter((function(e){return""!==e})).length}},addProseMirrorPlugins:function(){var e=this;return[new p.Plugin({key:new p.PluginKey("characterCount"),filterTransaction:function(t,n){var r=e.options.limit;if(!t.docChanged||0===r||null===r||void 0===r)return!0;var o=e.storage.characters({node:n.doc}),i=e.storage.characters({node:t.doc});if(i<=r)return!0;if(o>r&&i>r&&i<=o)return!0;if(o>r&&i>r&&i>o)return!1;if(!t.getMeta("paste"))return!1;var a=t.selection.$head.pos,s=a-(i-r),l=a;return t.deleteRange(s,l),!(e.storage.characters({node:t.doc})>r)}})]}}),$o="undefined"!=typeof navigator?navigator:null,qo="undefined"!=typeof document?document:null,Wo=$o&&$o.userAgent||"",Uo=/Edge\/(\d+)/.exec(Wo),Ko=/MSIE \d/.exec(Wo),Go=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Wo),Jo=!!(Ko||Go||Uo),Yo=Ko?document.documentMode:Go?+Go[1]:Uo?+Uo[1]:0,Zo=!Jo&&/gecko\/(\d+)/i.test(Wo);Zo&&(/Firefox\/(\d+)/.exec(Wo)||[0,0])[1];var Xo=!Jo&&/Chrome\/(\d+)/.exec(Wo),Qo=!!Xo,ei=Xo?+Xo[1]:0,ti=!Jo&&!!$o&&/Apple Computer/.test($o.vendor),ni=ti&&(/Mobile\/\w+/.test(Wo)||!!$o&&$o.maxTouchPoints>2),ri=ni||!!$o&&/Mac/.test($o.platform),oi=/Android \d/.test(Wo),ii=!!qo&&"webkitFontSmoothing"in qo.documentElement.style,ai=ii?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,si=function(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t},li=function(e,t,n,r){return n&&(ci(e,t,n,r,-1)||ci(e,t,n,r,1))},ui=/^(img|br|input|textarea|hr)$/i;function ci(e,t,n,r,o){for(;;){if(e==n&&t==r)return!0;if(t==(o<0?0:di(e))){var i=e.parentNode;if(!i||1!=i.nodeType||pi(e)||ui.test(e.nodeName)||"false"==e.contentEditable)return!1;t=si(e)+(o<0?0:1),e=i}else{if(1!=e.nodeType)return!1;if("false"==(e=e.childNodes[t+(o<0?-1:0)]).contentEditable)return!1;t=o<0?di(e):0}}}function di(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function fi(e,t,n){for(var r=0==t,o=t==di(e);r||o;){if(e==n)return!0;var i=si(e);if(!(e=e.parentNode))return!1;r=r&&0==i,o=o&&i==di(e)}}function pi(e){for(var t,n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}var hi=function(e){var t=e.isCollapsed;return t&&Qo&&e.rangeCount&&!e.getRangeAt(0).collapsed&&(t=!1),t};function mi(e,t){var n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}var vi=function(e){e&&(this.nodeName=e)};vi.prototype=Object.create(null);new vi;function gi(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=e.domSelection(),r=e.state.doc;if(!n.focusNode)return null;var o=e.docView.nearestDesc(n.focusNode),i=o&&0==o.size,a=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(a<0)return null;var s,l,u=r.resolve(a);if(hi(n)){for(s=u;o&&!o.node;)o=o.parent;var c=o.node;if(o&&c.isAtom&&p.NodeSelection.isSelectable(c)&&o.parent&&(!c.isInline||!fi(n.focusNode,n.focusOffset,o.dom))){var d=o.posBefore;l=new p.NodeSelection(a==d?u:r.resolve(d))}}else{var f=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(f<0)return null;s=r.resolve(f)}if(!l){var h="pointer"==t||e.state.selection.head<u.pos&&!i?1:-1;l=Ai(e,s,u,h)}return l}function yi(e){return e.editable?e.hasFocus():Ei(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function bi(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.state.selection;if(ji(e,n),yi(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&Qo){var r=e.domSelection(),o=e.domObserver.currentSelection;if(r.anchorNode&&o.anchorNode&&li(r.anchorNode,r.anchorOffset,o.anchorNode,o.anchorOffset))return e.input.mouseDown.delayedSelectionSync=!0,void e.domObserver.setCurSelection()}if(e.domObserver.disconnectSelection(),e.cursorWrapper)Ci(e);else{var i,a,s=n.anchor,l=n.head;!wi||n instanceof p.TextSelection||(n.$from.parent.inlineContent||(i=ki(e,n.from)),n.empty||n.$from.parent.inlineContent||(a=ki(e,n.to))),e.docView.setSelection(s,l,e.root,t),wi&&(i&&Oi(i),a&&Oi(a)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&Si(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}var wi=ti||Qo&&ei<63;function ki(e,t){var n=e.docView.domFromPos(t,0),r=n.node,o=n.offset,i=o<r.childNodes.length?r.childNodes[o]:null,a=o?r.childNodes[o-1]:null;if(ti&&i&&"false"==i.contentEditable)return xi(i);if((!i||"false"==i.contentEditable)&&(!a||"false"==a.contentEditable)){if(i)return xi(i);if(a)return xi(a)}}function xi(e){return e.contentEditable="true",ti&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function Oi(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function Si(e){var t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.input.hideSelectionGuard);var n=e.domSelection(),r=n.anchorNode,o=n.anchorOffset;t.addEventListener("selectionchange",e.input.hideSelectionGuard=function(){n.anchorNode==r&&n.anchorOffset==o||(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout((function(){yi(e)&&!e.state.selection.visible||e.dom.classList.remove("ProseMirror-hideselection")}),20))})}function Ci(e){var t=e.domSelection(),n=document.createRange(),r=e.cursorWrapper.dom,o="IMG"==r.nodeName;o?n.setEnd(r.parentNode,si(r)+1):n.setEnd(r,0),n.collapse(!1),t.removeAllRanges(),t.addRange(n),!o&&!e.state.selection.visible&&Jo&&Yo<=11&&(r.disabled=!0,r.disabled=!1)}function ji(e,t){if(t instanceof p.NodeSelection){var n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(Di(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else Di(e)}function Di(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function Ai(e,t,n,r){return e.someProp("createSelectionBetween",(function(r){return r(e,t,n)}))||p.TextSelection.between(t,n,r)}function Ei(e){var t=e.domSelection();if(!t.anchorNode)return!1;try{return e.dom.contains(3==t.anchorNode.nodeType?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(3==t.focusNode.nodeType?t.focusNode.parentNode:t.focusNode))}catch(n){return!1}}function Mi(e,t){var n=e.selection,r=n.$anchor,o=n.$head,i=t>0?r.max(o):r.min(o),a=i.parent.inlineContent?i.depth?e.doc.resolve(t>0?i.after():i.before()):null:i;return a&&p.Selection.findFrom(a,t)}function Ti(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function Li(e,t,n){var r=e.state.selection;if(!(r instanceof p.TextSelection)){if(r instanceof p.NodeSelection&&r.node.isInline)return Ti(e,new p.TextSelection(t>0?r.$to:r.$from));var o=Mi(e.state,t);return!!o&&Ti(e,o)}if(!r.empty||n.indexOf("s")>-1)return!1;if(e.endOfTextblock(t>0?"right":"left")){var i=Mi(e.state,t);return!!(i&&i instanceof p.NodeSelection)&&Ti(e,i)}if(!(ri&&n.indexOf("m")>-1)){var a,s=r.$head,l=s.textOffset?null:t<0?s.nodeBefore:s.nodeAfter;if(!l||l.isText)return!1;var u=t<0?s.pos-l.nodeSize:s.pos;return!!(l.isAtom||(a=e.docView.descAt(u))&&!a.contentDOM)&&(p.NodeSelection.isSelectable(l)?Ti(e,new p.NodeSelection(t<0?e.state.doc.resolve(s.pos-l.nodeSize):s)):!!ii&&Ti(e,new p.TextSelection(e.state.doc.resolve(t<0?u:u+l.nodeSize))))}}function Ni(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function Pi(e){var t=e.pmViewDesc;return t&&0==t.size&&(e.nextSibling||"BR"!=e.nodeName)}function Ri(e){var t=e.domSelection(),n=t.focusNode,r=t.focusOffset;if(n){var o,i,a=!1;for(Zo&&1==n.nodeType&&r<Ni(n)&&Pi(n.childNodes[r])&&(a=!0);;)if(r>0){if(1!=n.nodeType)break;var s=n.childNodes[r-1];if(Pi(s))o=n,i=--r;else{if(3!=s.nodeType)break;r=(n=s).nodeValue.length}}else{if(Fi(n))break;for(var l=n.previousSibling;l&&Pi(l);)o=n.parentNode,i=si(l),l=l.previousSibling;if(l)r=Ni(n=l);else{if((n=n.parentNode)==e.dom)break;r=0}}a?Vi(e,t,n,r):o&&Vi(e,t,o,i)}}function Hi(e){var t=e.domSelection(),n=t.focusNode,r=t.focusOffset;if(n){for(var o,i,a=Ni(n);;)if(r<a){if(1!=n.nodeType)break;if(!Pi(n.childNodes[r]))break;o=n,i=++r}else{if(Fi(n))break;for(var s=n.nextSibling;s&&Pi(s);)o=s.parentNode,i=si(s)+1,s=s.nextSibling;if(s)r=0,a=Ni(n=s);else{if((n=n.parentNode)==e.dom)break;r=a=0}}o&&Vi(e,t,o,i)}}function Fi(e){var t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function Vi(e,t,n,r){if(hi(t)){var o=document.createRange();o.setEnd(n,r),o.setStart(n,r),t.removeAllRanges(),t.addRange(o)}else t.extend&&t.extend(n,r);e.domObserver.setCurSelection();var i=e.state;setTimeout((function(){e.state==i&&bi(e)}),50)}function zi(e,t,n){var r=e.state.selection;if(r instanceof p.TextSelection&&!r.empty||n.indexOf("s")>-1)return!1;if(ri&&n.indexOf("m")>-1)return!1;var o=r.$from,i=r.$to;if(!o.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){var a=Mi(e.state,t);if(a&&a instanceof p.NodeSelection)return Ti(e,a)}if(!o.parent.inlineContent){var s=t<0?o:i,l=r instanceof p.AllSelection?p.Selection.near(s,t):p.Selection.findFrom(s,t);return!!l&&Ti(e,l)}return!1}function Bi(e,t){if(!(e.state.selection instanceof p.TextSelection))return!0;var n=e.state.selection,r=n.$head,o=n.$anchor,i=n.empty;if(!r.sameParent(o))return!0;if(!i)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;var a=!r.textOffset&&(t<0?r.nodeBefore:r.nodeAfter);if(a&&!a.isText){var s=e.state.tr;return t<0?s.delete(r.pos-a.nodeSize,r.pos):s.delete(r.pos,r.pos+a.nodeSize),e.dispatch(s),!0}return!1}function Ii(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function _i(e,t){var n=t.keyCode,r=function(e){var t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}(t);return 8==n||ri&&72==n&&"c"==r?Bi(e,-1)||Ri(e):46==n||ri&&68==n&&"c"==r?Bi(e,1)||Hi(e):13==n||27==n||(37==n||ri&&66==n&&"c"==r?Li(e,-1,r)||Ri(e):39==n||ri&&70==n&&"c"==r?Li(e,1,r)||Hi(e):38==n||ri&&80==n&&"c"==r?zi(e,-1,r)||Ri(e):40==n||ri&&78==n&&"c"==r?function(e){if(!ti||e.state.selection.$head.parentOffset>0)return!1;var t=e.domSelection(),n=t.focusNode,r=t.focusOffset;if(n&&1==n.nodeType&&0==r&&n.firstChild&&"false"==n.firstChild.contentEditable){var o=n.firstChild;Ii(e,o,"true"),setTimeout((function(){return Ii(e,o,"false")}),20)}return!1}(e)||zi(e,1,r)||Hi(e):r==(ri?"m":"c")&&(66==n||73==n||89==n||90==n))}function $i(e,t){for(var n=[],r=t.content,o=t.openStart,i=t.openEnd;o>1&&i>1&&1==r.childCount&&1==r.firstChild.childCount;){o--,i--;var a=r.firstChild;n.push(a.type.name,a.attrs!=a.type.defaultAttrs?a.attrs:null),r=a.content}var s=e.someProp("clipboardSerializer")||v.DOMSerializer.fromSchema(e.state.schema),l=Qi(),u=l.createElement("div");u.appendChild(s.serializeFragment(r,{document:l}));for(var c,d=u.firstChild,f=0;d&&1==d.nodeType&&(c=Zi[d.nodeName.toLowerCase()]);){for(var p=c.length-1;p>=0;p--){for(var h=l.createElement(c[p]);u.firstChild;)h.appendChild(u.firstChild);u.appendChild(h),f++}d=u.firstChild}return d&&1==d.nodeType&&d.setAttribute("data-pm-slice","".concat(o," ").concat(i).concat(f?" -".concat(f):""," ").concat(JSON.stringify(n))),{dom:u,text:e.someProp("clipboardTextSerializer",(function(e){return e(t)}))||t.content.textBetween(0,t.content.size,"\n\n")}}function qi(e,t,n,r,o){var i,a,s=o.parent.type.spec.code;if(!n&&!t)return null;var l=t&&(r||s||!n);if(l){if(e.someProp("transformPastedText",(function(e){t=e(t,s||r)})),s)return t?new v.Slice(v.Fragment.from(e.state.schema.text(t.replace(/\r\n?/g,"\n"))),0,0):v.Slice.empty;var u=e.someProp("clipboardTextParser",(function(e){return e(t,o,r)}));if(u)a=u;else{var c=o.marks(),d=e.state.schema,f=v.DOMSerializer.fromSchema(d);i=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach((function(e){var t=i.appendChild(document.createElement("p"));e&&t.appendChild(f.serializeNode(d.text(e,c)))}))}}else e.someProp("transformPastedHTML",(function(e){n=e(n)})),i=function(e){var t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));var n,r=Qi().createElement("div"),o=/<([a-z][^>\s]+)/i.exec(e);(n=o&&Zi[o[1].toLowerCase()])&&(e=n.map((function(e){return"<"+e+">"})).join("")+e+n.map((function(e){return"</"+e+">"})).reverse().join(""));if(r.innerHTML=e,n)for(var i=0;i<n.length;i++)r=r.querySelector(n[i])||r;return r}(n),ii&&function(e){for(var t=e.querySelectorAll(Qo?"span:not([class]):not([style])":"span.Apple-converted-space"),n=0;n<t.length;n++){var r=t[n];1==r.childNodes.length&&"\xa0"==r.textContent&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),r)}}(i);var p=i&&i.querySelector("[data-pm-slice]"),h=p&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(p.getAttribute("data-pm-slice")||"");if(h&&h[3])for(var m=+h[3];m>0&&i.firstChild;m--)i=i.firstChild;if(!a){var g=e.someProp("clipboardParser")||e.someProp("domParser")||v.DOMParser.fromSchema(e.state.schema);a=g.parseSlice(i,{preserveWhitespace:!(!l&&!h),context:o,ruleFromNode:function(e){return"BR"!=e.nodeName||e.nextSibling||!e.parentNode||Wi.test(e.parentNode.nodeName)?null:{ignore:!0}}})}if(h)a=function(e,t){if(!e.size)return e;var n,r=e.content.firstChild.type.schema;try{n=JSON.parse(t)}catch(u){return e}for(var o=e.content,i=e.openStart,a=e.openEnd,s=n.length-2;s>=0;s-=2){var l=r.nodes[n[s]];if(!l||l.hasRequiredAttrs())break;o=v.Fragment.from(l.create(n[s+1],o)),i++,a++}return new v.Slice(o,i,a)}(Yi(a,+h[1],+h[2]),h[4]);else if(a=v.Slice.maxOpen(function(e,t){if(e.childCount<2)return e;for(var n=function(n){var r=t.node(n).contentMatchAt(t.index(n)),o=void 0,i=[];if(e.forEach((function(e){if(i){var t,n=r.findWrapping(e.type);if(!n)return i=null;if(t=i.length&&o.length&&Ki(n,o,e,i[i.length-1],0))i[i.length-1]=t;else{i.length&&(i[i.length-1]=Gi(i[i.length-1],o.length));var a=Ui(e,n);i.push(a),r=r.matchType(a.type),o=n}}})),i)return{v:v.Fragment.from(i)}},r=t.depth;r>=0;r--){var o=n(r);if("object"===typeof o)return o.v}return e}(a.content,o),!0),a.openStart||a.openEnd){for(var y=0,b=0,w=a.content.firstChild;y<a.openStart&&!w.type.spec.isolating;y++,w=w.firstChild);for(var k=a.content.lastChild;b<a.openEnd&&!k.type.spec.isolating;b++,k=k.lastChild);a=Yi(a,y,b)}return e.someProp("transformPasted",(function(e){a=e(a)})),a}var Wi=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function Ui(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=t.length-1;r>=n;r--)e=t[r].create(null,v.Fragment.from(e));return e}function Ki(e,t,n,r,o){if(o<e.length&&o<t.length&&e[o]==t[o]){var i=Ki(e,t,n,r.lastChild,o+1);if(i)return r.copy(r.content.replaceChild(r.childCount-1,i));if(r.contentMatchAt(r.childCount).matchType(o==e.length-1?n.type:e[o+1]))return r.copy(r.content.append(v.Fragment.from(Ui(n,e,o+1))))}}function Gi(e,t){if(0==t)return e;var n=e.content.replaceChild(e.childCount-1,Gi(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(v.Fragment.empty,!0);return e.copy(n.append(r))}function Ji(e,t,n,r,o,i){var a=t<0?e.firstChild:e.lastChild,s=a.content;return o<r-1&&(s=Ji(s,t,n,r,o+1,i)),o>=n&&(s=t<0?a.contentMatchAt(0).fillBefore(s,e.childCount>1||i<=o).append(s):s.append(a.contentMatchAt(a.childCount).fillBefore(v.Fragment.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,a.copy(s))}function Yi(e,t,n){return t<e.openStart&&(e=new v.Slice(Ji(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new v.Slice(Ji(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}var Zi={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]},Xi=null;function Qi(){return Xi||(Xi=document.implementation.createHTMLDocument("title"))}var ea={},ta={};function na(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function ra(e){return{left:e.clientX,top:e.clientY}}function oa(e,t,n,r,o){if(-1==r)return!1;for(var i=e.state.doc.resolve(r),a=function(r){if(e.someProp(t,(function(t){return r>i.depth?t(e,n,i.nodeAfter,i.before(r),o,!0):t(e,n,i.node(r),i.before(r),o,!1)})))return{v:!0}},s=i.depth+1;s>0;s--){var l=a(s);if("object"===typeof l)return l.v}return!1}function ia(e,t,n){e.focused||e.focus();var r=e.state.tr.setSelection(t);"pointer"==n&&r.setMeta("pointer",!0),e.dispatch(r)}function aa(e,t,n,r,o){return oa(e,"handleClickOn",t,n,r)||e.someProp("handleClick",(function(n){return n(e,t,r)}))||(o?function(e,t){if(-1==t)return!1;var n,r,o=e.state.selection;o instanceof p.NodeSelection&&(n=o.node);for(var i=e.state.doc.resolve(t),a=i.depth+1;a>0;a--){var s=a>i.depth?i.nodeAfter:i.node(a);if(p.NodeSelection.isSelectable(s)){r=n&&o.$from.depth>0&&a>=o.$from.depth&&i.before(o.$from.depth+1)==o.$from.pos?i.before(o.$from.depth):i.before(a);break}}return null!=r&&(ia(e,p.NodeSelection.create(e.state.doc,r),"pointer"),!0)}(e,n):function(e,t){if(-1==t)return!1;var n=e.state.doc.resolve(t),r=n.nodeAfter;return!!(r&&r.isAtom&&p.NodeSelection.isSelectable(r))&&(ia(e,new p.NodeSelection(n),"pointer"),!0)}(e,n))}function sa(e,t,n,r){return oa(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",(function(n){return n(e,t,r)}))}function la(e,t,n,r){return oa(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",(function(n){return n(e,t,r)}))||function(e,t,n){if(0!=n.button)return!1;var r=e.state.doc;if(-1==t)return!!r.inlineContent&&(ia(e,p.TextSelection.create(r,0,r.content.size),"pointer"),!0);for(var o=r.resolve(t),i=o.depth+1;i>0;i--){var a=i>o.depth?o.nodeAfter:o.node(i),s=o.before(i);if(a.inlineContent)ia(e,p.TextSelection.create(r,s+1,s+1+a.content.size),"pointer");else{if(!p.NodeSelection.isSelectable(a))continue;ia(e,p.NodeSelection.create(r,s),"pointer")}return!0}}(e,n,r)}function ua(e){return va(e)}ta.keydown=function(e,t){var n=t;if(e.input.shiftKey=16==n.keyCode||n.shiftKey,!fa(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!oi||!Qo||13!=n.keyCode))if(229!=n.keyCode&&e.domObserver.forceFlush(),!ni||13!=n.keyCode||n.ctrlKey||n.altKey||n.metaKey)e.someProp("handleKeyDown",(function(t){return t(e,n)}))||_i(e,n)?n.preventDefault():na(e,"key");else{var r=Date.now();e.input.lastIOSEnter=r,e.input.lastIOSEnterFallbackTimeout=setTimeout((function(){e.input.lastIOSEnter==r&&(e.someProp("handleKeyDown",(function(t){return t(e,mi(13,"Enter"))})),e.input.lastIOSEnter=0)}),200)}},ta.keyup=function(e,t){16==t.keyCode&&(e.input.shiftKey=!1)},ta.keypress=function(e,t){var n=t;if(!(fa(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||ri&&n.metaKey))if(e.someProp("handleKeyPress",(function(t){return t(e,n)})))n.preventDefault();else{var r=e.state.selection;if(!(r instanceof p.TextSelection)||!r.$from.sameParent(r.$to)){var o=String.fromCharCode(n.charCode);e.someProp("handleTextInput",(function(t){return t(e,r.$from.pos,r.$to.pos,o)}))||e.dispatch(e.state.tr.insertText(o).scrollIntoView()),n.preventDefault()}}};var ca=ri?"metaKey":"ctrlKey";ea.mousedown=function(e,t){var n=t;e.input.shiftKey=n.shiftKey;var r=ua(e),o=Date.now(),i="singleClick";o-e.input.lastClick.time<500&&function(e,t){var n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}(n,e.input.lastClick)&&!n[ca]&&("singleClick"==e.input.lastClick.type?i="doubleClick":"doubleClick"==e.input.lastClick.type&&(i="tripleClick")),e.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:i};var a=e.posAtCoords(ra(n));a&&("singleClick"==i?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new da(e,a,n,!!r)):("doubleClick"==i?sa:la)(e,a.pos,a.inside,n)?n.preventDefault():na(e,"pointer"))};var da=function(){function e(t,n,r,o){var i,a,s=this;if(Object(c.a)(this,e),this.view=t,this.pos=n,this.event=r,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!r[ca],this.allowDefault=r.shiftKey,n.inside>-1)i=t.state.doc.nodeAt(n.inside),a=n.inside;else{var l=t.state.doc.resolve(n.pos);i=l.parent,a=l.depth?l.before():0}var u=o?null:r.target,d=u?t.docView.nearestDesc(u,!0):null;this.target=d?d.dom:null;var f=t.state.selection;(0==r.button&&i.type.spec.draggable&&!1!==i.type.spec.selectable||f instanceof p.NodeSelection&&f.from<=a&&f.to>a)&&(this.mightDrag={node:i,pos:a,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!Zo||this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout((function(){s.view.input.mouseDown==s&&s.target.setAttribute("contentEditable","false")}),20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),na(t,"pointer")}return Object(d.a)(e,[{key:"done",value:function(){var e=this;this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout((function(){return bi(e.view)})),this.view.input.mouseDown=null}},{key:"up",value:function(e){if(this.done(),this.view.dom.contains(e.target)){var t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(ra(e))),this.allowDefault||!t?na(this.view,"pointer"):aa(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():0==e.button&&(this.flushed||ti&&this.mightDrag&&!this.mightDrag.node.isAtom||Qo&&!(this.view.state.selection instanceof p.TextSelection)&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(ia(this.view,p.Selection.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):na(this.view,"pointer")}}},{key:"move",value:function(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0),na(this.view,"pointer"),0==e.buttons&&this.done()}}]),e}();function fa(e,t){return!!e.composing||!!(ti&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500)&&(e.input.compositionEndedAt=-2e8,!0)}ea.touchdown=function(e){ua(e),na(e,"pointer")},ea.contextmenu=function(e){return ua(e)};var pa=oi?5e3:-1;function ha(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout((function(){return va(e)}),t))}function ma(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=function(){var e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function va(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!(oi&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),ma(e),t||e.docView&&e.docView.dirty){var n=gi(e);return n&&!n.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(n)):e.updateState(e.state),!0}return!1}}ta.compositionstart=ta.compositionupdate=function(e){if(!e.composing){e.domObserver.flush();var t=e.state,n=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some((function(e){return!1===e.type.spec.inclusive}))))e.markCursor=e.state.storedMarks||n.marks(),va(e,!0),e.markCursor=null;else if(va(e),Zo&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length)for(var r=e.domSelection(),o=r.focusNode,i=r.focusOffset;o&&1==o.nodeType&&0!=i;){var a=i<0?o.lastChild:o.childNodes[i-1];if(!a)break;if(3==a.nodeType){r.collapse(a,a.nodeValue.length);break}o=a,i=-1}e.input.composing=!0}ha(e,pa)},ta.compositionend=function(e,t){e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,ha(e,20))};var ga=Jo&&Yo<15||ni&&ai<604;function ya(e,t,n,r){var o=qi(e,t,n,e.input.shiftKey,e.state.selection.$from);if(e.someProp("handlePaste",(function(t){return t(e,r,o||v.Slice.empty)})))return!0;if(!o)return!1;var i=function(e){return 0==e.openStart&&0==e.openEnd&&1==e.content.childCount?e.content.firstChild:null}(o),a=i?e.state.tr.replaceSelectionWith(i,e.input.shiftKey):e.state.tr.replaceSelection(o);return e.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}ea.copy=ta.cut=function(e,t){var n=t,r=e.state.selection,o="cut"==n.type;if(!r.empty){var i=ga?null:n.clipboardData,a=$i(e,r.content()),s=a.dom,l=a.text;i?(n.preventDefault(),i.clearData(),i.setData("text/html",s.innerHTML),i.setData("text/plain",l)):function(e,t){if(e.dom.parentNode){var n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";var r=getSelection(),o=document.createRange();o.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout((function(){n.parentNode&&n.parentNode.removeChild(n),e.focus()}),50)}}(e,s),o&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))}},ta.paste=function(e,t){var n=t;if(!e.composing||oi){var r=ga?null:n.clipboardData;r&&ya(e,r.getData("text/plain"),r.getData("text/html"),n)?n.preventDefault():function(e,t){if(e.dom.parentNode){var n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus(),setTimeout((function(){e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?ya(e,r.value,null,t):ya(e,r.textContent,r.innerHTML,t)}),50)}}(e,n)}};var ba=Object(d.a)((function e(t,n){Object(c.a)(this,e),this.slice=t,this.move=n})),wa=ri?"altKey":"ctrlKey";for(var ka in ea.dragstart=function(e,t){var n=t,r=e.input.mouseDown;if(r&&r.done(),n.dataTransfer){var o=e.state.selection,i=o.empty?null:e.posAtCoords(ra(n));if(i&&i.pos>=o.from&&i.pos<=(o instanceof p.NodeSelection?o.to-1:o.to));else if(r&&r.mightDrag)e.dispatch(e.state.tr.setSelection(p.NodeSelection.create(e.state.doc,r.mightDrag.pos)));else if(n.target&&1==n.target.nodeType){var a=e.docView.nearestDesc(n.target,!0);a&&a.node.type.spec.draggable&&a!=e.docView&&e.dispatch(e.state.tr.setSelection(p.NodeSelection.create(e.state.doc,a.posBefore)))}var s=e.state.selection.content(),l=$i(e,s),u=l.dom,c=l.text;n.dataTransfer.clearData(),n.dataTransfer.setData(ga?"Text":"text/html",u.innerHTML),n.dataTransfer.effectAllowed="copyMove",ga||n.dataTransfer.setData("text/plain",c),e.dragging=new ba(s,!n[wa])}},ea.dragend=function(e){var t=e.dragging;window.setTimeout((function(){e.dragging==t&&(e.dragging=null)}),50)},ta.dragover=ta.dragenter=function(e,t){return t.preventDefault()},ta.drop=function(e,t){var n=t,r=e.dragging;if(e.dragging=null,n.dataTransfer){var o=e.posAtCoords(ra(n));if(o){var i=e.state.doc.resolve(o.pos);if(i){var a=r&&r.slice;a?e.someProp("transformPasted",(function(e){a=e(a)})):a=qi(e,n.dataTransfer.getData(ga?"Text":"text/plain"),ga?null:n.dataTransfer.getData("text/html"),!1,i);var s=!(!r||n[wa]);if(e.someProp("handleDrop",(function(t){return t(e,n,a||v.Slice.empty,s)})))n.preventDefault();else if(a){n.preventDefault();var l=a?Object(g.h)(e.state.doc,i.pos,a):i.pos;null==l&&(l=i.pos);var u=e.state.tr;s&&u.deleteSelection();var c=u.mapping.map(l),d=0==a.openStart&&0==a.openEnd&&1==a.content.childCount,f=u.doc;if(d?u.replaceRangeWith(c,c,a.content.firstChild):u.replaceRange(c,c,a),!u.doc.eq(f)){var h=u.doc.resolve(c);if(d&&p.NodeSelection.isSelectable(a.content.firstChild)&&h.nodeAfter&&h.nodeAfter.sameMarkup(a.content.firstChild))u.setSelection(new p.NodeSelection(h));else{var m=u.mapping.map(l);u.mapping.maps[u.mapping.maps.length-1].forEach((function(e,t,n,r){return m=r})),u.setSelection(Ai(e,h,u.doc.resolve(m)))}e.focus(),e.dispatch(u.setMeta("uiEvent","drop"))}}}}}},ea.focus=function(e){e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout((function(){e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelection())&&bi(e)}),20))},ea.blur=function(e,t){var n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)},ea.beforeinput=function(e,t){if(Qo&&oi&&"deleteContentBackward"==t.inputType){e.domObserver.flushSoon();var n=e.input.domChangeCount;setTimeout((function(){if(e.input.domChangeCount==n&&(e.dom.blur(),e.focus(),!e.someProp("handleKeyDown",(function(t){return t(e,mi(8,"Backspace"))})))){var t=e.state.selection.$cursor;t&&t.pos>0&&e.dispatch(e.state.tr.delete(t.pos-1,t.pos).scrollIntoView())}}),50)}},ta)ea[ka]=ta[ka];function xa(e,t){if(e==t)return!0;for(var n in e)if(e[n]!==t[n])return!1;for(var r in t)if(!(r in e))return!1;return!0}var Oa=function(){function e(t,n){Object(c.a)(this,e),this.toDOM=t,this.spec=n||Aa,this.side=this.spec.side||0}return Object(d.a)(e,[{key:"map",value:function(e,t,n,r){var o=e.mapResult(t.from+r,this.side<0?-1:1),i=o.pos;return o.deleted?null:new ja(i-n,i-n,this)}},{key:"valid",value:function(){return!0}},{key:"eq",value:function(t){return this==t||t instanceof e&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&xa(this.spec,t.spec))}},{key:"destroy",value:function(e){this.spec.destroy&&this.spec.destroy(e)}}]),e}(),Sa=function(){function e(t,n){Object(c.a)(this,e),this.attrs=t,this.spec=n||Aa}return Object(d.a)(e,[{key:"map",value:function(e,t,n,r){var o=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-n,i=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-n;return o>=i?null:new ja(o,i,this)}},{key:"valid",value:function(e,t){return t.from<t.to}},{key:"eq",value:function(t){return this==t||t instanceof e&&xa(this.attrs,t.attrs)&&xa(this.spec,t.spec)}},{key:"destroy",value:function(){}}],[{key:"is",value:function(t){return t.type instanceof e}}]),e}(),Ca=function(){function e(t,n){Object(c.a)(this,e),this.attrs=t,this.spec=n||Aa}return Object(d.a)(e,[{key:"map",value:function(e,t,n,r){var o=e.mapResult(t.from+r,1);if(o.deleted)return null;var i=e.mapResult(t.to+r,-1);return i.deleted||i.pos<=o.pos?null:new ja(o.pos-n,i.pos-n,this)}},{key:"valid",value:function(e,t){var n,r=e.content.findIndex(t.from),o=r.index,i=r.offset;return i==t.from&&!(n=e.child(o)).isText&&i+n.nodeSize==t.to}},{key:"eq",value:function(t){return this==t||t instanceof e&&xa(this.attrs,t.attrs)&&xa(this.spec,t.spec)}},{key:"destroy",value:function(){}}]),e}(),ja=function(){function e(t,n,r){Object(c.a)(this,e),this.from=t,this.to=n,this.type=r}return Object(d.a)(e,[{key:"copy",value:function(t,n){return new e(t,n,this.type)}},{key:"eq",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}},{key:"map",value:function(e,t,n){return this.type.map(e,this,t,n)}},{key:"spec",get:function(){return this.type.spec}},{key:"inline",get:function(){return this.type instanceof Sa}}],[{key:"widget",value:function(t,n,r){return new e(t,t,new Oa(n,r))}},{key:"inline",value:function(t,n,r,o){return new e(t,n,new Sa(r,o))}},{key:"node",value:function(t,n,r,o){return new e(t,n,new Ca(r,o))}}]),e}(),Da=[],Aa={},Ea=function(){function e(t,n){Object(c.a)(this,e),this.local=t.length?t:Da,this.children=n.length?n:Da}return Object(d.a)(e,[{key:"find",value:function(e,t,n){var r=[];return this.findInner(null==e?0:e,null==t?1e9:t,r,0,n),r}},{key:"findInner",value:function(e,t,n,r,o){for(var i=0;i<this.local.length;i++){var a=this.local[i];a.from<=t&&a.to>=e&&(!o||o(a.spec))&&n.push(a.copy(a.from+r,a.to+r))}for(var s=0;s<this.children.length;s+=3)if(this.children[s]<t&&this.children[s+1]>e){var l=this.children[s]+1;this.children[s+2].findInner(e-l,t-l,n,r+l,o)}}},{key:"map",value:function(e,t,n){return this==Ma||0==e.maps.length?this:this.mapInner(e,t,0,0,n||Aa)}},{key:"mapInner",value:function(t,n,r,o,i){for(var a,s=0;s<this.local.length;s++){var l=this.local[s].map(t,r,o);l&&l.type.valid(n,l)?(a||(a=[])).push(l):i.onRemove&&i.onRemove(this.local[s].spec)}return this.children.length?function(e,t,n,r,o,i,a){for(var s=e.slice(),l=function(e,t,n,r){for(var a=0;a<s.length;a+=3){var l=s[a+1],u=void 0;if(!(l<0||e>l+i)){var c=s[a]+i;t>=c?s[a+1]=e<=c?-2:-1:n>=o&&(u=r-n-(t-e))&&(s[a]+=u,s[a+1]+=u)}}},u=0;u<n.maps.length;u++)n.maps[u].forEach(l);for(var c=!1,d=0;d<s.length;d+=3)if(s[d+1]<0){if(-2==s[d+1]){c=!0,s[d+1]=-1;continue}var f=n.map(e[d]+i),p=f-o;if(p<0||p>=r.content.size){c=!0;continue}var h=n.map(e[d+1]+i,-1)-o,m=r.content.findIndex(p),v=m.index,g=m.offset,y=r.maybeChild(v);if(y&&g==p&&g+y.nodeSize==h){var b=s[d+2].mapInner(n,y,f+1,e[d]+i+1,a);b!=Ma?(s[d]=p,s[d+1]=h,s[d+2]=b):(s[d+1]=-2,c=!0)}else c=!0}if(c){var w=function(e,t,n,r,o,i,a){function s(e,t){for(var i=0;i<e.local.length;i++){var l=e.local[i].map(r,o,t);l?n.push(l):a.onRemove&&a.onRemove(e.local[i].spec)}for(var u=0;u<e.children.length;u+=3)s(e.children[u+2],e.children[u]+t+1)}for(var l=0;l<e.length;l+=3)-1==e[l+1]&&s(e[l+2],t[l]+i+1);return n}(s,e,t,n,o,i,a),k=Ra(w,r,0,a);t=k.local;for(var x=0;x<s.length;x+=3)s[x+1]<0&&(s.splice(x,3),x-=3);for(var O=0,S=0;O<k.children.length;O+=3){for(var C=k.children[O];S<s.length&&s[S]<C;)S+=3;s.splice(S,0,k.children[O],k.children[O+1],k.children[O+2])}}return new Ea(t.sort(Ha),s)}(this.children,a||[],t,n,r,o,i):a?new e(a.sort(Ha),Da):Ma}},{key:"add",value:function(t,n){return n.length?this==Ma?e.create(t,n):this.addInner(t,n,0):this}},{key:"addInner",value:function(t,n,r){var o,i=this,a=0;t.forEach((function(e,t){var s,l=t+r;if(s=Na(n,e,l)){for(o||(o=i.children.slice());a<o.length&&o[a]<t;)a+=3;o[a]==t?o[a+2]=o[a+2].addInner(e,s,l+1):o.splice(a,0,t,t+e.nodeSize,Ra(s,e,l+1,Aa)),a+=3}}));for(var s=La(a?Pa(n):n,-r),l=0;l<s.length;l++)s[l].type.valid(t,s[l])||s.splice(l--,1);return new e(s.length?this.local.concat(s).sort(Ha):this.local,o||this.children)}},{key:"remove",value:function(e){return 0==e.length||this==Ma?this:this.removeInner(e,0)}},{key:"removeInner",value:function(t,n){for(var r=this.children,o=this.local,i=0;i<r.length;i+=3){for(var a,s=void 0,l=r[i]+n,u=r[i+1]+n,c=0;c<t.length;c++)(a=t[c])&&a.from>l&&a.to<u&&(t[c]=null,(s||(s=[])).push(a));if(s){r==this.children&&(r=this.children.slice());var d=r[i+2].removeInner(s,l+1);d!=Ma?r[i+2]=d:(r.splice(i,3),i-=3)}}if(o.length)for(var f,p=0;p<t.length;p++)if(f=t[p])for(var h=0;h<o.length;h++)o[h].eq(f,n)&&(o==this.local&&(o=this.local.slice()),o.splice(h--,1));return r==this.children&&o==this.local?this:o.length||r.length?new e(o,r):Ma}},{key:"forChild",value:function(t,n){if(this==Ma)return this;if(n.isLeaf)return e.empty;for(var r,o,i=0;i<this.children.length;i+=3)if(this.children[i]>=t){this.children[i]==t&&(r=this.children[i+2]);break}for(var a=t+1,s=a+n.content.size,l=0;l<this.local.length;l++){var u=this.local[l];if(u.from<s&&u.to>a&&u.type instanceof Sa){var c=Math.max(a,u.from)-a,d=Math.min(s,u.to)-a;c<d&&(o||(o=[])).push(u.copy(c,d))}}if(o){var f=new e(o.sort(Ha),Da);return r?new Ta([f,r]):f}return r||Ma}},{key:"eq",value:function(t){if(this==t)return!0;if(!(t instanceof e)||this.local.length!=t.local.length||this.children.length!=t.children.length)return!1;for(var n=0;n<this.local.length;n++)if(!this.local[n].eq(t.local[n]))return!1;for(var r=0;r<this.children.length;r+=3)if(this.children[r]!=t.children[r]||this.children[r+1]!=t.children[r+1]||!this.children[r+2].eq(t.children[r+2]))return!1;return!0}},{key:"locals",value:function(e){return Fa(this.localsInner(e))}},{key:"localsInner",value:function(e){if(this==Ma)return Da;if(e.inlineContent||!this.local.some(Sa.is))return this.local;for(var t=[],n=0;n<this.local.length;n++)this.local[n].type instanceof Sa||t.push(this.local[n]);return t}}],[{key:"create",value:function(e,t){return t.length?Ra(t,e,0,Aa):Ma}}]),e}();Ea.empty=new Ea([],[]),Ea.removeOverlap=Fa;var Ma=Ea.empty,Ta=function(){function e(t){Object(c.a)(this,e),this.members=t}return Object(d.a)(e,[{key:"map",value:function(t,n){var r=this.members.map((function(e){return e.map(t,n,Aa)}));return e.from(r)}},{key:"forChild",value:function(t,n){if(n.isLeaf)return Ea.empty;for(var r=[],o=0;o<this.members.length;o++){var i=this.members[o].forChild(t,n);i!=Ma&&(i instanceof e?r=r.concat(i.members):r.push(i))}return e.from(r)}},{key:"eq",value:function(t){if(!(t instanceof e)||t.members.length!=this.members.length)return!1;for(var n=0;n<this.members.length;n++)if(!this.members[n].eq(t.members[n]))return!1;return!0}},{key:"locals",value:function(e){for(var t,n=!0,r=0;r<this.members.length;r++){var o=this.members[r].localsInner(e);if(o.length)if(t){n&&(t=t.slice(),n=!1);for(var i=0;i<o.length;i++)t.push(o[i])}else t=o}return t?Fa(n?t:t.sort(Ha)):Da}}],[{key:"from",value:function(t){switch(t.length){case 0:return Ma;case 1:return t[0];default:return new e(t)}}}]),e}();function La(e,t){if(!t||!e.length)return e;for(var n=[],r=0;r<e.length;r++){var o=e[r];n.push(new ja(o.from+t,o.to+t,o.type))}return n}function Na(e,t,n){if(t.isLeaf)return null;for(var r,o=n+t.nodeSize,i=null,a=0;a<e.length;a++)(r=e[a])&&r.from>n&&r.to<o&&((i||(i=[])).push(r),e[a]=null);return i}function Pa(e){for(var t=[],n=0;n<e.length;n++)null!=e[n]&&t.push(e[n]);return t}function Ra(e,t,n,r){var o=[],i=!1;t.forEach((function(t,a){var s=Na(e,t,a+n);if(s){i=!0;var l=Ra(s,t,n+a+1,r);l!=Ma&&o.push(a,a+t.nodeSize,l)}}));for(var a=La(i?Pa(e):e,-n).sort(Ha),s=0;s<a.length;s++)a[s].type.valid(t,a[s])||(r.onRemove&&r.onRemove(a[s].spec),a.splice(s--,1));return a.length||o.length?new Ea(a,o):Ma}function Ha(e,t){return e.from-t.from||e.to-t.to}function Fa(e){for(var t=e,n=0;n<t.length-1;n++){var r=t[n];if(r.from!=r.to)for(var o=n+1;o<t.length;o++){var i=t[o];if(i.from!=r.from){i.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,i.from),Va(t,o,r.copy(i.from,r.to)));break}i.to!=r.to&&(t==e&&(t=e.slice()),t[o]=i.copy(i.from,r.to),Va(t,o+1,i.copy(r.to,i.to)))}}return t}function Va(e,t,n){for(;t<e.length&&Ha(n,e[t])>0;)t++;e.splice(t,0,n)}var za=_r.create({name:"placeholder",addOptions:function(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something \u2026",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins:function(){var e=this;return[new p.Plugin({props:{decorations:function(t){var n=t.doc,r=t.selection,o=e.editor.isEditable||!e.options.showOnlyWhenEditable,i=r.anchor,a=[];return o?(n.descendants((function(t,n){var r=i>=n&&i<=n+t.nodeSize,o=!t.isLeaf&&!t.childCount;if((r||!e.options.showOnlyCurrent)&&o){var s=[e.options.emptyNodeClass];e.editor.isEmpty&&s.push(e.options.emptyEditorClass);var l=ja.node(n,n+t.nodeSize,{class:s.join(" "),"data-placeholder":"function"===typeof e.options.placeholder?e.options.placeholder({editor:e.editor,node:t,pos:n,hasAnchor:r}):e.options.placeholder});a.push(l)}return e.options.includeChildren})),Ea.create(n,a)):null}}})]}}),Ba=zo.create({name:"underline",addOptions:function(){return{HTMLAttributes:{}}},parseHTML:function(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:function(e){return!!e.includes("underline")&&{}}}]},renderHTML:function(e){var t=e.HTMLAttributes;return["u",Sr(this.options.HTMLAttributes,t),0]},addCommands:function(){var e=this;return{setUnderline:function(){return function(t){return t.commands.setMark(e.name)}},toggleUnderline:function(){return function(t){return t.commands.toggleMark(e.name)}},unsetUnderline:function(){return function(t){return t.commands.unsetMark(e.name)}}}},addKeyboardShortcuts:function(){var e=this;return{"Mod-u":function(){return e.editor.commands.toggleUnderline()},"Mod-U":function(){return e.editor.commands.toggleUnderline()}}}}),Ia=/^\s*>\s$/,_a=Bo.create({name:"blockquote",addOptions:function(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML:function(){return[{tag:"blockquote"}]},renderHTML:function(e){var t=e.HTMLAttributes;return["blockquote",Sr(this.options.HTMLAttributes,t),0]},addCommands:function(){var e=this;return{setBlockquote:function(){return function(t){return t.commands.wrapIn(e.name)}},toggleBlockquote:function(){return function(t){return t.commands.toggleWrap(e.name)}},unsetBlockquote:function(){return function(t){return t.commands.lift(e.name)}}}},addKeyboardShortcuts:function(){var e=this;return{"Mod-Shift-b":function(){return e.editor.commands.toggleBlockquote()}}},addInputRules:function(){return[Vo({find:Ia,type:this.type})]}}),$a=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))$/,qa=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))/g,Wa=/(?:^|\s)((?:__)((?:[^__]+))(?:__))$/,Ua=/(?:^|\s)((?:__)((?:[^__]+))(?:__))/g,Ka=zo.create({name:"bold",addOptions:function(){return{HTMLAttributes:{}}},parseHTML:function(){return[{tag:"strong"},{tag:"b",getAttrs:function(e){return"normal"!==e.style.fontWeight&&null}},{style:"font-weight",getAttrs:function(e){return/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}}]},renderHTML:function(e){var t=e.HTMLAttributes;return["strong",Sr(this.options.HTMLAttributes,t),0]},addCommands:function(){var e=this;return{setBold:function(){return function(t){return t.commands.setMark(e.name)}},toggleBold:function(){return function(t){return t.commands.toggleMark(e.name)}},unsetBold:function(){return function(t){return t.commands.unsetMark(e.name)}}}},addKeyboardShortcuts:function(){var e=this;return{"Mod-b":function(){return e.editor.commands.toggleBold()},"Mod-B":function(){return e.editor.commands.toggleBold()}}},addInputRules:function(){return[Ro({find:$a,type:this.type}),Ro({find:Wa,type:this.type})]},addPasteRules:function(){return[Io({find:qa,type:this.type}),Io({find:Ua,type:this.type})]}}),Ga=/^\s*([-+*])\s$/,Ja=Bo.create({name:"bulletList",addOptions:function(){return{itemTypeName:"listItem",HTMLAttributes:{}}},group:"block list",content:function(){return"".concat(this.options.itemTypeName,"+")},parseHTML:function(){return[{tag:"ul"}]},renderHTML:function(e){var t=e.HTMLAttributes;return["ul",Sr(this.options.HTMLAttributes,t),0]},addCommands:function(){var e=this;return{toggleBulletList:function(){return function(t){return t.commands.toggleList(e.name,e.options.itemTypeName)}}}},addKeyboardShortcuts:function(){var e=this;return{"Mod-Shift-8":function(){return e.editor.commands.toggleBulletList()}}},addInputRules:function(){return[Vo({find:Ga,type:this.type})]}}),Ya=/(?:^|\s)((?:`)((?:[^`]+))(?:`))$/,Za=/(?:^|\s)((?:`)((?:[^`]+))(?:`))/g,Xa=zo.create({name:"code",addOptions:function(){return{HTMLAttributes:{}}},excludes:"_",code:!0,parseHTML:function(){return[{tag:"code"}]},renderHTML:function(e){var t=e.HTMLAttributes;return["code",Sr(this.options.HTMLAttributes,t),0]},addCommands:function(){var e=this;return{setCode:function(){return function(t){return t.commands.setMark(e.name)}},toggleCode:function(){return function(t){return t.commands.toggleMark(e.name)}},unsetCode:function(){return function(t){return t.commands.unsetMark(e.name)}}}},addKeyboardShortcuts:function(){var e=this;return{"Mod-e":function(){return e.editor.commands.toggleCode()}}},addInputRules:function(){return[Ro({find:Ya,type:this.type})]},addPasteRules:function(){return[Io({find:Za,type:this.type})]}}),Qa=/^```([a-z]+)?[\s\n]$/,es=/^~~~([a-z]+)?[\s\n]$/,ts=Bo.create({name:"codeBlock",addOptions:function(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes:function(){var e=this;return{language:{default:null,parseHTML:function(t){var n,r=e.options.languageClassPrefix,i=Object(o.a)((null===(n=t.firstElementChild)||void 0===n?void 0:n.classList)||[]).filter((function(e){return e.startsWith(r)})).map((function(e){return e.replace(r,"")}))[0];return i||null},rendered:!1}}},parseHTML:function(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML:function(e){var t=e.node,n=e.HTMLAttributes;return["pre",Sr(this.options.HTMLAttributes,n),["code",{class:t.attrs.language?this.options.languageClassPrefix+t.attrs.language:null},0]]},addCommands:function(){var e=this;return{setCodeBlock:function(t){return function(n){return n.commands.setNode(e.name,t)}},toggleCodeBlock:function(t){return function(n){return n.commands.toggleNode(e.name,"paragraph",t)}}}},addKeyboardShortcuts:function(){var e=this;return{"Mod-Alt-c":function(){return e.editor.commands.toggleCodeBlock()},Backspace:function(){var t=e.editor.state.selection,n=t.empty,r=t.$anchor,o=1===r.pos;return!(!n||r.parent.type.name!==e.name)&&(!(!o&&r.parent.textContent.length)&&e.editor.commands.clearNodes())},Enter:function(t){var n=t.editor;if(!e.options.exitOnTripleEnter)return!1;var r=n.state.selection,o=r.$from;if(!r.empty||o.parent.type!==e.type)return!1;var i=o.parentOffset===o.parent.nodeSize-2,a=o.parent.textContent.endsWith("\n\n");return!(!i||!a)&&n.chain().command((function(e){return e.tr.delete(o.pos-2,o.pos),!0})).exitCode().run()},ArrowDown:function(t){var n=t.editor;if(!e.options.exitOnArrowDown)return!1;var r=n.state,o=r.selection,i=r.doc,a=o.$from;if(!o.empty||a.parent.type!==e.type)return!1;if(!(a.parentOffset===a.parent.nodeSize-2))return!1;var s=a.after();return void 0!==s&&(!i.nodeAt(s)&&n.commands.exitCode())}}},addInputRules:function(){return[Fo({find:Qa,type:this.type,getAttributes:function(e){return{language:e[1]}}}),Fo({find:es,type:this.type,getAttributes:function(e){return{language:e[1]}}})]},addProseMirrorPlugins:function(){var e=this;return[new p.Plugin({key:new p.PluginKey("codeBlockVSCodeHandler"),props:{handlePaste:function(t,n){if(!n.clipboardData)return!1;if(e.editor.isActive(e.type.name))return!1;var r=n.clipboardData.getData("text/plain"),o=n.clipboardData.getData("vscode-editor-data"),i=o?JSON.parse(o):void 0,a=null===i||void 0===i?void 0:i.mode;if(!r||!a)return!1;var s=t.state.tr;return s.replaceSelectionWith(e.type.create({language:a})),s.setSelection(p.TextSelection.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.insertText(r.replace(/\r\n?/g,"\n")),s.setMeta("paste",!0),t.dispatch(s),!0}}})]}}),ns=Bo.create({name:"doc",topNode:!0,content:"block+"});function rs(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new p.Plugin({view:function(t){return new is(t,e)}})}var is=function(){function e(t,n){var r=this;Object(c.a)(this,e),this.editorView=t,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=n.width||1,this.color=n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map((function(e){var n=function(t){r[e](t)};return t.dom.addEventListener(e,n),{name:e,handler:n}}))}return Object(d.a)(e,[{key:"destroy",value:function(){var e=this;this.handlers.forEach((function(t){var n=t.name,r=t.handler;return e.editorView.dom.removeEventListener(n,r)}))}},{key:"update",value:function(e,t){null!=this.cursorPos&&t.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}},{key:"setCursor",value:function(e){e!=this.cursorPos&&(this.cursorPos=e,null==e?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}},{key:"updateOverlay",value:function(){var e,t=this.editorView.state.doc.resolve(this.cursorPos);if(!t.parent.inlineContent){var n=t.nodeBefore,r=t.nodeAfter;if(n||r){var o=this.editorView.nodeDOM(this.cursorPos-(n?n.nodeSize:0)).getBoundingClientRect(),i=n?o.bottom:o.top;n&&r&&(i=(i+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),e={left:o.left,right:o.right,top:i-this.width/2,bottom:i+this.width/2}}}if(!e){var a=this.editorView.coordsAtPos(this.cursorPos);e={left:a.left-this.width/2,right:a.left+this.width/2,top:a.top,bottom:a.bottom}}var s,l,u=this.editorView.dom.offsetParent;if(this.element||(this.element=u.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none; background-color: "+this.color),!u||u==document.body&&"static"==getComputedStyle(u).position)s=-pageXOffset,l=-pageYOffset;else{var c=u.getBoundingClientRect();s=c.left-u.scrollLeft,l=c.top-u.scrollTop}this.element.style.left=e.left-s+"px",this.element.style.top=e.top-l+"px",this.element.style.width=e.right-e.left+"px",this.element.style.height=e.bottom-e.top+"px"}},{key:"scheduleRemoval",value:function(e){var t=this;clearTimeout(this.timeout),this.timeout=setTimeout((function(){return t.setCursor(null)}),e)}},{key:"dragover",value:function(e){if(this.editorView.editable){var t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),n=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),r=n&&n.type.spec.disableDropCursor,o="function"==typeof r?r(this.editorView,t):r;if(t&&!o){var i=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice&&null==(i=Object(g.h)(this.editorView.state.doc,i,this.editorView.dragging.slice)))return this.setCursor(null);this.setCursor(i),this.scheduleRemoval(5e3)}}}},{key:"dragend",value:function(){this.scheduleRemoval(20)}},{key:"drop",value:function(){this.scheduleRemoval(20)}},{key:"dragleave",value:function(e){e.target!=this.editorView.dom&&this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}]),e}(),as=_r.create({name:"dropCursor",addOptions:function(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins:function(){return[rs(this.options)]}}),ss="undefined"!=typeof navigator?navigator:null,ls="undefined"!=typeof document?document:null,us=ss&&ss.userAgent||"",cs=/Edge\/(\d+)/.exec(us),ds=/MSIE \d/.exec(us),fs=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(us),ps=!!(ds||fs||cs),hs=ds?document.documentMode:fs?+fs[1]:cs?+cs[1]:0,ms=!ps&&/gecko\/(\d+)/i.test(us);ms&&(/Firefox\/(\d+)/.exec(us)||[0,0])[1];var vs=!ps&&/Chrome\/(\d+)/.exec(us),gs=!!vs,ys=vs?+vs[1]:0,bs=!ps&&!!ss&&/Apple Computer/.test(ss.vendor),ws=bs&&(/Mobile\/\w+/.test(us)||!!ss&&ss.maxTouchPoints>2),ks=ws||!!ss&&/Mac/.test(ss.platform),xs=/Android \d/.test(us),Os=!!ls&&"webkitFontSmoothing"in ls.documentElement.style,Ss=Os?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,Cs=function(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t},js=function(e){var t=e.assignedSlot||e.parentNode;return t&&11==t.nodeType?t.host:t},Ds=null,As=function(e,t,n){var r=Ds||(Ds=document.createRange());return r.setEnd(e,null==n?e.nodeValue.length:n),r.setStart(e,t||0),r},Es=function(e,t,n,r){return n&&(Ts(e,t,n,r,-1)||Ts(e,t,n,r,1))},Ms=/^(img|br|input|textarea|hr)$/i;function Ts(e,t,n,r,o){for(;;){if(e==n&&t==r)return!0;if(t==(o<0?0:Ls(e))){var i=e.parentNode;if(!i||1!=i.nodeType||Ps(e)||Ms.test(e.nodeName)||"false"==e.contentEditable)return!1;t=Cs(e)+(o<0?0:1),e=i}else{if(1!=e.nodeType)return!1;if("false"==(e=e.childNodes[t+(o<0?-1:0)]).contentEditable)return!1;t=o<0?Ls(e):0}}}function Ls(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function Ns(e,t,n){for(var r=0==t,o=t==Ls(e);r||o;){if(e==n)return!0;var i=Cs(e);if(!(e=e.parentNode))return!1;r=r&&0==i,o=o&&i==Ls(e)}}function Ps(e){for(var t,n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}var Rs=function(e){var t=e.isCollapsed;return t&&gs&&e.rangeCount&&!e.getRangeAt(0).collapsed&&(t=!1),t};function Hs(e,t){var n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function Fs(e){return{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function Vs(e,t){return"number"==typeof e?e:e[t]}function zs(e){var 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 Bs(e,t,n){for(var r=e.someProp("scrollThreshold")||0,o=e.someProp("scrollMargin")||5,i=e.dom.ownerDocument,a=n||e.dom;a;a=js(a))if(1==a.nodeType){var s=a,l=s==i.body,u=l?Fs(i):zs(s),c=0,d=0;if(t.top<u.top+Vs(r,"top")?d=-(u.top-t.top+Vs(o,"top")):t.bottom>u.bottom-Vs(r,"bottom")&&(d=t.bottom-u.bottom+Vs(o,"bottom")),t.left<u.left+Vs(r,"left")?c=-(u.left-t.left+Vs(o,"left")):t.right>u.right-Vs(r,"right")&&(c=t.right-u.right+Vs(o,"right")),c||d)if(l)i.defaultView.scrollBy(c,d);else{var f=s.scrollLeft,p=s.scrollTop;d&&(s.scrollTop+=d),c&&(s.scrollLeft+=c);var h=s.scrollLeft-f,m=s.scrollTop-p;t={left:t.left-h,top:t.top-m,right:t.right-h,bottom:t.bottom-m}}if(l)break}}function Is(e){for(var t=[],n=e.ownerDocument,r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=js(r));return t}function _s(e,t){for(var n=0;n<e.length;n++){var r=e[n],o=r.dom,i=r.top,a=r.left;o.scrollTop!=i+t&&(o.scrollTop=i+t),o.scrollLeft!=a&&(o.scrollLeft=a)}}var $s=null;function qs(e,t){for(var n,r,o=2e8,i=0,a=t.top,s=t.top,l=e.firstChild,u=0;l;l=l.nextSibling,u++){var c=void 0;if(1==l.nodeType)c=l.getClientRects();else{if(3!=l.nodeType)continue;c=As(l).getClientRects()}for(var d=0;d<c.length;d++){var f=c[d];if(f.top<=a&&f.bottom>=s){a=Math.max(f.bottom,a),s=Math.min(f.top,s);var p=f.left>t.left?f.left-t.left:f.right<t.left?t.left-f.right:0;if(p<o){n=l,o=p,r=p&&3==n.nodeType?{left:f.right<t.left?f.right:f.left,top:t.top}:t,1==l.nodeType&&p&&(i=u+(t.left>=(f.left+f.right)/2?1:0));continue}}!n&&(t.left>=f.right&&t.top>=f.top||t.left>=f.left&&t.top>=f.bottom)&&(i=u+1)}}return n&&3==n.nodeType?function(e,t){for(var n=e.nodeValue.length,r=document.createRange(),o=0;o<n;o++){r.setEnd(e,o+1),r.setStart(e,o);var i=Gs(r,1);if(i.top!=i.bottom&&Ws(t,i))return{node:e,offset:o+(t.left>=(i.left+i.right)/2?1:0)}}return{node:e,offset:0}}(n,r):!n||o&&1==n.nodeType?{node:e,offset:i}:qs(n,r)}function Ws(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function Us(e,t,n){var r=e.childNodes.length;if(r&&n.top<n.bottom)for(var o=Math.max(0,Math.min(r-1,Math.floor(r*(t.top-n.top)/(n.bottom-n.top))-2)),i=o;;){var a=e.childNodes[i];if(1==a.nodeType)for(var s=a.getClientRects(),l=0;l<s.length;l++){var u=s[l];if(Ws(t,u))return Us(a,t,u)}if((i=(i+1)%r)==o)break}return e}function Ks(e,t){var n,r=e.dom.ownerDocument,o=0;if(r.caretPositionFromPoint)try{var i=r.caretPositionFromPoint(t.left,t.top);i&&(n=i.offsetNode,o=i.offset)}catch(h){}if(!n&&r.caretRangeFromPoint){var a=r.caretRangeFromPoint(t.left,t.top);a&&(n=a.startContainer,o=a.startOffset)}var s,l=(e.root.elementFromPoint?e.root:r).elementFromPoint(t.left,t.top);if(!l||!e.dom.contains(1!=l.nodeType?l.parentNode:l)){var u=e.dom.getBoundingClientRect();if(!Ws(t,u))return null;if(!(l=Us(e.dom,t,u)))return null}if(bs)for(var c=l;n&&c;c=js(c))c.draggable&&(n=void 0);if(l=function(e,t){var n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left?n:e}(l,t),n){if(ms&&1==n.nodeType&&(o=Math.min(o,n.childNodes.length))<n.childNodes.length){var d,f=n.childNodes[o];"IMG"==f.nodeName&&(d=f.getBoundingClientRect()).right<=t.left&&d.bottom>t.top&&o++}n==e.dom&&o==n.childNodes.length-1&&1==n.lastChild.nodeType&&t.top>n.lastChild.getBoundingClientRect().bottom?s=e.state.doc.content.size:0!=o&&1==n.nodeType&&"BR"==n.childNodes[o-1].nodeName||(s=function(e,t,n,r){for(var o=-1,i=t;i!=e.dom;){var a=e.docView.nearestDesc(i,!0);if(!a)return null;if(a.node.isBlock&&a.parent){var s=a.dom.getBoundingClientRect();if(s.left>r.left||s.top>r.top)o=a.posBefore;else{if(!(s.right<r.left||s.bottom<r.top))break;o=a.posAfter}}i=a.dom.parentNode}return o>-1?o:e.docView.posFromDOM(t,n,1)}(e,n,o,t))}null==s&&(s=function(e,t,n){var r=qs(t,n),o=r.node,i=r.offset,a=-1;if(1==o.nodeType&&!o.firstChild){var s=o.getBoundingClientRect();a=s.left!=s.right&&n.left>(s.left+s.right)/2?1:-1}return e.docView.posFromDOM(o,i,a)}(e,l,t));var p=e.docView.nearestDesc(l,!0);return{pos:s,inside:p?p.posAtStart-p.border:-1}}function Gs(e,t){var n=e.getClientRects();return n.length?n[t<0?0:n.length-1]:e.getBoundingClientRect()}var Js=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function Ys(e,t,n){var r=e.docView.domFromPos(t,n<0?-1:1),o=r.node,i=r.offset,a=r.atom,s=Os||ms;if(3==o.nodeType){if(!s||!Js.test(o.nodeValue)&&(n<0?i:i!=o.nodeValue.length)){var l=i,u=i,c=n<0?1:-1;return n<0&&!i?(u++,c=-1):n>=0&&i==o.nodeValue.length?(l--,c=1):n<0?l--:u++,Zs(Gs(As(o,l,u),c),c<0)}var d=Gs(As(o,i,i),n);if(ms&&i&&/\s/.test(o.nodeValue[i-1])&&i<o.nodeValue.length){var f=Gs(As(o,i-1,i-1),-1);if(f.top==d.top){var p=Gs(As(o,i,i+1),-1);if(p.top!=d.top)return Zs(p,p.left<f.left)}}return d}if(!e.state.doc.resolve(t-(a||0)).parent.inlineContent){if(null==a&&i&&(n<0||i==Ls(o))){var h=o.childNodes[i-1];if(1==h.nodeType)return Xs(h.getBoundingClientRect(),!1)}if(null==a&&i<Ls(o)){var m=o.childNodes[i];if(1==m.nodeType)return Xs(m.getBoundingClientRect(),!0)}return Xs(o.getBoundingClientRect(),n>=0)}if(null==a&&i&&(n<0||i==Ls(o))){var v=o.childNodes[i-1],g=3==v.nodeType?As(v,Ls(v)-(s?0:1)):1!=v.nodeType||"BR"==v.nodeName&&v.nextSibling?null:v;if(g)return Zs(Gs(g,1),!1)}if(null==a&&i<Ls(o)){for(var y=o.childNodes[i];y.pmViewDesc&&y.pmViewDesc.ignoreForCoords;)y=y.nextSibling;var b=y?3==y.nodeType?As(y,0,s?0:1):1==y.nodeType?y:null:null;if(b)return Zs(Gs(b,-1),!0)}return Zs(Gs(3==o.nodeType?As(o):o,-n),n>=0)}function Zs(e,t){if(0==e.width)return e;var n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function Xs(e,t){if(0==e.height)return e;var n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function Qs(e,t,n){var r=e.state,o=e.root.activeElement;r!=t&&e.updateState(t),o!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),o!=e.dom&&o&&o.focus()}}var el=/[\u0590-\u08ac]/;var tl=null,nl=null,rl=!1;function ol(e,t,n){return tl==t&&nl==n?rl:(tl=t,nl=n,rl="up"==n||"down"==n?function(e,t,n){var r=t.selection,o="up"==n?r.$from:r.$to;return Qs(e,t,(function(){for(var t=e.docView.domFromPos(o.pos,"up"==n?-1:1).node;;){var r=e.docView.nearestDesc(t,!0);if(!r)break;if(r.node.isBlock){t=r.dom;break}t=r.dom.parentNode}for(var i=Ys(e,o.pos,1),a=t.firstChild;a;a=a.nextSibling){var s=void 0;if(1==a.nodeType)s=a.getClientRects();else{if(3!=a.nodeType)continue;s=As(a,0,a.nodeValue.length).getClientRects()}for(var l=0;l<s.length;l++){var u=s[l];if(u.bottom>u.top+1&&("up"==n?i.top-u.top>2*(u.bottom-i.top):u.bottom-i.bottom>2*(i.bottom-u.top)))return!1}}return!0}))}(e,t,n):function(e,t,n){var r=t.selection.$head;if(!r.parent.isTextblock)return!1;var o=r.parentOffset,i=!o,a=o==r.parent.content.size,s=e.domSelection();return el.test(r.parent.textContent)&&s.modify?Qs(e,t,(function(){var t=s.getRangeAt(0),o=s.focusNode,i=s.focusOffset,a=s.caretBidiLevel;s.modify("move",n,"character");var l=!(r.depth?e.docView.domAfterPos(r.before()):e.dom).contains(1==s.focusNode.nodeType?s.focusNode:s.focusNode.parentNode)||o==s.focusNode&&i==s.focusOffset;return s.removeAllRanges(),s.addRange(t),null!=a&&(s.caretBidiLevel=a),l})):"left"==n||"backward"==n?i:a}(e,t,n))}var il=function(){function e(t,n,r,o){Object(c.a)(this,e),this.parent=t,this.children=n,this.dom=r,this.contentDOM=o,this.dirty=0,r.pmViewDesc=this}return Object(d.a)(e,[{key:"matchesWidget",value:function(e){return!1}},{key:"matchesMark",value:function(e){return!1}},{key:"matchesNode",value:function(e,t,n){return!1}},{key:"matchesHack",value:function(e){return!1}},{key:"parseRule",value:function(){return null}},{key:"stopEvent",value:function(e){return!1}},{key:"size",get:function(){for(var e=0,t=0;t<this.children.length;t++)e+=this.children[t].size;return e}},{key:"border",get:function(){return 0}},{key:"destroy",value:function(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(var e=0;e<this.children.length;e++)this.children[e].destroy()}},{key:"posBeforeChild",value:function(e){for(var t=0,n=this.posAtStart;;t++){var r=this.children[t];if(r==e)return n;n+=r.size}}},{key:"posBefore",get:function(){return this.parent.posBeforeChild(this)}},{key:"posAtStart",get:function(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}},{key:"posAfter",get:function(){return this.posBefore+this.size}},{key:"posAtEnd",get:function(){return this.posAtStart+this.size-2*this.border}},{key:"localPosFromDOM",value:function(e,t,n){if(this.contentDOM&&this.contentDOM.contains(1==e.nodeType?e:e.parentNode)){if(n<0){var r,o;if(e==this.contentDOM)r=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;r=e.previousSibling}for(;r&&(!(o=r.pmViewDesc)||o.parent!=this);)r=r.previousSibling;return r?this.posBeforeChild(o)+o.size:this.posAtStart}var i,a;if(e==this.contentDOM)i=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.nextSibling}for(;i&&(!(a=i.pmViewDesc)||a.parent!=this);)i=i.nextSibling;return i?this.posBeforeChild(a):this.posAtEnd}var s;if(e==this.dom&&this.contentDOM)s=t>Cs(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))s=2&e.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==t)for(var l=e;;l=l.parentNode){if(l==this.dom){s=!1;break}if(l.previousSibling)break}if(null==s&&t==e.childNodes.length)for(var u=e;;u=u.parentNode){if(u==this.dom){s=!0;break}if(u.nextSibling)break}}return(null==s?n>0:s)?this.posAtEnd:this.posAtStart}},{key:"nearestDesc",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!0,r=e;r;r=r.parentNode){var o=this.getDesc(r),i=void 0;if(o&&(!t||o.node)){if(!n||!(i=o.nodeDOM)||(1==i.nodeType?i.contains(1==e.nodeType?e:e.parentNode):i==e))return o;n=!1}}}},{key:"getDesc",value:function(e){for(var t=e.pmViewDesc,n=t;n;n=n.parent)if(n==this)return t}},{key:"posFromDOM",value:function(e,t,n){for(var r=e;r;r=r.parentNode){var o=this.getDesc(r);if(o)return o.localPosFromDOM(e,t,n)}return-1}},{key:"descAt",value:function(e){for(var t=0,n=0;t<this.children.length;t++){var r=this.children[t],o=n+r.size;if(n==e&&o!=n){for(;!r.border&&r.children.length;)r=r.children[0];return r}if(e<o)return r.descAt(e-n-r.border);n=o}}},{key:"domFromPos",value:function(e,t){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};for(var n,r=0,o=0,i=0;r<this.children.length;r++){var a=this.children[r],s=i+a.size;if(s>e||a instanceof fl){o=e-i;break}i=s}if(o)return this.children[r].domFromPos(o-this.children[r].border,t);for(;r&&!(n=this.children[r-1]).size&&n instanceof al&&n.side>=0;r--);if(t<=0){for(var l,u=!0;(l=r?this.children[r-1]:null)&&l.dom.parentNode!=this.contentDOM;r--,u=!1);return l&&t&&u&&!l.border&&!l.domAtom?l.domFromPos(l.size,t):{node:this.contentDOM,offset:l?Cs(l.dom)+1:0}}for(var c,d=!0;(c=r<this.children.length?this.children[r]:null)&&c.dom.parentNode!=this.contentDOM;r++,d=!1);return c&&d&&!c.border&&!c.domAtom?c.domFromPos(0,t):{node:this.contentDOM,offset:c?Cs(c.dom):this.contentDOM.childNodes.length}}},{key:"parseRange",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(0==this.children.length)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};for(var r=-1,o=-1,i=n,a=0;;a++){var s=this.children[a],l=i+s.size;if(-1==r&&e<=l){var u=i+s.border;if(e>=u&&t<=l-s.border&&s.node&&s.contentDOM&&this.contentDOM.contains(s.contentDOM))return s.parseRange(e,t,u);e=i;for(var c=a;c>0;c--){var d=this.children[c-1];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(1)){r=Cs(d.dom)+1;break}e-=d.size}-1==r&&(r=0)}if(r>-1&&(l>t||a==this.children.length-1)){t=l;for(var f=a+1;f<this.children.length;f++){var p=this.children[f];if(p.size&&p.dom.parentNode==this.contentDOM&&!p.emptyChildAt(-1)){o=Cs(p.dom);break}t+=p.size}-1==o&&(o=this.contentDOM.childNodes.length);break}i=l}return{node:this.contentDOM,from:e,to:t,fromOffset:r,toOffset:o}}},{key:"emptyChildAt",value:function(e){if(this.border||!this.contentDOM||!this.children.length)return!1;var t=this.children[e<0?0:this.children.length-1];return 0==t.size||t.emptyChildAt(e)}},{key:"domAfterPos",value:function(e){var t=this.domFromPos(e,0),n=t.node,r=t.offset;if(1!=n.nodeType||r==n.childNodes.length)throw new RangeError("No node after pos "+e);return n.childNodes[r]}},{key:"setSelection",value:function(e,t,n){for(var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=Math.min(e,t),i=Math.max(e,t),a=0,s=0;a<this.children.length;a++){var l=this.children[a],u=s+l.size;if(o>s&&i<u)return l.setSelection(e-s-l.border,t-s-l.border,n,r);s=u}var c=this.domFromPos(e,e?-1:1),d=t==e?c:this.domFromPos(t,t?-1:1),f=n.getSelection(),p=!1;if((ms||bs)&&e==t){var h=c,m=h.node,v=h.offset;if(3==m.nodeType){if((p=!(!v||"\n"!=m.nodeValue[v-1]))&&v==m.nodeValue.length)for(var g,y=m;y;y=y.parentNode){if(g=y.nextSibling){"BR"==g.nodeName&&(c=d={node:g.parentNode,offset:Cs(g)+1});break}var b=y.pmViewDesc;if(b&&b.node&&b.node.isBlock)break}}else{var w=m.childNodes[v-1];p=w&&("BR"==w.nodeName||"false"==w.contentEditable)}}if(ms&&f.focusNode&&f.focusNode!=d.node&&1==f.focusNode.nodeType){var k=f.focusNode.childNodes[f.focusOffset];k&&"false"==k.contentEditable&&(r=!0)}if(r||p&&bs||!Es(c.node,c.offset,f.anchorNode,f.anchorOffset)||!Es(d.node,d.offset,f.focusNode,f.focusOffset)){var x=!1;if((f.extend||e==t)&&!p){f.collapse(c.node,c.offset);try{e!=t&&f.extend(d.node,d.offset),x=!0}catch(C){if(!(C instanceof DOMException))throw C}}if(!x){if(e>t){var O=c;c=d,d=O}var S=document.createRange();S.setEnd(d.node,d.offset),S.setStart(c.node,c.offset),f.removeAllRanges(),f.addRange(S)}}}},{key:"ignoreMutation",value:function(e){return!this.contentDOM&&"selection"!=e.type}},{key:"contentLost",get:function(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}},{key:"markDirty",value:function(e,t){for(var n=0,r=0;r<this.children.length;r++){var o=this.children[r],i=n+o.size;if(n==i?e<=i&&t>=n:e<i&&t>n){var a=n+o.border,s=i-o.border;if(e>=a&&t<=s)return this.dirty=e==n||t==i?2:1,void(e!=a||t!=s||!o.contentLost&&o.dom.parentNode==this.contentDOM?o.markDirty(e-a,t-a):o.dirty=3);o.dirty=o.dom!=o.contentDOM||o.dom.parentNode!=this.contentDOM||o.children.length?3:2}n=i}this.dirty=2}},{key:"markParentsDirty",value:function(){for(var e=1,t=this.parent;t;t=t.parent,e++){var n=1==e?2:1;t.dirty<n&&(t.dirty=n)}}},{key:"domAtom",get:function(){return!1}},{key:"ignoreForCoords",get:function(){return!1}}]),e}(),al=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e,r,o,i){var s;Object(c.a)(this,n);var l,u=r.type.toDOM;if("function"==typeof u&&(u=u(o,(function(){return l?l.parent?l.parent.posBeforeChild(l):void 0:i}))),!r.type.spec.raw){if(1!=u.nodeType){var d=document.createElement("span");d.appendChild(u),u=d}u.contentEditable="false",u.classList.add("ProseMirror-widget")}return(s=t.call(this,e,[],u,null)).widget=r,s.widget=r,l=Object(a.a)(s),s}return Object(d.a)(n,[{key:"matchesWidget",value:function(e){return 0==this.dirty&&e.type.eq(this.widget.type)}},{key:"parseRule",value:function(){return{ignore:!0}}},{key:"stopEvent",value:function(e){var t=this.widget.spec.stopEvent;return!!t&&t(e)}},{key:"ignoreMutation",value:function(e){return"selection"!=e.type||this.widget.spec.ignoreSelection}},{key:"destroy",value:function(){this.widget.type.destroy(this.dom),Object(h.a)(Object(m.a)(n.prototype),"destroy",this).call(this)}},{key:"domAtom",get:function(){return!0}},{key:"side",get:function(){return this.widget.type.side}}]),n}(il),sl=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e,r,o,i){var a;return Object(c.a)(this,n),(a=t.call(this,e,[],r,null)).textDOM=o,a.text=i,a}return Object(d.a)(n,[{key:"size",get:function(){return this.text.length}},{key:"localPosFromDOM",value:function(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t}},{key:"domFromPos",value:function(e){return{node:this.textDOM,offset:e}}},{key:"ignoreMutation",value:function(e){return"characterData"===e.type&&e.target.nodeValue==e.oldValue}}]),n}(il),ll=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e,r,o,i){var a;return Object(c.a)(this,n),(a=t.call(this,e,[],o,i)).mark=r,a}return Object(d.a)(n,[{key:"parseRule",value:function(){return 3&this.dirty||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM||void 0}}},{key:"matchesMark",value:function(e){return 3!=this.dirty&&this.mark.eq(e)}},{key:"markDirty",value:function(e,t){if(Object(h.a)(Object(m.a)(n.prototype),"markDirty",this).call(this,e,t),0!=this.dirty){for(var r=this.parent;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=0}}},{key:"slice",value:function(e,t,r){var o=n.create(this.parent,this.mark,!0,r),i=this.children,a=this.size;t<a&&(i=Cl(i,t,a,r)),e>0&&(i=Cl(i,0,e,r));for(var s=0;s<i.length;s++)i[s].parent=o;return o.children=i,o}}],[{key:"create",value:function(e,t,r,o){var i=o.nodeViews[t.type.name],a=i&&i(t,o,r);return a&&a.dom||(a=v.DOMSerializer.renderSpec(document,t.type.spec.toDOM(t,r))),new n(e,t,a.dom,a.contentDOM||a.dom)}}]),n}(il),ul=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e,r,o,i,a,s,l,u,d){var f;return Object(c.a)(this,n),(f=t.call(this,e,[],a,s)).node=r,f.outerDeco=o,f.innerDeco=i,f.nodeDOM=l,s&&f.updateChildren(u,d),f}return Object(d.a)(n,[{key:"parseRule",value:function(){var e=this;if(this.node.type.spec.reparseInView)return null;var t={node:this.node.type.name,attrs:this.node.attrs};if("pre"==this.node.type.whitespace&&(t.preserveWhitespace="full"),this.contentDOM)if(this.contentLost){for(var n=this.children.length-1;n>=0;n--){var r=this.children[n];if(this.dom.contains(r.dom.parentNode)){t.contentElement=r.dom.parentNode;break}}t.contentElement||(t.getContent=function(){return v.Fragment.empty})}else t.contentElement=this.contentDOM;else t.getContent=function(){return e.node.content};return t}},{key:"matchesNode",value:function(e,t,n){return 0==this.dirty&&e.eq(this.node)&&kl(t,this.outerDeco)&&n.eq(this.innerDeco)}},{key:"size",get:function(){return this.node.nodeSize}},{key:"border",get:function(){return this.node.isLeaf?0:1}},{key:"updateChildren",value:function(e,t){var n=this,r=this.node.inlineContent,o=t,i=e.composing?this.localCompositionInfo(e,t):null,a=i&&i.pos>-1?i:null,s=i&&i.pos<0,l=new Ol(this,a&&a.node);!function(e,t,n,r){var o=t.locals(e),i=0;if(0==o.length){for(var a=0;a<e.childCount;a++){var s=e.child(a);r(s,o,t.forChild(i,s),a),i+=s.nodeSize}return}for(var l=0,u=[],c=null,d=0;;){if(l<o.length&&o[l].to==i){for(var f=o[l++],p=void 0;l<o.length&&o[l].to==i;)(p||(p=[f])).push(o[l++]);if(p){p.sort(Sl);for(var h=0;h<p.length;h++)n(p[h],d,!!c)}else n(f,d,!!c)}var m=void 0,v=void 0;if(c)v=-1,m=c,c=null;else{if(!(d<e.childCount))break;v=d,m=e.child(d++)}for(var g=0;g<u.length;g++)u[g].to<=i&&u.splice(g--,1);for(;l<o.length&&o[l].from<=i&&o[l].to>i;)u.push(o[l++]);var y=i+m.nodeSize;if(m.isText){var b=y;l<o.length&&o[l].from<b&&(b=o[l].from);for(var w=0;w<u.length;w++)u[w].to<b&&(b=u[w].to);b<y&&(c=m.cut(b-i),m=m.cut(0,b-i),y=b,v=-1)}r(m,m.isInline&&!m.isLeaf?u.filter((function(e){return!e.inline})):u.slice(),t.forChild(i,m),v),i=y}}(this.node,this.innerDeco,(function(t,i,a){t.spec.marks?l.syncToMarks(t.spec.marks,r,e):t.type.side>=0&&!a&&l.syncToMarks(i==n.node.childCount?v.Mark.none:n.node.child(i).marks,r,e),l.placeWidget(t,e,o)}),(function(t,n,a,u){var c;l.syncToMarks(t.marks,r,e),l.findNodeMatch(t,n,a,u)||s&&e.state.selection.from>o&&e.state.selection.to<o+t.nodeSize&&(c=l.findIndexWithChild(i.node))>-1&&l.updateNodeAt(t,n,a,c,e)||l.updateNextNode(t,n,a,e,u)||l.addNode(t,n,a,e,o),o+=t.nodeSize})),l.syncToMarks([],r,e),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||2==this.dirty)&&(a&&this.protectLocalComposition(e,a),hl(this.contentDOM,this.children,e),ws&&function(e){if("UL"==e.nodeName||"OL"==e.nodeName){var t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}(this.dom))}},{key:"localCompositionInfo",value:function(e,t){var n=e.state.selection,r=n.from,o=n.to;if(!(e.state.selection instanceof p.TextSelection)||r<t||o>t+this.node.content.size)return null;var i=e.domSelection(),a=function(e,t){for(;;){if(3==e.nodeType)return e;if(1==e.nodeType&&t>0){if(e.childNodes.length>t&&3==e.childNodes[t].nodeType)return e.childNodes[t];t=Ls(e=e.childNodes[t-1])}else{if(!(1==e.nodeType&&t<e.childNodes.length))return null;e=e.childNodes[t],t=0}}}(i.focusNode,i.focusOffset);if(!a||!this.dom.contains(a.parentNode))return null;if(this.node.inlineContent){var s=a.nodeValue,l=function(e,t,n,r){for(var o=0,i=0;o<e.childCount&&i<=r;){var a=e.child(o++),s=i;if(i+=a.nodeSize,a.isText){for(var l=a.text;o<e.childCount;){var u=e.child(o++);if(i+=u.nodeSize,!u.isText)break;l+=u.text}if(i>=n){var c=s<r?l.lastIndexOf(t,r-s-1):-1;if(c>=0&&c+t.length+s>=n)return s+c;if(n==r&&l.length>=r+t.length-s&&l.slice(r-s,r-s+t.length)==t)return r}}}return-1}(this.node.content,s,r-t,o-t);return l<0?null:{node:a,pos:l,text:s}}return{node:a,pos:-1,text:""}}},{key:"protectLocalComposition",value:function(e,t){var n=t.node,r=t.pos,o=t.text;if(!this.getDesc(n)){for(var i=n;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&&(i.pmViewDesc=void 0)}var a=new sl(this,i,n,o);e.input.compositionNodes.push(a),this.children=Cl(this.children,r,r+o.length,e,a)}}},{key:"update",value:function(e,t,n,r){return!(3==this.dirty||!e.sameMarkup(this.node))&&(this.updateInner(e,t,n,r),!0)}},{key:"updateInner",value:function(e,t,n,r){this.updateOuterDeco(t),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=0}},{key:"updateOuterDeco",value:function(e){if(!kl(e,this.outerDeco)){var t=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=yl(this.dom,this.nodeDOM,gl(this.outerDeco,this.node,t),gl(e,this.node,t)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}}},{key:"selectNode",value:function(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!0)}},{key:"deselectNode",value:function(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.dom.removeAttribute("draggable")}},{key:"domAtom",get:function(){return this.node.isAtom}}],[{key:"create",value:function(e,t,r,o,i,a){var s,l=i.nodeViews[t.type.name],u=l&&l(t,i,(function(){return s?s.parent?s.parent.posBeforeChild(s):void 0:a}),r,o),c=u&&u.dom,d=u&&u.contentDOM;if(t.isText)if(c){if(3!=c.nodeType)throw new RangeError("Text must be rendered as a DOM text node")}else c=document.createTextNode(t.text);else if(!c){var f=v.DOMSerializer.renderSpec(document,t.type.spec.toDOM(t));c=f.dom,d=f.contentDOM}d||t.isText||"BR"==c.nodeName||(c.hasAttribute("contenteditable")||(c.contentEditable="false"),t.type.spec.draggable&&(c.draggable=!0));var p=c;return c=wl(c,r,t),u?s=new pl(e,t,r,o,c,d||null,p,u,i,a+1):t.isText?new dl(e,t,r,o,c,p,i):new n(e,t,r,o,c,d||null,p,i,a+1)}}]),n}(il);function cl(e,t,n,r,o){return wl(r,t,e),new ul(void 0,e,t,n,r,r,r,o,0)}var dl=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e,r,o,i,a,s,l){return Object(c.a)(this,n),t.call(this,e,r,o,i,a,null,s,l,0)}return Object(d.a)(n,[{key:"parseRule",value:function(){for(var e=this.nodeDOM.parentNode;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}},{key:"update",value:function(e,t,n,r){return!(3==this.dirty||0!=this.dirty&&!this.inParent()||!e.sameMarkup(this.node))&&(this.updateOuterDeco(t),0==this.dirty&&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=0,!0)}},{key:"inParent",value:function(){for(var e=this.parent.contentDOM,t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}},{key:"domFromPos",value:function(e){return{node:this.nodeDOM,offset:e}}},{key:"localPosFromDOM",value:function(e,t,r){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):Object(h.a)(Object(m.a)(n.prototype),"localPosFromDOM",this).call(this,e,t,r)}},{key:"ignoreMutation",value:function(e){return"characterData"!=e.type&&"selection"!=e.type}},{key:"slice",value:function(e,t,r){var o=this.node.cut(e,t),i=document.createTextNode(o.text);return new n(this.parent,o,this.outerDeco,this.innerDeco,i,i,r)}},{key:"markDirty",value:function(e,t){Object(h.a)(Object(m.a)(n.prototype),"markDirty",this).call(this,e,t),this.dom==this.nodeDOM||0!=e&&t!=this.nodeDOM.nodeValue.length||(this.dirty=3)}},{key:"domAtom",get:function(){return!1}}]),n}(ul),fl=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(){return Object(c.a)(this,n),t.apply(this,arguments)}return Object(d.a)(n,[{key:"parseRule",value:function(){return{ignore:!0}}},{key:"matchesHack",value:function(e){return 0==this.dirty&&this.dom.nodeName==e}},{key:"domAtom",get:function(){return!0}},{key:"ignoreForCoords",get:function(){return"IMG"==this.dom.nodeName}}]),n}(il),pl=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e,r,o,i,a,s,l,u,d,f){var p;return Object(c.a)(this,n),(p=t.call(this,e,r,o,i,a,s,l,d,f)).spec=u,p}return Object(d.a)(n,[{key:"update",value:function(e,t,r,o){if(3==this.dirty)return!1;if(this.spec.update){var i=this.spec.update(e,t,r);return i&&this.updateInner(e,t,r,o),i}return!(!this.contentDOM&&!e.isLeaf)&&Object(h.a)(Object(m.a)(n.prototype),"update",this).call(this,e,t,r,o)}},{key:"selectNode",value:function(){this.spec.selectNode?this.spec.selectNode():Object(h.a)(Object(m.a)(n.prototype),"selectNode",this).call(this)}},{key:"deselectNode",value:function(){this.spec.deselectNode?this.spec.deselectNode():Object(h.a)(Object(m.a)(n.prototype),"deselectNode",this).call(this)}},{key:"setSelection",value:function(e,t,r,o){this.spec.setSelection?this.spec.setSelection(e,t,r):Object(h.a)(Object(m.a)(n.prototype),"setSelection",this).call(this,e,t,r,o)}},{key:"destroy",value:function(){this.spec.destroy&&this.spec.destroy(),Object(h.a)(Object(m.a)(n.prototype),"destroy",this).call(this)}},{key:"stopEvent",value:function(e){return!!this.spec.stopEvent&&this.spec.stopEvent(e)}},{key:"ignoreMutation",value:function(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):Object(h.a)(Object(m.a)(n.prototype),"ignoreMutation",this).call(this,e)}}]),n}(ul);function hl(e,t,n){for(var r=e.firstChild,o=!1,i=0;i<t.length;i++){var a=t[i],s=a.dom;if(s.parentNode==e){for(;s!=r;)r=xl(r),o=!0;r=r.nextSibling}else o=!0,e.insertBefore(s,r);if(a instanceof ll){var l=r?r.previousSibling:e.lastChild;hl(a.contentDOM,a.children,n),r=l?l.nextSibling:e.firstChild}}for(;r;)r=xl(r),o=!0;o&&n.trackWrites==e&&(n.trackWrites=null)}var ml=function(e){e&&(this.nodeName=e)};ml.prototype=Object.create(null);var vl=[new ml];function gl(e,t,n){if(0==e.length)return vl;for(var r=n?vl[0]:new ml,o=[r],i=0;i<e.length;i++){var a=e[i].type.attrs;if(a)for(var s in a.nodeName&&o.push(r=new ml(a.nodeName)),a){var l=a[s];null!=l&&(n&&1==o.length&&o.push(r=new ml(t.isInline?"span":"div")),"class"==s?r.class=(r.class?r.class+" ":"")+l:"style"==s?r.style=(r.style?r.style+";":"")+l:"nodeName"!=s&&(r[s]=l))}}return o}function yl(e,t,n,r){if(n==vl&&r==vl)return t;for(var o=t,i=0;i<r.length;i++){var a=r[i],s=n[i];if(i){var l=void 0;s&&s.nodeName==a.nodeName&&o!=e&&(l=o.parentNode)&&l.nodeName.toLowerCase()==a.nodeName||((l=document.createElement(a.nodeName)).pmIsDeco=!0,l.appendChild(o),s=vl[0]),o=l}bl(o,s||vl[0],a)}return o}function bl(e,t,n){for(var r in t)"class"==r||"style"==r||"nodeName"==r||r in n||e.removeAttribute(r);for(var o in n)"class"!=o&&"style"!=o&&"nodeName"!=o&&n[o]!=t[o]&&e.setAttribute(o,n[o]);if(t.class!=n.class){for(var i=t.class?t.class.split(" ").filter(Boolean):[],a=n.class?n.class.split(" ").filter(Boolean):[],s=0;s<i.length;s++)-1==a.indexOf(i[s])&&e.classList.remove(i[s]);for(var l=0;l<a.length;l++)-1==i.indexOf(a[l])&&e.classList.add(a[l]);0==e.classList.length&&e.removeAttribute("class")}if(t.style!=n.style){if(t.style)for(var u,c=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g;u=c.exec(t.style);)e.style.removeProperty(u[1]);n.style&&(e.style.cssText+=n.style)}}function wl(e,t,n){return yl(e,e,vl,gl(t,n,1!=e.nodeType))}function kl(e,t){if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function xl(e){var t=e.nextSibling;return e.parentNode.removeChild(e),t}var Ol=function(){function e(t,n){Object(c.a)(this,e),this.lock=n,this.index=0,this.stack=[],this.changed=!1,this.top=t,this.preMatch=function(e,t){var n=t,r=n.children.length,o=e.childCount,i=new Map,a=[];e:for(;o>0;){for(var s=void 0;;)if(r){var l=n.children[r-1];if(!(l instanceof ll)){s=l,r--;break}n=l,r=l.children.length}else{if(n==t)break e;r=n.parent.children.indexOf(n),n=n.parent}var u=s.node;if(u){if(u!=e.child(o-1))break;--o,i.set(s,o),a.push(s)}}return{index:o,matched:i,matches:a.reverse()}}(t.node.content,t)}return Object(d.a)(e,[{key:"destroyBetween",value:function(e,t){if(e!=t){for(var n=e;n<t;n++)this.top.children[n].destroy();this.top.children.splice(e,t-e),this.changed=!0}}},{key:"destroyRest",value:function(){this.destroyBetween(this.index,this.top.children.length)}},{key:"syncToMarks",value:function(e,t,n){for(var r=0,o=this.stack.length>>1,i=Math.min(o,e.length);r<i&&(r==o-1?this.top:this.stack[r+1<<1]).matchesMark(e[r])&&!1!==e[r].type.spec.spanning;)r++;for(;r<o;)this.destroyRest(),this.top.dirty=0,this.index=this.stack.pop(),this.top=this.stack.pop(),o--;for(;o<e.length;){this.stack.push(this.top,this.index+1);for(var a=-1,s=this.index;s<Math.min(this.index+3,this.top.children.length);s++)if(this.top.children[s].matchesMark(e[o])){a=s;break}if(a>-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{var l=ll.create(this.top,e[o],t,n);this.top.children.splice(this.index,0,l),this.top=l,this.changed=!0}this.index=0,o++}}},{key:"findNodeMatch",value:function(e,t,n,r){var o,i=-1;if(r>=this.preMatch.index&&(o=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&o.matchesNode(e,t,n))i=this.top.children.indexOf(o,this.index);else for(var a=this.index,s=Math.min(this.top.children.length,a+5);a<s;a++){var l=this.top.children[a];if(l.matchesNode(e,t,n)&&!this.preMatch.matched.has(l)){i=a;break}}return!(i<0)&&(this.destroyBetween(this.index,i),this.index++,!0)}},{key:"updateNodeAt",value:function(e,t,n,r,o){var i=this.top.children[r];return 3==i.dirty&&i.dom==i.contentDOM&&(i.dirty=2),!!i.update(e,t,n,o)&&(this.destroyBetween(this.index,r),this.index++,!0)}},{key:"findIndexWithChild",value:function(e){for(;;){var t=e.parentNode;if(!t)return-1;if(t==this.top.contentDOM){var n=e.pmViewDesc;if(n)for(var r=this.index;r<this.top.children.length;r++)if(this.top.children[r]==n)return r;return-1}e=t}}},{key:"updateNextNode",value:function(e,t,n,r,o){for(var i=this.index;i<this.top.children.length;i++){var a=this.top.children[i];if(a instanceof ul){var s=this.preMatch.matched.get(a);if(null!=s&&s!=o)return!1;var l=a.dom;if(!(this.lock&&(l==this.lock||1==l.nodeType&&l.contains(this.lock.parentNode))&&!(e.isText&&a.node&&a.node.isText&&a.nodeDOM.nodeValue==e.text&&3!=a.dirty&&kl(t,a.outerDeco)))&&a.update(e,t,n,r))return this.destroyBetween(this.index,i),a.dom!=l&&(this.changed=!0),this.index++,!0;break}}return!1}},{key:"addNode",value:function(e,t,n,r,o){this.top.children.splice(this.index++,0,ul.create(this.top,e,t,n,r,o)),this.changed=!0}},{key:"placeWidget",value:function(e,t,n){var 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){var o=new al(this.top,e,t,n);this.top.children.splice(this.index++,0,o),this.changed=!0}else this.index++}},{key:"addTextblockHacks",value:function(){for(var e=this.top.children[this.index-1],t=this.top;e instanceof ll;)e=(t=e).children[t.children.length-1];e&&e instanceof dl&&!/\n$/.test(e.node.text)||((bs||gs)&&e&&"false"==e.dom.contentEditable&&this.addHackNode("IMG",t),this.addHackNode("BR",this.top))}},{key:"addHackNode",value:function(e,t){if(t==this.top&&this.index<t.children.length&&t.children[this.index].matchesHack(e))this.index++;else{var n=document.createElement(e);"IMG"==e&&(n.className="ProseMirror-separator",n.alt=""),"BR"==e&&(n.className="ProseMirror-trailingBreak");var r=new fl(this.top,[],n,null);t!=this.top?t.children.push(r):t.children.splice(this.index++,0,r),this.changed=!0}}}]),e}();function Sl(e,t){return e.type.side-t.type.side}function Cl(e,t,n,r,o){for(var i=[],a=0,s=0;a<e.length;a++){var l=e[a],u=s,c=s+=l.size;u>=n||c<=t?i.push(l):(u<t&&i.push(l.slice(0,t-u,r)),o&&(i.push(o),o=void 0),c>n&&i.push(l.slice(n-u,l.size,r)))}return i}function jl(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=e.domSelection(),r=e.state.doc;if(!n.focusNode)return null;var o=e.docView.nearestDesc(n.focusNode),i=o&&0==o.size,a=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(a<0)return null;var s,l,u=r.resolve(a);if(Rs(n)){for(s=u;o&&!o.node;)o=o.parent;var c=o.node;if(o&&c.isAtom&&p.NodeSelection.isSelectable(c)&&o.parent&&(!c.isInline||!Ns(n.focusNode,n.focusOffset,o.dom))){var d=o.posBefore;l=new p.NodeSelection(a==d?u:r.resolve(d))}}else{var f=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(f<0)return null;s=r.resolve(f)}if(!l){var h="pointer"==t||e.state.selection.head<u.pos&&!i?1:-1;l=Fl(e,s,u,h)}return l}function Dl(e){return e.editable?e.hasFocus():zl(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function Al(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.state.selection;if(Rl(e,n),Dl(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&gs){var r=e.domSelection(),o=e.domObserver.currentSelection;if(r.anchorNode&&o.anchorNode&&Es(r.anchorNode,r.anchorOffset,o.anchorNode,o.anchorOffset))return e.input.mouseDown.delayedSelectionSync=!0,void e.domObserver.setCurSelection()}if(e.domObserver.disconnectSelection(),e.cursorWrapper)Pl(e);else{var i,a,s=n.anchor,l=n.head;!El||n instanceof p.TextSelection||(n.$from.parent.inlineContent||(i=Ml(e,n.from)),n.empty||n.$from.parent.inlineContent||(a=Ml(e,n.to))),e.docView.setSelection(s,l,e.root,t),El&&(i&&Ll(i),a&&Ll(a)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&Nl(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}var El=bs||gs&&ys<63;function Ml(e,t){var n=e.docView.domFromPos(t,0),r=n.node,o=n.offset,i=o<r.childNodes.length?r.childNodes[o]:null,a=o?r.childNodes[o-1]:null;if(bs&&i&&"false"==i.contentEditable)return Tl(i);if((!i||"false"==i.contentEditable)&&(!a||"false"==a.contentEditable)){if(i)return Tl(i);if(a)return Tl(a)}}function Tl(e){return e.contentEditable="true",bs&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function Ll(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function Nl(e){var t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.input.hideSelectionGuard);var n=e.domSelection(),r=n.anchorNode,o=n.anchorOffset;t.addEventListener("selectionchange",e.input.hideSelectionGuard=function(){n.anchorNode==r&&n.anchorOffset==o||(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout((function(){Dl(e)&&!e.state.selection.visible||e.dom.classList.remove("ProseMirror-hideselection")}),20))})}function Pl(e){var t=e.domSelection(),n=document.createRange(),r=e.cursorWrapper.dom,o="IMG"==r.nodeName;o?n.setEnd(r.parentNode,Cs(r)+1):n.setEnd(r,0),n.collapse(!1),t.removeAllRanges(),t.addRange(n),!o&&!e.state.selection.visible&&ps&&hs<=11&&(r.disabled=!0,r.disabled=!1)}function Rl(e,t){if(t instanceof p.NodeSelection){var n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(Hl(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else Hl(e)}function Hl(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function Fl(e,t,n,r){return e.someProp("createSelectionBetween",(function(r){return r(e,t,n)}))||p.TextSelection.between(t,n,r)}function Vl(e){return(!e.editable||e.root.activeElement==e.dom)&&zl(e)}function zl(e){var t=e.domSelection();if(!t.anchorNode)return!1;try{return e.dom.contains(3==t.anchorNode.nodeType?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(3==t.focusNode.nodeType?t.focusNode.parentNode:t.focusNode))}catch(n){return!1}}function Bl(e,t){var n=e.selection,r=n.$anchor,o=n.$head,i=t>0?r.max(o):r.min(o),a=i.parent.inlineContent?i.depth?e.doc.resolve(t>0?i.after():i.before()):null:i;return a&&p.Selection.findFrom(a,t)}function Il(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function _l(e,t,n){var r=e.state.selection;if(!(r instanceof p.TextSelection)){if(r instanceof p.NodeSelection&&r.node.isInline)return Il(e,new p.TextSelection(t>0?r.$to:r.$from));var o=Bl(e.state,t);return!!o&&Il(e,o)}if(!r.empty||n.indexOf("s")>-1)return!1;if(e.endOfTextblock(t>0?"right":"left")){var i=Bl(e.state,t);return!!(i&&i instanceof p.NodeSelection)&&Il(e,i)}if(!(ks&&n.indexOf("m")>-1)){var a,s=r.$head,l=s.textOffset?null:t<0?s.nodeBefore:s.nodeAfter;if(!l||l.isText)return!1;var u=t<0?s.pos-l.nodeSize:s.pos;return!!(l.isAtom||(a=e.docView.descAt(u))&&!a.contentDOM)&&(p.NodeSelection.isSelectable(l)?Il(e,new p.NodeSelection(t<0?e.state.doc.resolve(s.pos-l.nodeSize):s)):!!Os&&Il(e,new p.TextSelection(e.state.doc.resolve(t<0?u:u+l.nodeSize))))}}function $l(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function ql(e){var t=e.pmViewDesc;return t&&0==t.size&&(e.nextSibling||"BR"!=e.nodeName)}function Wl(e){var t=e.domSelection(),n=t.focusNode,r=t.focusOffset;if(n){var o,i,a=!1;for(ms&&1==n.nodeType&&r<$l(n)&&ql(n.childNodes[r])&&(a=!0);;)if(r>0){if(1!=n.nodeType)break;var s=n.childNodes[r-1];if(ql(s))o=n,i=--r;else{if(3!=s.nodeType)break;r=(n=s).nodeValue.length}}else{if(Kl(n))break;for(var l=n.previousSibling;l&&ql(l);)o=n.parentNode,i=Cs(l),l=l.previousSibling;if(l)r=$l(n=l);else{if((n=n.parentNode)==e.dom)break;r=0}}a?Gl(e,t,n,r):o&&Gl(e,t,o,i)}}function Ul(e){var t=e.domSelection(),n=t.focusNode,r=t.focusOffset;if(n){for(var o,i,a=$l(n);;)if(r<a){if(1!=n.nodeType)break;if(!ql(n.childNodes[r]))break;o=n,i=++r}else{if(Kl(n))break;for(var s=n.nextSibling;s&&ql(s);)o=s.parentNode,i=Cs(s)+1,s=s.nextSibling;if(s)r=0,a=$l(n=s);else{if((n=n.parentNode)==e.dom)break;r=a=0}}o&&Gl(e,t,o,i)}}function Kl(e){var t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function Gl(e,t,n,r){if(Rs(t)){var o=document.createRange();o.setEnd(n,r),o.setStart(n,r),t.removeAllRanges(),t.addRange(o)}else t.extend&&t.extend(n,r);e.domObserver.setCurSelection();var i=e.state;setTimeout((function(){e.state==i&&Al(e)}),50)}function Jl(e,t,n){var r=e.state.selection;if(r instanceof p.TextSelection&&!r.empty||n.indexOf("s")>-1)return!1;if(ks&&n.indexOf("m")>-1)return!1;var o=r.$from,i=r.$to;if(!o.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){var a=Bl(e.state,t);if(a&&a instanceof p.NodeSelection)return Il(e,a)}if(!o.parent.inlineContent){var s=t<0?o:i,l=r instanceof p.AllSelection?p.Selection.near(s,t):p.Selection.findFrom(s,t);return!!l&&Il(e,l)}return!1}function Yl(e,t){if(!(e.state.selection instanceof p.TextSelection))return!0;var n=e.state.selection,r=n.$head,o=n.$anchor,i=n.empty;if(!r.sameParent(o))return!0;if(!i)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;var a=!r.textOffset&&(t<0?r.nodeBefore:r.nodeAfter);if(a&&!a.isText){var s=e.state.tr;return t<0?s.delete(r.pos-a.nodeSize,r.pos):s.delete(r.pos,r.pos+a.nodeSize),e.dispatch(s),!0}return!1}function Zl(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function Xl(e,t){var n=t.keyCode,r=function(e){var t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}(t);return 8==n||ks&&72==n&&"c"==r?Yl(e,-1)||Wl(e):46==n||ks&&68==n&&"c"==r?Yl(e,1)||Ul(e):13==n||27==n||(37==n||ks&&66==n&&"c"==r?_l(e,-1,r)||Wl(e):39==n||ks&&70==n&&"c"==r?_l(e,1,r)||Ul(e):38==n||ks&&80==n&&"c"==r?Jl(e,-1,r)||Wl(e):40==n||ks&&78==n&&"c"==r?function(e){if(!bs||e.state.selection.$head.parentOffset>0)return!1;var t=e.domSelection(),n=t.focusNode,r=t.focusOffset;if(n&&1==n.nodeType&&0==r&&n.firstChild&&"false"==n.firstChild.contentEditable){var o=n.firstChild;Zl(e,o,"true"),setTimeout((function(){return Zl(e,o,"false")}),20)}return!1}(e)||Jl(e,1,r)||Ul(e):r==(ks?"m":"c")&&(66==n||73==n||89==n||90==n))}function Ql(e,t){for(var n=[],r=t.content,o=t.openStart,i=t.openEnd;o>1&&i>1&&1==r.childCount&&1==r.firstChild.childCount;){o--,i--;var a=r.firstChild;n.push(a.type.name,a.attrs!=a.type.defaultAttrs?a.attrs:null),r=a.content}var s=e.someProp("clipboardSerializer")||v.DOMSerializer.fromSchema(e.state.schema),l=uu(),u=l.createElement("div");u.appendChild(s.serializeFragment(r,{document:l}));for(var c,d=u.firstChild,f=0;d&&1==d.nodeType&&(c=su[d.nodeName.toLowerCase()]);){for(var p=c.length-1;p>=0;p--){for(var h=l.createElement(c[p]);u.firstChild;)h.appendChild(u.firstChild);u.appendChild(h),f++}d=u.firstChild}return d&&1==d.nodeType&&d.setAttribute("data-pm-slice","".concat(o," ").concat(i).concat(f?" -".concat(f):""," ").concat(JSON.stringify(n))),{dom:u,text:e.someProp("clipboardTextSerializer",(function(e){return e(t)}))||t.content.textBetween(0,t.content.size,"\n\n")}}function eu(e,t,n,r,o){var i,a,s=o.parent.type.spec.code;if(!n&&!t)return null;var l=t&&(r||s||!n);if(l){if(e.someProp("transformPastedText",(function(e){t=e(t,s||r)})),s)return t?new v.Slice(v.Fragment.from(e.state.schema.text(t.replace(/\r\n?/g,"\n"))),0,0):v.Slice.empty;var u=e.someProp("clipboardTextParser",(function(e){return e(t,o,r)}));if(u)a=u;else{var c=o.marks(),d=e.state.schema,f=v.DOMSerializer.fromSchema(d);i=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach((function(e){var t=i.appendChild(document.createElement("p"));e&&t.appendChild(f.serializeNode(d.text(e,c)))}))}}else e.someProp("transformPastedHTML",(function(e){n=e(n)})),i=function(e){var t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));var n,r=uu().createElement("div"),o=/<([a-z][^>\s]+)/i.exec(e);(n=o&&su[o[1].toLowerCase()])&&(e=n.map((function(e){return"<"+e+">"})).join("")+e+n.map((function(e){return"</"+e+">"})).reverse().join(""));if(r.innerHTML=e,n)for(var i=0;i<n.length;i++)r=r.querySelector(n[i])||r;return r}(n),Os&&function(e){for(var t=e.querySelectorAll(gs?"span:not([class]):not([style])":"span.Apple-converted-space"),n=0;n<t.length;n++){var r=t[n];1==r.childNodes.length&&"\xa0"==r.textContent&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),r)}}(i);var p=i&&i.querySelector("[data-pm-slice]"),h=p&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(p.getAttribute("data-pm-slice")||"");if(h&&h[3])for(var m=+h[3];m>0&&i.firstChild;m--)i=i.firstChild;if(!a){var g=e.someProp("clipboardParser")||e.someProp("domParser")||v.DOMParser.fromSchema(e.state.schema);a=g.parseSlice(i,{preserveWhitespace:!(!l&&!h),context:o,ruleFromNode:function(e){return"BR"!=e.nodeName||e.nextSibling||!e.parentNode||tu.test(e.parentNode.nodeName)?null:{ignore:!0}}})}if(h)a=function(e,t){if(!e.size)return e;var n,r=e.content.firstChild.type.schema;try{n=JSON.parse(t)}catch(u){return e}for(var o=e.content,i=e.openStart,a=e.openEnd,s=n.length-2;s>=0;s-=2){var l=r.nodes[n[s]];if(!l||l.hasRequiredAttrs())break;o=v.Fragment.from(l.create(n[s+1],o)),i++,a++}return new v.Slice(o,i,a)}(au(a,+h[1],+h[2]),h[4]);else if(a=v.Slice.maxOpen(function(e,t){if(e.childCount<2)return e;for(var n=function(n){var r=t.node(n).contentMatchAt(t.index(n)),o=void 0,i=[];if(e.forEach((function(e){if(i){var t,n=r.findWrapping(e.type);if(!n)return i=null;if(t=i.length&&o.length&&ru(n,o,e,i[i.length-1],0))i[i.length-1]=t;else{i.length&&(i[i.length-1]=ou(i[i.length-1],o.length));var a=nu(e,n);i.push(a),r=r.matchType(a.type),o=n}}})),i)return{v:v.Fragment.from(i)}},r=t.depth;r>=0;r--){var o=n(r);if("object"===typeof o)return o.v}return e}(a.content,o),!0),a.openStart||a.openEnd){for(var y=0,b=0,w=a.content.firstChild;y<a.openStart&&!w.type.spec.isolating;y++,w=w.firstChild);for(var k=a.content.lastChild;b<a.openEnd&&!k.type.spec.isolating;b++,k=k.lastChild);a=au(a,y,b)}return e.someProp("transformPasted",(function(e){a=e(a)})),a}var tu=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function nu(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=t.length-1;r>=n;r--)e=t[r].create(null,v.Fragment.from(e));return e}function ru(e,t,n,r,o){if(o<e.length&&o<t.length&&e[o]==t[o]){var i=ru(e,t,n,r.lastChild,o+1);if(i)return r.copy(r.content.replaceChild(r.childCount-1,i));if(r.contentMatchAt(r.childCount).matchType(o==e.length-1?n.type:e[o+1]))return r.copy(r.content.append(v.Fragment.from(nu(n,e,o+1))))}}function ou(e,t){if(0==t)return e;var n=e.content.replaceChild(e.childCount-1,ou(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(v.Fragment.empty,!0);return e.copy(n.append(r))}function iu(e,t,n,r,o,i){var a=t<0?e.firstChild:e.lastChild,s=a.content;return o<r-1&&(s=iu(s,t,n,r,o+1,i)),o>=n&&(s=t<0?a.contentMatchAt(0).fillBefore(s,e.childCount>1||i<=o).append(s):s.append(a.contentMatchAt(a.childCount).fillBefore(v.Fragment.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,a.copy(s))}function au(e,t,n){return t<e.openStart&&(e=new v.Slice(iu(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new v.Slice(iu(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}var su={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]},lu=null;function uu(){return lu||(lu=document.implementation.createHTMLDocument("title"))}var cu={},du={},fu=Object(d.a)((function e(){Object(c.a)(this,e),this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastAndroidDelete=0,this.composing=!1,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}));function pu(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function hu(e){e.someProp("handleDOMEvents",(function(t){for(var n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=function(t){return mu(e,t)})}))}function mu(e,t){return e.someProp("handleDOMEvents",(function(n){var r=n[t.type];return!!r&&(r(e,t)||t.defaultPrevented)}))}function vu(e){return{left:e.clientX,top:e.clientY}}function gu(e,t,n,r,o){if(-1==r)return!1;for(var i=e.state.doc.resolve(r),a=function(r){if(e.someProp(t,(function(t){return r>i.depth?t(e,n,i.nodeAfter,i.before(r),o,!0):t(e,n,i.node(r),i.before(r),o,!1)})))return{v:!0}},s=i.depth+1;s>0;s--){var l=a(s);if("object"===typeof l)return l.v}return!1}function yu(e,t,n){e.focused||e.focus();var r=e.state.tr.setSelection(t);"pointer"==n&&r.setMeta("pointer",!0),e.dispatch(r)}function bu(e,t,n,r,o){return gu(e,"handleClickOn",t,n,r)||e.someProp("handleClick",(function(n){return n(e,t,r)}))||(o?function(e,t){if(-1==t)return!1;var n,r,o=e.state.selection;o instanceof p.NodeSelection&&(n=o.node);for(var i=e.state.doc.resolve(t),a=i.depth+1;a>0;a--){var s=a>i.depth?i.nodeAfter:i.node(a);if(p.NodeSelection.isSelectable(s)){r=n&&o.$from.depth>0&&a>=o.$from.depth&&i.before(o.$from.depth+1)==o.$from.pos?i.before(o.$from.depth):i.before(a);break}}return null!=r&&(yu(e,p.NodeSelection.create(e.state.doc,r),"pointer"),!0)}(e,n):function(e,t){if(-1==t)return!1;var n=e.state.doc.resolve(t),r=n.nodeAfter;return!!(r&&r.isAtom&&p.NodeSelection.isSelectable(r))&&(yu(e,new p.NodeSelection(n),"pointer"),!0)}(e,n))}function wu(e,t,n,r){return gu(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",(function(n){return n(e,t,r)}))}function ku(e,t,n,r){return gu(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",(function(n){return n(e,t,r)}))||function(e,t,n){if(0!=n.button)return!1;var r=e.state.doc;if(-1==t)return!!r.inlineContent&&(yu(e,p.TextSelection.create(r,0,r.content.size),"pointer"),!0);for(var o=r.resolve(t),i=o.depth+1;i>0;i--){var a=i>o.depth?o.nodeAfter:o.node(i),s=o.before(i);if(a.inlineContent)yu(e,p.TextSelection.create(r,s+1,s+1+a.content.size),"pointer");else{if(!p.NodeSelection.isSelectable(a))continue;yu(e,p.NodeSelection.create(r,s),"pointer")}return!0}}(e,n,r)}function xu(e){return Eu(e)}du.keydown=function(e,t){var n=t;if(e.input.shiftKey=16==n.keyCode||n.shiftKey,!Cu(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!xs||!gs||13!=n.keyCode))if(229!=n.keyCode&&e.domObserver.forceFlush(),!ws||13!=n.keyCode||n.ctrlKey||n.altKey||n.metaKey)e.someProp("handleKeyDown",(function(t){return t(e,n)}))||Xl(e,n)?n.preventDefault():pu(e,"key");else{var r=Date.now();e.input.lastIOSEnter=r,e.input.lastIOSEnterFallbackTimeout=setTimeout((function(){e.input.lastIOSEnter==r&&(e.someProp("handleKeyDown",(function(t){return t(e,Hs(13,"Enter"))})),e.input.lastIOSEnter=0)}),200)}},du.keyup=function(e,t){16==t.keyCode&&(e.input.shiftKey=!1)},du.keypress=function(e,t){var n=t;if(!(Cu(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||ks&&n.metaKey))if(e.someProp("handleKeyPress",(function(t){return t(e,n)})))n.preventDefault();else{var r=e.state.selection;if(!(r instanceof p.TextSelection)||!r.$from.sameParent(r.$to)){var o=String.fromCharCode(n.charCode);e.someProp("handleTextInput",(function(t){return t(e,r.$from.pos,r.$to.pos,o)}))||e.dispatch(e.state.tr.insertText(o).scrollIntoView()),n.preventDefault()}}};var Ou=ks?"metaKey":"ctrlKey";cu.mousedown=function(e,t){var n=t;e.input.shiftKey=n.shiftKey;var r=xu(e),o=Date.now(),i="singleClick";o-e.input.lastClick.time<500&&function(e,t){var n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}(n,e.input.lastClick)&&!n[Ou]&&("singleClick"==e.input.lastClick.type?i="doubleClick":"doubleClick"==e.input.lastClick.type&&(i="tripleClick")),e.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:i};var a=e.posAtCoords(vu(n));a&&("singleClick"==i?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new Su(e,a,n,!!r)):("doubleClick"==i?wu:ku)(e,a.pos,a.inside,n)?n.preventDefault():pu(e,"pointer"))};var Su=function(){function e(t,n,r,o){var i,a,s=this;if(Object(c.a)(this,e),this.view=t,this.pos=n,this.event=r,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!r[Ou],this.allowDefault=r.shiftKey,n.inside>-1)i=t.state.doc.nodeAt(n.inside),a=n.inside;else{var l=t.state.doc.resolve(n.pos);i=l.parent,a=l.depth?l.before():0}var u=o?null:r.target,d=u?t.docView.nearestDesc(u,!0):null;this.target=d?d.dom:null;var f=t.state.selection;(0==r.button&&i.type.spec.draggable&&!1!==i.type.spec.selectable||f instanceof p.NodeSelection&&f.from<=a&&f.to>a)&&(this.mightDrag={node:i,pos:a,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!ms||this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout((function(){s.view.input.mouseDown==s&&s.target.setAttribute("contentEditable","false")}),20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),pu(t,"pointer")}return Object(d.a)(e,[{key:"done",value:function(){var e=this;this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout((function(){return Al(e.view)})),this.view.input.mouseDown=null}},{key:"up",value:function(e){if(this.done(),this.view.dom.contains(e.target)){var t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(vu(e))),this.allowDefault||!t?pu(this.view,"pointer"):bu(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():0==e.button&&(this.flushed||bs&&this.mightDrag&&!this.mightDrag.node.isAtom||gs&&!(this.view.state.selection instanceof p.TextSelection)&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(yu(this.view,p.Selection.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):pu(this.view,"pointer")}}},{key:"move",value:function(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0),pu(this.view,"pointer"),0==e.buttons&&this.done()}}]),e}();function Cu(e,t){return!!e.composing||!!(bs&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500)&&(e.input.compositionEndedAt=-2e8,!0)}cu.touchdown=function(e){xu(e),pu(e,"pointer")},cu.contextmenu=function(e){return xu(e)};var ju=xs?5e3:-1;function Du(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout((function(){return Eu(e)}),t))}function Au(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=function(){var e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function Eu(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!(xs&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),Au(e),t||e.docView&&e.docView.dirty){var n=jl(e);return n&&!n.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(n)):e.updateState(e.state),!0}return!1}}du.compositionstart=du.compositionupdate=function(e){if(!e.composing){e.domObserver.flush();var t=e.state,n=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some((function(e){return!1===e.type.spec.inclusive}))))e.markCursor=e.state.storedMarks||n.marks(),Eu(e,!0),e.markCursor=null;else if(Eu(e),ms&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length)for(var r=e.domSelection(),o=r.focusNode,i=r.focusOffset;o&&1==o.nodeType&&0!=i;){var a=i<0?o.lastChild:o.childNodes[i-1];if(!a)break;if(3==a.nodeType){r.collapse(a,a.nodeValue.length);break}o=a,i=-1}e.input.composing=!0}Du(e,ju)},du.compositionend=function(e,t){e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,Du(e,20))};var Mu=ps&&hs<15||ws&&Ss<604;function Tu(e,t,n,r){var o=eu(e,t,n,e.input.shiftKey,e.state.selection.$from);if(e.someProp("handlePaste",(function(t){return t(e,r,o||v.Slice.empty)})))return!0;if(!o)return!1;var i=function(e){return 0==e.openStart&&0==e.openEnd&&1==e.content.childCount?e.content.firstChild:null}(o),a=i?e.state.tr.replaceSelectionWith(i,e.input.shiftKey):e.state.tr.replaceSelection(o);return e.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}cu.copy=du.cut=function(e,t){var n=t,r=e.state.selection,o="cut"==n.type;if(!r.empty){var i=Mu?null:n.clipboardData,a=Ql(e,r.content()),s=a.dom,l=a.text;i?(n.preventDefault(),i.clearData(),i.setData("text/html",s.innerHTML),i.setData("text/plain",l)):function(e,t){if(e.dom.parentNode){var n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";var r=getSelection(),o=document.createRange();o.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout((function(){n.parentNode&&n.parentNode.removeChild(n),e.focus()}),50)}}(e,s),o&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))}},du.paste=function(e,t){var n=t;if(!e.composing||xs){var r=Mu?null:n.clipboardData;r&&Tu(e,r.getData("text/plain"),r.getData("text/html"),n)?n.preventDefault():function(e,t){if(e.dom.parentNode){var n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus(),setTimeout((function(){e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?Tu(e,r.value,null,t):Tu(e,r.textContent,r.innerHTML,t)}),50)}}(e,n)}};var Lu=Object(d.a)((function e(t,n){Object(c.a)(this,e),this.slice=t,this.move=n})),Nu=ks?"altKey":"ctrlKey";for(var Pu in cu.dragstart=function(e,t){var n=t,r=e.input.mouseDown;if(r&&r.done(),n.dataTransfer){var o=e.state.selection,i=o.empty?null:e.posAtCoords(vu(n));if(i&&i.pos>=o.from&&i.pos<=(o instanceof p.NodeSelection?o.to-1:o.to));else if(r&&r.mightDrag)e.dispatch(e.state.tr.setSelection(p.NodeSelection.create(e.state.doc,r.mightDrag.pos)));else if(n.target&&1==n.target.nodeType){var a=e.docView.nearestDesc(n.target,!0);a&&a.node.type.spec.draggable&&a!=e.docView&&e.dispatch(e.state.tr.setSelection(p.NodeSelection.create(e.state.doc,a.posBefore)))}var s=e.state.selection.content(),l=Ql(e,s),u=l.dom,c=l.text;n.dataTransfer.clearData(),n.dataTransfer.setData(Mu?"Text":"text/html",u.innerHTML),n.dataTransfer.effectAllowed="copyMove",Mu||n.dataTransfer.setData("text/plain",c),e.dragging=new Lu(s,!n[Nu])}},cu.dragend=function(e){var t=e.dragging;window.setTimeout((function(){e.dragging==t&&(e.dragging=null)}),50)},du.dragover=du.dragenter=function(e,t){return t.preventDefault()},du.drop=function(e,t){var n=t,r=e.dragging;if(e.dragging=null,n.dataTransfer){var o=e.posAtCoords(vu(n));if(o){var i=e.state.doc.resolve(o.pos);if(i){var a=r&&r.slice;a?e.someProp("transformPasted",(function(e){a=e(a)})):a=eu(e,n.dataTransfer.getData(Mu?"Text":"text/plain"),Mu?null:n.dataTransfer.getData("text/html"),!1,i);var s=!(!r||n[Nu]);if(e.someProp("handleDrop",(function(t){return t(e,n,a||v.Slice.empty,s)})))n.preventDefault();else if(a){n.preventDefault();var l=a?Object(g.h)(e.state.doc,i.pos,a):i.pos;null==l&&(l=i.pos);var u=e.state.tr;s&&u.deleteSelection();var c=u.mapping.map(l),d=0==a.openStart&&0==a.openEnd&&1==a.content.childCount,f=u.doc;if(d?u.replaceRangeWith(c,c,a.content.firstChild):u.replaceRange(c,c,a),!u.doc.eq(f)){var h=u.doc.resolve(c);if(d&&p.NodeSelection.isSelectable(a.content.firstChild)&&h.nodeAfter&&h.nodeAfter.sameMarkup(a.content.firstChild))u.setSelection(new p.NodeSelection(h));else{var m=u.mapping.map(l);u.mapping.maps[u.mapping.maps.length-1].forEach((function(e,t,n,r){return m=r})),u.setSelection(Fl(e,h,u.doc.resolve(m)))}e.focus(),e.dispatch(u.setMeta("uiEvent","drop"))}}}}}},cu.focus=function(e){e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout((function(){e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelection())&&Al(e)}),20))},cu.blur=function(e,t){var n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)},cu.beforeinput=function(e,t){if(gs&&xs&&"deleteContentBackward"==t.inputType){e.domObserver.flushSoon();var n=e.input.domChangeCount;setTimeout((function(){if(e.input.domChangeCount==n&&(e.dom.blur(),e.focus(),!e.someProp("handleKeyDown",(function(t){return t(e,Hs(8,"Backspace"))})))){var t=e.state.selection.$cursor;t&&t.pos>0&&e.dispatch(e.state.tr.delete(t.pos-1,t.pos).scrollIntoView())}}),50)}},du)cu[Pu]=du[Pu];function Ru(e,t){if(e==t)return!0;for(var n in e)if(e[n]!==t[n])return!1;for(var r in t)if(!(r in e))return!1;return!0}var Hu=function(){function e(t,n){Object(c.a)(this,e),this.toDOM=t,this.spec=n||Iu,this.side=this.spec.side||0}return Object(d.a)(e,[{key:"map",value:function(e,t,n,r){var o=e.mapResult(t.from+r,this.side<0?-1:1),i=o.pos;return o.deleted?null:new zu(i-n,i-n,this)}},{key:"valid",value:function(){return!0}},{key:"eq",value:function(t){return this==t||t instanceof e&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&Ru(this.spec,t.spec))}},{key:"destroy",value:function(e){this.spec.destroy&&this.spec.destroy(e)}}]),e}(),Fu=function(){function e(t,n){Object(c.a)(this,e),this.attrs=t,this.spec=n||Iu}return Object(d.a)(e,[{key:"map",value:function(e,t,n,r){var o=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-n,i=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-n;return o>=i?null:new zu(o,i,this)}},{key:"valid",value:function(e,t){return t.from<t.to}},{key:"eq",value:function(t){return this==t||t instanceof e&&Ru(this.attrs,t.attrs)&&Ru(this.spec,t.spec)}},{key:"destroy",value:function(){}}],[{key:"is",value:function(t){return t.type instanceof e}}]),e}(),Vu=function(){function e(t,n){Object(c.a)(this,e),this.attrs=t,this.spec=n||Iu}return Object(d.a)(e,[{key:"map",value:function(e,t,n,r){var o=e.mapResult(t.from+r,1);if(o.deleted)return null;var i=e.mapResult(t.to+r,-1);return i.deleted||i.pos<=o.pos?null:new zu(o.pos-n,i.pos-n,this)}},{key:"valid",value:function(e,t){var n,r=e.content.findIndex(t.from),o=r.index,i=r.offset;return i==t.from&&!(n=e.child(o)).isText&&i+n.nodeSize==t.to}},{key:"eq",value:function(t){return this==t||t instanceof e&&Ru(this.attrs,t.attrs)&&Ru(this.spec,t.spec)}},{key:"destroy",value:function(){}}]),e}(),zu=function(){function e(t,n,r){Object(c.a)(this,e),this.from=t,this.to=n,this.type=r}return Object(d.a)(e,[{key:"copy",value:function(t,n){return new e(t,n,this.type)}},{key:"eq",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}},{key:"map",value:function(e,t,n){return this.type.map(e,this,t,n)}},{key:"spec",get:function(){return this.type.spec}},{key:"inline",get:function(){return this.type instanceof Fu}}],[{key:"widget",value:function(t,n,r){return new e(t,t,new Hu(n,r))}},{key:"inline",value:function(t,n,r,o){return new e(t,n,new Fu(r,o))}},{key:"node",value:function(t,n,r,o){return new e(t,n,new Vu(r,o))}}]),e}(),Bu=[],Iu={},_u=function(){function e(t,n){Object(c.a)(this,e),this.local=t.length?t:Bu,this.children=n.length?n:Bu}return Object(d.a)(e,[{key:"find",value:function(e,t,n){var r=[];return this.findInner(null==e?0:e,null==t?1e9:t,r,0,n),r}},{key:"findInner",value:function(e,t,n,r,o){for(var i=0;i<this.local.length;i++){var a=this.local[i];a.from<=t&&a.to>=e&&(!o||o(a.spec))&&n.push(a.copy(a.from+r,a.to+r))}for(var s=0;s<this.children.length;s+=3)if(this.children[s]<t&&this.children[s+1]>e){var l=this.children[s]+1;this.children[s+2].findInner(e-l,t-l,n,r+l,o)}}},{key:"map",value:function(e,t,n){return this==$u||0==e.maps.length?this:this.mapInner(e,t,0,0,n||Iu)}},{key:"mapInner",value:function(t,n,r,o,i){for(var a,s=0;s<this.local.length;s++){var l=this.local[s].map(t,r,o);l&&l.type.valid(n,l)?(a||(a=[])).push(l):i.onRemove&&i.onRemove(this.local[s].spec)}return this.children.length?function(e,t,n,r,o,i,a){for(var s=e.slice(),l=function(e,t,n,r){for(var a=0;a<s.length;a+=3){var l=s[a+1],u=void 0;if(!(l<0||e>l+i)){var c=s[a]+i;t>=c?s[a+1]=e<=c?-2:-1:n>=o&&(u=r-n-(t-e))&&(s[a]+=u,s[a+1]+=u)}}},u=0;u<n.maps.length;u++)n.maps[u].forEach(l);for(var c=!1,d=0;d<s.length;d+=3)if(s[d+1]<0){if(-2==s[d+1]){c=!0,s[d+1]=-1;continue}var f=n.map(e[d]+i),p=f-o;if(p<0||p>=r.content.size){c=!0;continue}var h=n.map(e[d+1]+i,-1)-o,m=r.content.findIndex(p),v=m.index,g=m.offset,y=r.maybeChild(v);if(y&&g==p&&g+y.nodeSize==h){var b=s[d+2].mapInner(n,y,f+1,e[d]+i+1,a);b!=$u?(s[d]=p,s[d+1]=h,s[d+2]=b):(s[d+1]=-2,c=!0)}else c=!0}if(c){var w=function(e,t,n,r,o,i,a){function s(e,t){for(var i=0;i<e.local.length;i++){var l=e.local[i].map(r,o,t);l?n.push(l):a.onRemove&&a.onRemove(e.local[i].spec)}for(var u=0;u<e.children.length;u+=3)s(e.children[u+2],e.children[u]+t+1)}for(var l=0;l<e.length;l+=3)-1==e[l+1]&&s(e[l+2],t[l]+i+1);return n}(s,e,t,n,o,i,a),k=Gu(w,r,0,a);t=k.local;for(var x=0;x<s.length;x+=3)s[x+1]<0&&(s.splice(x,3),x-=3);for(var O=0,S=0;O<k.children.length;O+=3){for(var C=k.children[O];S<s.length&&s[S]<C;)S+=3;s.splice(S,0,k.children[O],k.children[O+1],k.children[O+2])}}return new _u(t.sort(Ju),s)}(this.children,a||[],t,n,r,o,i):a?new e(a.sort(Ju),Bu):$u}},{key:"add",value:function(t,n){return n.length?this==$u?e.create(t,n):this.addInner(t,n,0):this}},{key:"addInner",value:function(t,n,r){var o,i=this,a=0;t.forEach((function(e,t){var s,l=t+r;if(s=Uu(n,e,l)){for(o||(o=i.children.slice());a<o.length&&o[a]<t;)a+=3;o[a]==t?o[a+2]=o[a+2].addInner(e,s,l+1):o.splice(a,0,t,t+e.nodeSize,Gu(s,e,l+1,Iu)),a+=3}}));for(var s=Wu(a?Ku(n):n,-r),l=0;l<s.length;l++)s[l].type.valid(t,s[l])||s.splice(l--,1);return new e(s.length?this.local.concat(s).sort(Ju):this.local,o||this.children)}},{key:"remove",value:function(e){return 0==e.length||this==$u?this:this.removeInner(e,0)}},{key:"removeInner",value:function(t,n){for(var r=this.children,o=this.local,i=0;i<r.length;i+=3){for(var a,s=void 0,l=r[i]+n,u=r[i+1]+n,c=0;c<t.length;c++)(a=t[c])&&a.from>l&&a.to<u&&(t[c]=null,(s||(s=[])).push(a));if(s){r==this.children&&(r=this.children.slice());var d=r[i+2].removeInner(s,l+1);d!=$u?r[i+2]=d:(r.splice(i,3),i-=3)}}if(o.length)for(var f,p=0;p<t.length;p++)if(f=t[p])for(var h=0;h<o.length;h++)o[h].eq(f,n)&&(o==this.local&&(o=this.local.slice()),o.splice(h--,1));return r==this.children&&o==this.local?this:o.length||r.length?new e(o,r):$u}},{key:"forChild",value:function(t,n){if(this==$u)return this;if(n.isLeaf)return e.empty;for(var r,o,i=0;i<this.children.length;i+=3)if(this.children[i]>=t){this.children[i]==t&&(r=this.children[i+2]);break}for(var a=t+1,s=a+n.content.size,l=0;l<this.local.length;l++){var u=this.local[l];if(u.from<s&&u.to>a&&u.type instanceof Fu){var c=Math.max(a,u.from)-a,d=Math.min(s,u.to)-a;c<d&&(o||(o=[])).push(u.copy(c,d))}}if(o){var f=new e(o.sort(Ju),Bu);return r?new qu([f,r]):f}return r||$u}},{key:"eq",value:function(t){if(this==t)return!0;if(!(t instanceof e)||this.local.length!=t.local.length||this.children.length!=t.children.length)return!1;for(var n=0;n<this.local.length;n++)if(!this.local[n].eq(t.local[n]))return!1;for(var r=0;r<this.children.length;r+=3)if(this.children[r]!=t.children[r]||this.children[r+1]!=t.children[r+1]||!this.children[r+2].eq(t.children[r+2]))return!1;return!0}},{key:"locals",value:function(e){return Yu(this.localsInner(e))}},{key:"localsInner",value:function(e){if(this==$u)return Bu;if(e.inlineContent||!this.local.some(Fu.is))return this.local;for(var t=[],n=0;n<this.local.length;n++)this.local[n].type instanceof Fu||t.push(this.local[n]);return t}}],[{key:"create",value:function(e,t){return t.length?Gu(t,e,0,Iu):$u}}]),e}();_u.empty=new _u([],[]),_u.removeOverlap=Yu;var $u=_u.empty,qu=function(){function e(t){Object(c.a)(this,e),this.members=t}return Object(d.a)(e,[{key:"map",value:function(t,n){var r=this.members.map((function(e){return e.map(t,n,Iu)}));return e.from(r)}},{key:"forChild",value:function(t,n){if(n.isLeaf)return _u.empty;for(var r=[],o=0;o<this.members.length;o++){var i=this.members[o].forChild(t,n);i!=$u&&(i instanceof e?r=r.concat(i.members):r.push(i))}return e.from(r)}},{key:"eq",value:function(t){if(!(t instanceof e)||t.members.length!=this.members.length)return!1;for(var n=0;n<this.members.length;n++)if(!this.members[n].eq(t.members[n]))return!1;return!0}},{key:"locals",value:function(e){for(var t,n=!0,r=0;r<this.members.length;r++){var o=this.members[r].localsInner(e);if(o.length)if(t){n&&(t=t.slice(),n=!1);for(var i=0;i<o.length;i++)t.push(o[i])}else t=o}return t?Yu(n?t:t.sort(Ju)):Bu}}],[{key:"from",value:function(t){switch(t.length){case 0:return $u;case 1:return t[0];default:return new e(t)}}}]),e}();function Wu(e,t){if(!t||!e.length)return e;for(var n=[],r=0;r<e.length;r++){var o=e[r];n.push(new zu(o.from+t,o.to+t,o.type))}return n}function Uu(e,t,n){if(t.isLeaf)return null;for(var r,o=n+t.nodeSize,i=null,a=0;a<e.length;a++)(r=e[a])&&r.from>n&&r.to<o&&((i||(i=[])).push(r),e[a]=null);return i}function Ku(e){for(var t=[],n=0;n<e.length;n++)null!=e[n]&&t.push(e[n]);return t}function Gu(e,t,n,r){var o=[],i=!1;t.forEach((function(t,a){var s=Uu(e,t,a+n);if(s){i=!0;var l=Gu(s,t,n+a+1,r);l!=$u&&o.push(a,a+t.nodeSize,l)}}));for(var a=Wu(i?Ku(e):e,-n).sort(Ju),s=0;s<a.length;s++)a[s].type.valid(t,a[s])||(r.onRemove&&r.onRemove(a[s].spec),a.splice(s--,1));return a.length||o.length?new _u(a,o):$u}function Ju(e,t){return e.from-t.from||e.to-t.to}function Yu(e){for(var t=e,n=0;n<t.length-1;n++){var r=t[n];if(r.from!=r.to)for(var o=n+1;o<t.length;o++){var i=t[o];if(i.from!=r.from){i.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,i.from),Zu(t,o,r.copy(i.from,r.to)));break}i.to!=r.to&&(t==e&&(t=e.slice()),t[o]=i.copy(i.from,r.to),Zu(t,o+1,i.copy(r.to,i.to)))}}return t}function Zu(e,t,n){for(;t<e.length&&Ju(n,e[t])>0;)t++;e.splice(t,0,n)}function Xu(e){var t=[];return e.someProp("decorations",(function(n){var r=n(e.state);r&&r!=$u&&t.push(r)})),e.cursorWrapper&&t.push(_u.create(e.state.doc,[e.cursorWrapper.deco])),qu.from(t)}var Qu={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},ec=ps&&hs<=11,tc=function(){function e(){Object(c.a)(this,e),this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}return Object(d.a)(e,[{key:"set",value:function(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}},{key:"clear",value:function(){this.anchorNode=this.focusNode=null}},{key:"eq",value:function(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}]),e}(),nc=function(){function e(t,n){var r=this;Object(c.a)(this,e),this.view=t,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new tc,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.observer=window.MutationObserver&&new window.MutationObserver((function(e){for(var t=0;t<e.length;t++)r.queue.push(e[t]);ps&&hs<=11&&e.some((function(e){return"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length}))?r.flushSoon():r.flush()})),ec&&(this.onCharData=function(e){r.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),r.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}return Object(d.a)(e,[{key:"flushSoon",value:function(){var e=this;this.flushingSoon<0&&(this.flushingSoon=window.setTimeout((function(){e.flushingSoon=-1,e.flush()}),20))}},{key:"forceFlush",value:function(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}},{key:"start",value:function(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,Qu)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}},{key:"stop",value:function(){var e=this;if(this.observer){var t=this.observer.takeRecords();if(t.length){for(var n=0;n<t.length;n++)this.queue.push(t[n]);window.setTimeout((function(){return e.flush()}),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}},{key:"connectSelection",value:function(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}},{key:"disconnectSelection",value:function(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}},{key:"suppressSelectionUpdates",value:function(){var e=this;this.suppressingSelectionUpdates=!0,setTimeout((function(){return e.suppressingSelectionUpdates=!1}),50)}},{key:"onSelectionChange",value:function(){if(Vl(this.view)){if(this.suppressingSelectionUpdates)return Al(this.view);if(ps&&hs<=11&&!this.view.state.selection.empty){var e=this.view.domSelection();if(e.focusNode&&Es(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}},{key:"setCurSelection",value:function(){this.currentSelection.set(this.view.domSelection())}},{key:"ignoreSelectionChange",value:function(e){if(0==e.rangeCount)return!0;var t=e.getRangeAt(0).commonAncestorContainer,n=this.view.docView.nearestDesc(t);return n&&n.ignoreMutation({type:"selection",target:3==t.nodeType?t.parentNode:t})?(this.setCurSelection(),!0):void 0}},{key:"flush",value:function(){if(this.view.docView&&!(this.flushingSoon>-1)){var e=this.observer?this.observer.takeRecords():[];this.queue.length&&(e=this.queue.concat(e),this.queue.length=0);var t=this.view.domSelection(),n=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(t)&&Vl(this.view)&&!this.ignoreSelectionChange(t),r=-1,o=-1,i=!1,a=[];if(this.view.editable)for(var s=0;s<e.length;s++){var l=this.registerMutation(e[s],a);l&&(r=r<0?l.from:Math.min(l.from,r),o=o<0?l.to:Math.max(l.to,o),l.typeOver&&(i=!0))}if(ms&&a.length>1){var u=a.filter((function(e){return"BR"==e.nodeName}));if(2==u.length){var c=u[0],d=u[1];c.parentNode&&c.parentNode.parentNode==d.parentNode?d.remove():c.remove()}}(r>-1||n)&&(r>-1&&(this.view.docView.markDirty(r,o),function(e){if(rc)return;rc=!0,"normal"==getComputedStyle(e.dom).whiteSpace&&console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package.")}(this.view)),this.handleDOMChange(r,o,i,a),this.view.docView&&this.view.docView.dirty?this.view.updateState(this.view.state):this.currentSelection.eq(t)||Al(this.view),this.currentSelection.set(t))}}},{key:"registerMutation",value:function(e,t){if(t.indexOf(e.target)>-1)return null;var n=this.view.docView.nearestDesc(e.target);if("attributes"==e.type&&(n==this.view.docView||"contenteditable"==e.attributeName||"style"==e.attributeName&&!e.oldValue&&!e.target.getAttribute("style")))return null;if(!n||n.ignoreMutation(e))return null;if("childList"==e.type){for(var r=0;r<e.addedNodes.length;r++)t.push(e.addedNodes[r]);if(n.contentDOM&&n.contentDOM!=n.dom&&!n.contentDOM.contains(e.target))return{from:n.posBefore,to:n.posAfter};var o=e.previousSibling,i=e.nextSibling;if(ps&&hs<=11&&e.addedNodes.length)for(var a=0;a<e.addedNodes.length;a++){var s=e.addedNodes[a],l=s.previousSibling,u=s.nextSibling;(!l||Array.prototype.indexOf.call(e.addedNodes,l)<0)&&(o=l),(!u||Array.prototype.indexOf.call(e.addedNodes,u)<0)&&(i=u)}var c=o&&o.parentNode==e.target?Cs(o)+1:0,d=n.localPosFromDOM(e.target,c,-1),f=i&&i.parentNode==e.target?Cs(i):e.target.childNodes.length;return{from:d,to:n.localPosFromDOM(e.target,f,1)}}return"attributes"==e.type?{from:n.posAtStart-n.border,to:n.posAtEnd+n.border}:{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}}}]),e}(),rc=!1;function oc(e){var t=e.pmViewDesc;if(t)return t.parseRule();if("BR"==e.nodeName&&e.parentNode){if(bs&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){var n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}if(e.parentNode.lastChild==e||bs&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if("IMG"==e.nodeName&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}function ic(e,t,n,r,o){if(t<0){var i=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,a=jl(e,i);if(a&&!e.state.selection.eq(a)){var s=e.state.tr.setSelection(a);"pointer"==i?s.setMeta("pointer",!0):"key"==i&&s.scrollIntoView(),e.dispatch(s)}}else{var l=e.state.doc.resolve(t),u=l.sharedDepth(n);t=l.before(u+1),n=e.state.doc.resolve(n).after(u+1);var c=e.state.selection,d=function(e,t,n){var r,o=e.docView.parseRange(t,n),i=o.node,a=o.fromOffset,s=o.toOffset,l=o.from,u=o.to,c=e.domSelection(),d=c.anchorNode;if(d&&e.dom.contains(1==d.nodeType?d:d.parentNode)&&(r=[{node:d,offset:c.anchorOffset}],Rs(c)||r.push({node:c.focusNode,offset:c.focusOffset})),gs&&8===e.input.lastKeyCode)for(var f=s;f>a;f--){var p=i.childNodes[f-1],h=p.pmViewDesc;if("BR"==p.nodeName&&!h){s=f;break}if(!h||h.size)break}var m=e.state.doc,g=e.someProp("domParser")||v.DOMParser.fromSchema(e.state.schema),y=m.resolve(l),b=null,w=g.parse(i,{topNode:y.parent,topMatch:y.parent.contentMatchAt(y.index()),topOpen:!0,from:a,to:s,preserveWhitespace:"pre"!=y.parent.type.whitespace||"full",findPositions:r,ruleFromNode:oc,context:y});if(r&&null!=r[0].pos){var k=r[0].pos,x=r[1]&&r[1].pos;null==x&&(x=k),b={anchor:k+l,head:x+l}}return{doc:w,sel:b,from:l,to:u}}(e,t,n);if(gs&&e.cursorWrapper&&d.sel&&d.sel.anchor==e.cursorWrapper.deco.from){var f=e.cursorWrapper.deco.type.toDOM.nextSibling,h=f&&f.nodeValue?f.nodeValue.length:1;d.sel={anchor:d.sel.anchor+h,head:d.sel.anchor+h}}var m,g,y=e.state.doc,b=y.slice(d.from,d.to);8===e.input.lastKeyCode&&Date.now()-100<e.input.lastKeyCodeTime?(m=e.state.selection.to,g="end"):(m=e.state.selection.from,g="start"),e.input.lastKeyCode=null;var w=function(e,t,n,r,o){var i=e.findDiffStart(t,n);if(null==i)return null;var a=e.findDiffEnd(t,n+e.size,n+t.size),s=a.a,l=a.b;if("end"==o){r-=s+Math.max(0,i-Math.min(s,l))-i}if(s<i&&e.size<t.size){l=(i-=r<=i&&r>=s?i-r:0)+(l-s),s=i}else if(l<i){s=(i-=r<=i&&r>=l?i-r:0)+(s-l),l=i}return{start:i,endA:s,endB:l}}(b.content,d.doc.content,d.from,m,g);if((ws&&e.input.lastIOSEnter>Date.now()-225||xs)&&o.some((function(e){return"DIV"==e.nodeName||"P"==e.nodeName}))&&(!w||w.endA>=w.endB)&&e.someProp("handleKeyDown",(function(t){return t(e,Hs(13,"Enter"))})))e.input.lastIOSEnter=0;else{if(!w){if(!(r&&c instanceof p.TextSelection&&!c.empty&&c.$head.sameParent(c.$anchor))||e.composing||d.sel&&d.sel.anchor!=d.sel.head){if(d.sel){var k=ac(e,e.state.doc,d.sel);k&&!k.eq(e.state.selection)&&e.dispatch(e.state.tr.setSelection(k))}return}w={start:c.from,endA:c.to,endB:c.to}}e.input.domChangeCount++,e.state.selection.from<e.state.selection.to&&w.start==w.endB&&e.state.selection instanceof p.TextSelection&&(w.start>e.state.selection.from&&w.start<=e.state.selection.from+2&&e.state.selection.from>=d.from?w.start=e.state.selection.from:w.endA<e.state.selection.to&&w.endA>=e.state.selection.to-2&&e.state.selection.to<=d.to&&(w.endB+=e.state.selection.to-w.endA,w.endA=e.state.selection.to)),ps&&hs<=11&&w.endB==w.start+1&&w.endA==w.start&&w.start>d.from&&" \xa0"==d.doc.textBetween(w.start-d.from-1,w.start-d.from+1)&&(w.start--,w.endA--,w.endB--);var x,O=d.doc.resolveNoCache(w.start-d.from),S=d.doc.resolveNoCache(w.endB-d.from),C=y.resolve(w.start),j=O.sameParent(S)&&O.parent.inlineContent&&C.end()>=w.endA;if((ws&&e.input.lastIOSEnter>Date.now()-225&&(!j||o.some((function(e){return"DIV"==e.nodeName||"P"==e.nodeName})))||!j&&O.pos<d.doc.content.size&&(x=p.Selection.findFrom(d.doc.resolve(O.pos+1),1,!0))&&x.head==S.pos)&&e.someProp("handleKeyDown",(function(t){return t(e,Hs(13,"Enter"))})))e.input.lastIOSEnter=0;else if(e.state.selection.anchor>w.start&&function(e,t,n,r,o){if(!r.parent.isTextblock||n-t<=o.pos-r.pos||sc(r,!0,!1)<o.pos)return!1;var i=e.resolve(t);if(i.parentOffset<i.parent.content.size||!i.parent.isTextblock)return!1;var a=e.resolve(sc(i,!0,!0));return!(!a.parent.isTextblock||a.pos>n||sc(a,!0,!1)<n)&&r.parent.content.cut(r.parentOffset).eq(a.parent.content)}(y,w.start,w.endA,O,S)&&e.someProp("handleKeyDown",(function(t){return t(e,Hs(8,"Backspace"))})))xs&&gs&&e.domObserver.suppressSelectionUpdates();else{gs&&xs&&w.endB==w.start&&(e.input.lastAndroidDelete=Date.now()),xs&&!j&&O.start()!=S.start()&&0==S.parentOffset&&O.depth==S.depth&&d.sel&&d.sel.anchor==d.sel.head&&d.sel.head==w.endA&&(w.endB-=2,S=d.doc.resolveNoCache(w.endB-d.from),setTimeout((function(){e.someProp("handleKeyDown",(function(t){return t(e,Hs(13,"Enter"))}))}),20));var D,A,E,M=w.start,T=w.endA;if(j)if(O.pos==S.pos)ps&&hs<=11&&0==O.parentOffset&&(e.domObserver.suppressSelectionUpdates(),setTimeout((function(){return Al(e)}),20)),D=e.state.tr.delete(M,T),A=y.resolve(w.start).marksAcross(y.resolve(w.endA));else if(w.endA==w.endB&&(E=function(e,t){for(var n,r,o,i=e.firstChild.marks,a=t.firstChild.marks,s=i,l=a,u=0;u<a.length;u++)s=a[u].removeFromSet(s);for(var c=0;c<i.length;c++)l=i[c].removeFromSet(l);if(1==s.length&&0==l.length)r=s[0],n="add",o=function(e){return e.mark(r.addToSet(e.marks))};else{if(0!=s.length||1!=l.length)return null;r=l[0],n="remove",o=function(e){return e.mark(r.removeFromSet(e.marks))}}for(var d=[],f=0;f<t.childCount;f++)d.push(o(t.child(f)));if(v.Fragment.from(d).eq(e))return{mark:r,type:n}}(O.parent.content.cut(O.parentOffset,S.parentOffset),C.parent.content.cut(C.parentOffset,w.endA-C.start()))))D=e.state.tr,"add"==E.type?D.addMark(M,T,E.mark):D.removeMark(M,T,E.mark);else if(O.parent.child(O.index()).isText&&O.index()==S.index()-(S.textOffset?0:1)){var L=O.parent.textBetween(O.parentOffset,S.parentOffset);if(e.someProp("handleTextInput",(function(t){return t(e,M,T,L)})))return;D=e.state.tr.insertText(L,M,T)}if(D||(D=e.state.tr.replace(M,T,d.doc.slice(w.start-d.from,w.endB-d.from))),d.sel){var N=ac(e,D.doc,d.sel);N&&!(gs&&xs&&e.composing&&N.empty&&(w.start!=w.endB||e.input.lastAndroidDelete<Date.now()-100)&&(N.head==M||N.head==D.mapping.map(T)-1)||ps&&N.empty&&N.head==M)&&D.setSelection(N)}A&&D.ensureMarks(A),e.dispatch(D.scrollIntoView())}}}}function ac(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:Fl(e,t.resolve(n.anchor),t.resolve(n.head))}function sc(e,t,n){for(var r=e.depth,o=t?e.end():e.pos;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,o++,t=!1;if(n)for(var i=e.node(r).maybeChild(e.indexAfter(r));i&&!i.isLeaf;)i=i.firstChild,o++;return o}var lc=Ql,uc=function(){function e(t,n){var r=this;Object(c.a)(this,e),this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new fu,this.prevDirectPlugins=[],this.pluginViews=[],this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(hc),this.dispatch=this.dispatch.bind(this),this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):"function"==typeof t?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=fc(this),dc(this),this.nodeViews=pc(this),this.docView=cl(this.state.doc,cc(this),Xu(this),this.dom,this),this.domObserver=new nc(this,(function(e,t,n,o){return ic(r,e,t,n,o)})),this.domObserver.start(),function(e){var t=function(t){var n=cu[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=function(t){!function(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(var n=t.target;n!=e.dom;n=n.parentNode)if(!n||11==n.nodeType||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}(e,t)||mu(e,t)||!e.editable&&t.type in du||n(e,t)})};for(var n in cu)t(n);bs&&e.dom.addEventListener("input",(function(){return null})),hu(e)}(this),this.updatePluginViews()}return Object(d.a)(e,[{key:"composing",get:function(){return this.input.composing}},{key:"props",get:function(){if(this._props.state!=this.state){var e=this._props;for(var t in this._props={},e)this._props[t]=e[t];this._props.state=this.state}return this._props}},{key:"update",value:function(e){e.handleDOMEvents!=this._props.handleDOMEvents&&hu(this),this._props=e,e.plugins&&(e.plugins.forEach(hc),this.directPlugins=e.plugins),this.updateStateInner(e.state,!0)}},{key:"setProps",value:function(e){var t={};for(var n in this._props)t[n]=this._props[n];for(var r in t.state=this.state,e)t[r]=e[r];this.update(t)}},{key:"updateState",value:function(e){this.updateStateInner(e,this.state.plugins!=e.plugins)}},{key:"updateStateInner",value:function(e,t){var n=this,r=this.state,o=!1,i=!1;if(e.storedMarks&&this.composing&&(Au(this),i=!0),this.state=e,t){var a=pc(this);(function(e,t){var n=0,r=0;for(var o in e){if(e[o]!=t[o])return!0;n++}for(var i in t)r++;return n!=r})(a,this.nodeViews)&&(this.nodeViews=a,o=!0),hu(this)}this.editable=fc(this),dc(this);var s=Xu(this),l=cc(this),u=t?"reset":e.scrollToSelection>r.scrollToSelection?"to selection":"preserve",c=o||!this.docView.matchesNode(e.doc,l,s);!c&&e.selection.eq(r.selection)||(i=!0);var d="preserve"==u&&i&&null==this.dom.style.overflowAnchor&&function(e){for(var t,n,r=e.dom.getBoundingClientRect(),o=Math.max(0,r.top),i=(r.left+r.right)/2,a=o+1;a<Math.min(innerHeight,r.bottom);a+=5){var s=e.root.elementFromPoint(i,a);if(s&&s!=e.dom&&e.dom.contains(s)){var l=s.getBoundingClientRect();if(l.top>=o-20){t=s,n=l.top;break}}}return{refDOM:t,refTop:n,stack:Is(e.dom)}}(this);if(i){this.domObserver.stop();var f=c&&(ps||gs)&&!this.composing&&!r.selection.empty&&!e.selection.empty&&function(e,t){var n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}(r.selection,e.selection);if(c){var h=gs?this.trackWrites=this.domSelection().focusNode:null;!o&&this.docView.update(e.doc,l,s,this)||(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=cl(e.doc,l,s,this.dom,this)),h&&!this.trackWrites&&(f=!0)}f||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelection())&&function(e){var t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelection();return Es(t.node,t.offset,n.anchorNode,n.anchorOffset)}(this))?Al(this,f):(Rl(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}if(this.updatePluginViews(r),"reset"==u)this.dom.scrollTop=0;else if("to selection"==u){var m=this.domSelection().focusNode;if(this.someProp("handleScrollToSelection",(function(e){return e(n)})));else if(e.selection instanceof p.NodeSelection){var v=this.docView.domAfterPos(e.selection.from);1==v.nodeType&&Bs(this,v.getBoundingClientRect(),m)}else Bs(this,this.coordsAtPos(e.selection.head,1),m)}else d&&function(e){var t=e.refDOM,n=e.refTop,r=e.stack,o=t?t.getBoundingClientRect().top:0;_s(r,0==o?0:o-n)}(d)}},{key:"destroyPluginViews",value:function(){for(var e;e=this.pluginViews.pop();)e.destroy&&e.destroy()}},{key:"updatePluginViews",value:function(e){if(e&&e.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(var t=0;t<this.pluginViews.length;t++){var n=this.pluginViews[t];n.update&&n.update(this,e)}else{this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(var r=0;r<this.directPlugins.length;r++){var o=this.directPlugins[r];o.spec.view&&this.pluginViews.push(o.spec.view(this))}for(var i=0;i<this.state.plugins.length;i++){var a=this.state.plugins[i];a.spec.view&&this.pluginViews.push(a.spec.view(this))}}}},{key:"someProp",value:function(e,t){var n,r=this._props&&this._props[e];if(null!=r&&(n=t?t(r):r))return n;for(var o=0;o<this.directPlugins.length;o++){var i=this.directPlugins[o].props[e];if(null!=i&&(n=t?t(i):i))return n}var a=this.state.plugins;if(a)for(var s=0;s<a.length;s++){var l=a[s].props[e];if(null!=l&&(n=t?t(l):l))return n}}},{key:"hasFocus",value:function(){return this.root.activeElement==this.dom}},{key:"focus",value:function(){this.domObserver.stop(),this.editable&&function(e){if(e.setActive)return e.setActive();if($s)return e.focus($s);var t=Is(e);e.focus(null==$s?{get preventScroll(){return $s={preventScroll:!0},!0}}:void 0),$s||($s=!1,_s(t,0))}(this.dom),Al(this),this.domObserver.start()}},{key:"root",get:function(){var e=this,t=this._root;if(null==t)for(var n=function(t){if(9==t.nodeType||11==t.nodeType&&t.host)return t.getSelection||(Object.getPrototypeOf(t).getSelection=function(){return t.ownerDocument.getSelection()}),{v:e._root=t}},r=this.dom.parentNode;r;r=r.parentNode){var o=n(r);if("object"===typeof o)return o.v}return t||document}},{key:"posAtCoords",value:function(e){return Ks(this,e)}},{key:"coordsAtPos",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Ys(this,e,t)}},{key:"domAtPos",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.docView.domFromPos(e,t)}},{key:"nodeDOM",value:function(e){var t=this.docView.descAt(e);return t?t.nodeDOM:null}},{key:"posAtDOM",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,r=this.docView.posFromDOM(e,t,n);if(null==r)throw new RangeError("DOM position not inside the editor");return r}},{key:"endOfTextblock",value:function(e,t){return ol(this,t||this.state,e)}},{key:"destroy",value:function(){this.docView&&(!function(e){for(var t in e.domObserver.stop(),e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Xu(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)}},{key:"isDestroyed",get:function(){return null==this.docView}},{key:"dispatchEvent",value:function(e){return function(e,t){mu(e,t)||!cu[t.type]||!e.editable&&t.type in du||cu[t.type](e,t)}(this,e)}},{key:"dispatch",value:function(e){var t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))}},{key:"domSelection",value:function(){return this.root.getSelection()}}]),e}();function cc(e){var t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),t.translate="no",e.someProp("attributes",(function(n){if("function"==typeof n&&(n=n(e.state)),n)for(var r in n)"class"==r&&(t.class+=" "+n[r]),"style"==r?t.style=(t.style?t.style+";":"")+n[r]:t[r]||"contenteditable"==r||"nodeName"==r||(t[r]=String(n[r]))})),[zu.node(0,e.state.doc.content.size,t)]}function dc(e){if(e.markCursor){var t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:zu.widget(e.state.selection.head,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function fc(e){return!e.someProp("editable",(function(t){return!1===t(e.state)}))}function pc(e){var t=Object.create(null);function n(e){for(var n in e)Object.prototype.hasOwnProperty.call(t,n)||(t[n]=e[n])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function hc(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var mc=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e){return Object(c.a)(this,n),t.call(this,e,e)}return Object(d.a)(n,[{key:"map",value:function(e,t){var r=e.resolve(t.map(this.head));return n.valid(r)?new n(r):p.Selection.near(r)}},{key:"content",value:function(){return v.Slice.empty}},{key:"eq",value:function(e){return e instanceof n&&e.head==this.head}},{key:"toJSON",value:function(){return{type:"gapcursor",pos:this.head}}},{key:"getBookmark",value:function(){return new vc(this.anchor)}}],[{key:"fromJSON",value:function(e,t){if("number"!=typeof t.pos)throw new RangeError("Invalid input for GapCursor.fromJSON");return new n(e.resolve(t.pos))}},{key:"valid",value:function(e){var t=e.parent;if(t.isTextblock||!function(e){for(var t=e.depth;t>=0;t--){var n=e.index(t),r=e.node(t);if(0!=n)for(var o=r.child(n-1);;o=o.lastChild){if(0==o.childCount&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}else if(r.type.spec.isolating)return!0}return!0}(e)||!function(e){for(var t=e.depth;t>=0;t--){var n=e.indexAfter(t),r=e.node(t);if(n!=r.childCount)for(var o=r.child(n);;o=o.firstChild){if(0==o.childCount&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}else if(r.type.spec.isolating)return!0}return!0}(e))return!1;var n=t.type.spec.allowGapCursor;if(null!=n)return n;var r=t.contentMatchAt(e.index()).defaultType;return r&&r.isTextblock}},{key:"findGapCursorFrom",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];e:for(;;){if(!r&&n.valid(e))return e;for(var o=e.pos,i=null,a=e.depth;;a--){var s=e.node(a);if(t>0?e.indexAfter(a)<s.childCount:e.index(a)>0){i=s.child(t>0?e.indexAfter(a):e.index(a)-1);break}if(0==a)return null;o+=t;var l=e.doc.resolve(o);if(n.valid(l))return l}for(;;){var u=t>0?i.firstChild:i.lastChild;if(!u){if(i.isAtom&&!i.isText&&!p.NodeSelection.isSelectable(i)){e=e.doc.resolve(o+i.nodeSize*t),r=!1;continue e}break}i=u,o+=t;var c=e.doc.resolve(o);if(n.valid(c))return c}return null}}}]),n}(p.Selection);mc.prototype.visible=!1,mc.findFrom=mc.findGapCursorFrom,p.Selection.jsonID("gapcursor",mc);var vc=function(){function e(t){Object(c.a)(this,e),this.pos=t}return Object(d.a)(e,[{key:"map",value:function(t){return new e(t.map(this.pos))}},{key:"resolve",value:function(e){var t=e.resolve(this.pos);return mc.valid(t)?new mc(t):p.Selection.near(t)}}]),e}();var gc=Bn({ArrowLeft:yc("horiz",-1),ArrowRight:yc("horiz",1),ArrowUp:yc("vert",-1),ArrowDown:yc("vert",1)});function yc(e,t){var n="vert"==e?t>0?"down":"up":t>0?"right":"left";return function(e,r,o){var i=e.selection,a=t>0?i.$to:i.$from,s=i.empty;if(i instanceof p.TextSelection){if(!o.endOfTextblock(n)||0==a.depth)return!1;s=!1,a=e.doc.resolve(t>0?a.after():a.before())}var l=mc.findGapCursorFrom(a,t,s);return!!l&&(r&&r(e.tr.setSelection(new mc(l))),!0)}}function bc(e,t,n){if(!e||!e.editable)return!1;var r=e.state.doc.resolve(t);if(!mc.valid(r))return!1;var o=e.posAtCoords({left:n.clientX,top:n.clientY});return!(o&&o.inside>-1&&p.NodeSelection.isSelectable(e.state.doc.nodeAt(o.inside)))&&(e.dispatch(e.state.tr.setSelection(new mc(r))),!0)}function wc(e,t){if("insertCompositionText"!=t.inputType||!(e.state.selection instanceof mc))return!1;var n=e.state.selection.$from,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;for(var o=v.Fragment.empty,i=r.length-1;i>=0;i--)o=v.Fragment.from(r[i].createAndFill(null,o));var a=e.state.tr.replace(n.pos,n.pos,new v.Slice(o,0,0));return a.setSelection(p.TextSelection.near(a.doc.resolve(n.pos+1))),e.dispatch(a),!1}function kc(e){if(!(e.selection instanceof mc))return null;var t=document.createElement("div");return t.className="ProseMirror-gapcursor",_u.create(e.doc,[zu.widget(e.selection.head,t,{key:"gapcursor"})])}var xc=_r.create({name:"gapCursor",addProseMirrorPlugins:function(){return[new p.Plugin({props:{decorations:kc,createSelectionBetween:function(e,t,n){return t.pos==n.pos&&mc.valid(n)?new mc(n):null},handleClick:bc,handleKeyDown:gc,handleDOMEvents:{beforeinput:wc}}})]},extendNodeSchema:function(e){var t;return{allowGapCursor:null!==(t=Dr(wr(e,"allowGapCursor",{name:e.name,options:e.options,storage:e.storage})))&&void 0!==t?t:null}}}),Oc=Bo.create({name:"hardBreak",addOptions:function(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,parseHTML:function(){return[{tag:"br"}]},renderHTML:function(e){var t=e.HTMLAttributes;return["br",Sr(this.options.HTMLAttributes,t)]},renderText:function(){return"\n"},addCommands:function(){var e=this;return{setHardBreak:function(){return function(t){var n=t.commands,r=t.chain,o=t.state,i=t.editor;return n.first([function(){return n.exitCode()},function(){return n.command((function(){var t=o.selection,n=o.storedMarks;if(t.$from.parent.type.spec.isolating)return!1;var a=e.options.keepMarks,s=i.extensionManager.splittableMarks,l=n||t.$to.parentOffset&&t.$from.marks();return r().insertContent({type:e.name}).command((function(e){var t=e.tr;if(e.dispatch&&l&&a){var n=l.filter((function(e){return s.includes(e.type.name)}));t.ensureMarks(n)}return!0})).run()}))}])}}}},addKeyboardShortcuts:function(){var e=this;return{"Mod-Enter":function(){return e.editor.commands.setHardBreak()},"Shift-Enter":function(){return e.editor.commands.setHardBreak()}}}}),Sc=Bo.create({name:"heading",addOptions:function(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes:function(){return{level:{default:1,rendered:!1}}},parseHTML:function(){return this.options.levels.map((function(e){return{tag:"h".concat(e),attrs:{level:e}}}))},renderHTML:function(e){var t=e.node,n=e.HTMLAttributes,r=this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0];return["h".concat(r),Sr(this.options.HTMLAttributes,n),0]},addCommands:function(){var e=this;return{setHeading:function(t){return function(n){var r=n.commands;return!!e.options.levels.includes(t.level)&&r.setNode(e.name,t)}},toggleHeading:function(t){return function(n){var r=n.commands;return!!e.options.levels.includes(t.level)&&r.toggleNode(e.name,"paragraph",t)}}}},addKeyboardShortcuts:function(){var e=this;return this.options.levels.reduce((function(t,n){return Object(f.a)(Object(f.a)({},t),Object(u.a)({},"Mod-Alt-".concat(n),(function(){return e.editor.commands.toggleHeading({level:n})})))}),{})},addInputRules:function(){var e=this;return this.options.levels.map((function(t){return Fo({find:new RegExp("^(#{1,".concat(t,"})\\s$")),type:e.type,getAttributes:{level:t}})}))}}),Cc=200,jc=function(){};jc.prototype.append=function(e){return e.length?(e=jc.from(e),!this.length&&e||e.length<Cc&&this.leafAppend(e)||this.length<Cc&&e.leafPrepend(this)||this.appendInner(e)):this},jc.prototype.prepend=function(e){return e.length?jc.from(e).append(this):this},jc.prototype.appendInner=function(e){return new Ac(this,e)},jc.prototype.slice=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.length),e>=t?jc.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},jc.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},jc.prototype.forEach=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},jc.prototype.map=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length);var r=[];return this.forEach((function(t,n){return r.push(e(t,n))}),t,n),r},jc.from=function(e){return e instanceof jc?e:e&&e.length?new Dc(e):jc.empty};var Dc=function(e){function t(t){e.call(this),this.values=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,n){return 0==e&&n==this.length?this:new t(this.values.slice(e,n))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,n,r){for(var o=t;o<n;o++)if(!1===e(this.values[o],r+o))return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){for(var o=t-1;o>=n;o--)if(!1===e(this.values[o],r+o))return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=Cc)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=Cc)return new t(e.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(jc);jc.empty=new Dc([]);var Ac=function(e){function t(t,n){e.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return e<this.left.length?this.left.get(e):this.right.get(e-this.left.length)},t.prototype.forEachInner=function(e,t,n,r){var o=this.left.length;return!(t<o&&!1===this.left.forEachInner(e,t,Math.min(n,o),r))&&(!(n>o&&!1===this.right.forEachInner(e,Math.max(t-o,0),Math.min(this.length,n)-o,r+o))&&void 0)},t.prototype.forEachInvertedInner=function(e,t,n,r){var o=this.left.length;return!(t>o&&!1===this.right.forEachInvertedInner(e,t-o,Math.max(n,o)-o,r+o))&&(!(n<o&&!1===this.left.forEachInvertedInner(e,Math.min(t,o),n,r))&&void 0)},t.prototype.sliceInner=function(e,t){if(0==e&&t==this.length)return this;var n=this.left.length;return t<=n?this.left.slice(e,t):e>=n?this.right.slice(e-n,t-n):this.left.slice(e,n).append(this.right.slice(0,t-n))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e);if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e);if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(jc),Ec=jc,Mc=function(){function e(t,n){Object(c.a)(this,e),this.items=t,this.eventCount=n}return Object(d.a)(e,[{key:"popEvent",value:function(t,n){var r=this;if(0==this.eventCount)return null;for(var o,i,a=this.items.length;;a--){if(this.items.get(a-1).selection){--a;break}}n&&(o=this.remapping(a,this.items.length),i=o.maps.length);var s,l,u=t.tr,c=[],d=[];return this.items.forEach((function(t,n){if(!t.step)return o||(o=r.remapping(a,n+1),i=o.maps.length),i--,void d.push(t);if(o){d.push(new Tc(t.map));var f,p=t.step.map(o.slice(i));p&&u.maybeStep(p).doc&&(f=u.mapping.maps[u.mapping.maps.length-1],c.push(new Tc(f,void 0,void 0,c.length+d.length))),i--,f&&o.appendMap(f,i)}else u.maybeStep(t.step);return t.selection?(s=o?t.selection.map(o.slice(i)):t.selection,l=new e(r.items.slice(0,a).append(d.reverse().concat(c)),r.eventCount-1),!1):void 0}),this.items.length,0),{remaining:l,transform:u,selection:s}}},{key:"addTransform",value:function(t,n,r,o){for(var i=[],a=this.eventCount,s=this.items,l=!o&&s.length?s.get(s.length-1):null,u=0;u<t.steps.length;u++){var c,d=t.steps[u].invert(t.docs[u]),f=new Tc(t.mapping.maps[u],d,n);(c=l&&l.merge(f))&&(f=c,u?i.pop():s=s.slice(0,s.length-1)),i.push(f),n&&(a++,n=void 0),o||(l=f)}var p=a-r.depth;return p>Nc&&(s=function(e,t){var n;return e.forEach((function(e,r){if(e.selection&&0==t--)return n=r,!1})),e.slice(n)}(s,p),a-=p),new e(s.append(i),a)}},{key:"remapping",value:function(e,t){var n=new g.a;return this.items.forEach((function(t,r){var o=null!=t.mirrorOffset&&r-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:void 0;n.appendMap(t.map,o)}),e,t),n}},{key:"addMaps",value:function(t){return 0==this.eventCount?this:new e(this.items.append(t.map((function(e){return new Tc(e)}))),this.eventCount)}},{key:"rebased",value:function(t,n){if(!this.eventCount)return this;var r=[],o=Math.max(0,this.items.length-n),i=t.mapping,a=t.steps.length,s=this.eventCount;this.items.forEach((function(e){e.selection&&s--}),o);var l=n;this.items.forEach((function(e){var n=i.getMirror(--l);if(null!=n){a=Math.min(a,n);var o=i.maps[n];if(e.step){var u=t.steps[n].invert(t.docs[n]),c=e.selection&&e.selection.map(i.slice(l+1,n));c&&s++,r.push(new Tc(o,u,c))}else r.push(new Tc(o))}}),o);for(var u=[],c=n;c<a;c++)u.push(new Tc(i.maps[c]));var d=new e(this.items.slice(0,o).append(u).append(r),s);return d.emptyItemCount()>500&&(d=d.compress(this.items.length-r.length)),d}},{key:"emptyItemCount",value:function(){var e=0;return this.items.forEach((function(t){t.step||e++})),e}},{key:"compress",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.items.length,n=this.remapping(0,t),r=n.maps.length,o=[],i=0;return this.items.forEach((function(e,a){if(a>=t)o.push(e),e.selection&&i++;else if(e.step){var s=e.step.map(n.slice(r)),l=s&&s.getMap();if(r--,l&&n.appendMap(l,r),s){var u=e.selection&&e.selection.map(n.slice(r));u&&i++;var c,d=new Tc(l.invert(),s,u),f=o.length-1;(c=o.length&&o[f].merge(d))?o[f]=c:o.push(d)}}else e.map&&r--}),this.items.length,0),new e(Ec.from(o.reverse()),i)}}]),e}();Mc.empty=new Mc(Ec.empty,0);var Tc=function(){function e(t,n,r,o){Object(c.a)(this,e),this.map=t,this.step=n,this.selection=r,this.mirrorOffset=o}return Object(d.a)(e,[{key:"merge",value:function(t){if(this.step&&t.step&&!t.selection){var n=t.step.merge(this.step);if(n)return new e(n.getMap().invert(),n,this.selection)}}}]),e}(),Lc=Object(d.a)((function e(t,n,r,o){Object(c.a)(this,e),this.done=t,this.undone=n,this.prevRanges=r,this.prevTime=o})),Nc=20;function Pc(e,t,n,r){var o,i=n.getMeta(Ic);if(i)return i.historyState;n.getMeta(_c)&&(e=new Lc(e.done,e.undone,null,0));var a=n.getMeta("appendedTransaction");if(0==n.steps.length)return e;if(a&&a.getMeta(Ic))return a.getMeta(Ic).redo?new Lc(e.done.addTransform(n,void 0,r,Bc(t)),e.undone,Rc(n.mapping.maps[n.steps.length-1]),e.prevTime):new Lc(e.done,e.undone.addTransform(n,void 0,r,Bc(t)),null,e.prevTime);if(!1===n.getMeta("addToHistory")||a&&!1===a.getMeta("addToHistory"))return(o=n.getMeta("rebased"))?new Lc(e.done.rebased(n,o),e.undone.rebased(n,o),Hc(e.prevRanges,n.mapping),e.prevTime):new Lc(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),Hc(e.prevRanges,n.mapping),e.prevTime);var s=0==e.prevTime||!a&&(e.prevTime<(n.time||0)-r.newGroupDelay||!function(e,t){if(!t)return!1;if(!e.docChanged)return!0;var n=!1;return e.mapping.maps[0].forEach((function(e,r){for(var o=0;o<t.length;o+=2)e<=t[o+1]&&r>=t[o]&&(n=!0)})),n}(n,e.prevRanges)),l=a?Hc(e.prevRanges,n.mapping):Rc(n.mapping.maps[n.steps.length-1]);return new Lc(e.done.addTransform(n,s?t.selection.getBookmark():void 0,r,Bc(t)),Mc.empty,l,n.time)}function Rc(e){var t=[];return e.forEach((function(e,n,r,o){return t.push(r,o)})),t}function Hc(e,t){if(!e)return null;for(var n=[],r=0;r<e.length;r+=2){var o=t.map(e[r],1),i=t.map(e[r+1],-1);o<=i&&n.push(o,i)}return n}function Fc(e,t,n,r){var o=Bc(t),i=Ic.get(t).spec.config,a=(r?e.undone:e.done).popEvent(t,o);if(a){var s=a.selection.resolve(a.transform.doc),l=(r?e.done:e.undone).addTransform(a.transform,t.selection.getBookmark(),i,o),u=new Lc(r?l:a.remaining,r?a.remaining:l,null,0);n(a.transform.setSelection(s).setMeta(Ic,{redo:r,historyState:u}).scrollIntoView())}}var Vc=!1,zc=null;function Bc(e){var t=e.plugins;if(zc!=t){Vc=!1,zc=t;for(var n=0;n<t.length;n++)if(t[n].spec.historyPreserveItems){Vc=!0;break}}return Vc}var Ic=new p.PluginKey("history"),_c=new p.PluginKey("closeHistory");function $c(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new p.Plugin({key:Ic,state:{init:function(){return new Lc(Mc.empty,Mc.empty,null,0)},apply:function(t,n,r){return Pc(n,r,t,e)}},config:e,props:{handleDOMEvents:{beforeinput:function(e,t){var n=t.inputType,r="historyUndo"==n?qc:"historyRedo"==n?Wc:null;return!!r&&(t.preventDefault(),r(e.state,e.dispatch))}}}})}var qc=function(e,t){var n=Ic.getState(e);return!(!n||0==n.done.eventCount)&&(t&&Fc(n,e,t,!1),!0)},Wc=function(e,t){var n=Ic.getState(e);return!(!n||0==n.undone.eventCount)&&(t&&Fc(n,e,t,!0),!0)};var Uc=_r.create({name:"history",addOptions:function(){return{depth:100,newGroupDelay:500}},addCommands:function(){return{undo:function(){return function(e){var t=e.state,n=e.dispatch;return qc(t,n)}},redo:function(){return function(e){var t=e.state,n=e.dispatch;return Wc(t,n)}}}},addProseMirrorPlugins:function(){return[$c(this.options)]},addKeyboardShortcuts:function(){var e=this;return{"Mod-z":function(){return e.editor.commands.undo()},"Mod-y":function(){return e.editor.commands.redo()},"Shift-Mod-z":function(){return e.editor.commands.redo()},"Mod-\u044f":function(){return e.editor.commands.undo()},"Shift-Mod-\u044f":function(){return e.editor.commands.redo()}}}}),Kc=Bo.create({name:"horizontalRule",addOptions:function(){return{HTMLAttributes:{}}},group:"block",parseHTML:function(){return[{tag:"hr"}]},renderHTML:function(e){var t=e.HTMLAttributes;return["hr",Sr(this.options.HTMLAttributes,t)]},addCommands:function(){var e=this;return{setHorizontalRule:function(){return function(t){return(0,t.chain)().insertContent({type:e.name}).command((function(e){var t,n=e.tr;if(e.dispatch){var r=n.selection.$to,o=r.end();if(r.nodeAfter)n.setSelection(p.TextSelection.create(n.doc,r.pos));else{var i=null===(t=r.parent.type.contentMatch.defaultType)||void 0===t?void 0:t.create();i&&(n.insert(o,i),n.setSelection(p.TextSelection.create(n.doc,o)))}n.scrollIntoView()}return!0})).run()}}}},addInputRules:function(){return[Ho({find:/^(?:---|\u2014-|___\s|\*\*\*\s)$/,type:this.type})]}}),Gc=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))$/,Jc=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))/g,Yc=/(?:^|\s)((?:_)((?:[^_]+))(?:_))$/,Zc=/(?:^|\s)((?:_)((?:[^_]+))(?:_))/g,Xc=zo.create({name:"italic",addOptions:function(){return{HTMLAttributes:{}}},parseHTML:function(){return[{tag:"em"},{tag:"i",getAttrs:function(e){return"normal"!==e.style.fontStyle&&null}},{style:"font-style=italic"}]},renderHTML:function(e){var t=e.HTMLAttributes;return["em",Sr(this.options.HTMLAttributes,t),0]},addCommands:function(){var e=this;return{setItalic:function(){return function(t){return t.commands.setMark(e.name)}},toggleItalic:function(){return function(t){return t.commands.toggleMark(e.name)}},unsetItalic:function(){return function(t){return t.commands.unsetMark(e.name)}}}},addKeyboardShortcuts:function(){var e=this;return{"Mod-i":function(){return e.editor.commands.toggleItalic()},"Mod-I":function(){return e.editor.commands.toggleItalic()}}},addInputRules:function(){return[Ro({find:Gc,type:this.type}),Ro({find:Yc,type:this.type})]},addPasteRules:function(){return[Io({find:Jc,type:this.type}),Io({find:Zc,type:this.type})]}}),Qc=Bo.create({name:"listItem",addOptions:function(){return{HTMLAttributes:{}}},content:"paragraph block*",defining:!0,parseHTML:function(){return[{tag:"li"}]},renderHTML:function(e){var t=e.HTMLAttributes;return["li",Sr(this.options.HTMLAttributes,t),0]},addKeyboardShortcuts:function(){var e=this;return{Enter:function(){return e.editor.commands.splitListItem(e.name)},Tab:function(){return e.editor.commands.sinkListItem(e.name)},"Shift-Tab":function(){return e.editor.commands.liftListItem(e.name)}}}});function ed(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var td=["start"],nd=/^(\d+)\.\s$/,rd=Bo.create({name:"orderedList",addOptions:function(){return{itemTypeName:"listItem",HTMLAttributes:{}}},group:"block list",content:function(){return"".concat(this.options.itemTypeName,"+")},addAttributes:function(){return{start:{default:1,parseHTML:function(e){return e.hasAttribute("start")?parseInt(e.getAttribute("start")||"",10):1}}}},parseHTML:function(){return[{tag:"ol"}]},renderHTML:function(e){var t=e.HTMLAttributes,n=t.start,r=ed(t,td);return 1===n?["ol",Sr(this.options.HTMLAttributes,r),0]:["ol",Sr(this.options.HTMLAttributes,t),0]},addCommands:function(){var e=this;return{toggleOrderedList:function(){return function(t){return t.commands.toggleList(e.name,e.options.itemTypeName)}}}},addKeyboardShortcuts:function(){var e=this;return{"Mod-Shift-7":function(){return e.editor.commands.toggleOrderedList()}}},addInputRules:function(){return[Vo({find:nd,type:this.type,getAttributes:function(e){return{start:+e[1]}},joinPredicate:function(e,t){return t.childCount+t.attrs.start===+e[1]}})]}}),od=Bo.create({name:"paragraph",priority:1e3,addOptions:function(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML:function(){return[{tag:"p"}]},renderHTML:function(e){var t=e.HTMLAttributes;return["p",Sr(this.options.HTMLAttributes,t),0]},addCommands:function(){var e=this;return{setParagraph:function(){return function(t){return t.commands.setNode(e.name)}}}},addKeyboardShortcuts:function(){var e=this;return{"Mod-Alt-0":function(){return e.editor.commands.setParagraph()}}}}),id=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))$/,ad=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))/g,sd=zo.create({name:"strike",addOptions:function(){return{HTMLAttributes:{}}},parseHTML:function(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:function(e){return!!e.includes("line-through")&&{}}}]},renderHTML:function(e){var t=e.HTMLAttributes;return["s",Sr(this.options.HTMLAttributes,t),0]},addCommands:function(){var e=this;return{setStrike:function(){return function(t){return t.commands.setMark(e.name)}},toggleStrike:function(){return function(t){return t.commands.toggleMark(e.name)}},unsetStrike:function(){return function(t){return t.commands.unsetMark(e.name)}}}},addKeyboardShortcuts:function(){var e=this;return{"Mod-Shift-x":function(){return e.editor.commands.toggleStrike()}}},addInputRules:function(){return[Ro({find:id,type:this.type})]},addPasteRules:function(){return[Io({find:ad,type:this.type})]}}),ld=Bo.create({name:"text",group:"inline"}),ud=_r.create({name:"starterKit",addExtensions:function(){var e,t,n,r,o,i,a,s,l,u,c,d,f,p,h,m,v,g,y=[];return!1!==this.options.blockquote&&y.push(_a.configure(null===(e=this.options)||void 0===e?void 0:e.blockquote)),!1!==this.options.bold&&y.push(Ka.configure(null===(t=this.options)||void 0===t?void 0:t.bold)),!1!==this.options.bulletList&&y.push(Ja.configure(null===(n=this.options)||void 0===n?void 0:n.bulletList)),!1!==this.options.code&&y.push(Xa.configure(null===(r=this.options)||void 0===r?void 0:r.code)),!1!==this.options.codeBlock&&y.push(ts.configure(null===(o=this.options)||void 0===o?void 0:o.codeBlock)),!1!==this.options.document&&y.push(ns.configure(null===(i=this.options)||void 0===i?void 0:i.document)),!1!==this.options.dropcursor&&y.push(as.configure(null===(a=this.options)||void 0===a?void 0:a.dropcursor)),!1!==this.options.gapcursor&&y.push(xc.configure(null===(s=this.options)||void 0===s?void 0:s.gapcursor)),!1!==this.options.hardBreak&&y.push(Oc.configure(null===(l=this.options)||void 0===l?void 0:l.hardBreak)),!1!==this.options.heading&&y.push(Sc.configure(null===(u=this.options)||void 0===u?void 0:u.heading)),!1!==this.options.history&&y.push(Uc.configure(null===(c=this.options)||void 0===c?void 0:c.history)),!1!==this.options.horizontalRule&&y.push(Kc.configure(null===(d=this.options)||void 0===d?void 0:d.horizontalRule)),!1!==this.options.italic&&y.push(Xc.configure(null===(f=this.options)||void 0===f?void 0:f.italic)),!1!==this.options.listItem&&y.push(Qc.configure(null===(p=this.options)||void 0===p?void 0:p.listItem)),!1!==this.options.orderedList&&y.push(rd.configure(null===(h=this.options)||void 0===h?void 0:h.orderedList)),!1!==this.options.paragraph&&y.push(od.configure(null===(m=this.options)||void 0===m?void 0:m.paragraph)),!1!==this.options.strike&&y.push(sd.configure(null===(v=this.options)||void 0===v?void 0:v.strike)),!1!==this.options.text&&y.push(ld.configure(null===(g=this.options)||void 0===g?void 0:g.text)),y}}),cd=_r.create({name:"textAlign",addOptions:function(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:"left"}},addGlobalAttributes:function(){var e=this;return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:function(t){return t.style.textAlign||e.options.defaultAlignment},renderHTML:function(t){return t.textAlign===e.options.defaultAlignment?{}:{style:"text-align: ".concat(t.textAlign)}}}}}]},addCommands:function(){var e=this;return{setTextAlign:function(t){return function(n){var r=n.commands;return!!e.options.alignments.includes(t)&&e.options.types.every((function(e){return r.updateAttributes(e,{textAlign:t})}))}},unsetTextAlign:function(){return function(t){var n=t.commands;return e.options.types.every((function(e){return n.resetAttributes(e,"textAlign")}))}}}},addKeyboardShortcuts:function(){var e=this;return{"Mod-Shift-l":function(){return e.editor.commands.setTextAlign("left")},"Mod-Shift-e":function(){return e.editor.commands.setTextAlign("center")},"Mod-Shift-r":function(){return e.editor.commands.setTextAlign("right")},"Mod-Shift-j":function(){return e.editor.commands.setTextAlign("justify")}}}}),dd=zo.create({name:"subscript",addOptions:function(){return{HTMLAttributes:{}}},parseHTML:function(){return[{tag:"sub"},{style:"vertical-align",getAttrs:function(e){return"sub"===e&&null}}]},renderHTML:function(e){var t=e.HTMLAttributes;return["sub",Sr(this.options.HTMLAttributes,t),0]},addCommands:function(){var e=this;return{setSubscript:function(){return function(t){return t.commands.setMark(e.name)}},toggleSubscript:function(){return function(t){return t.commands.toggleMark(e.name)}},unsetSubscript:function(){return function(t){return t.commands.unsetMark(e.name)}}}},addKeyboardShortcuts:function(){var e=this;return{"Mod-,":function(){return e.editor.commands.toggleSubscript()}}}}),fd=zo.create({name:"superscript",addOptions:function(){return{HTMLAttributes:{}}},parseHTML:function(){return[{tag:"sup"},{style:"vertical-align",getAttrs:function(e){return"super"===e&&null}}]},renderHTML:function(e){var t=e.HTMLAttributes;return["sup",Sr(this.options.HTMLAttributes,t),0]},addCommands:function(){var e=this;return{setSuperscript:function(){return function(t){return t.commands.setMark(e.name)}},toggleSuperscript:function(){return function(t){return t.commands.toggleMark(e.name)}},unsetSuperscript:function(){return function(t){return t.commands.unsetMark(e.name)}}}},addKeyboardShortcuts:function(){var e=this;return{"Mod-.":function(){return e.editor.commands.toggleSuperscript()}}}}),pd=zo.create({name:"textStyle",addOptions:function(){return{HTMLAttributes:{}}},parseHTML:function(){return[{tag:"span",getAttrs:function(e){return!!e.hasAttribute("style")&&{}}}]},renderHTML:function(e){var t=e.HTMLAttributes;return["span",Sr(this.options.HTMLAttributes,t),0]},addCommands:function(){var e=this;return{removeEmptyTextStyle:function(){return function(t){var n=t.state,r=t.commands,o=uo(n,e.type);return!!Object.entries(o).some((function(e){return!!Object(i.a)(e,2)[1]}))||r.unsetMark(e.name)}}}}}),hd=_r.create({name:"fontSize",defaultOptions:{types:["textStyle"],defaultFontSize:16},addGlobalAttributes:function(){return[{types:this.options.types,attributes:{fontSize:{default:"".concat(this.options.defaultFontSize,"px"),parseHTML:function(e){return e.style.fontSize},renderHTML:function(e){return e.fontSize?{style:"font-size: ".concat(e.fontSize)}:{}}}}}]},addCommands:function(){return{setFontSize:function(e){return function(t){return(0,t.chain)().setMark("textStyle",{fontSize:e}).run()}},unsetFontSize:function(){return function(e){return(0,e.chain)().setMark("textStyle",{fontSize:null}).removeEmptyTextStyle().run()}}}}}),md=_r.create({name:"textDirection",defaultOptions:{types:["paragraph","heading"],defaultDirection:"ltr"},addGlobalAttributes:function(){return[{types:this.options.types,attributes:{textDirection:{default:this.options.defaultDirection,parseHTML:function(e){return e.dir},renderHTML:function(e){return e.textDirection?{dir:e.textDirection}:{}}}}}]},addCommands:function(){var e=this;return{setTextDirection:function(t){return function(n){var r=n.commands;return e.options.types.every((function(e){return r.updateAttributes(e,{textDirection:t})}))}}}}}),vd=_r.create({name:"fontFamily",addOptions:function(){return{types:["textStyle"]}},addGlobalAttributes:function(){return[{types:this.options.types,attributes:{fontFamily:{default:null,parseHTML:function(e){var t;return null===(t=e.style.fontFamily)||void 0===t?void 0:t.replace(/['"]+/g,"")},renderHTML:function(e){return e.fontFamily?{style:"font-family: ".concat(e.fontFamily)}:{}}}}}]},addCommands:function(){return{setFontFamily:function(e){return function(t){return(0,t.chain)().setMark("textStyle",{fontFamily:e}).run()}},unsetFontFamily:function(){return function(e){return(0,e.chain)().setMark("textStyle",{fontFamily:null}).removeEmptyTextStyle().run()}}}}}),gd=Ja.extend({addAttributes:function(){return{listType:{default:null,parseHTML:function(e){return e.style.listStyleType},renderHTML:function(e){return e.listType?{style:"list-style-type: ".concat(e.listType)}:{}}}}}}),yd=rd.extend({addAttributes:function(){return{listType:{default:null,parseHTML:function(e){return e.style.listStyleType},renderHTML:function(e){return e.listType?{style:"list-style-type: ".concat(e.listType)}:{}}}}}}),bd=_r.create({name:"color",addOptions:function(){return{types:["textStyle"]}},addGlobalAttributes:function(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:function(e){var t;return null===(t=e.style.color)||void 0===t?void 0:t.replace(/['"]+/g,"")},renderHTML:function(e){return e.color?{style:"color: ".concat(e.color)}:{}}}}}]},addCommands:function(){return{setColor:function(e){return function(t){return(0,t.chain)().setMark("textStyle",{color:e}).run()}},unsetColor:function(){return function(e){return(0,e.chain)().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()}}}}}),wd=Bo.create({name:"tableRow",addOptions:function(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML:function(){return[{tag:"tr"}]},renderHTML:function(e){var t=e.HTMLAttributes;return["tr",Sr(this.options.HTMLAttributes,t),0]}});function kd(e,t,n){return{default:null,parseHTML:function(t){var r;return n?null===(r=t.style[e])||void 0===r?void 0:r.toString().replace(n,""):t.style[e]},renderHTML:function(r){return r[e]?{style:"".concat(t,": ").concat(r[e]).concat(n||"")}:{}}}}var xd=Bo.create({name:"tableCell",addOptions:function(){return{HTMLAttributes:{}}},content:"block+",addAttributes:function(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:function(e){var t=e.getAttribute("colwidth");return t?[parseInt(t,10)]:null}}}},tableRole:"cell",isolating:!0,parseHTML:function(){return[{tag:"td"}]},renderHTML:function(e){var t=e.HTMLAttributes;return["td",Sr(this.options.HTMLAttributes,t),0]}}).extend({addAttributes:function(){var e;return Object.assign(Object.assign({},null===(e=this.parent)||void 0===e?void 0:e.call(this)),{backgroundColor:kd("backgroundColor","background-color"),color:kd("color","color"),borderWidth:kd("borderWidth","border-width","px"),borderStyle:kd("borderStyle","border-style"),borderColor:kd("borderColor","border-color")})}}),Od=Bo.create({name:"tableHeader",addOptions:function(){return{HTMLAttributes:{}}},content:"block+",addAttributes:function(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:function(e){var t=e.getAttribute("colwidth");return t?[parseInt(t,10)]:null}}}},tableRole:"header_cell",isolating:!0,parseHTML:function(){return[{tag:"th"}]},renderHTML:function(e){var t=e.HTMLAttributes;return["th",Sr(this.options.HTMLAttributes,t),0]}}),Sd=n(14),Cd=n(0),jd=n(1),Dd=n.n(jd),Ad=n(30),Ed=n(44);n(58);function Md(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Td=function(e,t){return"function"===typeof t?t(e):function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Md(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Md(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e,{},t)},Ld=Object(Ed.a)((function(e){return Object(Ed.a)((function(t){return Td(e,t)}))})),Nd=function(e){return Object(jd.createElement)(Ad.a.Consumer,null,(function(t){return e.theme!==t&&(t=Ld(t)(e.theme)),Object(jd.createElement)(Ad.a.Provider,{value:t},e.children)}))};var Pd=n(45),Rd=n.n(Pd)()((function(e,t){return{theme:void 0,isMobile:!1,isKeyboardOpen:!0,openedPopups:{},setIsKeyboardOpen:function(t){return e((function(e){e.isKeyboardOpen=t}))},setIsMobile:function(t){return e((function(e){e.isMobile=t}))},setTheme:function(t){return e((function(e){e.theme=t}))},toolbarLocation:"top",setToolbarLocation:function(t){return e((function(e){e.toolbarLocation=t}))},closePopup:function(t){return e((function(e){e.openedPopups=Object.assign(Object.assign({},e.openedPopups),Object(u.a)({},t,!1))}))},isPopupOpen:function(e){return!!t().openedPopups[e]},openPopup:function(t){return e((function(e){e.openedPopups=Object.assign(Object.assign({},e.openedPopups),Object(u.a)({},t.id,t))}))},closePopupGroup:function(t,n){return e((function(e){for(var r in e.openedPopups){var o=e.openedPopups[r];o&&o.group===t&&!n.includes(o.id)&&(e.openedPopups[r]=!1)}}))}}}));function Hd(){return Rd((function(e){return e.toolbarLocation}))}function Fd(){return Rd((function(e){return e.isMobile}))}var Vd=Object.defineProperty((function(){return Rd((function(e){return e.theme}))}),"current",{get:function(){return Rd.getState().theme}}),zd=Object.defineProperty((function(){return Rd((function(e){return e.isKeyboardOpen}))}),"current",{get:function(){return Rd.getState().isKeyboardOpen}});function Bd(e){var t=Vd();return Object(Cd.jsx)(Nd,Object.assign({theme:t||{}},{children:e.children}))}var Id=function(){function e(t,n,r,o){var i=this;Object(c.a)(this,e),this.editor=n,this.getPos=r,this.options=o,this.isDragging=!1,this.handleRef=function(e){return i._handleRef(e)},this.portalProviderAPI=n.storage.portalProviderAPI,this.node=t}return Object(d.a)(e,[{key:"init",value:function(){var e=this;this.domRef=this.createDomRef(),this.domRef.ondragstart=function(t){return e.onDragStart(t)};var t=this.getContentDOM()||{dom:void 0,contentDOM:void 0},n=t.dom,r=t.contentDOM;return this.domRef&&n&&(this.domRef.appendChild(n),this.contentDOM=r||n,this.contentDOMWrapper=n||r),this.domRef.classList.add("".concat(this.node.type.name,"-view-content-wrap")),this.renderReactComponent((function(){return e.render(e.options.props,e.handleRef)})),this}},{key:"renderReactComponent",value:function(e){this.domRef&&e&&this.portalProviderAPI?this.portalProviderAPI.render(e,this.domRef):console.warn("Cannot render node view",this.editor.storage)}},{key:"createDomRef",value:function(){return this.options.wrapperFactory?this.options.wrapperFactory():this.node.isInline?document.createElement("span"):document.createElement("div")}},{key:"getContentDOM",value:function(){var e,t;if(this.options.contentDOMFactory){if(!0===this.options.contentDOMFactory){var n=document.createElement("div");return n.classList.add("".concat(this.node.type.name.toLowerCase(),"-content-wrapper")),n.style.whiteSpace="inherit",n.style.minWidth="20px",{dom:n}}return null===(t=(e=this.options).contentDOMFactory)||void 0===t?void 0:t.call(e)}}},{key:"_handleRef",value:function(e){var t=this.contentDOMWrapper||this.contentDOM;e&&t&&!e.contains(t)&&e.appendChild(t)}},{key:"render",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return this.options.component?Object(Cd.jsx)(Bd,{children:Object(Cd.jsx)(this.options.component,Object.assign({},t,{editor:this.editor,getPos:this.getPos,node:this.node,forwardRef:n,updateAttributes:function(t,n){return e.updateAttributes(t,e.getPos(),null===n||void 0===n?void 0:n.addToHistory,null===n||void 0===n?void 0:n.preventUpdate)}}))}):null}},{key:"updateAttributes",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];this.editor.commands.command((function(i){var a=i.tr;return a.setNodeMarkup(t,void 0,Object.assign(Object.assign({},n.node.attrs),e)),a.setMeta("addToHistory",r),a.setMeta("preventUpdate",o),!0}))}},{key:"update",value:function(e,t,n){var r=this;return this.node.type===e.type&&(this.viewShouldUpdate(e)?(this.node=e,this.renderReactComponent((function(){return r.render(r.options.props,r.handleRef)})),!0):(this.node=e,!0))}},{key:"onDragStart",value:function(e){var t,n,r,o,i,a,s,l=this.editor.view,u=e.target,c=3===u.nodeType?null===(t=u.parentElement)||void 0===t?void 0:t.closest("[data-drag-handle]"):u.closest("[data-drag-handle]");if(this.dom&&!(null===(n=this.contentDOM)||void 0===n?void 0:n.contains(u))&&c){var d=this.dom.querySelector("[data-drag-image]")||this.dom,f=0,h=0;if(d!==c){var m=d.getBoundingClientRect(),v=c.getBoundingClientRect(),g=null!==(r=e.offsetX)&&void 0!==r?r:null===(o=e.nativeEvent)||void 0===o?void 0:o.offsetX,y=null!==(i=e.offsetY)&&void 0!==i?i:null===(a=e.nativeEvent)||void 0===a?void 0:a.offsetY;f=v.x-m.x+g,h=v.y-m.y+y}var b=p.NodeSelection.create(l.state.doc,this.getPos()),w=l.state.tr.setSelection(b);l.dispatch(w),null===(s=e.dataTransfer)||void 0===s||s.setDragImage(d,f,h),function(e,t){if(!e.dataTransfer)return;var n=t.view,r=n.state.selection.content(),o=lc(n,r),i=o.dom,a=o.text;e.dataTransfer.clearData(),e.dataTransfer.setData("Text",a),e.dataTransfer.setData("text/plain",a),e.dataTransfer.setData("text/html",i.innerHTML),e.dataTransfer.effectAllowed="copyMove",n.dragging={slice:r,move:!0}}(e,this.editor)}}},{key:"stopEvent",value:function(e){var t,n=this;if(!this.dom)return!1;var r=e.target;if(!(this.dom.contains(r)&&!(null===(t=this.contentDOM)||void 0===t?void 0:t.contains(r))))return!1;var o="drop"===e.type;if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(r.tagName)||r.isContentEditable)&&!o)return!0;var i=this.editor.isEditable,a=this.isDragging,s=!!this.node.type.spec.draggable,l=p.NodeSelection.isSelectable(this.node),u="copy"===e.type,c="paste"===e.type,d="cut"===e.type,f="mousedown"===e.type,h=e.type.startsWith("drag");if(!s&&l&&h&&e.preventDefault(),s&&h&&!a)return e.preventDefault(),!1;if(s&&i&&!a&&f){var m=r.closest("[data-drag-handle]");m&&(this.dom===m||this.dom.contains(m))&&(this.isDragging=!0,document.addEventListener("dragend",(function(){n.isDragging=!1}),{once:!0}),document.addEventListener("mouseup",(function(){n.isDragging=!1}),{once:!0}))}return!(a||o||u||c||d||f&&l)}},{key:"ignoreMutation",value:function(e){if(!this.dom||!this.contentDOM)return!0;if(this.node.isLeaf||this.node.isAtom)return!0;if("selection"===e.type)return!1;if(this.dom.contains(e.target)&&"childList"===e.type&&this.editor.isFocused&&[].concat(Object(o.a)(Array.from(e.addedNodes)),Object(o.a)(Array.from(e.removedNodes))).every((function(e){return e.isContentEditable})))return!1;return this.contentDOM===e.target&&"attributes"===e.type||!this.contentDOM.contains(e.target)}},{key:"viewShouldUpdate",value:function(e){return!this.options.shouldUpdate||this.options.shouldUpdate(this.node,e)}},{key:"setDomAttrs",value:function(e,t){Object.keys(e.attrs||{}).forEach((function(n){t.setAttribute(n,e.attrs[n])}))}},{key:"dom",get:function(){return this.domRef}},{key:"destroy",value:function(){this.domRef&&this.portalProviderAPI&&(this.portalProviderAPI.remove(this.domRef),this.domRef=void 0,this.contentDOM=void 0)}}]),e}();function _d(e,t){return function(n){var r=n.node,o=n.getPos,i=n.editor;return new Id(r,i,(function(){return"boolean"===typeof o?-1:o()}),Object.assign(Object.assign({},t),{component:e})).init()}}var $d=n(23),qd=n.n($d),Wd=function(){function e(){Object(c.a)(this,e),this.listeners={}}return Object(d.a)(e,[{key:"on",value:function(e,t){this.listeners[e]||(this.listeners[e]=new Set),this.listeners[e].add(t)}},{key:"off",value:function(e,t){this.listeners[e]&&this.listeners[e].has(t)&&this.listeners[e].delete(t)}},{key:"emit",value:function(e,t){this.listeners[e]&&this.listeners[e].forEach((function(e){return e(t)}))}},{key:"destroy",value:function(){this.listeners={}}}]),e}();var Ud=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(){var e;return Object(c.a)(this,n),(e=t.call(this)).portals=new Map,e.setContext=function(t){e.context=t},e}return Object(d.a)(n,[{key:"render",value:function(e,t){this.portals.set(t,{children:e});var n=e();Object($d.unstable_renderSubtreeIntoContainer)(this.context,n,t)}},{key:"forceUpdate",value:function(){}},{key:"remove",value:function(e){this.portals.delete(e);try{Object($d.unmountComponentAtNode)(e)}catch(t){}}}]),n}(Wd),Kd=Dd.a.createContext(void 0);function Gd(){return Object(jd.useContext)(Kd)}var Jd=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e){var r;return Object(c.a)(this,n),(r=t.call(this,e)).portalProviderAPI=new Ud,r}return Object(d.a)(n,[{key:"render",value:function(){return Object(Cd.jsxs)(Kd.Provider,Object.assign({value:this.portalProviderAPI},{children:[this.props.children,Object(Cd.jsx)(Yd,{portalProviderAPI:this.portalProviderAPI})]}))}},{key:"componentDidUpdate",value:function(){this.portalProviderAPI.forceUpdate()}}]),n}(Dd.a.Component);Jd.displayName="PortalProvider";var Yd=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e){var r;return Object(c.a)(this,n),(r=t.call(this,e)).handleUpdate=function(e){return r.setState({portals:e})},e.portalProviderAPI.setContext(Object(a.a)(r)),e.portalProviderAPI.on("update",r.handleUpdate),r.state={portals:new Map},r}return Object(d.a)(n,[{key:"render",value:function(){var e=this.state.portals;return Object(Cd.jsx)(Cd.Fragment,{children:Array.from(e.entries()).map((function(e){var t=Object(i.a)(e,2),n=t[0],r=t[1];return Object($d.createPortal)(r,n)}))})}}]),n}(Dd.a.Component),Zd=function(){function e(){Object(c.a)(this,e),this.changeHandlers=[],this.changeHandlers=[]}return Object(d.a)(e,[{key:"subscribe",value:function(e){this.changeHandlers.push(e)}},{key:"unsubscribe",value:function(e){this.changeHandlers=this.changeHandlers.filter((function(t){return t!==e}))}},{key:"notifyNewSelection",value:function(e,t){this.changeHandlers.forEach((function(n){return n(e,t)}))}}]),e}(),Xd=new p.PluginKey("reactNodeView"),Qd=new p.Plugin({state:{init:function(){return new Zd},apply:function(e,t){return t}},key:Xd,view:function(e){var t=Xd.getState(e.state);return{update:function(e){var n=e.state.selection,r=n.from,o=n.to;t.notifyNewSelection(r,o)}}}}),ef=_r.create({name:"node-view-selection-notifier",addProseMirrorPlugins:function(){return[Qd]}}),tf=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e,r,o,i){var a;return Object(c.a)(this,n),(a=t.call(this,e,r,o,i)).pos=-1,a.isNodeInsideSelection=function(e,t,n,r){var o=a.getPositionsWithDefault(n,r);return n=o.pos,r=o.posEnd,"number"===typeof n&&"number"===typeof r&&(e<=n&&t>=r)},a.isSelectionInsideNode=function(e,t,n,r){var o=a.getPositionsWithDefault(n,r);return n=o.pos,r=o.posEnd,"number"===typeof n&&"number"===typeof r&&(n<e&&t<r)},a.isSelectedNode=function(e){if(e instanceof p.NodeSelection){var t=a.editor.view.state.selection,n=t.from,r=t.to;return e.node===a.node||a.pos===n&&a.posEnd===r&&e.node.eq(a.node)}return!1},a.insideSelection=function(){var e=a.editor.view.state.selection,t=e.from,n=e.to;return a.isSelectedNode(a.editor.view.state.selection)||a.isSelectionInsideNode(t,n)},a.nodeInsideSelection=function(){var e=a.editor.view.state.selection,t=e.from,n=e.to;return a.isSelectedNode(e)||a.isNodeInsideSelection(t,n)},a.onSelectionChange=function(){a.update(a.node,[],_u.empty)},a.updatePos(),a.oldSelection=r.view.state.selection,a.selectionChangeState=Xd.getState(a.editor.view.state),a.selectionChangeState.subscribe(a.onSelectionChange),a}return Object(d.a)(n,[{key:"render",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(!this.options.component)return null;var r=this.editor.isEditable&&(this.insideSelection()||this.nodeInsideSelection());return Object(Cd.jsx)(Bd,{children:Object(Cd.jsx)(this.options.component,Object.assign({},t,{editor:this.editor,getPos:this.getPos,node:this.node,forwardRef:n,selected:r,updateAttributes:function(t,n){return e.updateAttributes(t,e.pos,null===n||void 0===n?void 0:n.addToHistory,null===n||void 0===n?void 0:n.preventUpdate)}}))})}},{key:"updatePos",value:function(){"boolean"!==typeof this.getPos&&(this.pos=this.getPos(),this.posEnd=this.pos+this.node.nodeSize)}},{key:"getPositionsWithDefault",value:function(e,t){return{pos:"number"!==typeof e?this.pos:e,posEnd:"number"!==typeof t?this.posEnd:t}}},{key:"viewShouldUpdate",value:function(e){if(Object(h.a)(Object(m.a)(n.prototype),"viewShouldUpdate",this).call(this,e))return!0;var t=this.editor.view.state.selection,r=this.oldSelection;this.oldSelection=t;var o=this.pos,i=this.posEnd;this.updatePos();var a=t.from,s=t.to,l=r.from,u=r.to;if(this.node.type.spec.selectable){var c=t instanceof p.NodeSelection&&t.from===this.pos,d=r instanceof p.NodeSelection&&r.from===this.pos;if(c&&!d||d&&!c)return!0}var f=this.isNodeInsideSelection(a,s)&&!this.isNodeInsideSelection(l,u),v=!this.isNodeInsideSelection(a,s)&&this.isNodeInsideSelection(l,u),g=this.isNodeInsideSelection(a,s,o,i)&&!this.isNodeInsideSelection(a,s);return!!(f||v||g)}},{key:"destroy",value:function(){this.selectionChangeState.unsubscribe(this.onSelectionChange),Object(h.a)(Object(m.a)(n.prototype),"destroy",this).call(this)}}]),n}(Id);function nf(e,t){return function(n){var r=n.node,o=n.getPos,i=n.editor;return new tf(r,i,(function(){return"boolean"===typeof o?-1:o()}),Object.assign(Object.assign({},t),{component:e})).init()}}var rf=n(27);function of(){return of=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},of.apply(this,arguments)}var af=Object(jd.forwardRef)((function(e,t){return Dd.a.createElement(rf.Box,of({ref:t,tx:"text"},e))})),sf=(Object(jd.forwardRef)((function(e,t){return Dd.a.createElement(rf.Box,of({ref:t,as:"h2",tx:"text",variant:"heading"},e,{__css:{fontSize:4,fontFamily:"heading",fontWeight:"heading",lineHeight:"heading"}}))})),Object(jd.forwardRef)((function(e,t){return Dd.a.createElement(rf.Box,of({ref:t,as:"a",variant:"link"},e))})),Object(jd.forwardRef)((function(e,t){return Dd.a.createElement(rf.Box,of({ref:t,as:"button",tx:"buttons",variant:"primary"},e,{__css:{appearance:"none",display:"inline-block",textAlign:"center",lineHeight:"inherit",textDecoration:"none",fontSize:"inherit",px:3,py:2,color:"white",bg:"primary",border:0,borderRadius:4}}))}))),lf=Object(jd.forwardRef)((function(e,t){return Dd.a.createElement(rf.Box,of({ref:t,as:"img"},e,{__css:{maxWidth:"100%",height:"auto"}}))})),uf=(Object(jd.forwardRef)((function(e,t){return Dd.a.createElement(rf.Box,of({ref:t,variant:"card"},e))})),n(59)),cf=n.n(uf),df=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function ff(e){var t=e.title,n=e.path,r=e.size,o=void 0===r?24:r,i=e.color,a=void 0===i?"icon":i,s=e.stroke,l=e.rotate,u=Dd.a.useContext(Ad.a),c=(null===u||void 0===u?void 0:u.colors)?u.colors[a]:a;return Object(Cd.jsx)(cf.a,{className:"icon",title:t,path:n,size:"".concat("string"===typeof o?(null===u||void 0===u?void 0:u.iconSizes[o])||24:o,"px"),style:{strokeWidth:s||"0px",stroke:c},color:c,spin:l})}function pf(e){var t=e.sx,n=e.title,r=e.color,o=e.size,i=e.stroke,a=e.rotate,s=e.path,l=df(e,["sx","title","color","size","stroke","rotate","path"]);return Object(Cd.jsx)(rf.Flex,Object.assign({sx:Object.assign({flexShrink:0,justifyContent:"center",alignItems:"center"},t)},l,{children:Object(Cd.jsx)(ff,{title:n,path:s,rotate:a,color:r,stroke:i,size:o})}))}var hf={bold:"M13.5,15.5H10V12.5H13.5A1.5,1.5 0 0,1 15,14A1.5,1.5 0 0,1 13.5,15.5M10,6.5H13A1.5,1.5 0 0,1 14.5,8A1.5,1.5 0 0,1 13,9.5H10M15.6,10.79C16.57,10.11 17.25,9 17.25,8C17.25,5.74 15.5,4 13.25,4H7V18H14.04C16.14,18 17.75,16.3 17.75,14.21C17.75,12.69 16.89,11.39 15.6,10.79Z",italic:"M10,4V7H12.21L8.79,15H6V18H14V15H11.79L15.21,7H18V4H10Z",underline:"M5,21H19V19H5V21M12,17A6,6 0 0,0 18,11V3H15.5V11A3.5,3.5 0 0,1 12,14.5A3.5,3.5 0 0,1 8.5,11V3H6V11A6,6 0 0,0 12,17Z",strikethrough:"M3,14H21V12H3M5,4V7H10V10H14V7H19V4M10,19H14V16H10V19Z",code:"M14.6,16.6L19.2,12L14.6,7.4L16,6L22,12L16,18L14.6,16.6M9.4,16.6L4.8,12L9.4,7.4L8,6L2,12L8,18L9.4,16.6Z",codeRemove:"M3.62109375 1.83837892 2.26318358 3.13037107 6.46289063 7.536621 1.9995117 12l6.0000003 6 1.40039025-1.400391L4.80029295 12l3.0292968-3.0292965 7.0283205 7.371093-.2578125.2578125L16.000488 18l.224121-.224121 4.3125 4.52490225 1.35791025-1.29492225-4.34326125-4.55712825L22.000488 12l-6-6-1.40039025 1.40039063L19.19970675 12l-3.016113 3.016113L9.156738 7.6435545l.24316425-.24316387L7.999512 6l-.2109375.2109375Z",alignCenter:"M3,3H21V5H3V3M7,7H17V9H7V7M3,11H21V13H3V11M7,15H17V17H7V15M3,19H21V21H3V19Z",alignLeft:"M3,3H21V5H3V3M3,7H15V9H3V7M3,11H21V13H3V11M3,15H15V17H3V15M3,19H21V21H3V19Z",alignRight:"M3,3H21V5H3V3M9,7H21V9H9V7M3,11H21V13H3V11M9,15H21V17H9V15M3,19H21V21H3V19Z",alignJustify:"M3,3H21V5H3V3M3,7H21V9H3V7M3,11H21V13H3V11M3,15H21V17H3V15M3,19H21V21H3V19Z",subscript:"M16,7.41L11.41,12L16,16.59L14.59,18L10,13.41L5.41,18L4,16.59L8.59,12L4,7.41L5.41,6L10,10.59L14.59,6L16,7.41M21.85,21.03H16.97V20.03L17.86,19.23C18.62,18.58 19.18,18.04 19.56,17.6C19.93,17.16 20.12,16.75 20.13,16.36C20.14,16.08 20.05,15.85 19.86,15.66C19.68,15.5 19.39,15.38 19,15.38C18.69,15.38 18.42,15.44 18.16,15.56L17.5,15.94L17.05,14.77C17.32,14.56 17.64,14.38 18.03,14.24C18.42,14.1 18.85,14 19.32,14C20.1,14.04 20.7,14.25 21.1,14.66C21.5,15.07 21.72,15.59 21.72,16.23C21.71,16.79 21.53,17.31 21.18,17.78C20.84,18.25 20.42,18.7 19.91,19.14L19.27,19.66V19.68H21.85V21.03Z",superscript:"M16,7.41L11.41,12L16,16.59L14.59,18L10,13.41L5.41,18L4,16.59L8.59,12L4,7.41L5.41,6L10,10.59L14.59,6L16,7.41M21.85,9H16.97V8L17.86,7.18C18.62,6.54 19.18,6 19.56,5.55C19.93,5.11 20.12,4.7 20.13,4.32C20.14,4.04 20.05,3.8 19.86,3.62C19.68,3.43 19.39,3.34 19,3.33C18.69,3.34 18.42,3.4 18.16,3.5L17.5,3.89L17.05,2.72C17.32,2.5 17.64,2.33 18.03,2.19C18.42,2.05 18.85,2 19.32,2C20.1,2 20.7,2.2 21.1,2.61C21.5,3 21.72,3.54 21.72,4.18C21.71,4.74 21.53,5.26 21.18,5.73C20.84,6.21 20.42,6.66 19.91,7.09L19.27,7.61V7.63H21.85V9Z",horizontalRule:"M19,21H21V19H19M15,21H17V19H15M11,17H13V15H11M19,9H21V7H19M19,5H21V3H19M3,13H21V11H3M11,21H13V19H11M19,17H21V15H19M13,3H11V5H13M13,7H11V9H13M17,3H15V5H17M9,3H7V5H9M5,3H3V5H5M7,21H9V19H7M3,17H5V15H3M5,7H3V9H5M3,21H5V19H3V21Z",codeblock:"M8,3A2,2 0 0,0 6,5V9A2,2 0 0,1 4,11H3V13H4A2,2 0 0,1 6,15V19A2,2 0 0,0 8,21H10V19H8V14A2,2 0 0,0 6,12A2,2 0 0,0 8,10V5H10V3M16,3A2,2 0 0,1 18,5V9A2,2 0 0,0 20,11H21V13H20A2,2 0 0,0 18,15V19A2,2 0 0,1 16,21H14V19H16V14A2,2 0 0,1 18,12A2,2 0 0,1 16,10V5H14V3H16Z",blockquote:"M14,17H17L19,13V7H13V13H16M6,17H9L11,13V7H5V13H8L6,17Z",formatClear:"M6,5V5.18L8.82,8H11.22L10.5,9.68L12.6,11.78L14.21,8H20V5H6M3.27,5L2,6.27L8.97,13.24L6.5,19H9.5L11.07,15.34L16.73,21L18,19.73L3.55,5.27L3.27,5Z",ltr:"M21,18L17,14V17H5V19H17V22M9,10V15H11V4H13V15H15V4H17V2H9A4,4 0 0,0 5,6A4,4 0 0,0 9,10Z",rtl:"M8,17V14L4,18L8,22V19H20V17M10,10V15H12V4H14V15H16V4H18V2H10A4,4 0 0,0 6,6A4,4 0 0,0 10,10Z",numberedList:"M7,13V11H21V13H7M7,19V17H21V19H7M7,7V5H21V7H7M3,8V5H2V4H4V8H3M2,17V16H5V20H2V19H4V18.5H3V17.5H4V17H2M4.25,10A0.75,0.75 0 0,1 5,10.75C5,10.95 4.92,11.14 4.79,11.27L3.12,13H5V14H2V13.08L4,11H2V10H4.25Z",bulletList:"M7,5H21V7H7V5M7,13V11H21V13H7M4,4.5A1.5,1.5 0 0,1 5.5,6A1.5,1.5 0 0,1 4,7.5A1.5,1.5 0 0,1 2.5,6A1.5,1.5 0 0,1 4,4.5M4,10.5A1.5,1.5 0 0,1 5.5,12A1.5,1.5 0 0,1 4,13.5A1.5,1.5 0 0,1 2.5,12A1.5,1.5 0 0,1 4,10.5M7,19V17H21V19H7M4,16.5A1.5,1.5 0 0,1 5.5,18A1.5,1.5 0 0,1 4,19.5A1.5,1.5 0 0,1 2.5,18A1.5,1.5 0 0,1 4,16.5Z",highlight:"M4,17L6.75,14.25L6.72,14.23C6.14,13.64 6.14,12.69 6.72,12.11L11.46,7.37L15.7,11.61L10.96,16.35C10.39,16.93 9.46,16.93 8.87,16.37L8.24,17H4M15.91,2.91C16.5,2.33 17.45,2.33 18.03,2.91L20.16,5.03C20.74,5.62 20.74,6.57 20.16,7.16L16.86,10.45L12.62,6.21L15.91,2.91Z",textColor:"M9.62,12L12,5.67L14.37,12M11,3L5.5,17H7.75L8.87,14H15.12L16.25,17H18.5L13,3H11Z",link:"M7,7H11V9H7A3,3 0 0,0 4,12A3,3 0 0,0 7,15H11V17H7A5,5 0 0,1 2,12A5,5 0 0,1 7,7M17,7A5,5 0 0,1 22,12H20A3,3 0 0,0 17,9H13V7H17M8,11H16V13H8V11M17,12H19V15H22V17H19V20H17V17H14V15H17V12Z",linkRemove:"M17,7H13V8.9H17C18.71,8.9 20.1,10.29 20.1,12C20.1,13.43 19.12,14.63 17.79,15L19.25,16.44C20.88,15.61 22,13.95 22,12A5,5 0 0,0 17,7M16,11H13.81L15.81,13H16V11M2,4.27L5.11,7.38C3.29,8.12 2,9.91 2,12A5,5 0 0,0 7,17H11V15.1H7C5.29,15.1 3.9,13.71 3.9,12C3.9,10.41 5.11,9.1 6.66,8.93L8.73,11H8V13H10.73L13,15.27V17H14.73L18.74,21L20,19.74L3.27,3L2,4.27Z",openLink:"M14,3V5H17.59L7.76,14.83L9.17,16.24L19,6.41V10H21V3M19,19H5V5H12V3H5C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V12H19V19Z",linkEdit:"m19 14 1.28 1.28c.22.21.22.56 0 .77l-1 1L17.23 15l1-1c.11-.11.25-.17.39-.17s.27.06.38.17m-.3 3.63-6.06 6.07h-2.06v-2.06l6.07-6.06zM7 7h4v2H7c-1.6568542 0-3 1.343146-3 3s1.3431458 3 3 3h4v2H7c-2.7614237 0-5-2.238576-5-5 0-2.7614237 2.2385763-5 5-5m10 0c2.761424 0 5 2.2385763 5 5h-2c0-1.656854-1.343146-3-3-3h-4V7h4m-9 4h8v2H8v-2",linkSettings:"M7 7h4v2H7c-1.6568542 0-3 1.343146-3 3s1.3431458 3 3 3h4v2H7c-2.7614237 0-5-2.238576-5-5 0-2.7614237 2.2385763-5 5-5m10 0c2.761424 0 5 2.2385763 5 5h-2c0-1.656854-1.343146-3-3-3h-4V7h4m-9 4h8v2H8v-2m15.119777 8.323608-1.07-.82c.02-.17.04-.33.04-.5 0-.17-.01-.33-.04-.5l1.06-.82c.09258-.07939.117526-.212463.06-.32l-1-1.73c-.06-.13-.19-.13-.33-.13l-1.22.5c-.28-.18-.54-.35-.85-.47l-.19-1.32c-.01-.12-.12-.21-.24-.21h-2c-.12 0-.23.09-.25.21l-.19 1.32c-.3.13-.59.29-.85.47l-1.24-.5c-.11 0-.24 0-.31.13l-1 1.73c-.06.11-.04.24.06.32l1.06.82c-.03989.33214-.03989.66786 0 1l-1.06.82c-.09258.07939-.117526.212462-.06.32l1 1.73c.06.13.19.13.31.13l1.24-.5c.26.18.54.35.85.47l.19 1.32c.02.12.12.21.25.21h2c.12 0 .23-.09.25-.21l.19-1.32c.3-.13.56-.29.84-.47l1.22.5c.14 0 .27 0 .34-.13l1-1.73c.05753-.107538.03258-.240607-.06-.32m-4.78.18c-.83 0-1.5-.67-1.5-1.5s.68-1.5 1.5-1.5 1.5.67 1.5 1.5-.66 1.5-1.5 1.5z",url:"M3.9,12C3.9,10.29 5.29,8.9 7,8.9H11V7H7A5,5 0 0,0 2,12A5,5 0 0,0 7,17H11V15.1H7C5.29,15.1 3.9,13.71 3.9,12M8,13H16V11H8V13M17,7H13V8.9H17C18.71,8.9 20.1,10.29 20.1,12C20.1,13.71 18.71,15.1 17,15.1H13V17H17A5,5 0 0,0 22,12A5,5 0 0,0 17,7Z",image:"M19,19H5V5H19M19,3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5A2,2 0 0,0 19,3M13.96,12.29L11.21,15.83L9.25,13.47L6.5,17H17.5L13.96,12.29Z",imageDownload:"M13,2.03C17.73,2.5 21.5,6.25 21.95,11C22.5,16.5 18.5,21.38 13,21.93V19.93C16.64,19.5 19.5,16.61 19.96,12.97C20.5,8.58 17.39,4.59 13,4.05V2.05L13,2.03M11,2.06V4.06C9.57,4.26 8.22,4.84 7.1,5.74L5.67,4.26C7.19,3 9.05,2.25 11,2.06M4.26,5.67L5.69,7.1C4.8,8.23 4.24,9.58 4.05,11H2.05C2.25,9.04 3,7.19 4.26,5.67M2.06,13H4.06C4.24,14.42 4.81,15.77 5.69,16.9L4.27,18.33C3.03,16.81 2.26,14.96 2.06,13M7.1,18.37C8.23,19.25 9.58,19.82 11,20V22C9.04,21.79 7.18,21 5.67,19.74L7.1,18.37M12,16.5L7.5,12H11V8H13V12H16.5L12,16.5Z",imageFailed:"M13,2V4C17.39,4.54 20.5,8.53 19.96,12.92C19.5,16.56 16.64,19.43 13,19.88V21.88C18.5,21.28 22.45,16.34 21.85,10.85C21.33,6.19 17.66,2.5 13,2M11,2C9.04,2.18 7.19,2.95 5.67,4.2L7.1,5.74C8.22,4.84 9.57,4.26 11,4.06V2.06M4.26,5.67C3,7.19 2.24,9.04 2.05,11H4.05C4.24,9.58 4.8,8.23 5.69,7.1L4.26,5.67M2.06,13C2.26,14.96 3.03,16.81 4.27,18.33L5.69,16.9C4.81,15.77 4.24,14.42 4.06,13H2.06M7.06,18.37L5.67,19.74C7.18,21 9.04,21.79 11,22V20C9.58,19.82 8.23,19.25 7.1,18.37H7.06M13,13V7H11V13H13M13,17V15H11V17H13Z",imageSettings:"M22.7 14.3L21.7 15.3L19.7 13.3L20.7 12.3C20.8 12.2 20.9 12.1 21.1 12.1C21.2 12.1 21.4 12.2 21.5 12.3L22.8 13.6C22.9 13.8 22.9 14.1 22.7 14.3M13 19.9V22H15.1L21.2 15.9L19.2 13.9L13 19.9M11.21 15.83L9.25 13.47L6.5 17H13.12L15.66 14.55L13.96 12.29L11.21 15.83M11 19.9V19.05L11.05 19H5V5H19V11.31L21 9.38V5C21 3.9 20.11 3 19 3H5C3.9 3 3 3.9 3 5V19C3 20.11 3.9 21 5 21H11V19.9Z",colorClear:"M20.65,20.87L18.3,18.5L12,12.23L8.44,8.66L7,7.25L4.27,4.5L3,5.77L5.78,8.55C3.23,11.69 3.42,16.31 6.34,19.24C7.9,20.8 9.95,21.58 12,21.58C13.79,21.58 15.57,21 17.03,19.8L19.73,22.5L21,21.23L20.65,20.87M12,19.59C10.4,19.59 8.89,18.97 7.76,17.83C6.62,16.69 6,15.19 6,13.59C6,12.27 6.43,11 7.21,10L12,14.77V19.59M12,5.1V9.68L19.25,16.94C20.62,14 20.09,10.37 17.65,7.93L12,2.27L8.3,5.97L9.71,7.38L12,5.1Z",check:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z",checkbox:"M19,19H5V5H15V3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V11H19M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z",loading:"M12,4V2A10,10 0 0,0 2,12H4A8,8 0 0,1 12,4Z",more:"M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z",upload:"M9,10V16H15V10H19L12,3L5,10H9M12,5.8L14.2,8H13V14H11V8H9.8L12,5.8M19,18H5V20H19V18Z",camera:"M20,4H16.83L15,2H9L7.17,4H4A2,2 0 0,0 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V6A2,2 0 0,0 20,4M20,18H4V6H8.05L9.88,4H14.12L15.95,6H20V18M12,7A5,5 0 0,0 7,12A5,5 0 0,0 12,17A5,5 0 0,0 17,12A5,5 0 0,0 12,7M12,15A3,3 0 0,1 9,12A3,3 0 0,1 12,9A3,3 0 0,1 15,12A3,3 0 0,1 12,15Z",attachment:"M7.5,18A5.5,5.5 0 0,1 2,12.5A5.5,5.5 0 0,1 7.5,7H18A4,4 0 0,1 22,11A4,4 0 0,1 18,15H9.5A2.5,2.5 0 0,1 7,12.5A2.5,2.5 0 0,1 9.5,10H17V11.5H9.5A1,1 0 0,0 8.5,12.5A1,1 0 0,0 9.5,13.5H18A2.5,2.5 0 0,0 20.5,11A2.5,2.5 0 0,0 18,8.5H7.5A4,4 0 0,0 3.5,12.5A4,4 0 0,0 7.5,16.5H17V18H7.5Z",table:"M5,4H19A2,2 0 0,1 21,6V18A2,2 0 0,1 19,20H5A2,2 0 0,1 3,18V6A2,2 0 0,1 5,4M5,8V12H11V8H5M13,8V12H19V8H13M5,14V18H11V14H5M13,14V18H19V14H13Z",rowProperties:"M3,5H15A2,2 0 0,1 17,7V17A2,2 0 0,1 15,19H3A2,2 0 0,1 1,17V7A2,2 0 0,1 3,5M3,9V12H8V9H3M10,9V12H15V9H10M3,14V17H8V14H3M10,14V17H15V14H10M23,14V7H19V9H21V12H19V14H23Z",insertRowBelow:"M22,10A2,2 0 0,1 20,12H4A2,2 0 0,1 2,10V3H4V5H8V3H10V5H14V3H16V5H20V3H22V10M4,10H8V7H4V10M10,10H14V7H10V10M20,10V7H16V10H20M11,14H13V17H16V19H13V22H11V19H8V17H11V14Z",insertRowAbove:"M22,14A2,2 0 0,0 20,12H4A2,2 0 0,0 2,14V21H4V19H8V21H10V19H14V21H16V19H20V21H22V14M4,14H8V17H4V14M10,14H14V17H10V14M20,14V17H16V14H20M11,10H13V7H16V5H13V2H11V5H8V7H11V10Z",moveRowDown:"M22,4V2H2V4H11V18.17L5.5,12.67L4.08,14.08L12,22L19.92,14.08L18.5,12.67L13,18.17V4H22Z",moveRowUp:"M2,20V22H22V20H13V5.83L18.5,11.33L19.92,9.92L12,2L4.08,9.92L5.5,11.33L11,5.83V20H2Z",deleteRow:"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",toggleHeaderRow:"M21,19A1,1 0 0,1 20,20H19V18H21V19M15,20V18H17V20H15M11,20V18H13V20H11M7,20V18H9V20H7M4,20A1,1 0 0,1 3,19V18H5V20H4M19,4H5A2,2 0 0,0 3,6V8H5L11,8H13L19,8H21V6C21,4.89 20.11,4 19,4M5,14H3V16H5V14M5,10H3V12H5V10M21,10H19V12H21V10M21,14H19V16H21V14M11,16V14H13V16H11M11,12V10H13V12H11",columnProperties:"M5,8H19A2,2 0 0,1 21,10V20A2,2 0 0,1 19,22H5A2,2 0 0,1 3,20V10A2,2 0 0,1 5,8M5,12V15H11V12H5M13,12V15H19V12H13M5,17V20H11V17H5M13,17V20H19V17H13M11,2H21V6H19V4H13V6H11V2Z",insertColumnRight:"M11,2A2,2 0 0,1 13,4V20A2,2 0 0,1 11,22H2V2H11M4,10V14H11V10H4M4,16V20H11V16H4M4,4V8H11V4H4M15,11H18V8H20V11H23V13H20V16H18V13H15V11Z",insertColumnLeft:"M13,2A2,2 0 0,0 11,4V20A2,2 0 0,0 13,22H22V2H13M20,10V14H13V10H20M20,16V20H13V16H20M20,4V8H13V4H20M9,11H6V8H4V11H1V13H4V16H6V13H9V11Z",moveColumnRight:"M4,2H2V22H4V13H18.17L12.67,18.5L14.08,19.92L22,12L14.08,4.08L12.67,5.5L18.17,11H4V2Z",moveColumnLeft:"M20,22H22V2H20V11H5.83L11.33,5.5L9.92,4.08L2,12L9.92,19.92L11.33,18.5L5.83,13H20V22Z",deleteColumn:"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",cellProperties:"M4,6V19H20V6H4Z",cellBorderColor:"M4 24q-.825 0-1.412-.587Q2 22.825 2 22q0-.825.588-1.413Q3.175 20 4 20h16q.825 0 1.413.587Q22 21.175 22 22q0 .825-.587 1.413Q20.825 24 20 24Zm1-6q-.425 0-.713-.288Q4 17.425 4 17v-2.325q0-.2.075-.388q.075-.187.225-.337l8.75-8.75l3.75 3.75l-8.75 8.75q-.15.15-.337.225q-.188.075-.388.075Zm1-2h.9L14 8.95L13.05 8L6 15.1Zm11.925-8.15l-3.75-3.75l1.8-1.8q.275-.3.7-.288q.425.013.7.288l2.35 2.35q.275.275.275.688q0 .412-.275.712ZM6 16Z",backgroundColor:"M19,11.5C19,11.5 17,13.67 17,15A2,2 0 0,0 19,17A2,2 0 0,0 21,15C21,13.67 19,11.5 19,11.5M5.21,10L10,5.21L14.79,10M16.56,8.94L7.62,0L6.21,1.41L8.59,3.79L3.44,8.94C2.85,9.5 2.85,10.47 3.44,11.06L8.94,16.56C9.23,16.85 9.62,17 10,17C10.38,17 10.77,16.85 11.06,16.56L16.56,11.06C17.15,10.47 17.15,9.5 16.56,8.94Z",borderColor:"M4 24q-.825 0-1.412-.587Q2 22.825 2 22q0-.825.588-1.413Q3.175 20 4 20h16q.825 0 1.413.587Q22 21.175 22 22q0 .825-.587 1.413Q20.825 24 20 24Zm1-6q-.425 0-.713-.288Q4 17.425 4 17v-2.325q0-.2.075-.388q.075-.187.225-.337l8.75-8.75l3.75 3.75l-8.75 8.75q-.15.15-.337.225q-.188.075-.388.075Zm1-2h.9L14 8.95L13.05 8L6 15.1Zm11.925-8.15l-3.75-3.75l1.8-1.8q.275-.3.7-.288q.425.013.7.288l2.35 2.35q.275.275.275.688q0 .412-.275.712ZM6 16Z",sortDesc:"M19 7H22L18 3L14 7H17V21H19M2 17H12V19H2M6 5V7H2V5M2 11H9V13H2V11Z",deleteTable:"M22.11 21.46L2.39 1.73L1.11 3L3.22 5.11C3.08 5.38 3 5.68 3 6V18C3 19.11 3.9 20 5 20H18.11L20.84 22.73L22.11 21.46M10.11 12H5V8H6.11L10.11 12M11 18H5V14H11V18M13 18V14.89L16.11 18H13M13 9.8L7.2 4H19C20.11 4 21 4.89 21 6V17.8L19 15.8V14H17.2L15.2 12H19V8H13V9.8Z",mergeCells:"M5,10H3V4H11V6H5V10M19,18H13V20H21V14H19V18M5,18V14H3V20H11V18H5M21,4H13V6H19V10H21V4M8,13V15L11,12L8,9V11H3V13H8M16,11V9L13,12L16,15V13H21V11H16Z",splitCells:"M19 14H21V20H3V14H5V18H19V14M3 4V10H5V6H19V10H21V4H3M11 11V13H8V15L5 12L8 9V11H11M16 11V9L19 12L16 15V13H13V11H16Z",checklist:"M21,19V17H8V19H21M21,13V11H8V13H21M8,7H21V5H8V7M4,5V7H6V5H4M3,5A1,1 0 0,1 4,4H6A1,1 0 0,1 7,5V7A1,1 0 0,1 6,8H4A1,1 0 0,1 3,7V5M4,11V13H6V11H4M3,11A1,1 0 0,1 4,10H6A1,1 0 0,1 7,11V13A1,1 0 0,1 6,14H4A1,1 0 0,1 3,13V11M4,17V19H6V17H4M3,17A1,1 0 0,1 4,16H6A1,1 0 0,1 7,17V19A1,1 0 0,1 6,20H4A1,1 0 0,1 3,19V17Z",dragHandle:"M7,19V17H9V19H7M11,19V17H13V19H11M15,19V17H17V19H15M7,15V13H9V15H7M11,15V13H13V15H11M15,15V13H17V15H15M7,11V9H9V11H7M11,11V9H13V11H11M15,11V9H17V11H15M7,7V5H9V7H7M11,7V5H13V7H11M15,7V5H17V7H15Z",previousMatch:"M13,20H11V8L5.5,13.5L4.08,12.08L12,4.16L19.92,12.08L18.5,13.5L13,8V20Z",nextMatch:"M11,4H13V16L18.5,10.5L19.92,11.92L12,19.84L4.08,11.92L5.5,10.5L11,16V4Z",replaceOne:"m5.4 5.42 3.48 3.5 3.43-3.43-1.08-1.08-1.57 1.55V3.5a.8.8 0 0 1 .76-.81h2.35v-1.5h-2.35a2.29 2.29 0 0 0-2.28 2.3v2.5L6.48 4.33Zm10.3 2.77c.3.48.7.72 1.25.72.61 0 1.1-.26 1.45-.78.37-.51.55-1.2.55-2.05 0-.8-.15-1.41-.46-1.87a1.51 1.51 0 0 0-1.33-.68c-.63 0-1.11.3-1.45.9h-.02V1.19h-1.37v7.6h1.37v-.6Zm-.03-1.64v-.52c0-.39.09-.7.27-.93a.83.83 0 0 1 .69-.36.76.76 0 0 1 .67.36c.16.24.24.57.24 1 0 .5-.09.9-.26 1.18a.8.8 0 0 1-.73.42.76.76 0 0 1-.63-.33 1.32 1.32 0 0 1-.25-.82zm-1.35 12.82c-.4.23-.97.35-1.71.35-.87 0-1.58-.27-2.12-.82a2.9 2.9 0 0 1-.8-2.12c0-1 .28-1.8.86-2.37a3.12 3.12 0 0 1 2.31-.87c.67 0 1.16.1 1.46.28v1.54a1.95 1.95 0 0 0-1.23-.42c-.5 0-.9.15-1.2.46-.29.3-.43.72-.43 1.26 0 .52.14.93.42 1.23.28.3.67.44 1.16.44.43 0 .86-.14 1.28-.43zm-7.73-8.91L5.05 12v9.27l1.54 1.54h10.82l1.54-1.54V12l-1.54-1.54zm0 1.54h10.82v9.27H6.59Z",replaceAll:"M16.53 4.22c.22-.45.52-.68.92-.68.36 0 .64.17.83.52.2.34.3.81.3 1.4a3.1 3.1 0 0 1-.35 1.57c-.22.39-.53.59-.91.59-.35 0-.61-.19-.79-.55h-.01v.45h-.87V1.77h.87v2.45h.01zm-.02 1.6a1.14 1.14 0 0 0 .15.63c.1.17.24.25.4.25.2 0 .35-.1.46-.32a2 2 0 0 0 .17-.9c0-.32-.05-.57-.15-.75-.1-.18-.24-.27-.43-.27-.17 0-.32.09-.43.27a1.3 1.3 0 0 0-.17.7ZM5.6 11.56l-3.1-3.1.97-.97 1.47 1.46v-2.2A2.03 2.03 0 0 1 6.96 4.7h3.43v1.32H6.96a.72.72 0 0 0-.68.73l.01 2.19 1.39-1.38.96.96-3.04 3.04Zm7.65-4.04h.94v-2.5c0-1.18-.46-1.78-1.38-1.78-.2 0-.41.04-.66.1a2.11 2.11 0 0 0-.56.25v.97c.34-.3.71-.44 1.1-.44.38 0 .57.23.57.68l-.88.16c-.74.12-1.11.59-1.11 1.4 0 .38.09.7.27.92a.9.9 0 0 0 .74.35c.42 0 .74-.24.96-.7h.01zm0-1.98v.28a1.1 1.1 0 0 1-.17.64.54.54 0 0 1-.46.25.4.4 0 0 1-.32-.14.56.56 0 0 1-.11-.36c0-.33.16-.51.48-.57l.59-.1zM9.82 19.21h-.94v-.6h-.02c-.21.46-.53.7-.96.7a.9.9 0 0 1-.74-.35 1.47 1.47 0 0 1-.27-.92c0-.8.38-1.28 1.12-1.4l.87-.15c0-.46-.19-.69-.57-.69-.38 0-.75.15-1.1.45v-.98c.14-.09.33-.17.57-.24.24-.07.46-.1.66-.1.92 0 1.38.59 1.38 1.78zm-.94-1.7v-.29l-.58.1c-.33.06-.49.25-.49.57 0 .15.04.27.12.36a.4.4 0 0 0 .32.14.54.54 0 0 0 .46-.25c.11-.17.17-.38.17-.63zm4.24 1.8c.47 0 .83-.09 1.08-.26v-1.03a1.32 1.32 0 0 1-.8.3.9.9 0 0 1-.74-.31c-.17-.22-.26-.5-.26-.88s.1-.68.28-.9a.94.94 0 0 1 .75-.32c.28 0 .54.1.77.3v-1.1c-.19-.12-.5-.19-.91-.19-.61 0-1.1.2-1.47.62-.36.4-.54.97-.54 1.68 0 .61.17 1.11.5 1.5.35.4.8.59 1.34.59zM2.5 13.46 3.96 12h13.16l1.46 1.46v7.3l-1.46 1.47H3.96L2.5 20.77Zm1.46 0v7.3h13.16v-7.3Zm4.39-2.92L9.8 9.08h10.23l1.46 1.46v7.3l-1.46 1.47v-8.77z",replace:"M21 4.5000005V14.25a1.5000007 1.5000005 0 0 1-1.500007 1.500005h-8.999996v1.49999a.74999993.74999995 0 0 1-.459373.693747.79687482.79687478 0 0 1-.290624.056263.77812509.77812509 0 0 1-.534375-.215621l-2.25-2.25a.759375.759375 0 0 1 0-1.068763l2.25-2.25a.7875.7875 0 0 1 .824999-.159371.74999993.74999995 0 0 1 .459373.693745V14.25h8.999996V4.5000005H9.0000007v.7499997a.75000036.75000039 0 0 1-1.5000007 0v-.7499997A1.5000007 1.5000005 0 0 1 9.0000007 3H19.499993A1.5000007 1.5000005 0 0 1 21 4.5000005ZM15.750007 18.000005a.74999993.74999995 0 0 0-.750014.749995v.749995H4.5000007V9.7500002h9.0000063v1.5000048a.759375.759375 0 0 0 .459381.693745.79687482.79687478 0 0 0 .290612.05631.77812509.77812509 0 0 0 .534372-.215621l2.25-2.2500079a.759375.759375 0 0 0 0-1.06875l-2.25-2.25a.76875023.76875019 0 0 0-.824984-.1594227.74999993.74999995 0 0 0-.459381.6937502v1.4999978H4.5000007A1.5000007 1.5000005 0 0 0 3 9.7500002v9.7499948A1.5000007 1.5000005 0 0 0 4.5000007 21H14.999993A1.5000007 1.5000005 0 0 0 16.5 19.499995V18.75a.74999993.74999995 0 0 0-.749993-.749995z",attachmentSettings:"m24.0138 20.223188-1.07-.82c.02-.17.04-.33.04-.5 0-.17-.01-.33-.04-.5l1.06-.82c.09258-.07939.117526-.212463.06-.32l-1-1.73c-.06-.13-.19-.13-.33-.13l-1.22.5c-.28-.18-.54-.35-.85-.47l-.19-1.32c-.01-.12-.12-.21-.24-.21h-2c-.12 0-.23.09-.25.21l-.19 1.32c-.3.13-.59.29-.85.47l-1.24-.5c-.11 0-.24 0-.31.13l-1 1.73c-.06.11-.04.24.06.32l1.06.82c-.03989.33214-.03989.66786 0 1l-1.06.82c-.09258.07939-.117526.212463-.06.32l1 1.73c.06.13.19.13.31.13l1.24-.5c.26.18.54.35.85.47l.19 1.32c.02.12.12.21.25.21h2c.12 0 .23-.09.25-.21l.19-1.32c.3-.13.56-.29.84-.47l1.22.5c.14 0 .27 0 .34-.13l1-1.73c.05753-.107537.03258-.240606-.06-.32m-4.78.18c-.83 0-1.5-.67-1.5-1.5s.68-1.5 1.5-1.5 1.5.67 1.5 1.5-.66 1.5-1.5 1.5zM16.61 13.5c-.8.35-1.5.86-2.07 1.5H9.5c-3.3333319 0-3.3333319-5 0-5H17v1.5H9.5c-.55 0-1 .45-1 1s.45 1 1 1h7.11m-13.11-1c0-2.21 1.79-4 4-4H18c2.434718-.00632 3.435847 3.121347 1.45 4.53.6.04 1.18.17 1.72.38.52-.67.83-1.5.83-2.41 0-2.21-1.79-4-4-4H7.5C4.46 7 2 9.46 2 12.5S4.46 18 7.5 18h5.59c.09-.53.25-1.03.46-1.5H7.5c-2.21 0-4-1.79-4-4",caseSensitive:"M20.06,18C20,17.83 19.91,17.54 19.86,17.11C19.19,17.81 18.38,18.16 17.45,18.16C16.62,18.16 15.93,17.92 15.4,17.45C14.87,17 14.6,16.39 14.6,15.66C14.6,14.78 14.93,14.1 15.6,13.61C16.27,13.12 17.21,12.88 18.43,12.88H19.83V12.24C19.83,11.75 19.68,11.36 19.38,11.07C19.08,10.78 18.63,10.64 18.05,10.64C17.53,10.64 17.1,10.76 16.75,11C16.4,11.25 16.23,11.54 16.23,11.89H14.77C14.77,11.46 14.92,11.05 15.22,10.65C15.5,10.25 15.93,9.94 16.44,9.71C16.95,9.5 17.5,9.36 18.13,9.36C19.11,9.36 19.87,9.6 20.42,10.09C20.97,10.58 21.26,11.25 21.28,12.11V16C21.28,16.8 21.38,17.42 21.58,17.88V18H20.06M17.66,16.88C18.11,16.88 18.54,16.77 18.95,16.56C19.35,16.35 19.65,16.07 19.83,15.73V14.16H18.7C16.93,14.16 16.04,14.63 16.04,15.57C16.04,16 16.19,16.3 16.5,16.53C16.8,16.76 17.18,16.88 17.66,16.88M5.46,13.71H9.53L7.5,8.29L5.46,13.71M6.64,6H8.36L13.07,18H11.14L10.17,15.43H4.82L3.86,18H1.93L6.64,6Z",wholeWord:"M11.14 4L6.43 16H8.36L9.32 13.43H14.67L15.64 16H17.57L12.86 4M12 6.29L14.03 11.71H9.96M20 14V18H4V15H2V20H22V14Z",regex:"M16,16.92C15.67,16.97 15.34,17 15,17C14.66,17 14.33,16.97 14,16.92V13.41L11.5,15.89C11,15.5 10.5,15 10.11,14.5L12.59,12H9.08C9.03,11.67 9,11.34 9,11C9,10.66 9.03,10.33 9.08,10H12.59L10.11,7.5C10.3,7.25 10.5,7 10.76,6.76V6.76C11,6.5 11.25,6.3 11.5,6.11L14,8.59V5.08C14.33,5.03 14.66,5 15,5C15.34,5 15.67,5.03 16,5.08V8.59L18.5,6.11C19,6.5 19.5,7 19.89,7.5L17.41,10H20.92C20.97,10.33 21,10.66 21,11C21,11.34 20.97,11.67 20.92,12H17.41L19.89,14.5C19.7,14.75 19.5,15 19.24,15.24V15.24C19,15.5 18.75,15.7 18.5,15.89L16,13.41V16.92H16V16.92M5,19A2,2 0 0,1 7,17A2,2 0 0,1 9,19A2,2 0 0,1 7,21A2,2 0 0,1 5,19H5Z",embed:"M13 19C13 19.34 13.04 19.67 13.09 20H4C2.9 20 2 19.11 2 18V6C2 4.89 2.9 4 4 4H5L7 8H10L8 4H10L12 8H15L13 4H15L17 8H20L18 4H22V13.81C21.39 13.46 20.72 13.22 20 13.09V10H5.76L4 6.47V18H13.09C13.04 18.33 13 18.66 13 19M20 18V15H18V18H15V20H18V23H20V20H23V18H20Z",embedSettings:"M12 19C12 19.34 12.03 19.67 12.08 20H4C2.9 20 2 19.11 2 18V6C2 4.89 2.9 4 4 4H5L7 8H10L8 4H10L12 8H15L13 4H15L17 8H20L18 4H22V12.68C21.38 12.39 20.71 12.18 20 12.08V10H5.76L4 6.47V18H12.08C12.03 18.33 12 18.66 12 19M23.8 20.4C23.9 20.4 23.9 20.5 23.8 20.6L22.8 22.3C22.7 22.4 22.6 22.4 22.5 22.4L21.3 22C21 22.2 20.8 22.3 20.5 22.5L20.3 23.8C20.3 23.9 20.2 24 20.1 24H18.1C18 24 17.9 23.9 17.8 23.8L17.6 22.5C17.3 22.4 17 22.2 16.8 22L15.6 22.5C15.5 22.5 15.4 22.5 15.3 22.4L14.3 20.7C14.2 20.6 14.3 20.5 14.4 20.4L15.5 19.6V18.6L14.4 17.8C14.3 17.7 14.3 17.6 14.3 17.5L15.3 15.8C15.4 15.7 15.5 15.7 15.6 15.7L16.8 16.2C17.1 16 17.3 15.9 17.6 15.7L17.8 14.4C17.8 14.3 17.9 14.2 18.1 14.2H20.1C20.2 14.2 20.3 14.3 20.3 14.4L20.5 15.7C20.8 15.8 21.1 16 21.4 16.2L22.6 15.7C22.7 15.7 22.9 15.7 22.9 15.8L23.9 17.5C24 17.6 23.9 17.7 23.8 17.8L22.7 18.6V19.6L23.8 20.4M20.5 19C20.5 18.2 19.8 17.5 19 17.5S17.5 18.2 17.5 19 18.2 20.5 19 20.5 20.5 19.8 20.5 19Z",palette:"M12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2C17.5,2 22,6 22,11A6,6 0 0,1 16,17H14.2C13.9,17 13.7,17.2 13.7,17.5C13.7,17.6 13.8,17.7 13.8,17.8C14.2,18.3 14.4,18.9 14.4,19.5C14.5,20.9 13.4,22 12,22M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20C12.3,20 12.5,19.8 12.5,19.5C12.5,19.3 12.4,19.2 12.4,19.1C12,18.6 11.8,18.1 11.8,17.5C11.8,16.1 12.9,15 14.3,15H16A4,4 0 0,0 20,11C20,7.1 16.4,4 12,4M6.5,10C7.3,10 8,10.7 8,11.5C8,12.3 7.3,13 6.5,13C5.7,13 5,12.3 5,11.5C5,10.7 5.7,10 6.5,10M9.5,6C10.3,6 11,6.7 11,7.5C11,8.3 10.3,9 9.5,9C8.7,9 8,8.3 8,7.5C8,6.7 8.7,6 9.5,6M14.5,6C15.3,6 16,6.7 16,7.5C16,8.3 15.3,9 14.5,9C13.7,9 13,8.3 13,7.5C13,6.7 13.7,6 14.5,6M17.5,10C18.3,10 19,10.7 19,11.5C19,12.3 18.3,13 17.5,13C16.7,13 16,12.3 16,11.5C16,10.7 16.7,10 17.5,10Z",tableSettings:"M3 3H17C18.11 3 19 3.9 19 5V12.08C17.45 11.82 15.92 12.18 14.68 13H11V17H12.08C11.97 17.68 11.97 18.35 12.08 19H3C1.9 19 1 18.11 1 17V5C1 3.9 1.9 3 3 3M3 7V11H9V7H3M11 7V11H17V7H11M3 13V17H9V13H3M22.78 19.32L21.71 18.5C21.73 18.33 21.75 18.17 21.75 18S21.74 17.67 21.71 17.5L22.77 16.68C22.86 16.6 22.89 16.47 22.83 16.36L21.83 14.63C21.77 14.5 21.64 14.5 21.5 14.5L20.28 15C20 14.82 19.74 14.65 19.43 14.53L19.24 13.21C19.23 13.09 19.12 13 19 13H17C16.88 13 16.77 13.09 16.75 13.21L16.56 14.53C16.26 14.66 15.97 14.82 15.71 15L14.47 14.5C14.36 14.5 14.23 14.5 14.16 14.63L13.16 16.36C13.1 16.47 13.12 16.6 13.22 16.68L14.28 17.5C14.26 17.67 14.25 17.83 14.25 18S14.26 18.33 14.28 18.5L13.22 19.32C13.13 19.4 13.1 19.53 13.16 19.64L14.16 21.37C14.22 21.5 14.35 21.5 14.47 21.5L15.71 21C15.97 21.18 16.25 21.35 16.56 21.47L16.75 22.79C16.77 22.91 16.87 23 17 23H19C19.12 23 19.23 22.91 19.25 22.79L19.44 21.47C19.74 21.34 20 21.18 20.28 21L21.5 21.5C21.64 21.5 21.77 21.5 21.84 21.37L22.84 19.64C22.9 19.53 22.87 19.4 22.78 19.32M18 19.5C17.17 19.5 16.5 18.83 16.5 18S17.18 16.5 18 16.5 19.5 17.17 19.5 18 18.84 19.5 18 19.5Z",math:"M12.42,5.29C11.32,5.19 10.35,6 10.25,7.11L10,10H12.82V12H9.82L9.38,17.07C9.18,19.27 7.24,20.9 5.04,20.7C3.79,20.59 2.66,19.9 2,18.83L3.5,17.33C3.83,18.38 4.96,18.97 6,18.63C6.78,18.39 7.33,17.7 7.4,16.89L7.82,12H4.82V10H8L8.27,6.93C8.46,4.73 10.39,3.1 12.6,3.28C13.86,3.39 15,4.09 15.66,5.17L14.16,6.67C13.91,5.9 13.23,5.36 12.42,5.29M22,13.65L20.59,12.24L17.76,15.07L14.93,12.24L13.5,13.65L16.35,16.5L13.5,19.31L14.93,20.72L17.76,17.89L20.59,20.72L22,19.31L19.17,16.5L22,13.65Z",mathBlock:"M11.5 19.1C11.3 20.2 10.9 21 10.2 21.5C9.5 22 8.6 22.1 7.5 21.9C7.1 21.8 6.3 21.7 6 21.5L6.5 20C6.8 20.1 7.4 20.3 7.7 20.3C8.8 20.5 9.4 20 9.6 18.8L12 5.2C12.2 4 12.7 3.2 13.4 2.6C14.1 2.1 15.1 1.9 16.2 2.1C16.6 2.2 17.4 2.3 18 2.6L17.5 4C17.3 3.9 16.6 3.8 16.3 3.7C15 3.5 14.3 4.1 14 5.6L11.5 19.1Z",outlineList:"M12 13H7V18H12V20H5V10H7V11H12V13M8 4V6H4V4H8M10 2H2V8H10V2M20 11V13H16V11H20M22 9H14V15H22V9M20 18V20H16V18H20M22 16H14V22H22V16Z",fontFamily:"M17,8H20V20H21V21H17V20H18V17H14L12.5,20H14V21H10V20H11L17,8M18,9L14.5,16H18V9M5,3H10C11.11,3 12,3.89 12,5V16H9V11H6V16H3V5C3,3.89 3.89,3 5,3M6,5V9H9V5H6Z",fontSize:"M5.12,14L7.5,7.67L9.87,14M6.5,5L1,19H3.25L4.37,16H10.62L11.75,19H14L8.5,5H6.5M18,7L13,12.07L14.41,13.5L17,10.9V17H19V10.9L21.59,13.5L23,12.07L18,7Z",heading:"M3,4H5V10H9V4H11V18H9V12H5V18H3V4M13,8H15.31L15.63,5H17.63L17.31,8H19.31L19.63,5H21.63L21.31,8H23V10H21.1L20.9,12H23V14H20.69L20.37,17H18.37L18.69,14H16.69L16.37,17H14.37L14.69,14H13V12H14.9L15.1,10H13V8M17.1,10L16.9,12H18.9L19.1,10H17.1Z",indent:"M11,13H21V11H11M11,9H21V7H11M3,3V5H21V3M11,17H21V15H11M3,8V16L7,12M3,21H21V19H3V21Z",outdent:"M11,13H21V11H11M11,9H21V7H11M3,3V5H21V3M3,21H21V19H3M3,12L7,16V8M11,17H21V15H11V17Z",plus:"M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z",minus:"M19,13H5V11H19V13Z",close:"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z",delete:"M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19M8,9H16V19H8V9M15.5,4L14.5,3H9.5L8.5,4H5V6H19V4H15.5Z",download:"M13,5V11H14.17L12,13.17L9.83,11H11V5H13M15,3H9V9H5L12,16L19,9H15V3M19,18H5V20H19V18Z",chevronDown:"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z",chevronUp:"M7.41,15.41L12,10.83L16.59,15.41L18,14L12,8L6,14L7.41,15.41Z",chevronRight:"M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z",chevronLeft:"M15.41,16.58L10.83,12L15.41,7.41L14,6L8,12L14,18L15.41,16.58Z",circle:"M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z",arrowLeft:"M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z",resize:"M22,22H20V20H22V22M22,18H20V16H22V18M18,22H16V20H18V22M18,18H16V16H18V18M14,22H12V20H14V22M22,14H20V12H22V14Z",none:""},mf=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},vf=Object(jd.forwardRef)((function(e,t){var n,r=e.sx,o=mf(e,["sx"]),i=(null===(n=null===r||void 0===r?void 0:r[":hover"])||void 0===n?void 0:n.bg)||"hover",a=(null===r||void 0===r?void 0:r.bg)||"unset",s=Object(jd.useRef)();Object(jd.useEffect)((function(){if(s.current)return s.current.addEventListener("mousedown",l,{passive:!1,capture:!0}),function(){var e;null===(e=s.current)||void 0===e||e.removeEventListener("mousedown",l,{capture:!0})}}),[]);var l=Object(jd.useCallback)((function(e){e.preventDefault()}),[]);return Object(Cd.jsx)(sf,Object.assign({},o,{sx:Object.assign(Object.assign({},r),{":hover":{bg:[a,i]},":active":{bg:i}}),ref:function(e){s.current=e,"function"===typeof t?t(e):t&&(t.current=e)},onClick:e.onClick}))})),gf=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},yf=Dd.a.memo((function(e){var t=e.id,n=e.icon,r=e.iconSize,o=e.iconColor,i=e.toggled,a=e.sx,s=e.buttonRef,l=e.variant,u=void 0===l?"normal":l,c=gf(e,["id","icon","iconSize","iconColor","toggled","sx","buttonRef","variant"]);return Object(Cd.jsx)(vf,Object.assign({ref:s,tabIndex:-1,id:"tool-".concat(t||n),sx:Object.assign({flexShrink:0,p:"small"===u?"small":1,borderRadius:"small"===u?"small":"default",m:0,bg:i?"hover":"transparent",mr:"small"===u?0:1,":hover":{bg:"hover"},":last-of-type":{mr:0}},a),onMouseDown:function(e){return e.preventDefault()}},c,{children:Object(Cd.jsx)(pf,{path:hf[n],color:o||"icon",size:r||("small"===u?"medium":"big")})}))}),(function(e,t){return e.toggled===t.toggled&&e.icon===t.icon&&JSON.stringify(e.sx)===JSON.stringify(t.sx)}));function bf(e){var t=e.item,n=e.isFocused,r=e.onMouseEnter,o=e.onMouseLeave,i=e.onClick,a=t.title,s=t.key,l=t.icon,u=t.tooltip,c=t.isDisabled,d=t.isChecked,f=t.menu,p=t.modifier,h=t.styles,m=Object(jd.useRef)(null),v="bottom"===Hd();return Object(Cd.jsx)(rf.Flex,Object.assign({as:"li",sx:{flexShrink:0,flexDirection:"column"},onMouseEnter:r,onMouseLeave:o},{children:Object(Cd.jsxs)(vf,Object.assign({id:s,"data-test-id":"MenuButton-".concat(s),ref:m,tabIndex:-1,variant:"menuitem",title:u,disabled:c,onClick:i,sx:Object.assign(Object.assign({},h),{bg:n&&!v?"hover":"transparent",display:"flex",alignItems:"center",justifyContent:"space-between",":hover":{bg:v?"transparent":"hover"}})},{children:[Object(Cd.jsxs)(rf.Flex,Object.assign({sx:{fontSize:"inherit",fontFamily:"inherit"}},{children:[l&&Object(Cd.jsx)(pf,{path:hf[l],color:"text",size:"medium",sx:{mr:2}}),Object(Cd.jsx)(af,Object.assign({as:"span",variant:"body",sx:{fontSize:"inherit",fontFamily:"inherit"}},{children:a}))]})),d||f||p?Object(Cd.jsxs)(rf.Flex,Object.assign({sx:{ml:4}},{children:[d&&Object(Cd.jsx)(pf,{path:hf.check,size:"small"}),f&&Object(Cd.jsx)(pf,{path:hf.chevronRight,size:"small"}),p&&Object(Cd.jsx)(af,Object.assign({as:"span",sx:{fontFamily:"body",fontSize:"menu",color:"fontTertiary"}},{children:p}))]})):null]}),s)}))}function wf(){return Object(Cd.jsx)(rf.Box,{as:"li",sx:{width:"95%",height:"0.5px",bg:"border",my:2,alignSelf:"center"}})}var kf=n(46),xf=n.n(kf),Of=function(e,t){return Of=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Of(e,t)};function Sf(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Of(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Cf=function(){return Cf=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Cf.apply(this,arguments)};function jf(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}Object.create;function Df(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function Af(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}Object.create;var Ef=function(e){return{isEnabled:function(t){return e.some((function(e){return!!t[e]}))}}},Mf={measureLayout:Ef(["layout","layoutId","drag","_layoutResetTransform"]),animation:Ef(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag"]),exit:Ef(["exit"]),drag:Ef(["drag","dragControls"]),focus:Ef(["whileFocus"]),hover:Ef(["whileHover","onHoverStart","onHoverEnd"]),tap:Ef(["whileTap","onTap","onTapStart","onTapCancel"]),pan:Ef(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),layoutAnimation:Ef(["layout","layoutId"])};var Tf=Object(jd.createContext)({strict:!1}),Lf=Object.keys(Mf),Nf=Lf.length;var Pf=Object(jd.createContext)({transformPagePoint:function(e){return e},isStatic:!1}),Rf=Object(jd.createContext)({});var Hf=Object(jd.createContext)(null);function Ff(e){var t=Object(jd.useRef)(null);return null===t.current&&(t.current=e()),t.current}function Vf(){var e=Object(jd.useContext)(Hf);if(null===e)return[!0,null];var t=e.isPresent,n=e.onExitComplete,r=e.register,o=_f();Object(jd.useEffect)((function(){return r(o)}),[]);return!t&&n?[!1,function(){return null===n||void 0===n?void 0:n(o)}]:[!0]}function zf(e){return null===e||e.isPresent}var Bf=0,If=function(){return Bf++},_f=function(){return Ff(If)},$f=Object(jd.createContext)(null),qf="undefined"!==typeof window,Wf=qf?jd.useLayoutEffect:jd.useEffect;function Uf(e,t,n,r){var o=Object(jd.useContext)(Pf),i=Object(jd.useContext)(Tf),a=Object(jd.useContext)(Rf).visualElement,s=Object(jd.useContext)(Hf),l=function(e){var t=e.layoutId,n=Object(jd.useContext)($f);return n&&void 0!==t?n+"-"+t:t}(n),u=Object(jd.useRef)(void 0);r||(r=i.renderer),!u.current&&r&&(u.current=r(e,{visualState:t,parent:a,props:Cf(Cf({},n),{layoutId:l}),presenceId:null===s||void 0===s?void 0:s.id,blockInitialAnimation:!1===(null===s||void 0===s?void 0:s.initial)}));var c=u.current;return Wf((function(){c&&(c.setProps(Cf(Cf(Cf({},o),n),{layoutId:l})),c.isPresent=zf(s),c.isPresenceRoot=!a||a.presenceId!==(null===s||void 0===s?void 0:s.id),c.syncRender())})),Object(jd.useEffect)((function(){var e;c&&(null===(e=c.animationState)||void 0===e||e.animateChanges())})),Wf((function(){return function(){return null===c||void 0===c?void 0:c.notifyUnmount()}}),[]),c}function Kf(e){return"object"===typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function Gf(e){return Array.isArray(e)}function Jf(e){return"string"===typeof e||Gf(e)}function Yf(e,t,n,r,o){var i;return void 0===r&&(r={}),void 0===o&&(o={}),"string"===typeof t&&(t=null===(i=e.variants)||void 0===i?void 0:i[t]),"function"===typeof t?t(null!==n&&void 0!==n?n:e.custom,r,o):t}function Zf(e,t,n){var r=e.getProps();return Yf(r,t,null!==n&&void 0!==n?n:r.custom,function(e){var t={};return e.forEachValue((function(e,n){return t[n]=e.get()})),t}(e),function(e){var t={};return e.forEachValue((function(e,n){return t[n]=e.getVelocity()})),t}(e))}function Xf(e){var t;return"function"===typeof(null===(t=e.animate)||void 0===t?void 0:t.start)||Jf(e.initial)||Jf(e.animate)||Jf(e.whileHover)||Jf(e.whileDrag)||Jf(e.whileTap)||Jf(e.whileFocus)||Jf(e.exit)}function Qf(e){return Boolean(Xf(e)||e.variants)}function ep(e,t){var n=function(e,t){if(Xf(e)){var n=e.initial,r=e.animate;return{initial:!1===n||Jf(n)?n:void 0,animate:Jf(r)?r:void 0}}return!1!==e.inherit?t:{}}(e,Object(jd.useContext)(Rf)),r=n.initial,o=n.animate;return Object(jd.useMemo)((function(){return{initial:r,animate:o}}),t?[tp(r),tp(o)]:[])}function tp(e){return Array.isArray(e)?e.join(" "):e}function np(e){var t=e.preloadedFeatures,n=e.createVisualElement,r=e.useRender,o=e.useVisualState,i=e.Component;return t&&function(e){for(var t in e){var n=e[t];null!==n&&(Mf[t].Component=n)}}(t),Object(jd.forwardRef)((function(e,t){var a=Object(jd.useContext)(Pf).isStatic,s=null,l=ep(e,a),u=o(e,a);return!a&&qf&&(l.visualElement=Uf(i,u,e,n),s=function(e,t,n){var r=[];if(Object(jd.useContext)(Tf),!t)return null;for(var o=0;o<Nf;o++){var i=Lf[o],a=Mf[i],s=a.isEnabled,l=a.Component;s(e)&&l&&r.push(jd.createElement(l,Cf({key:i},e,{visualElement:t})))}return r}(e,l.visualElement)),jd.createElement(jd.Fragment,null,jd.createElement(Rf.Provider,{value:l},r(i,e,function(e,t,n){return Object(jd.useCallback)((function(r){var o;r&&(null===(o=e.mount)||void 0===o||o.call(e,r)),t&&(r?t.mount(r):t.unmount()),n&&("function"===typeof n?n(r):Kf(n)&&(n.current=r))}),[t])}(u,l.visualElement,t),u,a)),s)}))}function rp(e){function t(t,n){return void 0===n&&(n={}),np(e(t,n))}var n=new Map;return new Proxy(t,{get:function(e,r){return n.has(r)||n.set(r,t(r)),n.get(r)}})}var op=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function ip(e){return"string"===typeof e&&!e.includes("-")&&!!(op.indexOf(e)>-1||/[A-Z]/.test(e))}var ap={};var sp=["","X","Y","Z"],lp=["transformPerspective","x","y","z"];function up(e,t){return lp.indexOf(e)-lp.indexOf(t)}["translate","scale","rotate","skew"].forEach((function(e){return sp.forEach((function(t){return lp.push(e+t)}))}));var cp=new Set(lp);function dp(e){return cp.has(e)}var fp=new Set(["originX","originY","originZ"]);function pp(e){return fp.has(e)}function hp(e,t){var n=t.layout,r=t.layoutId;return dp(e)||pp(e)||(n||void 0!==r)&&(!!ap[e]||"opacity"===e)}var mp=function(e){return null!==e&&"object"===typeof e&&e.getVelocity},vp={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function gp(e){return e.startsWith("--")}var yp=function(e,t){return t&&"number"===typeof e?t.transform(e):e},bp=function(e,t){return function(n){return Math.max(Math.min(n,t),e)}},wp=function(e){return e%1?Number(e.toFixed(5)):e},kp=/(-)?([\d]*\.?[\d])+/g,xp=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,Op=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;function Sp(e){return"string"===typeof e}var Cp=function(e){return{test:function(t){return Sp(t)&&t.endsWith(e)&&1===t.split(" ").length},parse:parseFloat,transform:function(t){return""+t+e}}},jp=Cp("deg"),Dp=Cp("%"),Ap=Cp("px"),Ep=Cp("vh"),Mp=Cp("vw"),Tp=Cf(Cf({},Dp),{parse:function(e){return Dp.parse(e)/100},transform:function(e){return Dp.transform(100*e)}}),Lp={test:function(e){return"number"===typeof e},parse:parseFloat,transform:function(e){return e}},Np=Cf(Cf({},Lp),{transform:bp(0,1)}),Pp=Cf(Cf({},Lp),{default:1}),Rp=Cf(Cf({},Lp),{transform:Math.round}),Hp={borderWidth:Ap,borderTopWidth:Ap,borderRightWidth:Ap,borderBottomWidth:Ap,borderLeftWidth:Ap,borderRadius:Ap,radius:Ap,borderTopLeftRadius:Ap,borderTopRightRadius:Ap,borderBottomRightRadius:Ap,borderBottomLeftRadius:Ap,width:Ap,maxWidth:Ap,height:Ap,maxHeight:Ap,size:Ap,top:Ap,right:Ap,bottom:Ap,left:Ap,padding:Ap,paddingTop:Ap,paddingRight:Ap,paddingBottom:Ap,paddingLeft:Ap,margin:Ap,marginTop:Ap,marginRight:Ap,marginBottom:Ap,marginLeft:Ap,rotate:jp,rotateX:jp,rotateY:jp,rotateZ:jp,scale:Pp,scaleX:Pp,scaleY:Pp,scaleZ:Pp,skew:jp,skewX:jp,skewY:jp,distance:Ap,translateX:Ap,translateY:Ap,translateZ:Ap,x:Ap,y:Ap,z:Ap,perspective:Ap,transformPerspective:Ap,opacity:Np,originX:Tp,originY:Tp,originZ:Ap,zIndex:Rp,fillOpacity:Np,strokeOpacity:Np,numOctaves:Rp};function Fp(e,t,n,r,o,i,a,s){var l,u=e.style,c=e.vars,d=e.transform,f=e.transformKeys,p=e.transformOrigin;f.length=0;var h=!1,m=!1,v=!0;for(var g in t){var y=t[g];if(gp(g))c[g]=y;else{var b=Hp[g],w=yp(y,b);if(dp(g)){if(h=!0,d[g]=w,f.push(g),!v)continue;y!==(null!==(l=b.default)&&void 0!==l?l:0)&&(v=!1)}else if(pp(g))p[g]=w,m=!0;else if((null===n||void 0===n?void 0:n.isHydrated)&&(null===r||void 0===r?void 0:r.isHydrated)&&ap[g]){var k=ap[g].process(y,r,n),x=ap[g].applyTo;if(x)for(var O=x.length,S=0;S<O;S++)u[x[S]]=k;else u[g]=k}else u[g]=w}}r&&n&&a&&s?(u.transform=a(r.deltaFinal,r.treeScale,h?d:void 0),i&&(u.transform=i(d,u.transform)),u.transformOrigin=s(r)):(h&&(u.transform=function(e,t,n,r){var o=e.transform,i=e.transformKeys,a=t.enableHardwareAcceleration,s=void 0===a||a,l=t.allowTransformNone,u=void 0===l||l,c="";i.sort(up);for(var d=!1,f=i.length,p=0;p<f;p++){var h=i[p];c+=(vp[h]||h)+"("+o[h]+") ","z"===h&&(d=!0)}return!d&&s?c+="translateZ(0)":c=c.trim(),r?c=r(o,n?"":c):u&&n&&(c="none"),c}(e,o,v,i)),m&&(u.transformOrigin=function(e){var t=e.originX,n=void 0===t?"50%":t,r=e.originY,o=void 0===r?"50%":r,i=e.originZ;return n+" "+o+" "+(void 0===i?0:i)}(p)))}var Vp=function(){return{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}};function zp(e,t,n){for(var r in t)mp(t[r])||hp(r,n)||(e[r]=t[r])}function Bp(e,t,n){var r={};return zp(r,e.style||{},e),Object.assign(r,function(e,t,n){var r=e.transformTemplate;return Object(jd.useMemo)((function(){var e={style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}};Fp(e,t,void 0,void 0,{enableHardwareAcceleration:!n},r);var o=e.style;return Cf(Cf({},e.vars),o)}),[t])}(e,t,n)),e.transformValues&&(r=e.transformValues(r)),r}function Ip(e,t,n){var r={},o=Bp(e,t,n);return Boolean(e.drag)&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),r.style=o,r}var _p=new Set(["initial","animate","exit","style","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","_layoutResetTransform","onLayoutAnimationComplete","onViewportBoxUpdate","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","whileDrag","onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","onHoverStart","onHoverEnd","whileFocus","whileTap","whileHover"]);function $p(e){return _p.has(e)}var qp=function(e){return!$p(e)};try{var Wp=n(36).default;qp=function(e){return e.startsWith("on")?!$p(e):Wp(e)}}catch(AM){}function Up(e,t,n){return"string"===typeof e?e:Ap.transform(t+n*e)}var Kp=function(e,t){return Ap.transform(e*t)},Gp={offset:"stroke-dashoffset",array:"stroke-dasharray"},Jp={offset:"strokeDashoffset",array:"strokeDasharray"};function Yp(e,t,n,r,o,i,a,s){var l=t.attrX,u=t.attrY,c=t.originX,d=t.originY,f=t.pathLength,p=t.pathSpacing,h=void 0===p?1:p,m=t.pathOffset,v=void 0===m?0:m;Fp(e,jf(t,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]),n,r,o,i,a,s),e.attrs=e.style,e.style={};var g=e.attrs,y=e.style,b=e.dimensions,w=e.totalPathLength;g.transform&&(b&&(y.transform=g.transform),delete g.transform),b&&(void 0!==c||void 0!==d||y.transform)&&(y.transformOrigin=function(e,t,n){return Up(t,e.x,e.width)+" "+Up(n,e.y,e.height)}(b,void 0!==c?c:.5,void 0!==d?d:.5)),void 0!==l&&(g.x=l),void 0!==u&&(g.y=u),void 0!==w&&void 0!==f&&function(e,t,n,r,o,i){void 0===r&&(r=1),void 0===o&&(o=0),void 0===i&&(i=!0);var a=i?Gp:Jp;e[a.offset]=Kp(-o,t);var s=Kp(n,t),l=Kp(r,t);e[a.array]=s+" "+l}(g,w,f,h,v,!1)}var Zp=function(){return Cf(Cf({},{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}),{attrs:{}})};function Xp(e,t){var n=Object(jd.useMemo)((function(){var n=Zp();return Yp(n,t,void 0,void 0,{enableHardwareAcceleration:!1},e.transformTemplate),Cf(Cf({},n.attrs),{style:Cf({},n.style)})}),[t]);if(e.style){var r={};zp(r,e.style,e),n.style=Cf(Cf({},r),n.style)}return n}function Qp(e){void 0===e&&(e=!1);return function(t,n,r,o,i){var a=o.latestValues,s=(ip(t)?Xp:Ip)(n,a,i),l=function(e,t,n){var r={};for(var o in e)(qp(o)||!0===n&&$p(o)||!t&&!$p(o))&&(r[o]=e[o]);return r}(n,"string"===typeof t,e),u=Cf(Cf(Cf({},l),s),{ref:r});return Object(jd.createElement)(t,u)}}var eh=/([a-z])([A-Z])/g,th=function(e){return e.replace(eh,"$1-$2").toLowerCase()};function nh(e,t){var n=t.style,r=t.vars;for(var o in Object.assign(e.style,n),r)e.style.setProperty(o,r[o])}var rh=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform"]);function oh(e,t){for(var n in nh(e,t),t.attrs)e.setAttribute(rh.has(n)?n:th(n),t.attrs[n])}function ih(e){var t=e.style,n={};for(var r in t)(mp(t[r])||hp(r,e))&&(n[r]=t[r]);return n}function ah(e){var t=ih(e);for(var n in e){if(mp(e[n]))t["x"===n||"y"===n?"attr"+n.toUpperCase():n]=e[n]}return t}function sh(e){return"object"===typeof e&&"function"===typeof e.start}var lh=function(e){return Array.isArray(e)};function uh(e){var t,n=mp(e)?e.get():e;return t=n,Boolean(t&&"object"===typeof t&&t.mix&&t.toValue)?n.toValue():n}function ch(e,t,n,r){var o=e.scrapeMotionValuesFromProps,i=e.createRenderState,a=e.onMount,s={latestValues:fh(t,n,r,o),renderState:i()};return a&&(s.mount=function(e){return a(t,e,s)}),s}var dh=function(e){return function(t,n){var r=Object(jd.useContext)(Rf),o=Object(jd.useContext)(Hf);return n?ch(e,t,r,o):Ff((function(){return ch(e,t,r,o)}))}};function fh(e,t,n,r){var o={},i=!1===(null===n||void 0===n?void 0:n.initial),a=r(e);for(var s in a)o[s]=uh(a[s]);var l=e.initial,u=e.animate,c=Xf(e),d=Qf(e);t&&d&&!c&&!1!==e.inherit&&(null!==l&&void 0!==l||(l=t.initial),null!==u&&void 0!==u||(u=t.animate));var f=i||!1===l?u:l;f&&"boolean"!==typeof f&&!sh(f)&&(Array.isArray(f)?f:[f]).forEach((function(t){var n=Yf(e,t);if(n){var r=n.transitionEnd;n.transition;var i=jf(n,["transitionEnd","transition"]);for(var a in i)o[a]=i[a];for(var a in r)o[a]=r[a]}}));return o}var ph={useVisualState:dh({scrapeMotionValuesFromProps:ah,createRenderState:Zp,onMount:function(e,t,n){var r=n.renderState,o=n.latestValues;try{r.dimensions="function"===typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(i){r.dimensions={x:0,y:0,width:0,height:0}}"path"===t.tagName&&(r.totalPathLength=t.getTotalLength()),Yp(r,o,void 0,void 0,{enableHardwareAcceleration:!1},e.transformTemplate),oh(t,r)}})};var hh,mh={useVisualState:dh({scrapeMotionValuesFromProps:ih,createRenderState:Vp})};function vh(e,t,n,r){var o=t.forwardMotionProps,i=void 0!==o&&o,a=ip(e)?ph:mh;return Cf(Cf({},a),{preloadedFeatures:n,useRender:Qp(i),createVisualElement:r,Component:e})}function gh(e,t,n,r){return e.addEventListener(t,n,r),function(){return e.removeEventListener(t,n,r)}}function yh(e,t,n,r){Object(jd.useEffect)((function(){var o=e.current;if(n&&o)return gh(o,t,n,r)}),[e,t,n,r])}function bh(e){return"undefined"!==typeof PointerEvent&&e instanceof PointerEvent?!("mouse"!==e.pointerType):e instanceof MouseEvent}function wh(e){return!!e.touches}!function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.Exit="exit"}(hh||(hh={}));var kh={pageX:0,pageY:0};function xh(e,t){void 0===t&&(t="page");var n=e.touches[0]||e.changedTouches[0]||kh;return{x:n[t+"X"],y:n[t+"Y"]}}function Oh(e,t){return void 0===t&&(t="page"),{x:e[t+"X"],y:e[t+"Y"]}}function Sh(e,t){return void 0===t&&(t="page"),{point:wh(e)?xh(e,t):Oh(e,t)}}var Ch=function(e,t){void 0===t&&(t=!1);var n,r=function(t){return e(t,Sh(t))};return t?(n=r,function(e){var t=e instanceof MouseEvent;(!t||t&&0===e.button)&&n(e)}):r},jh={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Dh={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function Ah(e){return qf&&null===window.onpointerdown?e:qf&&null===window.ontouchstart?Dh[e]:qf&&null===window.onmousedown?jh[e]:e}function Eh(e,t,n,r){return gh(e,Ah(t),Ch(n,"pointerdown"===t),r)}function Mh(e,t,n,r){return yh(e,Ah(t),n&&Ch(n,"pointerdown"===t),r)}function Th(e){var t=null;return function(){return null===t&&(t=e,function(){t=null})}}var Lh=Th("dragHorizontal"),Nh=Th("dragVertical");function Ph(e){var t=!1;if("y"===e)t=Nh();else if("x"===e)t=Lh();else{var n=Lh(),r=Nh();n&&r?t=function(){n(),r()}:(n&&n(),r&&r())}return t}function Rh(){var e=Ph(!0);return!e||(e(),!1)}function Hh(e,t,n){return function(r,o){var i;bh(r)&&!Rh()&&(null===n||void 0===n||n(r,o),null===(i=e.animationState)||void 0===i||i.setActive(hh.Hover,t))}}var Fh=function e(t,n){return!!n&&(t===n||e(t,n.parentElement))};function Vh(e){return Object(jd.useEffect)((function(){return function(){return e()}}),[])}var zh=function(e,t){return function(n){return t(e(n))}},Bh=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.reduce(zh)};var Ih=function(e){return function(t){return e(t),null}},_h={tap:Ih((function(e){var t=e.onTap,n=e.onTapStart,r=e.onTapCancel,o=e.whileTap,i=e.visualElement,a=t||n||r||o,s=Object(jd.useRef)(!1),l=Object(jd.useRef)(null);function u(){var e;null===(e=l.current)||void 0===e||e.call(l),l.current=null}function c(){var e;return u(),s.current=!1,null===(e=i.animationState)||void 0===e||e.setActive(hh.Tap,!1),!Rh()}function d(e,n){c()&&(Fh(i.getInstance(),e.target)?null===t||void 0===t||t(e,n):null===r||void 0===r||r(e,n))}function f(e,t){c()&&(null===r||void 0===r||r(e,t))}Mh(i,"pointerdown",a?function(e,t){var r;u(),s.current||(s.current=!0,l.current=Bh(Eh(window,"pointerup",d),Eh(window,"pointercancel",f)),null===n||void 0===n||n(e,t),null===(r=i.animationState)||void 0===r||r.setActive(hh.Tap,!0))}:void 0),Vh(u)})),focus:Ih((function(e){var t=e.whileFocus,n=e.visualElement;yh(n,"focus",t?function(){var e;null===(e=n.animationState)||void 0===e||e.setActive(hh.Focus,!0)}:void 0),yh(n,"blur",t?function(){var e;null===(e=n.animationState)||void 0===e||e.setActive(hh.Focus,!1)}:void 0)})),hover:Ih((function(e){var t=e.onHoverStart,n=e.onHoverEnd,r=e.whileHover,o=e.visualElement;Mh(o,"pointerenter",t||r?Hh(o,!0,t):void 0),Mh(o,"pointerleave",n||r?Hh(o,!1,n):void 0)}))};function $h(e,t){if(!Array.isArray(t))return!1;var n=t.length;if(n!==e.length)return!1;for(var r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var qh=function(e,t,n){return Math.min(Math.max(n,e),t)},Wh=.001;function Uh(e){var t,n,r=e.duration,o=void 0===r?800:r,i=e.bounce,a=void 0===i?.25:i,s=e.velocity,l=void 0===s?0:s,u=e.mass,c=void 0===u?1:u,d=1-a;d=qh(.05,1,d),o=qh(.01,10,o/1e3),d<1?(t=function(e){var t=e*d,n=t*o,r=t-l,i=Kh(e,d),a=Math.exp(-n);return Wh-r/i*a},n=function(e){var n=e*d*o,r=n*l+l,i=Math.pow(d,2)*Math.pow(e,2)*o,a=Math.exp(-n),s=Kh(Math.pow(e,2),d);return(-t(e)+Wh>0?-1:1)*((r-i)*a)/s}):(t=function(e){return Math.exp(-e*o)*((e-l)*o+1)-.001},n=function(e){return Math.exp(-e*o)*(o*o*(l-e))});var f=function(e,t,n){for(var r=n,o=1;o<12;o++)r-=e(r)/t(r);return r}(t,n,5/o);if(o*=1e3,isNaN(f))return{stiffness:100,damping:10,duration:o};var p=Math.pow(f,2)*c;return{stiffness:p,damping:2*d*Math.sqrt(c*p),duration:o}}function Kh(e,t){return e*Math.sqrt(1-t*t)}var Gh=["duration","bounce"],Jh=["stiffness","damping","mass"];function Yh(e,t){return t.some((function(t){return void 0!==e[t]}))}function Zh(e){var t=e.from,n=void 0===t?0:t,r=e.to,o=void 0===r?1:r,i=e.restSpeed,a=void 0===i?2:i,s=e.restDelta,l=jf(e,["from","to","restSpeed","restDelta"]),u={done:!1,value:n},c=function(e){var t=Cf({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!Yh(e,Jh)&&Yh(e,Gh)){var n=Uh(e);(t=Cf(Cf(Cf({},t),n),{velocity:0,mass:1})).isResolvedFromDuration=!0}return t}(l),d=c.stiffness,f=c.damping,p=c.mass,h=c.velocity,m=c.duration,v=c.isResolvedFromDuration,g=Xh,y=Xh;function b(){var e=h?-h/1e3:0,t=o-n,r=f/(2*Math.sqrt(d*p)),i=Math.sqrt(d/p)/1e3;if(null!==s&&void 0!==s||(s=Math.abs(o-n)<=1?.01:.4),r<1){var a=Kh(i,r);g=function(n){var s=Math.exp(-r*i*n);return o-s*((e+r*i*t)/a*Math.sin(a*n)+t*Math.cos(a*n))},y=function(n){var o=Math.exp(-r*i*n);return r*i*o*(Math.sin(a*n)*(e+r*i*t)/a+t*Math.cos(a*n))-o*(Math.cos(a*n)*(e+r*i*t)-a*t*Math.sin(a*n))}}else if(1===r)g=function(n){return o-Math.exp(-i*n)*(t+(e+i*t)*n)};else{var l=i*Math.sqrt(r*r-1);g=function(n){var a=Math.exp(-r*i*n),s=Math.min(l*n,300);return o-a*((e+r*i*t)*Math.sinh(s)+l*t*Math.cosh(s))/l}}}return b(),{next:function(e){var t=g(e);if(v)u.done=e>=m;else{var n=1e3*y(e),r=Math.abs(n)<=a,i=Math.abs(o-t)<=s;u.done=r&&i}return u.value=u.done?o:t,u},flipTarget:function(){var e;h=-h,n=(e=[o,n])[0],o=e[1],b()}}}Zh.needsInterpolation=function(e,t){return"string"===typeof e||"string"===typeof t};var Xh=function(e){return 0},Qh=function(e,t,n){var r=t-e;return 0===r?1:(n-e)/r},em=function(e,t,n){return-n*e+n*t+e},tm=function(e,t){return function(n){return Boolean(Sp(n)&&Op.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t))}},nm=function(e,t,n){return function(r){var o;if(!Sp(r))return r;var i=r.match(kp),a=i[0],s=i[1],l=i[2],u=i[3];return(o={})[e]=parseFloat(a),o[t]=parseFloat(s),o[n]=parseFloat(l),o.alpha=void 0!==u?parseFloat(u):1,o}},rm=bp(0,255),om=Cf(Cf({},Lp),{transform:function(e){return Math.round(rm(e))}}),im={test:tm("rgb","red"),parse:nm("red","green","blue"),transform:function(e){var t=e.red,n=e.green,r=e.blue,o=e.alpha,i=void 0===o?1:o;return"rgba("+om.transform(t)+", "+om.transform(n)+", "+om.transform(r)+", "+wp(Np.transform(i))+")"}};var am={test:tm("#"),parse:function(e){var t="",n="",r="",o="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),o=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),o=e.substr(4,1),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}},transform:im.transform},sm={test:tm("hsl","hue"),parse:nm("hue","saturation","lightness"),transform:function(e){var t=e.hue,n=e.saturation,r=e.lightness,o=e.alpha,i=void 0===o?1:o;return"hsla("+Math.round(t)+", "+Dp.transform(wp(n))+", "+Dp.transform(wp(r))+", "+wp(Np.transform(i))+")"}},lm=function(e,t,n){var r=e*e,o=t*t;return Math.sqrt(Math.max(0,n*(o-r)+r))},um=[am,im,sm],cm=function(e){return um.find((function(t){return t.test(e)}))},dm=function(e){return"'"+e+"' is not an animatable color. Use the equivalent color code instead."},fm=function(e,t){var n=cm(e),r=cm(t);dm(e),dm(t),n.transform,r.transform;var o=n.parse(e),i=r.parse(t),a=Cf({},o),s=n===sm?em:lm;return function(e){for(var t in a)"alpha"!==t&&(a[t]=s(o[t],i[t],e));return a.alpha=em(o.alpha,i.alpha,e),n.transform(a)}},pm={test:function(e){return im.test(e)||am.test(e)||sm.test(e)},parse:function(e){return im.test(e)?im.parse(e):sm.test(e)?sm.parse(e):am.parse(e)},transform:function(e){return Sp(e)?e:e.hasOwnProperty("red")?im.transform(e):sm.transform(e)}},hm="${c}",mm="${n}";function vm(e){var t=[],n=0,r=e.match(xp);r&&(n=r.length,e=e.replace(xp,hm),t.push.apply(t,r.map(pm.parse)));var o=e.match(kp);return o&&(e=e.replace(kp,mm),t.push.apply(t,o.map(Lp.parse))),{values:t,numColors:n,tokenised:e}}function gm(e){return vm(e).values}function ym(e){var t=vm(e),n=t.values,r=t.numColors,o=t.tokenised,i=n.length;return function(e){for(var t=o,n=0;n<i;n++)t=t.replace(n<r?hm:mm,n<r?pm.transform(e[n]):wp(e[n]));return t}}var bm=function(e){return"number"===typeof e?0:e};var wm={test:function(e){var t,n,r,o;return isNaN(e)&&Sp(e)&&(null!==(n=null===(t=e.match(kp))||void 0===t?void 0:t.length)&&void 0!==n?n:0)+(null!==(o=null===(r=e.match(xp))||void 0===r?void 0:r.length)&&void 0!==o?o:0)>0},parse:gm,createTransformer:ym,getAnimatableNone:function(e){var t=gm(e);return ym(e)(t.map(bm))}},km=function(e){return"number"===typeof e};function xm(e,t){return km(e)?function(n){return em(e,t,n)}:pm.test(e)?fm(e,t):jm(e,t)}var Om=function(e,t){var n=Af([],e),r=n.length,o=e.map((function(e,n){return xm(e,t[n])}));return function(e){for(var t=0;t<r;t++)n[t]=o[t](e);return n}},Sm=function(e,t){var n=Cf(Cf({},e),t),r={};for(var o in n)void 0!==e[o]&&void 0!==t[o]&&(r[o]=xm(e[o],t[o]));return function(e){for(var t in r)n[t]=r[t](e);return n}};function Cm(e){for(var t=wm.parse(e),n=t.length,r=0,o=0,i=0,a=0;a<n;a++)r||"number"===typeof t[a]?r++:void 0!==t[a].hue?i++:o++;return{parsed:t,numNumbers:r,numRGB:o,numHSL:i}}var jm=function(e,t){var n=wm.createTransformer(t),r=Cm(e),o=Cm(t);return r.numHSL===o.numHSL&&r.numRGB===o.numRGB&&(r.numNumbers,o.numNumbers),Bh(Om(r.parsed,o.parsed),n)},Dm=function(e,t){return function(n){return em(e,t,n)}};function Am(e,t,n){for(var r,o=[],i=n||("number"===typeof(r=e[0])?Dm:"string"===typeof r?pm.test(r)?fm:jm:Array.isArray(r)?Om:"object"===typeof r?Sm:void 0),a=e.length-1,s=0;s<a;s++){var l=i(e[s],e[s+1]);if(t){var u=Array.isArray(t)?t[s]:t;l=Bh(u,l)}o.push(l)}return o}function Em(e,t,n){var r=void 0===n?{}:n,o=r.clamp,i=void 0===o||o,a=r.ease,s=r.mixer,l=e.length;t.length,!a||!Array.isArray(a)||a.length,e[0]>e[l-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());var u=Am(t,a,s),c=2===l?function(e,t){var n=e[0],r=e[1],o=t[0];return function(e){return o(Qh(n,r,e))}}(e,u):function(e,t){var n=e.length,r=n-1;return function(o){var i=0,a=!1;if(o<=e[0]?a=!0:o>=e[r]&&(i=r-1,a=!0),!a){for(var s=1;s<n&&!(e[s]>o||s===r);s++);i=s-1}var l=Qh(e[i],e[i+1],o);return t[i](l)}}(e,u);return i?function(t){return c(qh(e[0],e[l-1],t))}:c}var Mm,Tm=function(e){return function(t){return 1-e(1-t)}},Lm=function(e){return function(t){return t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2}},Nm=function(e){return function(t){return t*t*((e+1)*t-e)}},Pm=function(e){return e},Rm=(Mm=2,function(e){return Math.pow(e,Mm)}),Hm=Tm(Rm),Fm=Lm(Rm),Vm=function(e){return 1-Math.sin(Math.acos(e))},zm=Tm(Vm),Bm=Lm(zm),Im=Nm(1.525),_m=Tm(Im),$m=Lm(Im),qm=function(e){var t=Nm(e);return function(e){return(e*=2)<1?.5*t(e):.5*(2-Math.pow(2,-10*(e-1)))}}(1.525),Wm=function(e){if(1===e||0===e)return e;var t=e*e;return e<.36363636363636365?7.5625*t:e<.7272727272727273?9.075*t-9.9*e+3.4:e<.9?12.066481994459833*t-19.63545706371191*e+8.898060941828255:10.8*e*e-20.52*e+10.72},Um=Tm(Wm);function Km(e,t){return e.map((function(){return t||Fm})).splice(0,e.length-1)}function Gm(e){var t=e.from,n=void 0===t?0:t,r=e.to,o=void 0===r?1:r,i=e.ease,a=e.offset,s=e.duration,l=void 0===s?300:s,u={done:!1,value:n},c=Array.isArray(o)?o:[n,o],d=function(e,t){return e.map((function(e){return e*t}))}(a&&a.length===c.length?a:function(e){var t=e.length;return e.map((function(e,n){return 0!==n?n/(t-1):0}))}(c),l);function f(){return Em(d,c,{ease:Array.isArray(i)?i:Km(c,i)})}var p=f();return{next:function(e){return u.value=p(e),u.done=e>=l,u},flipTarget:function(){c.reverse(),p=f()}}}var Jm={keyframes:Gm,spring:Zh,decay:function(e){var t=e.velocity,n=void 0===t?0:t,r=e.from,o=void 0===r?0:r,i=e.power,a=void 0===i?.8:i,s=e.timeConstant,l=void 0===s?350:s,u=e.restDelta,c=void 0===u?.5:u,d=e.modifyTarget,f={done:!1,value:o},p=a*n,h=o+p,m=void 0===d?h:d(h);return m!==h&&(p=m-o),{next:function(e){var t=-p*Math.exp(-e/l);return f.done=!(t>c||t<-c),f.value=f.done?m:m+t,f},flipTarget:function(){}}}};var Ym=1/60*1e3,Zm="undefined"!==typeof performance?function(){return performance.now()}:function(){return Date.now()},Xm="undefined"!==typeof window?function(e){return window.requestAnimationFrame(e)}:function(e){return setTimeout((function(){return e(Zm())}),Ym)};var Qm=!0,ev=!1,tv=!1,nv={delta:0,timestamp:0},rv=["read","update","preRender","render","postRender"],ov=rv.reduce((function(e,t){return e[t]=function(e){var t=[],n=[],r=0,o=!1,i=new WeakSet,a={schedule:function(e,a,s){void 0===a&&(a=!1),void 0===s&&(s=!1);var l=s&&o,u=l?t:n;return a&&i.add(e),-1===u.indexOf(e)&&(u.push(e),l&&o&&(r=t.length)),e},cancel:function(e){var t=n.indexOf(e);-1!==t&&n.splice(t,1),i.delete(e)},process:function(s){var l;if(o=!0,t=(l=[n,t])[0],(n=l[1]).length=0,r=t.length)for(var u=0;u<r;u++){var c=t[u];c(s),i.has(c)&&(a.schedule(c),e())}o=!1}};return a}((function(){return ev=!0})),e}),{}),iv=rv.reduce((function(e,t){var n=ov[t];return e[t]=function(e,t,r){return void 0===t&&(t=!1),void 0===r&&(r=!1),ev||cv(),n.schedule(e,t,r)},e}),{}),av=rv.reduce((function(e,t){return e[t]=ov[t].cancel,e}),{}),sv=rv.reduce((function(e,t){return e[t]=function(){return ov[t].process(nv)},e}),{}),lv=function(e){return ov[e].process(nv)},uv=function e(t){ev=!1,nv.delta=Qm?Ym:Math.max(Math.min(t-nv.timestamp,40),1),nv.timestamp=t,tv=!0,rv.forEach(lv),tv=!1,ev&&(Qm=!1,Xm(e))},cv=function(){ev=!0,Qm=!0,tv||Xm(uv)},dv=function(){return nv},fv=iv;function pv(e,t,n){return void 0===n&&(n=0),e-t-n}var hv=function(e){var t=function(t){var n=t.delta;return e(n)};return{start:function(){return fv.update(t,!0)},stop:function(){return av.update(t)}}};function mv(e){var t,n,r,o,i,a=e.from,s=e.autoplay,l=void 0===s||s,u=e.driver,c=void 0===u?hv:u,d=e.elapsed,f=void 0===d?0:d,p=e.repeat,h=void 0===p?0:p,m=e.repeatType,v=void 0===m?"loop":m,g=e.repeatDelay,y=void 0===g?0:g,b=e.onPlay,w=e.onStop,k=e.onComplete,x=e.onRepeat,O=e.onUpdate,S=jf(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]),C=S.to,j=0,D=S.duration,A=!1,E=!0,M=function(e){if(Array.isArray(e.to))return Gm;if(Jm[e.type])return Jm[e.type];var t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?Gm:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?Zh:Gm}(S);(null===(n=(t=M).needsInterpolation)||void 0===n?void 0:n.call(t,a,C))&&(i=Em([0,100],[a,C],{clamp:!1}),a=0,C=100);var T=M(Cf(Cf({},S),{from:a,to:C}));function L(){j++,"reverse"===v?f=function(e,t,n,r){return void 0===n&&(n=0),void 0===r&&(r=!0),r?pv(t+-e,t,n):t-(e-t)+n}(f,D,y,E=j%2===0):(f=pv(f,D,y),"mirror"===v&&T.flipTarget()),A=!1,x&&x()}function N(e){if(E||(e=-e),f+=e,!A){var t=T.next(Math.max(0,f));o=t.value,i&&(o=i(o)),A=E?t.done:f<=0}null===O||void 0===O||O(o),A&&(0===j&&(null!==D&&void 0!==D||(D=f)),j<h?function(e,t,n,r){return r?e>=t+n:e<=-n}(f,D,y,E)&&L():(r.stop(),k&&k()))}return l&&(null===b||void 0===b||b(),(r=c(N)).start()),{stop:function(){null===w||void 0===w||w(),r.stop()}}}function vv(e,t){return t?e*(1e3/t):0}var gv=function(e){return 1e3*e},yv=function(e,t){return 1-3*t+3*e},bv=function(e,t){return 3*t-6*e},wv=function(e){return 3*e},kv=function(e,t,n){return((yv(t,n)*e+bv(t,n))*e+wv(t))*e},xv=function(e,t,n){return 3*yv(t,n)*e*e+2*bv(t,n)*e+wv(t)};var Ov=.1;function Sv(e,t,n,r){if(e===t&&n===r)return Pm;for(var o=new Float32Array(11),i=0;i<11;++i)o[i]=kv(i*Ov,e,n);function a(t){for(var r=0,i=1;10!==i&&o[i]<=t;++i)r+=Ov;--i;var a=r+(t-o[i])/(o[i+1]-o[i])*Ov,s=xv(a,e,n);return s>=.001?function(e,t,n,r){for(var o=0;o<8;++o){var i=xv(t,n,r);if(0===i)return t;t-=(kv(t,n,r)-e)/i}return t}(t,a,e,n):0===s?a:function(e,t,n,r,o){var i,a,s=0;do{(i=kv(a=t+(n-t)/2,r,o)-e)>0?n=a:t=a}while(Math.abs(i)>1e-7&&++s<10);return a}(t,r,r+Ov,e,n)}return function(e){return 0===e||1===e?e:kv(a(e),t,r)}}var Cv={linear:Pm,easeIn:Rm,easeInOut:Fm,easeOut:Hm,circIn:Vm,circInOut:Bm,circOut:zm,backIn:Im,backInOut:$m,backOut:_m,anticipate:qm,bounceIn:Um,bounceInOut:function(e){return e<.5?.5*(1-Wm(1-2*e)):.5*Wm(2*e-1)+.5},bounceOut:Wm},jv=function(e){if(Array.isArray(e)){e.length;var t=Df(e,4);return Sv(t[0],t[1],t[2],t[3])}return"string"===typeof e?Cv[e]:e},Dv=function(e,t){return"zIndex"!==e&&(!("number"!==typeof t&&!Array.isArray(t))||!("string"!==typeof t||!wm.test(t)||t.startsWith("url(")))},Av=function(){return{type:"spring",stiffness:500,damping:25,restDelta:.5,restSpeed:10}},Ev=function(e){return{type:"spring",stiffness:550,damping:0===e?2*Math.sqrt(550):30,restDelta:.01,restSpeed:10}},Mv=function(){return{type:"keyframes",ease:"linear",duration:.3}},Tv=function(e){return{type:"keyframes",duration:.8,values:e}},Lv={x:Av,y:Av,z:Av,rotate:Av,rotateX:Av,rotateY:Av,rotateZ:Av,scaleX:Ev,scaleY:Ev,scale:Ev,opacity:Mv,backgroundColor:Mv,color:Mv,default:Ev},Nv=new Set(["brightness","contrast","saturate","opacity"]);function Pv(e){var t=e.slice(0,-1).split("("),n=t[0],r=t[1];if("drop-shadow"===n)return e;var o=(r.match(kp)||[])[0];if(!o)return e;var i=r.replace(o,""),a=Nv.has(n)?1:0;return o!==r&&(a*=100),n+"("+a+i+")"}var Rv=/([a-z-]*)\(.*?\)/g,Hv=Cf(Cf({},wm),{getAnimatableNone:function(e){var t=e.match(Rv);return t?t.map(Pv).join(" "):e}}),Fv=Cf(Cf({},Hp),{color:pm,backgroundColor:pm,outlineColor:pm,fill:pm,stroke:pm,borderColor:pm,borderTopColor:pm,borderRightColor:pm,borderBottomColor:pm,borderLeftColor:pm,filter:Hv,WebkitFilter:Hv}),Vv=function(e){return Fv[e]};function zv(e,t){var n,r=Vv(e);return r!==Hv&&(r=wm),null===(n=r.getAnimatableNone)||void 0===n?void 0:n.call(r,t)}function Bv(e){var t=e.ease,n=e.times,r=e.yoyo,o=e.flip,i=e.loop,a=jf(e,["ease","times","yoyo","flip","loop"]),s=Cf({},a);return n&&(s.offset=n),a.duration&&(s.duration=gv(a.duration)),a.repeatDelay&&(s.repeatDelay=gv(a.repeatDelay)),t&&(s.ease=function(e){return Array.isArray(e)&&"number"!==typeof e[0]}(t)?t.map(jv):jv(t)),"tween"===a.type&&(s.type="keyframes"),(r||i||o)&&(!0,r?s.repeatType="reverse":i?s.repeatType="loop":o&&(s.repeatType="mirror"),s.repeat=i||r||o||a.repeat),"spring"!==a.type&&(s.type="keyframes"),s}function Iv(e,t,n){var r;return Array.isArray(t.to)&&(null!==(r=e.duration)&&void 0!==r||(e.duration=.8)),function(e){Array.isArray(e.to)&&null===e.to[0]&&(e.to=Af([],Df(e.to)),e.to[0]=e.from)}(t),function(e){e.when,e.delay,e.delayChildren,e.staggerChildren,e.staggerDirection,e.repeat,e.repeatType,e.repeatDelay,e.from;var t=jf(e,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from"]);return!!Object.keys(t).length}(e)||(e=Cf(Cf({},e),function(e,t){var n;return n=lh(t)?Tv:Lv[e]||Lv.default,Cf({to:t},n(t))}(n,t.to))),Cf(Cf({},t),Bv(e))}function _v(e,t,n,r,o){var i,a=Wv(r,e),s=null!==(i=a.from)&&void 0!==i?i:t.get(),l=Dv(e,n);"none"===s&&l&&"string"===typeof n?s=zv(e,n):$v(s)&&"string"===typeof n?s=qv(n):!Array.isArray(n)&&$v(n)&&"string"===typeof s&&(n=qv(s));var u=Dv(e,s);return u&&l&&!1!==a.type?function(){var r={from:s,to:n,velocity:t.getVelocity(),onComplete:o,onUpdate:function(e){return t.set(e)}};return"inertia"===a.type||"decay"===a.type?function(e){var t,n=e.from,r=void 0===n?0:n,o=e.velocity,i=void 0===o?0:o,a=e.min,s=e.max,l=e.power,u=void 0===l?.8:l,c=e.timeConstant,d=void 0===c?750:c,f=e.bounceStiffness,p=void 0===f?500:f,h=e.bounceDamping,m=void 0===h?10:h,v=e.restDelta,g=void 0===v?1:v,y=e.modifyTarget,b=e.driver,w=e.onUpdate,k=e.onComplete;function x(e){return void 0!==a&&e<a||void 0!==s&&e>s}function O(e){return void 0===a?s:void 0===s||Math.abs(a-e)<Math.abs(s-e)?a:s}function S(e){null===t||void 0===t||t.stop(),t=mv(Cf(Cf({},e),{driver:b,onUpdate:function(t){var n;null===w||void 0===w||w(t),null===(n=e.onUpdate)||void 0===n||n.call(e,t)},onComplete:k}))}function C(e){S(Cf({type:"spring",stiffness:p,damping:m,restDelta:g},e))}if(x(r))C({from:r,velocity:i,to:O(r)});else{var j=u*i+r;"undefined"!==typeof y&&(j=y(j));var D,A,E=O(j),M=E===a?-1:1;S({type:"decay",from:r,velocity:i,timeConstant:d,power:u,restDelta:g,modifyTarget:y,onUpdate:x(j)?function(e){D=A,A=e,i=vv(e-D,dv().delta),(1===M&&e>E||-1===M&&e<E)&&C({from:e,to:E,velocity:i})}:void 0})}return{stop:function(){return null===t||void 0===t?void 0:t.stop()}}}(Cf(Cf({},r),a)):mv(Cf(Cf({},Iv(a,r,e)),{onUpdate:function(e){var t;r.onUpdate(e),null===(t=a.onUpdate)||void 0===t||t.call(a,e)},onComplete:function(){var e;r.onComplete(),null===(e=a.onComplete)||void 0===e||e.call(a)}}))}:function(){var e;return t.set(n),o(),null===(e=null===a||void 0===a?void 0:a.onComplete)||void 0===e||e.call(a),{stop:function(){}}}}function $v(e){return 0===e||"string"===typeof e&&0===parseFloat(e)&&-1===e.indexOf(" ")}function qv(e){return"number"===typeof e?0:zv("",e)}function Wv(e,t){return e[t]||e.default||e}function Uv(e,t,n,r){return void 0===r&&(r={}),t.start((function(o){var i,a,s=_v(e,t,n,r,o),l=function(e,t){var n;return null!==(n=(Wv(e,t)||{}).delay)&&void 0!==n?n:0}(r,e),u=function(){return a=s()};return l?i=setTimeout(u,gv(l)):u(),function(){clearTimeout(i),null===a||void 0===a||a.stop()}}))}function Kv(e,t){-1===e.indexOf(t)&&e.push(t)}function Gv(e,t){var n=e.indexOf(t);n>-1&&e.splice(n,1)}var Jv=function(){function e(){this.subscriptions=[]}return e.prototype.add=function(e){var t=this;return Kv(this.subscriptions,e),function(){return Gv(t.subscriptions,e)}},e.prototype.notify=function(e,t,n){var r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(var o=0;o<r;o++){var i=this.subscriptions[o];i&&i(e,t,n)}},e.prototype.getSize=function(){return this.subscriptions.length},e.prototype.clear=function(){this.subscriptions.length=0},e}(),Yv=function(){function e(e){var t,n=this;this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new Jv,this.velocityUpdateSubscribers=new Jv,this.renderSubscribers=new Jv,this.canTrackVelocity=!1,this.updateAndNotify=function(e,t){void 0===t&&(t=!0),n.prev=n.current,n.current=e;var r=dv(),o=r.delta,i=r.timestamp;n.lastUpdated!==i&&(n.timeDelta=o,n.lastUpdated=i,fv.postRender(n.scheduleVelocityCheck)),n.prev!==n.current&&n.updateSubscribers.notify(n.current),n.velocityUpdateSubscribers.getSize()&&n.velocityUpdateSubscribers.notify(n.getVelocity()),t&&n.renderSubscribers.notify(n.current)},this.scheduleVelocityCheck=function(){return fv.postRender(n.velocityCheck)},this.velocityCheck=function(e){e.timestamp!==n.lastUpdated&&(n.prev=n.current,n.velocityUpdateSubscribers.notify(n.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=(t=this.current,!isNaN(parseFloat(t)))}return e.prototype.onChange=function(e){return this.updateSubscribers.add(e)},e.prototype.clearListeners=function(){this.updateSubscribers.clear()},e.prototype.onRenderRequest=function(e){return e(this.get()),this.renderSubscribers.add(e)},e.prototype.attach=function(e){this.passiveEffect=e},e.prototype.set=function(e,t){void 0===t&&(t=!0),t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)},e.prototype.get=function(){return this.current},e.prototype.getPrevious=function(){return this.prev},e.prototype.getVelocity=function(){return this.canTrackVelocity?vv(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0},e.prototype.start=function(e){var t=this;return this.stop(),new Promise((function(n){t.hasAnimated=!0,t.stopAnimation=e(n)})).then((function(){return t.clearAnimation()}))},e.prototype.stop=function(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()},e.prototype.isAnimating=function(){return!!this.stopAnimation},e.prototype.clearAnimation=function(){this.stopAnimation=null},e.prototype.destroy=function(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()},e}();function Zv(e){return new Yv(e)}var Xv=function(e){return function(t){return t.test(e)}},Qv=[Lp,Ap,Dp,jp,Mp,Ep,{test:function(e){return"auto"===e},parse:function(e){return e}}],eg=function(e){return Qv.find(Xv(e))},tg=Af(Af([],Df(Qv)),[pm,wm]),ng=function(e){return tg.find(Xv(e))};function rg(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Zv(n))}function og(e,t){var n=Zf(e,t),r=n?e.makeTargetAnimatable(n,!1):{},o=r.transitionEnd,i=void 0===o?{}:o;r.transition;var a,s=jf(r,["transitionEnd","transition"]);for(var l in s=Cf(Cf({},s),i)){rg(e,l,(a=s[l],lh(a)?a[a.length-1]||0:a))}}function ig(e,t){Af([],Df(t)).reverse().forEach((function(n){var r,o=e.getVariant(n);o&&og(e,o),null===(r=e.variantChildren)||void 0===r||r.forEach((function(e){ig(e,t)}))}))}function ag(e,t){if(t)return(t[e]||t.default||t).from}function sg(e,t,n){var r;if(void 0===n&&(n={}),e.notifyAnimationStart(),Array.isArray(t)){var o=t.map((function(t){return lg(e,t,n)}));r=Promise.all(o)}else if("string"===typeof t)r=lg(e,t,n);else{var i="function"===typeof t?Zf(e,t,n.custom):t;r=ug(e,i,n)}return r.then((function(){return e.notifyAnimationComplete(t)}))}function lg(e,t,n){var r;void 0===n&&(n={});var o=Zf(e,t,n.custom),i=(o||{}).transition,a=void 0===i?e.getDefaultTransition()||{}:i;n.transitionOverride&&(a=n.transitionOverride);var s=o?function(){return ug(e,o,n)}:function(){return Promise.resolve()},l=(null===(r=e.variantChildren)||void 0===r?void 0:r.size)?function(r){void 0===r&&(r=0);var o=a.delayChildren,i=void 0===o?0:o,s=a.staggerChildren,l=a.staggerDirection;return function(e,t,n,r,o,i){void 0===n&&(n=0);void 0===r&&(r=0);void 0===o&&(o=1);var a=[],s=(e.variantChildren.size-1)*r,l=1===o?function(e){return void 0===e&&(e=0),e*r}:function(e){return void 0===e&&(e=0),s-e*r};return Array.from(e.variantChildren).sort(cg).forEach((function(e,r){a.push(lg(e,t,Cf(Cf({},i),{delay:n+l(r)})).then((function(){return e.notifyAnimationComplete(t)})))})),Promise.all(a)}(e,t,i+r,s,l,n)}:function(){return Promise.resolve()},u=a.when;if(u){var c=Df("beforeChildren"===u?[s,l]:[l,s],2),d=c[0],f=c[1];return d().then(f)}return Promise.all([s(),l(n.delay)])}function ug(e,t,n){var r,o=void 0===n?{}:n,i=o.delay,a=void 0===i?0:i,s=o.transitionOverride,l=o.type,u=e.makeTargetAnimatable(t),c=u.transition,d=void 0===c?e.getDefaultTransition():c,f=u.transitionEnd,p=jf(u,["transition","transitionEnd"]);s&&(d=s);var h=[],m=l&&(null===(r=e.animationState)||void 0===r?void 0:r.getState()[l]);for(var v in p){var g=e.getValue(v),y=p[v];if(!(!g||void 0===y||m&&dg(m,v))){var b=Uv(v,g,y,Cf({delay:a},d));h.push(b)}}return Promise.all(h).then((function(){f&&og(e,f)}))}function cg(e,t){return e.sortNodePosition(t)}function dg(e,t){var n=e.protectedKeys,r=e.needsAnimating,o=n.hasOwnProperty(t)&&!0!==r[t];return r[t]=!1,o}var fg=[hh.Animate,hh.Hover,hh.Tap,hh.Drag,hh.Focus,hh.Exit],pg=Af([],Df(fg)).reverse(),hg=fg.length;function mg(e){var t=function(e){return function(t){return Promise.all(t.map((function(t){var n=t.animation,r=t.options;return sg(e,n,r)})))}}(e),n=function(){var e;return(e={})[hh.Animate]=vg(!0),e[hh.Hover]=vg(),e[hh.Tap]=vg(),e[hh.Drag]=vg(),e[hh.Focus]=vg(),e[hh.Exit]=vg(),e}(),r={},o=!0,i=function(t,n){var r=Zf(e,n);if(r){r.transition;var o=r.transitionEnd,i=jf(r,["transition","transitionEnd"]);t=Cf(Cf(Cf({},t),i),o)}return t};function a(a,s){for(var l,u=e.getProps(),c=e.getVariantContext(!0)||{},d=[],f=new Set,p={},h=1/0,m=function(t){var r=pg[t],m=n[r],v=null!==(l=u[r])&&void 0!==l?l:c[r],g=Jf(v),y=r===s?m.isActive:null;!1===y&&(h=t);var b=v===c[r]&&v!==u[r]&&g;if(b&&o&&e.manuallyAnimateOnMount&&(b=!1),m.protectedKeys=Cf({},p),!m.isActive&&null===y||!v&&!m.prevProp||sh(v)||"boolean"===typeof v)return"continue";var w=function(e,t){if("string"===typeof t)return t!==e;if(Gf(t))return!$h(t,e);return!1}(m.prevProp,v)||r===s&&m.isActive&&!b&&g||t>h&&g,k=Array.isArray(v)?v:[v],x=k.reduce(i,{});!1===y&&(x={});var O=m.prevResolvedValues,S=void 0===O?{}:O,C=Cf(Cf({},S),x),j=function(e){w=!0,f.delete(e),m.needsAnimating[e]=!0};for(var D in C){var A=x[D],E=S[D];p.hasOwnProperty(D)||(A!==E?lh(A)&&lh(E)?$h(A,E)?m.protectedKeys[D]=!0:j(D):void 0!==A?j(D):f.add(D):void 0!==A&&f.has(D)?j(D):m.protectedKeys[D]=!0)}m.prevProp=v,m.prevResolvedValues=x,m.isActive&&(p=Cf(Cf({},p),x)),o&&e.blockInitialAnimation&&(w=!1),w&&!b&&d.push.apply(d,Af([],Df(k.map((function(e){return{animation:e,options:Cf({type:r},a)}})))))},v=0;v<hg;v++)m(v);if(r=Cf({},p),f.size){var g={};f.forEach((function(t){var n=e.getBaseTarget(t);void 0!==n&&(g[t]=n)})),d.push({animation:g})}var y=Boolean(d.length);return o&&!1===u.initial&&!e.manuallyAnimateOnMount&&(y=!1),o=!1,y?t(d):Promise.resolve()}return{isAnimated:function(e){return void 0!==r[e]},animateChanges:a,setActive:function(t,r,o){var i;return n[t].isActive===r?Promise.resolve():(null===(i=e.variantChildren)||void 0===i||i.forEach((function(e){var n;return null===(n=e.animationState)||void 0===n?void 0:n.setActive(t,r)})),n[t].isActive=r,a(o,t))},setAnimateFunction:function(n){t=n(e)},getState:function(){return n}}}function vg(e){return void 0===e&&(e=!1),{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}var gg={animation:Ih((function(e){var t=e.visualElement,n=e.animate;t.animationState||(t.animationState=mg(t)),sh(n)&&Object(jd.useEffect)((function(){return n.subscribe(t)}),[n])})),exit:Ih((function(e){var t=e.custom,n=e.visualElement,r=Df(Vf(),2),o=r[0],i=r[1],a=Object(jd.useContext)(Hf);Object(jd.useEffect)((function(){var e,r,s=null===(e=n.animationState)||void 0===e?void 0:e.setActive(hh.Exit,!o,{custom:null!==(r=null===a||void 0===a?void 0:a.custom)&&void 0!==r?r:t});!o&&(null===s||void 0===s||s.then(i))}),[o])}))},yg=function(e){return e.hasOwnProperty("x")&&e.hasOwnProperty("y")},bg=function(e){return yg(e)&&e.hasOwnProperty("z")},wg=function(e,t){return Math.abs(e-t)};function kg(e,t){if(km(e)&&km(t))return wg(e,t);if(yg(e)&&yg(t)){var n=wg(e.x,t.x),r=wg(e.y,t.y),o=bg(e)&&bg(t)?wg(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(o,2))}}var xg=function(){function e(e,t,n){var r=this,o=(void 0===n?{}:n).transformPagePoint;if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=function(){if(r.lastMoveEvent&&r.lastMoveEventInfo){var e=Cg(r.lastMoveEventInfo,r.history),t=null!==r.startEvent,n=kg(e.offset,{x:0,y:0})>=3;if(t||n){var o=e.point,i=dv().timestamp;r.history.push(Cf(Cf({},o),{timestamp:i}));var a=r.handlers,s=a.onStart,l=a.onMove;t||(s&&s(r.lastMoveEvent,e),r.startEvent=r.lastMoveEvent),l&&l(r.lastMoveEvent,e)}}},this.handlePointerMove=function(e,t){r.lastMoveEvent=e,r.lastMoveEventInfo=Og(t,r.transformPagePoint),bh(e)&&0===e.buttons?r.handlePointerUp(e,t):fv.update(r.updatePoint,!0)},this.handlePointerUp=function(e,t){r.end();var n=r.handlers,o=n.onEnd,i=n.onSessionEnd,a=Cg(Og(t,r.transformPagePoint),r.history);r.startEvent&&o&&o(e,a),i&&i(e,a)},!(wh(e)&&e.touches.length>1)){this.handlers=t,this.transformPagePoint=o;var i=Og(Sh(e),this.transformPagePoint),a=i.point,s=dv().timestamp;this.history=[Cf(Cf({},a),{timestamp:s})];var l=t.onSessionStart;l&&l(e,Cg(i,this.history)),this.removeListeners=Bh(Eh(window,"pointermove",this.handlePointerMove),Eh(window,"pointerup",this.handlePointerUp),Eh(window,"pointercancel",this.handlePointerUp))}}return e.prototype.updateHandlers=function(e){this.handlers=e},e.prototype.end=function(){this.removeListeners&&this.removeListeners(),av.update(this.updatePoint)},e}();function Og(e,t){return t?{point:t(e.point)}:e}function Sg(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Cg(e,t){var n=e.point;return{point:n,delta:Sg(n,Dg(t)),offset:Sg(n,jg(t)),velocity:Ag(t,.1)}}function jg(e){return e[0]}function Dg(e){return e[e.length-1]}function Ag(e,t){if(e.length<2)return{x:0,y:0};for(var n=e.length-1,r=null,o=Dg(e);n>=0&&(r=e[n],!(o.timestamp-r.timestamp>gv(t)));)n--;if(!r)return{x:0,y:0};var i=(o.timestamp-r.timestamp)/1e3;if(0===i)return{x:0,y:0};var a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Eg(e){return e}function Mg(e){var t=e.top;return{x:{min:e.left,max:e.right},y:{min:t,max:e.bottom}}}var Tg={translate:0,scale:1,origin:0,originPoint:0};function Lg(){return{x:Cf({},Tg),y:Cf({},Tg)}}function Ng(e){return[e("x"),e("y")]}function Pg(e,t,n){var r=t.min,o=t.max;return void 0!==r&&e<r?e=n?em(r,e,n.min):Math.max(e,r):void 0!==o&&e>o&&(e=n?em(o,e,n.max):Math.min(e,o)),e}function Rg(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function Hg(e,t){var n,r=t.min-e.min,o=t.max-e.max;return t.max-t.min<e.max-e.min&&(r=(n=Df([o,r],2))[0],o=n[1]),{min:e.min+r,max:e.min+o}}function Fg(e,t,n){return{min:Vg(e,t),max:Vg(e,n)}}function Vg(e,t){var n;return"number"===typeof e?e:null!==(n=e[t])&&void 0!==n?n:0}function zg(e,t){return Mg(function(e,t){var n=e.top,r=e.left,o=e.bottom,i=e.right;void 0===t&&(t=Eg);var a=t({x:r,y:n}),s=t({x:i,y:o});return{top:a.y,left:a.x,bottom:s.y,right:s.x}}(e.getBoundingClientRect(),t))}function Bg(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=.01),kg(e,t)<n}function Ig(e){return e.max-e.min}function _g(e,t){var n=.5,r=Ig(e),o=Ig(t);return o>r?n=Qh(t.min,t.max-r,e.min):r>o&&(n=Qh(e.min,e.max-o,t.min)),qh(0,1,n)}function $g(e,t,n,r){void 0===r&&(r=.5),e.origin=r,e.originPoint=em(t.min,t.max,e.origin),e.scale=Ig(n)/Ig(t),Bg(e.scale,1,1e-4)&&(e.scale=1),e.translate=em(n.min,n.max,e.origin)-e.originPoint,Bg(e.translate)&&(e.translate=0)}function qg(e,t,n,r){$g(e.x,t.x,n.x,Wg(r.originX)),$g(e.y,t.y,n.y,Wg(r.originY))}function Wg(e){return"number"===typeof e?e:.5}function Ug(e,t,n){e.min=n.min+t.min,e.max=e.min+Ig(t)}var Kg=function(e,t){return e.depth-t.depth};function Gg(e){return e.projection.isEnabled||e.shouldResetTransform()}function Jg(e,t){void 0===t&&(t=[]);var n=e.parent;return n&&Jg(n,t),Gg(e)&&t.push(e),t}function Yg(e){if(!e.shouldResetTransform()){var t,n=e.getLayoutState();e.notifyBeforeLayoutMeasure(n.layout),n.isHydrated=!0,n.layout=e.measureViewportBox(),n.layoutCorrected=(t=n.layout,{x:Cf({},t.x),y:Cf({},t.y)}),e.notifyLayoutMeasure(n.layout,e.prevViewportBox||n.layout),fv.update((function(){return e.rebaseProjectionTarget()}))}}function Zg(e,t){return{min:t.min-e.min,max:t.max-e.min}}function Xg(e,t){return{x:Zg(e.x,t.x),y:Zg(e.y,t.y)}}function Qg(e,t){var n=e.getLayoutId(),r=t.getLayoutId();return n!==r||void 0===r&&e!==t}function ey(e){var t=e.getProps(),n=t.drag,r=t._dragX;return n&&!r}function ty(e,t){e.min=t.min,e.max=t.max}function ny(e,t,n){return n+t*(e-n)}function ry(e,t,n,r,o){return void 0!==o&&(e=ny(e,o,r)),ny(e,n,r)+t}function oy(e,t,n,r,o){void 0===t&&(t=0),void 0===n&&(n=1),e.min=ry(e.min,t,n,r,o),e.max=ry(e.max,t,n,r,o)}function iy(e,t){var n=t.x,r=t.y;oy(e.x,n.translate,n.scale,n.originPoint),oy(e.y,r.translate,r.scale,r.originPoint)}function ay(e,t,n,r){var o=Df(r,3),i=o[0],a=o[1],s=o[2];e.min=t.min,e.max=t.max;var l=void 0!==n[s]?n[s]:.5,u=em(t.min,t.max,l);oy(e,n[i],n[a],u,n.scale)}var sy=["x","scaleX","originX"],ly=["y","scaleY","originY"];function uy(e,t,n){ay(e.x,t.x,n,sy),ay(e.y,t.y,n,ly)}function cy(e,t,n,r,o){return e=ny(e-=t,1/n,r),void 0!==o&&(e=ny(e,1/o,r)),e}function dy(e,t,n){var r=Df(n,3),o=r[0],i=r[1],a=r[2];!function(e,t,n,r,o){void 0===t&&(t=0),void 0===n&&(n=1),void 0===r&&(r=.5);var i=em(e.min,e.max,r)-t;e.min=cy(e.min,t,n,i,o),e.max=cy(e.max,t,n,i,o)}(e,t[o],t[i],t[a],t.scale)}function fy(e,t){dy(e.x,t,sy),dy(e.y,t,ly)}var py=new Set;function hy(e,t,n){e[n]||(e[n]=[]),e[n].push(t)}function my(e){return py.add(e),function(){return py.delete(e)}}function vy(){if(py.size){var e=0,t=[[]],n=[],r=function(n){return hy(t,n,e)},o=function(t){hy(n,t,e),e++};py.forEach((function(t){t(r,o),e=0})),py.clear();for(var i=n.length,a=0;a<=i;a++)t[a]&&t[a].forEach(yy),n[a]&&n[a].forEach(yy)}}var gy,yy=function(e){return e()},by=new WeakMap,wy=function(){function e(e){var t=e.visualElement;this.isDragging=!1,this.currentDirection=null,this.constraints=!1,this.elastic={x:{min:0,max:1},y:{min:0,max:1}},this.props={},this.hasMutatedConstraints=!1,this.cursorProgress={x:.5,y:.5},this.originPoint={},this.openGlobalLock=null,this.panSession=null,this.visualElement=t,this.visualElement.enableLayoutProjection(),by.set(t,this)}return e.prototype.start=function(e,t){var n=this,r=void 0===t?{}:t,o=r.snapToCursor,i=void 0!==o&&o,a=r.cursorProgress,s=this.props.transformPagePoint;this.panSession=new xg(e,{onSessionStart:function(e){var t;n.stopMotion();var r=function(e){return Sh(e,"client")}(e).point;null===(t=n.cancelLayout)||void 0===t||t.call(n),n.cancelLayout=my((function(e,t){var o=Jg(n.visualElement),s=function(e){var t=[];return e.children.forEach((function e(n){Gg(n)&&t.push(n),n.children.forEach(e)})),t.sort(Kg)}(n.visualElement),l=Af(Af([],Df(o)),Df(s)),u=!1;n.isLayoutDrag()&&n.visualElement.lockProjectionTarget(),t((function(){l.forEach((function(e){return e.resetTransform()}))})),e((function(){Yg(n.visualElement),s.forEach(Yg)})),t((function(){l.forEach((function(e){return e.restoreTransform()})),i&&(u=n.snapToCursor(r))})),e((function(){Boolean(n.getAxisMotionValue("x")&&!n.isExternalDrag())||n.visualElement.rebaseProjectionTarget(!0,n.visualElement.measureViewportBox(!1)),n.visualElement.scheduleUpdateLayoutProjection();var e=n.visualElement.projection;Ng((function(t){if(!u){var o=e.target[t],i=o.min,s=o.max;n.cursorProgress[t]=a?a[t]:Qh(i,s,r[t])}var l=n.getAxisMotionValue(t);l&&(n.originPoint[t]=l.get())}))})),t((function(){sv.update(),sv.preRender(),sv.render(),sv.postRender()})),e((function(){return n.resolveDragConstraints()}))}))},onStart:function(e,t){var r,o,i,a=n.props,s=a.drag,l=a.dragPropagation;(!s||l||(n.openGlobalLock&&n.openGlobalLock(),n.openGlobalLock=Ph(s),n.openGlobalLock))&&(vy(),n.isDragging=!0,n.currentDirection=null,null===(o=(r=n.props).onDragStart)||void 0===o||o.call(r,e,t),null===(i=n.visualElement.animationState)||void 0===i||i.setActive(hh.Drag,!0))},onMove:function(e,t){var r,o,i,a,s=n.props,l=s.dragPropagation,u=s.dragDirectionLock;if(l||n.openGlobalLock){var c=t.offset;if(u&&null===n.currentDirection)return n.currentDirection=function(e,t){void 0===t&&(t=10);var n=null;Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x");return n}(c),void(null!==n.currentDirection&&(null===(o=(r=n.props).onDirectionLock)||void 0===o||o.call(r,n.currentDirection)));n.updateAxis("x",t.point,c),n.updateAxis("y",t.point,c),null===(a=(i=n.props).onDrag)||void 0===a||a.call(i,e,t),gy=e}},onSessionEnd:function(e,t){return n.stop(e,t)}},{transformPagePoint:s})},e.prototype.resolveDragConstraints=function(){var e=this,t=this.props,n=t.dragConstraints,r=t.dragElastic,o=this.visualElement.getLayoutState().layoutCorrected;this.constraints=!!n&&(Kf(n)?this.resolveRefConstraints(o,n):function(e,t){var n=t.top,r=t.left,o=t.bottom,i=t.right;return{x:Rg(e.x,r,i),y:Rg(e.y,n,o)}}(o,n)),this.elastic=function(e){return!1===e?e=0:!0===e&&(e=.35),{x:Fg(e,"left","right"),y:Fg(e,"top","bottom")}}(r),this.constraints&&!this.hasMutatedConstraints&&Ng((function(t){e.getAxisMotionValue(t)&&(e.constraints[t]=function(e,t){var n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(o[t],e.constraints[t]))}))},e.prototype.resolveRefConstraints=function(e,t){var n=this.props,r=n.onMeasureDragConstraints,o=n.transformPagePoint,i=t.current;this.constraintsBox=zg(i,o);var a=function(e,t){return{x:Hg(e.x,t.x),y:Hg(e.y,t.y)}}(e,this.constraintsBox);if(r){var s=r(function(e){var t=e.x,n=e.y;return{top:n.min,bottom:n.max,left:t.min,right:t.max}}(a));this.hasMutatedConstraints=!!s,s&&(a=Mg(s))}return a},e.prototype.cancelDrag=function(){var e,t;this.visualElement.unlockProjectionTarget(),null===(e=this.cancelLayout)||void 0===e||e.call(this),this.isDragging=!1,this.panSession&&this.panSession.end(),this.panSession=null,!this.props.dragPropagation&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),null===(t=this.visualElement.animationState)||void 0===t||t.setActive(hh.Drag,!1)},e.prototype.stop=function(e,t){var n,r,o;null===(n=this.panSession)||void 0===n||n.end(),this.panSession=null;var i=this.isDragging;if(this.cancelDrag(),i){var a=t.velocity;this.animateDragEnd(a),null===(o=(r=this.props).onDragEnd)||void 0===o||o.call(r,e,t)}},e.prototype.snapToCursor=function(e){var t=this;return Ng((function(n){if(ky(n,t.props.drag,t.currentDirection)){var r=t.getAxisMotionValue(n);if(!r)return t.cursorProgress[n]=.5,!0;var o=t.visualElement.getLayoutState().layout,i=o[n].max-o[n].min,a=o[n].min+i/2,s=e[n]-a;t.originPoint[n]=e[n],r.set(s)}})).includes(!0)},e.prototype.updateAxis=function(e,t,n){if(ky(e,this.props.drag,this.currentDirection))return this.getAxisMotionValue(e)?this.updateAxisMotionValue(e,n):this.updateVisualElementAxis(e,t)},e.prototype.updateAxisMotionValue=function(e,t){var n=this.getAxisMotionValue(e);if(t&&n){var r=this.originPoint[e]+t[e],o=this.constraints?Pg(r,this.constraints[e],this.elastic[e]):r;n.set(o)}},e.prototype.updateVisualElementAxis=function(e,t){var n,r=this.visualElement.getLayoutState().layout[e],o=r.max-r.min,i=this.cursorProgress[e],a=function(e,t,n,r,o){var i=e-t*n;return r?Pg(i,r,o):i}(t[e],o,i,null===(n=this.constraints)||void 0===n?void 0:n[e],this.elastic[e]);this.visualElement.setProjectionTargetAxis(e,a,a+o)},e.prototype.setProps=function(e){var t=e.drag,n=void 0!==t&&t,r=e.dragDirectionLock,o=void 0!==r&&r,i=e.dragPropagation,a=void 0!==i&&i,s=e.dragConstraints,l=void 0!==s&&s,u=e.dragElastic,c=void 0===u?.35:u,d=e.dragMomentum,f=void 0===d||d,p=jf(e,["drag","dragDirectionLock","dragPropagation","dragConstraints","dragElastic","dragMomentum"]);this.props=Cf({drag:n,dragDirectionLock:o,dragPropagation:a,dragConstraints:l,dragElastic:c,dragMomentum:f},p)},e.prototype.getAxisMotionValue=function(e){var t=this.props,n=t.layout,r=t.layoutId,o="_drag"+e.toUpperCase();return this.props[o]?this.props[o]:n||void 0!==r?void 0:this.visualElement.getValue(e,0)},e.prototype.isLayoutDrag=function(){return!this.getAxisMotionValue("x")},e.prototype.isExternalDrag=function(){var e=this.props,t=e._dragX,n=e._dragY;return t||n},e.prototype.animateDragEnd=function(e){var t=this,n=this.props,r=n.drag,o=n.dragMomentum,i=n.dragElastic,a=n.dragTransition,s=function(e,t){void 0===t&&(t=!0);var n,r=e.getProjectionParent();return!!r&&(t?fy(n=Xg(r.projection.target,e.projection.target),r.getLatestValues()):n=Xg(r.getLayoutState().layout,e.getLayoutState().layout),Ng((function(t){return e.setProjectionTargetAxis(t,n[t].min,n[t].max,!0)})),!0)}(this.visualElement,this.isLayoutDrag()&&!this.isExternalDrag()),l=this.constraints||{};if(s&&Object.keys(l).length&&this.isLayoutDrag()){var u=this.visualElement.getProjectionParent();if(u){var c=Xg(u.projection.targetFinal,l);Ng((function(e){var t=c[e],n=t.min,r=t.max;l[e]={min:isNaN(n)?void 0:n,max:isNaN(r)?void 0:r}}))}}var d=Ng((function(n){var u;if(ky(n,r,t.currentDirection)){var c=null!==(u=null===l||void 0===l?void 0:l[n])&&void 0!==u?u:{},d=i?200:1e6,f=i?40:1e7,p=Cf(Cf({type:"inertia",velocity:o?e[n]:0,bounceStiffness:d,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10},a),c);return t.getAxisMotionValue(n)?t.startAxisValueAnimation(n,p):t.visualElement.startLayoutAnimation(n,p,s)}}));return Promise.all(d).then((function(){var e,n;null===(n=(e=t.props).onDragTransitionEnd)||void 0===n||n.call(e)}))},e.prototype.stopMotion=function(){var e=this;Ng((function(t){var n=e.getAxisMotionValue(t);n?n.stop():e.visualElement.stopLayoutAnimation()}))},e.prototype.startAxisValueAnimation=function(e,t){var n=this.getAxisMotionValue(e);if(n){var r=n.get();return n.set(r),n.set(r),Uv(e,n,0,t)}},e.prototype.scalePoint=function(){var e=this,t=this.props,n=t.drag;if(Kf(t.dragConstraints)&&this.constraintsBox){this.stopMotion();var r={x:0,y:0};Ng((function(t){r[t]=_g(e.visualElement.projection.target[t],e.constraintsBox[t])})),this.updateConstraints((function(){Ng((function(t){if(ky(t,n,null)){var o=function(e,t,n){var r=e.max-e.min,o=em(t.min,t.max-r,n);return{min:o,max:o+r}}(e.visualElement.projection.target[t],e.constraintsBox[t],r[t]),i=o.min,a=o.max;e.visualElement.setProjectionTargetAxis(t,i,a)}}))})),setTimeout(vy,1)}},e.prototype.updateConstraints=function(e){var t=this;this.cancelLayout=my((function(n,r){var o=Jg(t.visualElement);r((function(){return o.forEach((function(e){return e.resetTransform()}))})),n((function(){return Yg(t.visualElement)})),r((function(){return o.forEach((function(e){return e.restoreTransform()}))})),n((function(){t.resolveDragConstraints()})),e&&r(e)}))},e.prototype.mount=function(e){var t=this,n=Eh(e.getInstance(),"pointerdown",(function(e){var n=t.props,r=n.drag,o=n.dragListener;r&&(void 0===o||o)&&t.start(e)})),r=gh(window,"resize",(function(){t.scalePoint()})),o=e.onLayoutUpdate((function(){t.isDragging&&t.resolveDragConstraints()})),i=e.prevDragCursor;return i&&this.start(gy,{cursorProgress:i}),function(){null===n||void 0===n||n(),null===r||void 0===r||r(),null===o||void 0===o||o(),t.cancelDrag()}},e}();function ky(e,t,n){return(!0===t||t===e)&&(null===n||n===e)}var xy,Oy,Sy={pan:Ih((function(e){var t=e.onPan,n=e.onPanStart,r=e.onPanEnd,o=e.onPanSessionStart,i=e.visualElement,a=t||n||r||o,s=Object(jd.useRef)(null),l=Object(jd.useContext)(Pf).transformPagePoint,u={onSessionStart:o,onStart:n,onMove:t,onEnd:function(e,t){s.current=null,r&&r(e,t)}};Object(jd.useEffect)((function(){null!==s.current&&s.current.updateHandlers(u)})),Mh(i,"pointerdown",a&&function(e){s.current=new xg(e,u,{transformPagePoint:l})}),Vh((function(){return s.current&&s.current.end()}))})),drag:Ih((function(e){var t=e.dragControls,n=e.visualElement,r=Object(jd.useContext)(Pf).transformPagePoint,o=Ff((function(){return new wy({visualElement:n})}));o.setProps(Cf(Cf({},e),{transformPagePoint:r})),Object(jd.useEffect)((function(){return t&&t.subscribe(o)}),[o]),Object(jd.useEffect)((function(){return o.mount(n)}),[])}))};function Cy(e){return"string"===typeof e&&e.startsWith("var(--")}!function(e){e[e.Entering=0]="Entering",e[e.Present=1]="Present",e[e.Exiting=2]="Exiting"}(xy||(xy={})),function(e){e[e.Hide=0]="Hide",e[e.Show=1]="Show"}(Oy||(Oy={}));var jy=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Dy(e,t,n){void 0===n&&(n=1);var r=Df(function(e){var t=jy.exec(e);if(!t)return[,];var n=Df(t,3);return[n[1],n[2]]}(e),2),o=r[0],i=r[1];if(o){var a=window.getComputedStyle(t).getPropertyValue(o);return a?a.trim():Cy(i)?Dy(i,t,n+1):i}}function Ay(e,t){return e/(t.max-t.min)*100}var Ey="_$css";var My={process:function(e,t,n){var r=n.target;if("string"===typeof e){if(!Ap.test(e))return e;e=parseFloat(e)}return Ay(e,r.x)+"% "+Ay(e,r.y)+"%"}},Ty={borderRadius:Cf(Cf({},My),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:My,borderTopRightRadius:My,borderBottomLeftRadius:My,borderBottomRightRadius:My,boxShadow:{process:function(e,t){var n=t.delta,r=t.treeScale,o=e,i=e.includes("var("),a=[];i&&(e=e.replace(jy,(function(e){return a.push(e),Ey})));var s=wm.parse(e);if(s.length>5)return o;var l=wm.createTransformer(e),u="number"!==typeof s[0]?1:0,c=n.x.scale*r.x,d=n.y.scale*r.y;s[0+u]/=c,s[1+u]/=d;var f=em(c,d,.5);"number"===typeof s[2+u]&&(s[2+u]/=f),"number"===typeof s[3+u]&&(s[3+u]/=f);var p=l(s);if(i){var h=0;p=p.replace(Ey,(function(){var e=a[h];return h++,e}))}return p}}},Ly=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.frameTarget={x:{min:0,max:1},y:{min:0,max:1}},t.currentAnimationTarget={x:{min:0,max:1},y:{min:0,max:1}},t.isAnimating={x:!1,y:!1},t.stopAxisAnimation={x:void 0,y:void 0},t.isAnimatingTree=!1,t.animate=function(e,n,r){void 0===r&&(r={});var o=r.originBox,i=r.targetBox,a=r.visibilityAction,s=r.shouldStackAnimate,l=r.onComplete,u=r.prevParent,c=jf(r,["originBox","targetBox","visibilityAction","shouldStackAnimate","onComplete","prevParent"]),d=t.props,f=d.visualElement,p=d.layout;if(!1===s)return t.isAnimatingTree=!1,t.safeToRemove();if(!t.isAnimatingTree||!0===s){s&&(t.isAnimatingTree=!0),n=o||n,e=i||e;var h=!1,m=f.getProjectionParent();if(m){var v=m.prevViewportBox,g=m.getLayoutState().layout;u&&(i&&(g=u.getLayoutState().layout),o&&!Qg(u,m)&&u.prevViewportBox&&(v=u.prevViewportBox)),v&&Vy(u,o,i)&&(h=!0,n=Xg(v,n),e=Xg(g,e))}var y=Ny(n,e),b=Ng((function(r){var o,i;if("position"===p){var s=e[r].max-e[r].min;n[r].max=n[r].min+s}if(!f.projection.isTargetLocked)return void 0===a?y?t.animateAxis(r,e[r],n[r],Cf(Cf({},c),{isRelative:h})):(null===(i=(o=t.stopAxisAnimation)[r])||void 0===i||i.call(o),f.setProjectionTargetAxis(r,e[r].min,e[r].max,h)):void f.setVisibility(a===Oy.Show)}));return f.syncRender(),Promise.all(b).then((function(){t.isAnimatingTree=!1,l&&l(),f.notifyLayoutAnimationComplete()}))}},t}return Sf(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props.visualElement;t.animateMotionValue=Uv,t.enableLayoutProjection(),this.unsubLayoutReady=t.onLayoutUpdate(this.animate),t.layoutSafeToRemove=function(){return e.safeToRemove()},function(e){for(var t in e)ap[t]=e[t]}(Ty)},t.prototype.componentWillUnmount=function(){var e=this;this.unsubLayoutReady(),Ng((function(t){var n,r;return null===(r=(n=e.stopAxisAnimation)[t])||void 0===r?void 0:r.call(n)}))},t.prototype.animateAxis=function(e,t,n,r){var o,i,a=this,s=void 0===r?{}:r,l=s.transition,u=s.isRelative;if(!this.isAnimating[e]||!Hy(t,this.currentAnimationTarget[e])){null===(i=(o=this.stopAxisAnimation)[e])||void 0===i||i.call(o),this.isAnimating[e]=!0;var c=this.props.visualElement,d=this.frameTarget[e],f=c.getProjectionAnimationProgress()[e];f.clearListeners(),f.set(0),f.set(0);var p=function(){var r=f.get()/1e3;!function(e,t,n,r){e.min=em(t.min,n.min,r),e.max=em(t.max,n.max,r)}(d,n,t,r),c.setProjectionTargetAxis(e,d.min,d.max,u)};p();var h=f.onChange(p);this.stopAxisAnimation[e]=function(){a.isAnimating[e]=!1,f.stop(),h()},this.currentAnimationTarget[e]=t;var m=l||c.getDefaultTransition()||Fy;return Uv("x"===e?"layoutX":"layoutY",f,1e3,m&&Wv(m,"layout")).then(this.stopAxisAnimation[e])}},t.prototype.safeToRemove=function(){var e,t;null===(t=(e=this.props).safeToRemove)||void 0===t||t.call(e)},t.prototype.render=function(){return null},t}(jd.Component);function Ny(e,t){return!Ry(e)&&!Ry(t)&&(!Hy(e.x,t.x)||!Hy(e.y,t.y))}var Py={min:0,max:0};function Ry(e){return Hy(e.x,Py)&&Hy(e.y,Py)}function Hy(e,t){return e.min===t.min&&e.max===t.max}var Fy={duration:.45,ease:[.4,0,.1,1]};function Vy(e,t,n){return e||!e&&!(t||n)}var zy={layoutReady:function(e){return e.notifyLayoutReady()}};function By(){var e=new Set;return{add:function(t){return e.add(t)},flush:function(t){var n=void 0===t?zy:t,r=n.layoutReady,o=n.parent;my((function(t,n){var i=Array.from(e).sort(Kg),a=o?Jg(o):[];n((function(){Af(Af([],Df(a)),Df(i)).forEach((function(e){return e.resetTransform()}))})),t((function(){i.forEach(Yg)})),n((function(){a.forEach((function(e){return e.restoreTransform()})),i.forEach(r)})),t((function(){i.forEach((function(e){e.isPresent&&(e.presence=xy.Present)}))})),n((function(){sv.preRender(),sv.render()})),t((function(){fv.postRender((function(){return i.forEach(Iy)})),e.clear()}))})),vy()}}}function Iy(e){e.prevViewportBox=e.projection.target}var _y=Object(jd.createContext)(By()),$y=Object(jd.createContext)(By());function qy(e){return!!e.forceUpdate}var Wy=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Sf(t,e),t.prototype.componentDidMount=function(){var e=this.props,t=e.syncLayout,n=e.framerSyncLayout,r=e.visualElement;qy(t)&&t.register(r),qy(n)&&n.register(r),r.onUnmount((function(){qy(t)&&t.remove(r),qy(n)&&n.remove(r)}))},t.prototype.getSnapshotBeforeUpdate=function(){var e=this.props,t=e.syncLayout,n=e.visualElement;return qy(t)?t.syncUpdate():(!function(e){e.shouldResetTransform()||(e.prevViewportBox=e.measureViewportBox(!1),e.rebaseProjectionTarget(!1,e.prevViewportBox))}(n),t.add(n)),null},t.prototype.componentDidUpdate=function(){var e=this.props.syncLayout;qy(e)||e.flush()},t.prototype.render=function(){return null},t}(Dd.a.Component);var Uy={measureLayout:function(e){var t=Object(jd.useContext)(_y),n=Object(jd.useContext)($y);return Dd.a.createElement(Wy,Cf({},e,{syncLayout:t,framerSyncLayout:n}))},layoutAnimation:function(e){var t=Df(Vf(),2)[1];return jd.createElement(Ly,Cf({},e,{safeToRemove:t}))}};function Ky(){return{isHydrated:!1,layout:{x:{min:0,max:1},y:{min:0,max:1}},layoutCorrected:{x:{min:0,max:1},y:{min:0,max:1}},treeScale:{x:1,y:1},delta:Lg(),deltaFinal:Lg(),deltaTransform:""}}var Gy=Ky();function Jy(e,t,n){var r=e.x,o=e.y,i="translate3d("+r.translate/t.x+"px, "+o.translate/t.y+"px, 0) ";if(n){var a=n.rotate,s=n.rotateX,l=n.rotateY;a&&(i+="rotate("+a+") "),s&&(i+="rotateX("+s+") "),l&&(i+="rotateY("+l+") ")}return i+="scale("+r.scale+", "+o.scale+")",n||i!==Zy?i:""}function Yy(e){var t=e.deltaFinal;return 100*t.x.origin+"% "+100*t.y.origin+"% 0"}var Zy=Jy(Gy.delta,Gy.treeScale,{x:1,y:1}),Xy=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","SetAxisTarget","Unmount"];function Qy(e,t,n,r){var o,i,a=e.delta,s=e.layout,l=e.layoutCorrected,u=e.treeScale,c=t.target;i=s,ty((o=l).x,i.x),ty(o.y,i.y),function(e,t,n){var r=n.length;if(r){var o,i;t.x=t.y=1;for(var a=0;a<r;a++)i=(o=n[a]).getLayoutState().delta,t.x*=i.x.scale,t.y*=i.y.scale,iy(e,i),ey(o)&&uy(e,e,o.getLatestValues())}}(l,u,n),qg(a,l,c,r)}var eb=function(){function e(){this.children=[],this.isDirty=!1}return e.prototype.add=function(e){Kv(this.children,e),this.isDirty=!0},e.prototype.remove=function(e){Gv(this.children,e),this.isDirty=!0},e.prototype.forEach=function(e){this.isDirty&&this.children.sort(Kg),this.isDirty=!1,this.children.forEach(e)},e}();var tb=function(e){var t=e.treeType,n=void 0===t?"":t,r=e.build,o=e.getBaseTarget,i=e.makeTargetAnimatable,a=e.measureViewportBox,s=e.render,l=e.readValueFromInstance,u=e.resetTransform,c=e.restoreTransform,d=e.removeValueFromRenderState,f=e.sortNodePosition,p=e.scrapeMotionValuesFromProps;return function(e,t){var h=e.parent,m=e.props,v=e.presenceId,g=e.blockInitialAnimation,y=e.visualState;void 0===t&&(t={});var b,w,k,x,O,S,C=y.latestValues,j=y.renderState,D=function(){var e=Xy.map((function(){return new Jv})),t={},n={clearAllListeners:function(){return e.forEach((function(e){return e.clear()}))},updatePropListeners:function(e){return Xy.forEach((function(r){var o;null===(o=t[r])||void 0===o||o.call(t);var i="on"+r,a=e[i];a&&(t[r]=n[i](a))}))}};return e.forEach((function(e,t){n["on"+Xy[t]]=function(t){return e.add(t)},n["notify"+Xy[t]]=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.notify.apply(e,Af([],Df(t)))}})),n}(),A={isEnabled:!1,isHydrated:!1,isTargetLocked:!1,target:{x:{min:0,max:1},y:{min:0,max:1}},targetFinal:{x:{min:0,max:1},y:{min:0,max:1}}},E=A,M=C,T=Ky(),L=!1,N=new Map,P=new Map,R={},H=Cf({},C);function F(){b&&(U.isProjectionReady()&&(uy(E.targetFinal,E.target,M),qg(T.deltaFinal,T.layoutCorrected,E.targetFinal,C)),V(),s(b,j))}function V(){var e=C;if(x&&x.isActive()){var n=x.getCrossfadeState(U);n&&(e=n)}r(U,j,e,E,T,t,m)}function z(){D.notifyUpdate(C)}function B(){U.layoutTree.forEach(rb)}var I=p(m);for(var _ in I){var $=I[_];void 0!==C[_]&&mp($)&&$.set(C[_],!1)}var q=Xf(m),W=Qf(m),U=Cf(Cf({treeType:n,current:null,depth:h?h.depth+1:0,parent:h,children:new Set,path:h?Af(Af([],Df(h.path)),[h]):[],layoutTree:h?h.layoutTree:new eb,presenceId:v,projection:A,variantChildren:W?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(null===h||void 0===h?void 0:h.isMounted()),blockInitialAnimation:g,isMounted:function(){return Boolean(b)},mount:function(e){b=U.current=e,U.pointTo(U),W&&h&&!q&&(S=null===h||void 0===h?void 0:h.addVariantChild(U)),null===h||void 0===h||h.children.add(U)},unmount:function(){av.update(z),av.render(F),av.preRender(U.updateLayoutProjection),P.forEach((function(e){return e()})),U.stopLayoutAnimation(),U.layoutTree.remove(U),null===S||void 0===S||S(),null===h||void 0===h||h.children.delete(U),null===k||void 0===k||k(),D.clearAllListeners()},addVariantChild:function(e){var t,n=U.getClosestVariantNode();if(n)return null===(t=n.variantChildren)||void 0===t||t.add(e),function(){return n.variantChildren.delete(e)}},sortNodePosition:function(e){return f&&n===e.treeType?f(U.getInstance(),e.getInstance()):0},getClosestVariantNode:function(){return W?U:null===h||void 0===h?void 0:h.getClosestVariantNode()},scheduleUpdateLayoutProjection:h?h.scheduleUpdateLayoutProjection:function(){return fv.preRender(U.updateTreeLayoutProjection,!1,!0)},getLayoutId:function(){return m.layoutId},getInstance:function(){return b},getStaticValue:function(e){return C[e]},setStaticValue:function(e,t){return C[e]=t},getLatestValues:function(){return C},setVisibility:function(e){U.isVisible!==e&&(U.isVisible=e,U.scheduleRender())},makeTargetAnimatable:function(e,t){return void 0===t&&(t=!0),i(U,e,m,t)},addValue:function(e,t){U.hasValue(e)&&U.removeValue(e),N.set(e,t),C[e]=t.get(),function(e,t){var n=t.onChange((function(t){C[e]=t,m.onUpdate&&fv.update(z,!1,!0)})),r=t.onRenderRequest(U.scheduleRender);P.set(e,(function(){n(),r()}))}(e,t)},removeValue:function(e){var t;N.delete(e),null===(t=P.get(e))||void 0===t||t(),P.delete(e),delete C[e],d(e,j)},hasValue:function(e){return N.has(e)},getValue:function(e,t){var n=N.get(e);return void 0===n&&void 0!==t&&(n=Zv(t),U.addValue(e,n)),n},forEachValue:function(e){return N.forEach(e)},readValue:function(e){var n;return null!==(n=C[e])&&void 0!==n?n:l(b,e,t)},setBaseTarget:function(e,t){H[e]=t},getBaseTarget:function(e){if(o){var t=o(m,e);if(void 0!==t&&!mp(t))return t}return H[e]}},D),{build:function(){return V(),j},scheduleRender:function(){fv.render(F,!1,!0)},syncRender:F,setProps:function(e){m=e,D.updatePropListeners(e),R=function(e,t,n){var r;for(var o in t){var i=t[o],a=n[o];if(mp(i))e.addValue(o,i);else if(mp(a))e.addValue(o,Zv(i));else if(a!==i)if(e.hasValue(o)){var s=e.getValue(o);!s.hasAnimated&&s.set(i)}else e.addValue(o,Zv(null!==(r=e.getStaticValue(o))&&void 0!==r?r:i))}for(var o in n)void 0===t[o]&&e.removeValue(o);return t}(U,p(m),R)},getProps:function(){return m},getVariant:function(e){var t;return null===(t=m.variants)||void 0===t?void 0:t[e]},getDefaultTransition:function(){return m.transition},getVariantContext:function(e){if(void 0===e&&(e=!1),e)return null===h||void 0===h?void 0:h.getVariantContext();if(!q){var t=(null===h||void 0===h?void 0:h.getVariantContext())||{};return void 0!==m.initial&&(t.initial=m.initial),t}for(var n={},r=0;r<ab;r++){var o=ib[r],i=m[o];(Jf(i)||!1===i)&&(n[o]=i)}return n},enableLayoutProjection:function(){A.isEnabled=!0,U.layoutTree.add(U)},lockProjectionTarget:function(){A.isTargetLocked=!0},unlockProjectionTarget:function(){U.stopLayoutAnimation(),A.isTargetLocked=!1},getLayoutState:function(){return T},setCrossfader:function(e){x=e},isProjectionReady:function(){return A.isEnabled&&A.isHydrated&&T.isHydrated},startLayoutAnimation:function(e,t,n){void 0===n&&(n=!1);var r=U.getProjectionAnimationProgress()[e],o=n?A.relativeTarget[e]:A.target[e],i=o.min,a=o.max-i;return r.clearListeners(),r.set(i),r.set(i),r.onChange((function(t){U.setProjectionTargetAxis(e,t,t+a,n)})),U.animateMotionValue(e,r,0,t)},stopLayoutAnimation:function(){Ng((function(e){return U.getProjectionAnimationProgress()[e].stop()}))},measureViewportBox:function(e){void 0===e&&(e=!0);var n=a(b,t);return e||fy(n,C),n},getProjectionAnimationProgress:function(){return O||(O={x:Zv(0),y:Zv(0)}),O},setProjectionTargetAxis:function(e,t,n,r){var o;void 0===r&&(r=!1),r?(A.relativeTarget||(A.relativeTarget={x:{min:0,max:1},y:{min:0,max:1}}),o=A.relativeTarget[e]):(A.relativeTarget=void 0,o=A.target[e]),A.isHydrated=!0,o.min=t,o.max=n,L=!0,D.notifySetAxisTarget()},rebaseProjectionTarget:function(e,t){void 0===t&&(t=T.layout);var n=U.getProjectionAnimationProgress(),r=n.x,o=n.y,i=!A.relativeTarget&&!A.isTargetLocked&&!r.isAnimating()&&!o.isAnimating();(e||i)&&Ng((function(e){var n=t[e],r=n.min,o=n.max;U.setProjectionTargetAxis(e,r,o)}))},notifyLayoutReady:function(e){!function(e){var t=e.getProjectionParent();if(t){var n=Xg(t.getLayoutState().layout,e.getLayoutState().layout);Ng((function(t){e.setProjectionTargetAxis(t,n[t].min,n[t].max,!0)}))}else e.rebaseProjectionTarget()}(U),U.notifyLayoutUpdate(T.layout,U.prevViewportBox||T.layout,e)},resetTransform:function(){return u(U,b,m)},restoreTransform:function(){return c(b,j)},updateLayoutProjection:function(){if(U.isProjectionReady()){var e=T.delta,t=T.treeScale,n=t.x,r=t.y,o=T.deltaTransform;Qy(T,E,U.path,C),L&&U.notifyViewportBoxUpdate(E.target,e),L=!1;var i=Jy(e,t);i===o&&n===t.x&&r===t.y||U.scheduleRender(),T.deltaTransform=i}},updateTreeLayoutProjection:function(){U.layoutTree.forEach(nb),fv.preRender(B,!1,!0)},getProjectionParent:function(){if(void 0===w){for(var e=!1,t=U.path.length-1;t>=0;t--){var n=U.path[t];if(n.projection.isEnabled){e=n;break}}w=e}return w},resolveRelativeTargetBox:function(){var e=U.getProjectionParent();if(A.relativeTarget&&e&&(function(e,t){Ug(e.target.x,e.relativeTarget.x,t.target.x),Ug(e.target.y,e.relativeTarget.y,t.target.y)}(A,e.projection),ey(e))){var t=A.target;uy(t,t,e.getLatestValues())}},shouldResetTransform:function(){return Boolean(m._layoutResetTransform)},pointTo:function(e){E=e.projection,M=e.getLatestValues(),null===k||void 0===k||k(),k=Bh(e.onSetAxisTarget(U.scheduleUpdateLayoutProjection),e.onLayoutAnimationComplete((function(){var e;U.isPresent?U.presence=xy.Present:null===(e=U.layoutSafeToRemove)||void 0===e||e.call(U)})))},isPresent:!0,presence:xy.Entering});return U}};function nb(e){e.resolveRelativeTargetBox()}function rb(e){e.updateLayoutProjection()}var ob,ib=Af(["initial"],Df(fg)),ab=ib.length,sb=new Set(["width","height","top","left","right","bottom","x","y"]),lb=function(e){return sb.has(e)},ub=function(e,t){e.set(t,!1),e.set(t)},cb=function(e){return e===Lp||e===Ap};!function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"}(ob||(ob={}));var db=function(e,t){return parseFloat(e.split(", ")[t])},fb=function(e,t){return function(n,r){var o=r.transform;if("none"===o||!o)return 0;var i=o.match(/^matrix3d\((.+)\)$/);if(i)return db(i[1],t);var a=o.match(/^matrix\((.+)\)$/);return a?db(a[1],e):0}},pb=new Set(["x","y","z"]),hb=lp.filter((function(e){return!pb.has(e)}));var mb={width:function(e){var t=e.x;return t.max-t.min},height:function(e){var t=e.y;return t.max-t.min},top:function(e,t){var n=t.top;return parseFloat(n)},left:function(e,t){var n=t.left;return parseFloat(n)},bottom:function(e,t){var n=e.y,r=t.top;return parseFloat(r)+(n.max-n.min)},right:function(e,t){var n=e.x,r=t.left;return parseFloat(r)+(n.max-n.min)},x:fb(4,13),y:fb(5,14)},vb=function(e,t,n,r){void 0===n&&(n={}),void 0===r&&(r={}),t=Cf({},t),r=Cf({},r);var o=Object.keys(t).filter(lb),i=[],a=!1,s=[];if(o.forEach((function(o){var l=e.getValue(o);if(e.hasValue(o)){var u,c=n[o],d=t[o],f=eg(c);if(lh(d))for(var p=d.length,h=null===d[0]?1:0;h<p;h++)u?eg(d[h]):(u=eg(d[h]))===f||cb(f)&&cb(u);else u=eg(d);if(f!==u)if(cb(f)&&cb(u)){var m=l.get();"string"===typeof m&&l.set(parseFloat(m)),"string"===typeof d?t[o]=parseFloat(d):Array.isArray(d)&&u===Ap&&(t[o]=d.map(parseFloat))}else(null===f||void 0===f?void 0:f.transform)&&(null===u||void 0===u?void 0:u.transform)&&(0===c||0===d)?0===c?l.set(u.transform(c)):t[o]=f.transform(d):(a||(i=function(e){var t=[];return hb.forEach((function(n){var r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))})),t.length&&e.syncRender(),t}(e),a=!0),s.push(o),r[o]=void 0!==r[o]?r[o]:t[o],ub(l,d))}})),s.length){var l=function(e,t,n){var r=t.measureViewportBox(),o=t.getInstance(),i=getComputedStyle(o),a=i.display,s={top:i.top,left:i.left,bottom:i.bottom,right:i.right,transform:i.transform};"none"===a&&t.setStaticValue("display",e.display||"block"),t.syncRender();var l=t.measureViewportBox();return n.forEach((function(n){var o=t.getValue(n);ub(o,mb[n](r,s)),e[n]=mb[n](l,i)})),e}(t,e,s);return i.length&&i.forEach((function(t){var n=Df(t,2),r=n[0],o=n[1];e.getValue(r).set(o)})),e.syncRender(),{target:l,transitionEnd:r}}return{target:t,transitionEnd:r}};function gb(e,t,n,r){return function(e){return Object.keys(e).some(lb)}(t)?vb(e,t,n,r):{target:t,transitionEnd:r}}var yb=function(e,t,n,r){var o=function(e,t,n){var r,o=jf(t,[]),i=e.getInstance();if(!(i instanceof HTMLElement))return{target:o,transitionEnd:n};for(var a in n&&(n=Cf({},n)),e.forEachValue((function(e){var t=e.get();if(Cy(t)){var n=Dy(t,i);n&&e.set(n)}})),o){var s=o[a];if(Cy(s)){var l=Dy(s,i);l&&(o[a]=l,n&&(null!==(r=n[a])&&void 0!==r||(n[a]=s)))}}return{target:o,transitionEnd:n}}(e,t,r);return gb(e,t=o.target,n,r=o.transitionEnd)};var bb={treeType:"dom",readValueFromInstance:function(e,t){if(dp(t)){var n=Vv(t);return n&&n.default||0}var r,o=(r=e,window.getComputedStyle(r));return(gp(t)?o.getPropertyValue(t):o[t])||0},sortNodePosition:function(e,t){return 2&e.compareDocumentPosition(t)?1:-1},getBaseTarget:function(e,t){var n;return null===(n=e.style)||void 0===n?void 0:n[t]},measureViewportBox:function(e,t){return zg(e,t.transformPagePoint)},resetTransform:function(e,t,n){var r=n.transformTemplate;t.style.transform=r?r({},""):"none",e.scheduleRender()},restoreTransform:function(e,t){e.style.transform=t.style.transform},removeValueFromRenderState:function(e,t){var n=t.vars,r=t.style;delete n[e],delete r[e]},makeTargetAnimatable:function(e,t,n,r){var o=n.transformValues;void 0===r&&(r=!0);var i=t.transition,a=t.transitionEnd,s=jf(t,["transition","transitionEnd"]),l=function(e,t,n){var r,o,i={};for(var a in e)i[a]=null!==(r=ag(a,t))&&void 0!==r?r:null===(o=n.getValue(a))||void 0===o?void 0:o.get();return i}(s,i||{},e);if(o&&(a&&(a=o(a)),s&&(s=o(s)),l&&(l=o(l))),r){!function(e,t,n){var r,o,i,a,s=Object.keys(t).filter((function(t){return!e.hasValue(t)})),l=s.length;if(l)for(var u=0;u<l;u++){var c=s[u],d=t[c],f=null;Array.isArray(d)&&(f=d[0]),null===f&&(f=null!==(o=null!==(r=n[c])&&void 0!==r?r:e.readValue(c))&&void 0!==o?o:t[c]),void 0!==f&&null!==f&&("string"===typeof f&&/^\-?\d*\.?\d+$/.test(f)?f=parseFloat(f):!ng(f)&&wm.test(d)&&(f=zv(c,d)),e.addValue(c,Zv(f)),null!==(i=(a=n)[c])&&void 0!==i||(a[c]=f),e.setBaseTarget(c,f))}}(e,s,l);var u=yb(e,s,l,a);a=u.transitionEnd,s=u.target}return Cf({transition:i,transitionEnd:a},s)},scrapeMotionValuesFromProps:ih,build:function(e,t,n,r,o,i,a){void 0!==e.isVisible&&(t.style.visibility=e.isVisible?"visible":"hidden");var s=r.isEnabled&&o.isHydrated;Fp(t,n,r,o,i,a.transformTemplate,s?Jy:void 0,s?Yy:void 0)},render:nh},wb=tb(bb),kb=tb(Cf(Cf({},bb),{getBaseTarget:function(e,t){return e[t]},readValueFromInstance:function(e,t){var n;return dp(t)?(null===(n=Vv(t))||void 0===n?void 0:n.default)||0:(t=rh.has(t)?t:th(t),e.getAttribute(t))},scrapeMotionValuesFromProps:ah,build:function(e,t,n,r,o,i,a){var s=r.isEnabled&&o.isHydrated;Yp(t,n,r,o,i,a.transformTemplate,s?Jy:void 0,s?Yy:void 0)},render:oh})),xb=function(e,t){return ip(e)?kb(t,{enableHardwareAcceleration:!1}):wb(t,{enableHardwareAcceleration:!0})},Ob=Cf(Cf(Cf(Cf({},gg),_h),Sy),Uy),Sb=rp((function(e,t){return vh(e,t,Ob,xb)}));function Cb(e){var t=Ff((function(){return Zv(e)}));if(Object(jd.useContext)(Pf).isStatic){var n=Df(Object(jd.useState)(e),2)[1];Object(jd.useEffect)((function(){return t.onChange(n)}),[])}return t}var jb=function(e){return function(e){return"object"===typeof e&&e.mix}(e)?e.mix:void 0};function Db(e,t){var n=Cb(t()),r=function(){return n.set(t())};return r(),function(e,t){Object(jd.useEffect)((function(){var n=e.map((function(e){return e.onChange(t)}));return function(){return n.forEach((function(e){return e()}))}}))}(e,(function(){return fv.update(r,!1,!0)})),n}function Ab(e,t,n,r){var o="function"===typeof t?t:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=!Array.isArray(e[0]),r=n?0:-1,o=e[0+r],i=e[1+r],a=e[2+r],s=e[3+r],l=Em(i,a,Cf({mixer:jb(a[0])},s));return n?l(o):l}(t,n,r);return Array.isArray(e)?Eb(e,o):Eb([e],(function(e){var t=Df(e,1)[0];return o(t)}))}function Eb(e,t){var n=Ff((function(){return[]}));return Db(e,(function(){n.length=0;for(var r=e.length,o=0;o<r;o++)n[o]=e[o].get();return t(n)}))}function Mb(){var e=!1,t=[],n=new Set,r={subscribe:function(e){return n.add(e),function(){n.delete(e)}},start:function(r,o){if(e){var i=[];return n.forEach((function(e){i.push(sg(e,r,{transitionOverride:o}))})),Promise.all(i)}return new Promise((function(e){t.push({animation:[r,o],resolve:e})}))},set:function(e){return n.forEach((function(t){!function(e,t){Array.isArray(t)?ig(e,t):"string"===typeof t?ig(e,[t]):og(e,t)}(t,e)}))},stop:function(){n.forEach((function(e){!function(e){e.forEachValue((function(e){return e.stop()}))}(e)}))},mount:function(){return e=!0,t.forEach((function(e){var t=e.animation,n=e.resolve;r.start.apply(r,Af([],Df(t))).then(n)})),function(){e=!1,r.stop()}}};return r}var Tb=Sb(rf.Flex),Lb={type:"spring",stiffness:300,damping:30,mass:.2,duration:300};function Nb(e){var t,n=e.isOpen,r=e.title,o=e.items,i=e.onClose,a=e.blocking,s=void 0===a||a,l=e.focusOnRender,u=void 0===l||l,c=e.draggable,d=void 0===c||c,f=e.children,p=Vd(),h=Object(jd.useRef)(),m=Cb(0),v=Ab(m,[0,(null===(t=h.current)||void 0===t?void 0:t.offsetHeight)||window.innerHeight],[1,0]),g=function(){var e=Ff(Mb);return Object(jd.useEffect)(e.mount,[]),e}(),y=Object(jd.useCallback)((function(){var e,t=(null===(e=h.current)||void 0===e?void 0:e.offsetHeight)||window.innerHeight;setTimeout((function(){null===i||void 0===i||i()}),Lb.duration-50),g.start({transition:Lb,y:t+100})}),[g,i,h.current]),b=Object(jd.useCallback)((function(e){n&&(e.preventDefault(),y())}),[n,y]);return Object(jd.useEffect)((function(){return window.addEventListener("handleBackPress",b),function(){window.removeEventListener("handleBackPress",b)}}),[b]),n?Object(Cd.jsx)(xf.a,Object.assign({contentRef:function(e){return h.current=e},className:"bottom-sheet-presenter",role:"menu",isOpen:n,appElement:document.body,shouldCloseOnEsc:s,shouldReturnFocusAfterClose:u,shouldCloseOnOverlayClick:s,shouldFocusAfterRender:u,ariaHideApp:s,preventScroll:s,onRequestClose:function(){return y()},portalClassName:"bottom-sheet-presenter-portal",onAfterOpen:function(){console.log("OPEGN!"),g.start({transition:Lb,y:0})},overlayElement:function(e,t){return Object(Cd.jsxs)(rf.Box,Object.assign({},e,{style:Object.assign(Object.assign({},e.style),{position:s?"fixed":"sticky",zIndex:1e3,backgroundColor:s?"unset":"transparent"}),tabIndex:-1},{children:[s&&Object(Cd.jsx)(Sb.div,{id:"action-sheet-overlay",style:{height:"100%",width:"100%",opacity:v,position:"absolute",backgroundColor:"var(--overlay)"},tabIndex:-1}),t]}))},contentElement:function(e,t){return Object(Cd.jsx)(rf.Box,Object.assign({},e,{style:{},sx:{left:0,right:0,bottom:0,display:"flex",width:"auto",height:"fit-content",position:"fixed",backgroundColor:void 0,padding:0,zIndex:0,outline:0,isolation:"isolate"}},{children:t}))}},{children:Object(Cd.jsxs)(Tb,Object.assign({animate:g,style:{y:m},initial:{y:1e3},sx:{bg:"background",borderTopLeftRadius:15,borderTopRightRadius:15,boxShadow:(null===p||void 0===p?void 0:p.shadows.menu)||"none",flex:1,flexDirection:"column"}},{children:[d&&Object(Cd.jsx)(Tb,Object.assign({drag:"y",onDrag:function(e,t){var n=t.delta;m.set(Math.max(m.get()+n.y,0))},onDragEnd:function(e,t){if(t.velocity.y>=500)null===i||void 0===i||i();else{var n=30*h.current.offsetHeight/100;m.get()>=n?y():g.start({transition:Lb,y:0})}},dragConstraints:{top:0,bottom:0},dragMomentum:!1,dragElastic:!1,sx:{bg:"transparent",alignItems:"center",justifyContent:"center",p:2}},{children:Object(Cd.jsx)(rf.Box,{id:"pill",sx:{backgroundColor:"hover",width:60,height:8,borderRadius:100}})})),Object(Cd.jsx)(Pb,Object.assign({items:o,title:r,onClose:i},{children:f}))]}))})):null}function Pb(e){var t,n=e.title,r=e.items,o=e.onClose,a=e.children,s=function(e){var t=Object(jd.useState)(e),n=Object(i.a)(t,2),r=n[0],o=n[1],a=Object(jd.useState)(!1),s=Object(i.a)(a,2),l=s[0],u=s[1],c=Object(jd.useRef)([e]);return{current:r,goBack:Object(jd.useCallback)((function(){if(l){var e=c.current.pop();o(e),c.current.length<=1&&u(!1)}}),[l]),navigate:Object(jd.useCallback)((function(e){console.log("NAVI",e),o((function(t){return t&&c.current.push(t),e})),u(!0)}),[]),canGoBack:l}}({title:n,items:r}),l=s.current,u=s.goBack,c=s.canGoBack,d=s.navigate;return Object(Cd.jsxs)(rf.Flex,Object.assign({sx:{flexDirection:"column"}},{children:[c||(null===l||void 0===l?void 0:l.title)?Object(Cd.jsxs)(rf.Flex,Object.assign({id:"header",sx:{alignItems:"center",mx:0,mb:1}},{children:[c&&Object(Cd.jsx)(sf,Object.assign({variant:"icon",sx:{p:1,ml:1},onClick:u},{children:Object(Cd.jsx)(pf,{path:hf.arrowLeft,size:"big"})})),(null===l||void 0===l?void 0:l.title)&&Object(Cd.jsx)(af,Object.assign({variant:"title",sx:{ml:1,fontSize:"title"}},{children:null===l||void 0===l?void 0:l.title}))]})):null,a||(null===(t=null===l||void 0===l?void 0:l.items)||void 0===t?void 0:t.map((function(e){if(e.isHidden)return null;switch(e.type){case"separator":return Object(Cd.jsx)(wf,{},e.key);case"button":return Object(Cd.jsx)(bf,{item:e,onClick:function(t){e.menu?d(e.menu):e.onClick&&(null===o||void 0===o||o(),setTimeout((function(){var t;null===(t=e.onClick)||void 0===t||t.call(e)}),300))}},e.key);case"popup":return Object(Cd.jsx)(Dd.a.Fragment,{children:Object(Cd.jsx)(e.component,{onClick:o})},e.key)}})))]}))}var Rb={x:0,y:0,actualX:0,actualY:0};function Hb(e,t){var n=t||{},r=n.target,o=void 0===r?"mouse":r,i=n.isTargetAbsolute,a=void 0!==i&&i,s=n.location,l=void 0===s?void 0:s,u=n.yOffset,c=void 0===u?0:u,d=n.xOffset,f=void 0===d?0:d,p=n.align,h=void 0===p?"start":p,m=n.parent,v=void 0===m?document.body:m,g=n.yAnchor,y="mouse"===o?Rb:Fb(o,a),b=y.x,w=y.y,k=y.width,x=y.height,O=y.actualX,S=y.actualY,C=e.offsetWidth,j=e.offsetHeight,D=v.clientWidth,A=v.clientHeight,E={top:0,left:0};if(D-O<C){var M=O-b;E.left=D-C,E.left-=M}else E.left=b;if(k&&"right"===l?E.left+=k:"left"===l&&(E.left-=C),E.top=S+j>A?A-j:w,x&&("below"===l?E.top+=x:"top"===l&&(E.top=w-j)),k&&"mouse"!==o&&"center"===h&&C>0?E.left-=(C-k)/2:k&&"mouse"!==o&&"end"===h&&C>0&&(E.left-=C-k),j>A-E.top&&(e.style.maxHeight="".concat(A-20,"px")),g){var T=Fb(g,a);E.top=T.y-j}return E.top=a&&E.top<0?0:E.top,E.left=a&&E.left<0?0:E.left,E.top+="below"===l?c:-c,E.left+=f,E}function Fb(e,t){var n=e.getBoundingClientRect(),r={x:e.offsetLeft,y:e.offsetTop,width:n.width,height:n.height,actualY:n.y,actualX:n.x};return t&&(r.x=r.actualX,r.y=r.actualY),r}function Vb(e,t,n){var r=Object(jd.useState)(-1),o=Object(i.a)(r,2),a=o[0],s=o[1],l=Object(jd.useState)(!1),u=Object(i.a)(l,2),c=u[0],d=u[1],f=Object(jd.useCallback)((function(t){var n=e[t];if(n){var r=document.getElementById(n.key);r&&r.scrollIntoView({behavior:"auto"})}}),[e]),p=Object(jd.useCallback)((function(r){var o=function(t){return e[t]},i=function(t){var n,r;return e&&("separator"===(null===(n=e[t])||void 0===n?void 0:n.type)||(null===(r=o(t))||void 0===r?void 0:r.isDisabled))},a=function(t){return t<e.length-1?++t:0},l=function(t){return t>0?--t:e.length-1},u=function(t){return e&&o(t).menu};s((function(e){var o=e;switch(r.key){case"ArrowUp":if(c)break;for(o=l(e);i(o);)o=l(o);break;case"ArrowDown":if(c)break;for(o=a(e);i(o);)o=a(o);break;case"ArrowRight":u(e)&&d(!0);break;case"ArrowLeft":!function(e){u(e)&&d(!1)}(e);break;case"Enter":t&&t(r);break;case"Escape":n&&n(r)}return o!==e&&f(o),o}))}),[e,c,f,t]);return Object(jd.useEffect)((function(){return window.addEventListener("keydown",p),function(){window.removeEventListener("keydown",p)}}),[p]),{focusIndex:a,setFocusIndex:s,isSubmenuOpen:c,setIsSubmenuOpen:d}}function zb(){return document.querySelector(".editor-toolbar")||void 0}function Bb(){return document.getElementById("popup-container")||void 0}window.addEventListener("mousemove",(function(e){var t=function(e){var t=0,n=0;!e&&window.event&&(e=window.event);e.pageX||e.pageY?(t=e.pageX,n=e.pageY):(e.clientX||e.clientY)&&(t=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,n=e.clientY+document.body.scrollTop+document.documentElement.scrollTop);return{x:t,y:n,actualY:n,actualX:t}}(e),n=t.x,r=t.y,o=t.actualX,i=t.actualY;Rb.x=n,Rb.y=r,Rb.actualX=o,Rb.actualY=i}));var Ib=Dd.a.createContext(null),_b=Dd.a.createContext(null),$b=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(){var e;return Object(c.a)(this,n),(e=t.apply(this,arguments)).popupContainer=null,e.state={popups:[]},e.openPopup=function(t,n){n&&e.setState((function(e){return{popups:[].concat(Object(o.a)(e.popups),[{id:t,popup:n}])}}))},e.closePopup=function(t){e.setState((function(e){var n=e.popups.findIndex((function(e){return e.id===t}));if(n<=-1)return e;var r=e.popups.slice();return r.splice(n,1),{popups:r}}))},e}return Object(d.a)(n,[{key:"render",value:function(){return Object(Cd.jsxs)(Ib.Provider,Object.assign({value:this},{children:[this.props.children,Object(Cd.jsxs)(_b.Provider,Object.assign({value:this.props.editor},{children:[this.state.popups.map((function(e){var t=e.id,n=e.popup;return Object(Cd.jsx)(n,{id:t},t)})),Object(Cd.jsx)("div",{id:"popup-container"})]}))]}))}}]),n}(Dd.a.Component);var qb=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function Wb(e){var t=e.isOpen,n=e.position,r=e.onClose,o=e.blocking,i=void 0===o||o,a=e.focusOnRender,s=void 0===a||a,l=e.children,u=Fd(),c=Object(jd.useRef)(),d=Object(jd.useRef)(),f=Object(jd.useCallback)((function(){if(c.current&&n){var e=c.current,t=Hb(e,n);e.style.top=t.top+"px",e.style.left=t.left+"px"}}),[n]);Object(jd.useEffect)((function(){f()}),[n]),Object(jd.useEffect)((function(){function e(){f()}return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[]);var p=Object(jd.useCallback)((function(){if(c.current&&t){var e=c.current.querySelector(".movable");if(e){var n=c.current,r={x:0,y:0};e.addEventListener("mousedown",(function(e){r.x=e.clientX-n.offsetLeft,r.y=e.clientY-n.offsetTop,window.addEventListener("mousemove",o)})),window.addEventListener("mouseup",i)}}function o(e){e.buttons||i();var t=e.clientY-r.y,o=e.clientX-r.x;requestAnimationFrame((function(){n.style.top=t+"px",n.style.left=o+"px"}))}function i(){window.removeEventListener("mousemove",o)}}),[t]),h=Object(jd.useCallback)((function(){var e=c.current;if(e){var t=e.offsetHeight;d.current=new ResizeObserver((function(n){if(u)f();else{var r=e.getBoundingClientRect(),o=r.height,i=r.y;if(o-t>0){var a=document.body.clientHeight-20;i+o>a&&(e.style.top=a-o+"px")}t=o}})),d.current.observe(e,{box:"border-box"})}}),[u]);return Object(Cd.jsx)(xf.a,Object.assign({contentRef:function(e){return c.current=e},className:"popup-presenter",role:"menu",isOpen:t,appElement:document.body,shouldCloseOnEsc:!0,shouldReturnFocusAfterClose:!0,shouldCloseOnOverlayClick:!0,shouldFocusAfterRender:s,ariaHideApp:i,preventScroll:i,onRequestClose:r,portalClassName:"popup-presenter-portal",onAfterOpen:function(e){e&&n&&(f(),h(),p())},onAfterClose:function(){var e;return null===(e=d.current)||void 0===e?void 0:e.disconnect()},overlayElement:function(e,t){return Object(Cd.jsx)(rf.Box,Object.assign({},e,{style:Object.assign(Object.assign({},e.style),{position:i?"fixed":"initial",zIndex:1e3,backgroundColor:i?"unset":"transparent"})},{children:t}))},contentElement:function(e,t){return Object(Cd.jsx)(rf.Box,Object.assign({},e,{style:{},sx:{top:0,left:0,right:0,bottom:0,display:"flex",width:"fit-content",height:"fit-content",position:"fixed",backgroundColor:void 0,padding:0,zIndex:999,outline:0,isolation:"isolate"}},{children:t}))},style:{content:{},overlay:{zIndex:999,background:"transparent"}}},{children:l}))}function Ub(e){return e.isOpen?Object(Cd.jsx)(Wb,Object.assign({},e)):null}function Kb(e){var t=e.id,n=(e.group,e.position),r=e.renderPopup,o=(e.isOpen,e.onClosed,e.autoCloseOnUnmount),i=qb(e,["id","group","position","renderPopup","isOpen","onClosed","autoCloseOnUnmount"]),a=Object(jd.useContext)(Ib),s=Gb(e),l=s.closePopup,u=s.isPopupOpen;return Object(jd.useEffect)((function(){if(o)return function(){null===a||void 0===a||a.closePopup(t)}}),[o,t,a]),Object(jd.useEffect)((function(){a&&u&&a.openPopup(t,(function(e){var t=e.id,o=Rd((function(e){return!!e.openedPopups[t]}));return Object(jd.useEffect)((function(){o||a.closePopup(t)}),[o]),Object(Cd.jsx)(Ub,Object.assign({isOpen:o,onClose:function(){return l(t)},position:n,blocking:!0,focusOnRender:!0},i,{children:Object(Cd.jsx)(rf.Box,Object.assign({sx:{boxShadow:"menu",borderRadius:"default",overflow:"hidden"}},{children:Object(Cd.jsx)(_b.Consumer,{children:function(){return r((function(){return a.closePopup(t)}))}})}))}),t)}))}),[a,u]),null}function Gb(e){var t=e.group,n=e.isOpen,r=e.id,o=e.onClosed,i=Rd((function(e){return!!e.openedPopups[r]})),a=Rd((function(e){return e.openPopup})),s=Rd((function(e){return e.closePopup})),l=Rd((function(e){return e.closePopupGroup}));return Rd((function(e){return"bottom"===e.toolbarLocation}))&&(t="popup"),Object(jd.useEffect)((function(){n?a({id:r,group:t}):s(r)}),[n,r,t,a,s]),Object(jd.useEffect)((function(){i||null===o||void 0===o||o()}),[i]),Object(jd.useEffect)((function(){i&&l(t,[r])}),[o,i,l,r,t]),Object(jd.useEffect)((function(){n||s(r)}),[n,r,t,s]),{isPopupOpen:i,closePopup:s}}function Jb(e){var t=e.popup,n=qb(e,["popup"]);function r(){qd.a.unmountComponentAtNode(Bb())}return qd.a.render(Object(Cd.jsx)(Bd,{children:Object(Cd.jsx)(ow,Object.assign({isOpen:!0,position:{target:zb(),isTargetAbsolute:!0,location:"below",align:"end",yOffset:10},blocking:!0,focusOnRender:!0},n,{onClose:function(){var e;r(),null===(e=n.onClose)||void 0===e||e.call(n)}},{children:t(r)}))}),Bb()),r}var Yb=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function Zb(e){var t=e.items,n=void 0===t?[]:t,r=(e.title,e.onClose),o=Yb(e,["items","title","onClose"]),i=Object(jd.useRef)(),a=Object(jd.useCallback)((function(e,t){null===e||void 0===e||e.stopPropagation(),(null===t||void 0===t?void 0:t.onClick)&&t.onClick(),r&&r()}),[r]),s=Vb(n,(function(e){var t=n[l];t&&"button"===t.type&&a(e,t)}),(function(){return r()})),l=s.focusIndex,u=s.setFocusIndex,c=s.isSubmenuOpen,d=s.setIsSubmenuOpen,f=n[l],p=Object(jd.useRef)(null);return Object(jd.useEffect)((function(){var e=n[l];if(e&&p.current){var t=document.getElementById(e.key);if(t)if(c){var r=Hb(p.current,{target:t,location:"right"}),o=r.top,i=r.left;p.current.style.visibility="visible",p.current.style.top="".concat(o,"px"),p.current.style.left="".concat(i,"px")}else p.current.style.visibility="hidden"}}),[c,l,n]),Object(Cd.jsxs)(Cd.Fragment,{children:[Object(Cd.jsx)(Xb,Object.assign({},o,{children:n.map((function(e,t){if(e.isHidden)return null;switch(e.type){case"separator":return Object(Cd.jsx)(wf,{},e.key);case"button":return Object(Cd.jsx)(bf,{item:e,onClick:function(n){e.menu?(u(t),d(!0)):a(n,e)},isFocused:l===t,onMouseEnter:function(){e.isDisabled?u(-1):(i.current&&clearTimeout(i.current),u(t),d(!1),e.menu&&(i.current=setTimeout((function(){d(!0)}),500)))},onMouseLeave:function(){i.current&&clearTimeout(i.current)}},e.key);case"popup":return Object(Cd.jsx)(e.component,{onClick:function(e){return a(e)}})}}))})),"button"===(null===f||void 0===f?void 0:f.type)&&(null===f||void 0===f?void 0:f.menu)&&c&&Object(Cd.jsx)(rf.Flex,Object.assign({ref:p,style:{visibility:"hidden"},sx:{position:"absolute"}},{children:Object(Cd.jsx)(Zb,{items:f.menu.items,onClose:r})}))]})}function Xb(e){var t=e.children,n=e.title,r=e.sx,o=Yb(e,["children","title","sx"]);return Object(Cd.jsxs)(rf.Box,Object.assign({className:"menuContainer",as:"ul",tabIndex:-1,sx:Object.assign({bg:"background",py:1,display:"flex",flexDirection:"column",position:"relative",listStyle:"none",padding:0,margin:0,borderRadius:"default",boxShadow:"menu",border:"1px solid var(--border)",minWidth:220},r)},o,{children:[n&&Object(Cd.jsx)(af,Object.assign({sx:{fontFamily:"body",fontSize:"subtitle",color:"primary",py:"8px",px:3,borderBottom:"1px solid",borderBottomColor:"border",wordWrap:"break-word"}},{children:n})),t]}))}function Qb(e){var t=e.items,n=void 0===t?[]:t,r=Yb(e,["items"]);return Object(Cd.jsx)(Ub,Object.assign({},r,{children:e.children?e.children:Object(Cd.jsx)(Zb,Object.assign({items:n},r))}))}var ew=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function tw(e){return Fd()?e.mobile||null:e.desktop||null}function nw(e){return Object(Cd.jsx)(tw,{desktop:Object(Cd.jsx)(Cd.Fragment,{children:e.children})})}function rw(e){return Object(Cd.jsx)(tw,{mobile:Object(Cd.jsx)(Cd.Fragment,{children:e.children})})}function ow(e){var t=e.mobile,n=void 0===t?"menu":t,r=e.desktop,o=void 0===r?"menu":r,i=ew(e,["mobile","desktop"]);return Fd()&&"sheet"===n?Object(Cd.jsx)(Nb,Object.assign({},i)):"menu"===n||"menu"===o?Object(Cd.jsx)(Qb,Object.assign({},i)):e.isOpen?Object(Cd.jsx)(Cd.Fragment,{children:e.children}):null}function iw(e){var t=e.title,n=e.onClose,r=e.action,o=e.children;return Object(Cd.jsxs)(Cd.Fragment,{children:[Object(Cd.jsx)(nw,{children:Object(Cd.jsxs)(rf.Flex,Object.assign({sx:{overflow:"hidden",bg:"background",flexDirection:"column",borderRadius:"default",boxShadow:"menu",minWidth:200}},{children:[t&&Object(Cd.jsxs)(rf.Flex,Object.assign({className:"movable",sx:{justifyContent:"space-between",alignItems:"center",p:2}},{children:[Object(Cd.jsx)(af,Object.assign({variant:"title"},{children:t})),Object(Cd.jsx)(sf,Object.assign({variant:"tool",sx:{p:0,bg:"transparent"},onClick:n},{children:Object(Cd.jsx)(pf,{path:hf.close,size:"big"})}))]})),o,t&&r&&Object(Cd.jsx)(rf.Flex,Object.assign({sx:{justifyContent:"end"},bg:"bgSecondary",p:1,px:2,mt:2},{children:Object(Cd.jsx)(sf,Object.assign({variant:"dialog",onClick:r.disabled||r.loading?void 0:r.onClick,disabled:r.disabled||r.loading},{children:r.loading?Object(Cd.jsx)(pf,{path:hf.loading,rotate:!0,size:"medium"}):r.title}))}))]}))}),Object(Cd.jsxs)(rw,{children:[o,r&&Object(Cd.jsx)(sf,Object.assign({variant:"primary",sx:{alignSelf:"stretch",mb:1,mt:2,mx:1,py:2},onClick:r.disabled||null===r||void 0===r?void 0:r.onClick,disabled:r.disabled},{children:r.loading?Object(Cd.jsx)(pf,{path:hf.loading,rotate:!0,size:"medium"}):r.title}))]})]})}var aw=n(19),sw=n(41);function lw(){return lw=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},lw.apply(this,arguments)}function uw(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var cw,dw,fw,pw,hw=[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(cw=sw.props)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(cw)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}(),["sx","variant"]),mw=new RegExp("^(".concat(hw.join("|"),")$")),vw=/^m[trblxy]?$/,gw=function(e){return function(t){var n={};for(var r in t)e(r||"")&&(n[r]=t[r]);return n}},yw=gw((function(e){return mw.test(e)})),bw=gw((function(e){return vw.test(e)})),ww=gw((function(e){return!vw.test(e)})),kw=function(e){e.size;var t=uw(e,["size"]);return Dd.a.createElement(aw.Box,lw({as:"svg",xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentcolor"},t))},xw=Object(jd.forwardRef)((function(e,t){return Dd.a.createElement(aw.Flex,lw({ref:t,as:"label",tx:"forms",variant:"label"},e,{__css:{width:"100%"}}))})),Ow=Object(jd.forwardRef)((function(e,t){return Dd.a.createElement(aw.Box,lw({ref:t,as:"input",type:"text",tx:"forms",variant:"input"},e,{__css:{display:"block",width:"100%",p:2,appearance:"none",fontSize:"inherit",lineHeight:"inherit",border:"1px solid",borderRadius:"default",color:"inherit",bg:"transparent"}}))})),Sw=function(e){return Dd.a.createElement(kw,e,Dd.a.createElement("path",{d:"M7 10l5 5 5-5z"}))},Cw=(Object(jd.forwardRef)((function(e,t){return Dd.a.createElement(aw.Flex,bw(e),Dd.a.createElement(aw.Box,lw({ref:t,as:"select",tx:"forms",variant:"select"},ww(e),{__css:{display:"block",width:"100%",p:2,appearance:"none",fontSize:"inherit",lineHeight:"inherit",border:"1px solid",borderRadius:"default",color:"inherit",bg:"transparent"}})),Dd.a.createElement(Sw,{sx:{ml:-28,alignSelf:"center",pointerEvents:"none"}}))})),Object(jd.forwardRef)((function(e,t){return Dd.a.createElement(aw.Box,lw({ref:t,as:"textarea",tx:"forms",variant:"textarea"},e,{__css:{display:"block",width:"100%",p:2,appearance:"none",fontSize:"inherit",lineHeight:"inherit",border:"1px solid",borderRadius:"default",color:"inherit",bg:"transparent"}}))}))),jw=function(e){return Dd.a.createElement(kw,e,Dd.a.createElement("path",{d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))},Dw=function(e){return Dd.a.createElement(kw,e,Dd.a.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))},Aw=function(e){return Dd.a.createElement(Dd.a.Fragment,null,Dd.a.createElement(jw,lw({},e,{__css:{display:"none","input:checked ~ &":{display:"block"}}})),Dd.a.createElement(Dw,lw({},e,{__css:{display:"block","input:checked ~ &":{display:"none"}}})))},Ew=(Object(jd.forwardRef)((function(e,t){var n=e.className,r=e.sx,o=e.variant,i=void 0===o?"radio":o,a=uw(e,["className","sx","variant"]);return Dd.a.createElement(aw.Box,null,Dd.a.createElement(aw.Box,lw({ref:t,as:"input",type:"radio"},a,{sx:{position:"absolute",opacity:0,zIndex:-1,width:1,height:1,overflow:"hidden"}})),Dd.a.createElement(aw.Box,lw({as:Aw,"aria-hidden":"true",tx:"forms",variant:i,className:n,sx:r},yw(a),{__css:{mr:2,borderRadius:9999,color:"gray","input:checked ~ &":{color:"primary"},"input:focus ~ &":{bg:"highlight"}}})))})),function(e){return Dd.a.createElement(kw,e,Dd.a.createElement("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}))}),Mw=function(e){return Dd.a.createElement(kw,e,Dd.a.createElement("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}))},Tw=function(e){return Dd.a.createElement(Dd.a.Fragment,null,Dd.a.createElement(Ew,lw({},e,{__css:{display:"none","input:checked ~ &":{display:"block"}}})),Dd.a.createElement(Mw,lw({},e,{__css:{display:"block","input:checked ~ &":{display:"none"}}})))},Lw=Object(jd.forwardRef)((function(e,t){var n=e.className,r=e.sx,o=e.variant,i=void 0===o?"checkbox":o,a=uw(e,["className","sx","variant"]);return Dd.a.createElement(aw.Box,null,Dd.a.createElement(aw.Box,lw({ref:t,as:"input",type:"checkbox"},a,{sx:{position:"absolute",opacity:0,zIndex:-1,width:1,height:1,overflow:"hidden"}})),Dd.a.createElement(aw.Box,lw({as:Tw,"aria-hidden":"true",tx:"forms",variant:i,className:n,sx:r},yw(a),{__css:{mr:2,borderRadius:4,color:"gray","input:checked ~ &":{color:"primary"},"input:focus ~ &":{color:"primary",bg:"highlight"}}})))})),Nw=(Object(jd.forwardRef)((function(e,t){var n=lw({},e);return Dd.a.createElement(aw.Box,lw({ref:t,as:"input",type:"range",tx:"forms",variant:"slider"},n,{__css:{display:"block",width:"100%",height:4,my:2,cursor:"pointer",appearance:"none",borderRadius:9999,color:"inherit",bg:"gray",":focus":{outline:"none",color:"primary"},"&::-webkit-slider-thumb":{appearance:"none",width:16,height:16,bg:"currentcolor",border:0,borderRadius:9999,variant:"forms.slider.thumb"}}}))})),Object(jd.forwardRef)((function(e,t){var n=e.checked,r=uw(e,["checked"]);return Dd.a.createElement(aw.Box,lw({ref:t,as:"button",type:"button",role:"switch",tx:"forms",variant:"switch","aria-checked":n},r,{__css:{appearance:"none",m:0,p:0,width:40,height:24,color:"primary",bg:"transparent",border:"1px solid",borderColor:"primary",borderRadius:9999,"&[aria-checked=true]":{bg:"primary"},":focus":{outline:"none",boxShadow:"0 0 0 2px"}}}),Dd.a.createElement(aw.Box,{"aria-hidden":!0,style:{transform:n?"translateX(16px)":"translateX(0)"},sx:{mt:"-1px",ml:"-1px",width:24,height:24,borderRadius:9999,border:"1px solid",borderColor:"primary",bg:"background",transitionProperty:"transform",transitionTimingFunction:"ease-out",transitionDuration:"0.1s",variant:"forms.switch.thumb"}}))})),/(?:(?:https?):)?(?:\/\/)?(?:embed\.|open\.)(?:spotify\.com\/)(?:(album|track|playlist)\/|\?uri=spotify:track:)((\w|-){22})/),Pw=/spotify:(?:(album|track|playlist):|\?uri=spotify:track:)((\w|-){22})/,Rw=/(?:(?:https?):)?(?:\/\/)?(?:www\.|player\.)?vimeo\.com\/(?:channels\/(?:\w+\/)?|groups\/(?:[^/]*)\/videos\/|video\/|)(\d+)(?:|\/\?)/,Hw=/^(?:(?:https?):)?(?:\/\/)?(?:www\.)?(?:(?:dailymotion\.com(?:\/embed)?\/video)|dai\.ly)\/([a-zA-Z0-9]+)(?:_[\w_-]+)?(?:\?playlist=[a-zA-Z0-9]+)?$/,Fw=new RegExp("^(?:(?:https?):)?(?://)?[^/]*edpuzzle.com.*[=/]media/([-\\w]+)"),Vw=new RegExp("^(?:(?:https?):)?(?://)?[^/]*loom.com.*[=/]share/([-\\w]+)"),zw=function(e){var t,n;return e&&null!=(t=null==(n=e.match(Vw))?void 0:n[1])?t:""},Bw=new RegExp("^(?:(?:https?):)?(?://)?[^/]*(?:wistia.com|wi.st).*[=/](?:medias|embed)/([-\\w]+)"),Iw=function(e){var t,n;return e&&null!=(t=null==(n=e.match(Bw))?void 0:n[1])?t:""};!function(e){e.YouTube="YouTube",e.Spotify="Spotify",e.Vimeo="Vimeo",e.DailyMotion="DailyMotion",e.EdPuzzle="EdPuzzle",e.Loom="Loom",e.Wistia="Wistia"}(pw||(pw={}));var _w=((dw={})[pw.DailyMotion]=function(e){var t,n;return null!=(t=null==(n=e.match(Hw))?void 0:n[1])?t:""},dw[pw.Spotify]=function(e){var t=e.match(Nw)||e.match(Pw)||[],n=t[1];return[t[2],n]},dw[pw.Vimeo]=function(e){var t,n;return null!=(t=null==(n=e.match(Rw))?void 0:n[1])?t:""},dw[pw.YouTube]=function(e){var t,n;return e&&null!=(t=null==(n=e.match("^(?:(?:https?):)?(?://)?[^/]*(?:youtube(?:-nocookie)?.com|youtu.be).*[=/]([-\\w]{11})(?:\\?|=|&|$)"))?void 0:n[1])?t:""},dw[pw.EdPuzzle]=function(e){var t,n;return e&&null!=(t=null==(n=e.match(Fw))?void 0:n[1])?t:""},dw[pw.Loom]=zw,dw[pw.Wistia]=Iw,dw),$w=((fw={})[pw.DailyMotion]=function(e){return"https://www.dailymotion.com/embed/video/"+e},fw[pw.Spotify]=function(e,t){return"https://open.spotify.com/embed/"+t+"/"+e},fw[pw.Vimeo]=function(e){return"https://player.vimeo.com/video/"+e},fw[pw.YouTube]=function(e){return"https://www.youtube.com/embed/"+e},fw[pw.EdPuzzle]=function(e){return"https://edpuzzle.com/embed/media/"+e},fw[pw.Loom]=function(e){return"https://www.loom.com/embed/"+e},fw[pw.Wistia]=function(e){return"https://fast.wistia.net/embed/iframe/"+e},fw),qw=function(e){var t=function(e){if(e)return e.match(/dailymotion/)?pw.DailyMotion:e.match(/spotify/)?pw.Spotify:e.match(/vimeo/)?pw.Vimeo:e.match(/youtu\.?be/)?pw.YouTube:e.match(/edpuzzle.com/)?pw.EdPuzzle:Iw(e)?pw.Wistia:zw(e)?pw.Loom:void 0}(e);if(!t)return"";var n=_w[t],r=$w[t],o=n(e);if(Array.isArray(o)){var i=o.shift();return i?r.apply(void 0,[i].concat(o)):""}return r(o)},Ww=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function Uw(e){var t=e.label,n=e.containerProps,r=e.sx,o=Ww(e,["label","containerProps","sx"]);return Object(Cd.jsxs)(rf.Flex,Object.assign({},n,{sx:Object.assign(Object.assign({flex:1},null===n||void 0===n?void 0:n.sx),{outline:"1px solid var(--border)",p:2,borderRadius:"default",":focus-within":{outlineColor:"primary",outlineWidth:"1.8px"}})},{children:[Object(Cd.jsx)(Ow,Object.assign({variant:"clean",sx:Object.assign(Object.assign({},r),{p:0})},o)),Object(Cd.jsx)(af,Object.assign({variant:"body",sx:{flexShrink:0,color:"fontTertiary",borderLeft:"1px solid var(--border)",pl:1}},{children:t}))]}))}function Kw(e){return Object(Cd.jsx)(Cd.Fragment,{children:e.children})}function Gw(e){var t=e.activeIndex,n=e.children,r=e.containerProps,o=e.onTabChanged,a=Object(jd.useState)(t||0),s=Object(i.a)(a,2),l=s[0],u=s[1],c=Object(jd.useMemo)((function(){return jd.Children.map(n,(function(e){if(Dd.a.isValidElement(e))return{title:e.props.title,component:e}}))}),[n]);return Object(Cd.jsxs)(rf.Flex,Object.assign({sx:{flexDirection:"column"}},{children:[Object(Cd.jsx)(rf.Flex,Object.assign({sx:{mb:1}},{children:null===c||void 0===c?void 0:c.map((function(e,t){return Object(Cd.jsx)(sf,Object.assign({sx:{flex:1,p:0,py:1,borderRadius:0,borderTopLeftRadius:"default",borderTopRightRadius:"default",bg:l===t?"bgSecondary":"transparent",fontWeight:l===t?"bold":"normal",color:"text",":last-of-type":{mr:0},borderBottom:"2px solid",borderBottomColor:l===t?"primary":"transparent",":hover":{bg:"hover"}},onClick:function(){u(t),null===o||void 0===o||o(t)}},{children:e.title}),t.toString())}))})),Object(Cd.jsx)(rf.Flex,Object.assign({},r,{children:c&&c[l].component}))]}))}function Jw(e){var t=e.onClose,n=e.onSizeChanged,r=e.title,o=e.embed,a=Object(jd.useState)((null===o||void 0===o?void 0:o.width)||300),s=Object(i.a)(a,2),l=s[0],u=s[1],c=Object(jd.useState)((null===o||void 0===o?void 0:o.height)||150),d=Object(i.a)(c,2),f=d[0],p=d[1],h=Object(jd.useState)((null===o||void 0===o?void 0:o.src)||""),m=Object(i.a)(h,2),v=m[0],g=m[1],y=Object(jd.useState)("url"),b=Object(i.a)(y,2),w=b[0],k=b[1],x=Object(jd.useState)(null),O=Object(i.a)(x,2),S=O[0],C=O[1],j=Object(jd.useCallback)((function(e,t){var r=e?{width:e,height:e*(f/l)}:t?{width:t*(l/f),height:t}:{width:0,height:0};u(r.width),p(r.height),n&&n(r)}),[l,f]);return Object(Cd.jsx)(iw,Object.assign({title:r,onClose:function(){return t()},action:{title:"Save",onClick:function(){C(null);var e=v,n=l,r=f;if("code"===w){var o=(new DOMParser).parseFromString(v,"text/html");if(o.getElementsByTagName("iframe").length<=0)return C("Embed code must include an iframe.");var i=Yw(o,"src");if(!i)return C("Embed code must include an iframe with an src attribute.");e=i;var a=Yw(o,"width");a&&!isNaN(parseInt(a))&&(n=parseInt(a));var s=Yw(o,"height");s&&!isNaN(parseInt(s))&&(r=parseInt(s))}var u=qw(e);u&&(e=u),t({height:r,width:n,src:e})}}},{children:Object(Cd.jsxs)(rf.Flex,Object.assign({sx:{flexDirection:"column",width:["auto",300]}},{children:[S&&Object(Cd.jsxs)(af,Object.assign({variant:"error",sx:{bg:"errorBg",color:"error",p:1,borderRadius:"default"}},{children:["Error: ",S]})),Object(Cd.jsxs)(Gw,Object.assign({activeIndex:0,containerProps:{sx:{mx:1,flexDirection:"column"}},onTabChanged:function(e){return k(0===e?"url":"code")}},{children:[Object(Cd.jsxs)(Kw,Object.assign({title:"From URL"},{children:[Object(Cd.jsx)(Ow,{placeholder:"Enter embed source URL",value:v,autoFocus:!0,onChange:function(e){return g(e.target.value)},autoCapitalize:"none",sx:{fontSize:"body"}}),Object(Cd.jsxs)(rf.Flex,Object.assign({sx:{alignItems:"center",mt:1}},{children:[Object(Cd.jsx)(Uw,{containerProps:{sx:{mr:1}},label:"width",type:"number",placeholder:"Width",value:l,sx:{mr:1,fontSize:"body"},onChange:function(e){return j(e.target.valueAsNumber)}}),Object(Cd.jsx)(Uw,{label:"height",type:"number",placeholder:"Height",value:f,sx:{fontSize:"body"},onChange:function(e){return j(void 0,e.target.valueAsNumber)}})]}))]})),Object(Cd.jsx)(Kw,Object.assign({title:"From code"},{children:Object(Cd.jsx)(Cw,{autoFocus:!0,variant:"forms.input",sx:{fontSize:"subBody",fontFamily:"monospace"},minHeight:[200,100],onChange:function(e){return g(e.target.value)},placeholder:"Paste embed code here. Only iframes are supported."})}))]}))]}))}))}function Yw(e,t){var n=e.querySelector("[".concat(t,"]"));return n?n.getAttribute(t):null}function Zw(e){var t=Fd(),n=!t,r=t?30:15,o=e.onInsertTable,a=Object(jd.useState)({column:0,row:0}),s=Object(i.a)(a,2),l=s[0],u=s[1],c=Object(jd.useState)({columns:10,rows:6}),d=Object(i.a)(c,2),f=d[0],p=d[1];return Object(jd.useEffect)((function(){n&&p((function(e){var t=e.columns,n=e.rows,r=l.column,o=l.row,i=o===n-2||r===t-2,a=Number(o===n||o===n-2),s=Number(r===t||r===t-2);return{columns:i?Math.max(r+s,10):Math.min(e.columns+s,20),rows:i?Math.max(o+a,6):Math.min(e.rows+a,20)}}))}),[l,n]),Object(Cd.jsx)(iw,Object.assign({action:{title:l.column&&l.row?"Insert a ".concat(l.column," x ").concat(l.row," table"):"Please set a table size",disabled:!l.column||!l.row,onClick:function(){return o({columns:l.column,rows:l.row})}}},{children:Object(Cd.jsxs)(rf.Flex,Object.assign({sx:{px:1,pt:1,flexDirection:"column",alignItems:"center"}},{children:[Object(Cd.jsx)(rf.Box,Object.assign({sx:{display:"grid",gridTemplateColumns:"repeat(".concat(f.columns,", minmax(").concat(r,"px, 1fr))"),gap:"small",bg:"background",width:"100%"},onTouchMove:function(e){var t=e.touches.item(0),n=document.elementFromPoint(t.pageX,t.pageY);if(n){var r=n.dataset.index;r&&u(Xw(parseInt(r),f))}}},{children:Array(f.columns*f.rows).fill(0).map((function(e,t){return Object(Cd.jsx)(rf.Box,{"data-index":t,height:r||15,sx:{border:"1px solid var(--disabled)",borderRadius:"small",bg:Qw(t,l,f)?"disabled":"transparent"},onTouchStart:function(){u(Xw(t,f))},onMouseEnter:function(){u(Xw(t,f))},onTouchEnd:function(e){e.preventDefault()},onClick:function(){o({columns:l.column,rows:l.row})}},t)}))})),Object(Cd.jsxs)(rf.Flex,Object.assign({sx:{display:["flex","none","none"],mt:1,alignItems:"center",justifyContent:"center"}},{children:[Object(Cd.jsx)(Uw,{containerProps:{sx:{mr:1}},label:"columns",placeholder:"".concat(l.column," columns"),type:"number",value:l.column,onChange:function(e){u((function(t){return Object.assign(Object.assign({},t),{column:e.target.valueAsNumber||0})}))}}),Object(Cd.jsx)(Uw,{label:"rows",placeholder:"".concat(l.row," rows"),type:"number",value:l.row,onChange:function(e){u((function(t){return Object.assign(Object.assign({},t),{row:e.target.valueAsNumber||0})}))}})]})),Object(Cd.jsxs)(af,Object.assign({variant:"body",sx:{mt:1,display:["none","block","block"]}},{children:[l.column," x ",l.row]}))]}))}))}function Xw(e,t){var n=e+1,r=n%t.columns,o=n/t.columns,i=Math.floor(o);return o=o===i?o:i+1,{column:r||t.columns,row:o}}function Qw(e,t,n){var r=Xw(e,n);return r.row<=t.row&&r.column<=t.column}var ek=n(43);function tk(){tk=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(j){s=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var o=t&&t.prototype instanceof d?t:d,i=Object.create(o.prototype),a=new O(r||[]);return i._invoke=function(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return C()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=w(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=u(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===c)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}(e,n,a),i}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(j){return{type:"throw",arg:j}}}e.wrap=l;var c={};function d(){}function f(){}function p(){}var h={};s(h,o,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(S([])));v&&v!==t&&n.call(v,o)&&(h=v);var g=p.prototype=d.prototype=Object.create(h);function y(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){function r(o,i,a,s){var l=u(e[o],e,i);if("throw"!==l.type){var c=l.arg,d=c.value;return d&&"object"==Object(ek.a)(d)&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(d).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,s)}))}s(l.arg)}var o;this._invoke=function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}}function w(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return c;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=u(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,c;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,c):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,c)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:C}}function C(){return{value:void 0,done:!0}}return f.prototype=p,s(g,"constructor",p),s(p,"constructor",f),f.displayName=s(p,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,s(e,a,"GeneratorFunction")),e.prototype=Object.create(g),e},e.awrap=function(e){return{__await:e}},y(b.prototype),s(b.prototype,i,(function(){return this})),e.AsyncIterator=b,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new b(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},y(g),s(g,a,"Generator"),s(g,o,(function(){return this})),s(g,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=S,O.prototype={constructor:O,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(s&&l){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,c):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),c},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),x(n),c}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;x(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:S(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},e}var nk=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(t){i(t)}}function s(e){try{l(r.throw(e))}catch(t){i(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};function rk(e){return nk(this,void 0,void 0,tk().mark((function t(){var n,r,o,i,a;return tk().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,fetch(e);case 2:if((n=t.sent).ok){t.next=5;break}throw new Error("invalid status code ".concat(n.status));case 5:if(r=n.headers.get("Content-Type"),o=n.headers.get("Content-Length"),r&&o&&"0"!==o&&r.startsWith("image/")){t.next=9;break}throw new Error("not an image");case 9:return i=parseInt(o),t.next=12,n.blob();case 12:return a=t.sent,t.abrupt("return",{blob:a,url:URL.createObjectURL(a),type:r,size:i});case 14:case"end":return t.stop()}}),t)})))}function ok(e){return new Promise((function(t,n){var r=new FileReader;r.onload=function(e){return t(r.result)},r.onerror=function(e){return n(r.error)},r.onabort=function(e){return n(new Error("Read aborted"))},r.readAsDataURL(e)}))}function ik(e){return(null===e||void 0===e?void 0:e.startsWith("data:"))||!1}function ak(e){return nk(this,void 0,void 0,tk().mark((function t(){var n,r;return tk().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(ik(e)){t.next=2;break}return t.abrupt("return",e);case 2:return t.next=4,fetch(e);case 4:return n=t.sent,t.next=7,n.blob();case 7:return r=t.sent,t.abrupt("return",URL.createObjectURL(r));case 9:case"end":return t.stop()}}),t)})))}var sk=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(t){i(t)}}function s(e){try{l(r.throw(e))}catch(t){i(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};function lk(e){var t=this,n=e.onInsert,r=e.onClose,o=Object(jd.useState)(!1),a=Object(i.a)(o,2),s=a[0],l=a[1],u=Object(jd.useState)(),c=Object(i.a)(u,2),d=c[0],f=c[1],p=Object(jd.useState)(""),h=Object(i.a)(p,2),m=h[0],v=h[1];return Object(Cd.jsx)(iw,Object.assign({title:"Insert image from URL",onClose:r,action:{loading:s,title:"Insert image",disabled:!m,onClick:function(){return sk(t,void 0,void 0,tk().mark((function e(){var t,r,o,i;return tk().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l(!0),f(void 0),e.prev=2,e.next=5,rk(m);case 5:return t=e.sent,r=t.blob,o=t.size,i=t.type,e.t0=n,e.next=12,ok(r);case 12:e.t1=e.sent,e.t2=o,e.t3=i,e.t4={src:e.t1,size:e.t2,type:e.t3},(0,e.t0)(e.t4),e.next=22;break;case 19:e.prev=19,e.t5=e.catch(2),e.t5 instanceof Error&&f(e.t5.message);case 22:return e.prev=22,l(!1),e.finish(22);case 25:case"end":return e.stop()}}),e,null,[[2,19,22,25]])})))}}},{children:Object(Cd.jsxs)(rf.Flex,Object.assign({sx:{px:1,flexDirection:"column",width:["auto",350]}},{children:[Object(Cd.jsx)(Ow,{type:"url",autoFocus:!0,placeholder:"Paste Image URL here",value:m,onChange:function(e){v(e.target.value),f(void 0)}}),d?Object(Cd.jsxs)(af,Object.assign({variant:"error",sx:{bg:"errorBg",mt:1,p:1,borderRadius:"default"}},{children:["Failed to download image: ",d.toLowerCase(),"."]})):Object(Cd.jsx)(af,Object.assign({variant:"subBody",sx:{bg:"shade",color:"primary",mt:1,p:1,borderRadius:"default"}},{children:"To protect your privacy, we will download the image & add it to your attachments."}))]}))}))}var uk=function(e){return{key:"hr",type:"button",title:"Horizontal rule",icon:"horizontalRule",isChecked:null===e||void 0===e?void 0:e.isActive("horizontalRule"),onClick:function(){var t;return null===(t=e.current)||void 0===t?void 0:t.chain().focus().setHorizontalRule().run()}}},ck=function(e){return{key:"codeblock",type:"button",title:"Code block",icon:"codeblock",isChecked:null===e||void 0===e?void 0:e.isActive("codeBlock"),onClick:function(){var t;return null===(t=e.current)||void 0===t?void 0:t.chain().focus().toggleCodeBlock().run()}}},dk=function(e){return{key:"blockquote",type:"button",title:"Quote",icon:"blockquote",isChecked:null===e||void 0===e?void 0:e.isActive("blockQuote"),onClick:function(){var t;return null===(t=e.current)||void 0===t?void 0:t.chain().focus().toggleBlockquote().run()}}},fk=function(e){return{key:"math",type:"button",title:"Math & formulas",icon:"mathBlock",isChecked:null===e||void 0===e?void 0:e.isActive("mathBlock"),onClick:function(){var t;return null===(t=e.current)||void 0===t?void 0:t.chain().focus().insertMathBlock().run()}}},pk=function(e,t){return{key:"image",type:"button",title:"Image",icon:"image",menu:{title:"Insert an image",items:[{key:"upload-from-disk",type:"button",title:"Upload from disk",icon:"upload",onClick:function(){var t;return null===(t=e.current)||void 0===t?void 0:t.chain().focus().openAttachmentPicker("image").run()}},{key:"camera",type:"button",title:"Take a photo using camera",icon:"camera",isHidden:!t,onClick:function(){var t;return null===(t=e.current)||void 0===t?void 0:t.chain().focus().openAttachmentPicker("camera").run()}},t?wk(e):kk(e)]}}},hk=function(e){return{key:"table",type:"button",title:"Table",icon:"table",menu:{title:"Insert a table",items:[{key:"table-size-selector",type:"popup",component:function(t){return Object(Cd.jsx)(Zw,{onInsertTable:function(n){var r,o;null===(r=e.current)||void 0===r||r.chain().focus().insertTable({rows:n.rows,cols:n.columns}).run(),null===(o=t.onClick)||void 0===o||o.call(t)}})}}]}}},mk=function(e){return{key:"embed",type:"button",title:"Embed",icon:"embed",menu:{title:"Insert an embed",items:[{key:"embed-popup",type:"popup",component:function(t){var n=t.onClick;return Object(Cd.jsx)(Jw,{title:"Insert embed",onClose:function(t){var r;if(!t)return null===n||void 0===n?void 0:n();null===(r=e.current)||void 0===r||r.chain().insertEmbed(t).run(),null===n||void 0===n||n()}})}}]}}},vk=function(e){return{key:"embed",type:"button",title:"Embed",icon:"embed",onClick:function(){e&&Jb({popup:function(t){return Object(Cd.jsx)(Jw,{title:"Insert embed",onClose:function(n){var r;if(!n)return t();null===(r=e.current)||void 0===r||r.chain().insertEmbed(n).run(),t()}})}})}}},gk=function(e){return{key:"attachment",type:"button",title:"Attachment",icon:"attachment",isChecked:null===e||void 0===e?void 0:e.isActive("attachment"),onClick:function(){var t;return null===(t=e.current)||void 0===t?void 0:t.chain().focus().openAttachmentPicker("file").run()}}},yk=function(e){return{key:"tasklist",type:"button",title:"Task list",icon:"checkbox",isChecked:null===e||void 0===e?void 0:e.isActive("taskList"),onClick:function(){var t;return null===(t=e.current)||void 0===t?void 0:t.chain().focus().toggleTaskList().run()}}},bk=function(e){return{key:"outlinelist",type:"button",title:"Outline list",icon:"outlineList",isChecked:null===e||void 0===e?void 0:e.isActive("outlineList"),onClick:function(){var t;return null===(t=e.current)||void 0===t?void 0:t.chain().focus().toggleOutlineList().run()}}},wk=function(e){return{key:"upload-from-url",type:"button",title:"Attach from URL",icon:"link",menu:{title:"Attach image from URL",items:[{key:"attach-image",type:"popup",component:function(t){var n=t.onClick;return Object(Cd.jsx)(lk,{onInsert:function(t){var r;null===(r=e.requestPermission("insertImage"))||void 0===r||r.chain().focus().insertImage(t).run(),null===n||void 0===n||n()},onClose:function(){null===n||void 0===n||n()}})}}]}}},kk=function(e){return{key:"upload-from-url",type:"button",title:"Attach from URL",icon:"link",onClick:function(){Jb({popup:function(t){return Object(Cd.jsx)(lk,{onInsert:function(n){var r;null===(r=e.requestPermission("insertImage"))||void 0===r||r.chain().focus().insertImage(n).run(),t()},onClose:t})}})}}};function xk(e){var t=e.id,n=e.group,r=e.items,o=e.selectedItem,a=e.buttonRef,s=e.menuWidth,l=Object(jd.useRef)(),u=Object(jd.useState)(!1),c=Object(i.a)(u,2),d=c[0],f=c[1],p=Hd(),h=Fd(),m="bottom"===p,v=Gb({group:n,id:t,isOpen:d,onClosed:function(){return f(!1)}}),g=v.closePopup,y=v.isPopupOpen;return Object(Cd.jsxs)(Cd.Fragment,{children:[Object(Cd.jsxs)(vf,Object.assign({ref:function(e){l.current=e,a&&(a.current=e||void 0)},sx:{p:1,m:0,bg:y?"hover":"transparent",mr:1,display:"flex",alignItems:"center",":hover":{bg:"hover"},":last-of-type":{mr:0}},onClick:function(){return f((function(e){return!e}))},onMouseDown:function(e){return e.preventDefault()}},{children:["string"===typeof o?Object(Cd.jsx)(af,Object.assign({sx:{fontSize:"subBody",mr:1,color:"text"}},{children:o})):o,Object(Cd.jsx)(pf,{path:m?hf.chevronUp:hf.chevronDown,size:"small",color:"text"})]})),Object(Cd.jsx)(Qb,{isOpen:y,items:r,onClose:function(){return g(t)},position:{target:m?zb():l.current||"mouse",isTargetAbsolute:!0,location:m?"top":"below",align:"center",yOffset:5},blocking:!h,focusOnRender:!h,sx:{minWidth:s,maxWidth:m?"95vw":"auto",flexDirection:m?"row":"column",overflowX:m?"auto":"hidden",marginRight:m?"10px":0,display:"flex",alignItems:m?"center":"unset",mr:m?0:2}})]})}var Ok=Dd.a.memo((function(e){var t=e.title,n=e.onDecrease,r=e.onIncrease,o=e.onReset,i=e.value;return Object(Cd.jsxs)(rf.Flex,Object.assign({sx:{alignItems:"center",mr:1,":last-of-type":{mr:0}}},{children:[Object(Cd.jsx)(yf,{toggled:!1,title:"Decrease ".concat(t),icon:"minus",variant:"small",onClick:n}),Object(Cd.jsx)(vf,Object.assign({sx:{color:"text",bg:"transparent",px:0,fontSize:"subBody",mx:1,textAlign:"center",":hover":{bg:"transparent"}},onClick:o,title:"Reset ".concat(t)},{children:i})),Object(Cd.jsx)(yf,{toggled:!1,title:"Increase ".concat(t),icon:"plus",variant:"small",onClick:r})]}))}),(function(e,t){return e.value===t.value}));function Sk(e){var t=Object(jd.useRef)(e);return Object(jd.useEffect)((function(){t.current=e}),[e]),t}var Ck={"Sans-serif":"Open Sans",Serif:"serif",Monospace:"monospace"};var jk=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function Dk(e){var t=e.editor,n=e.alignment,r=jk(e,["editor","alignment"]),o=Sk(n);return Object(Cd.jsx)(yf,Object.assign({},r,{onClick:function(){var e;null===(e=t.current)||void 0===e||e.chain().focus().setTextAlign(o.current).run()},toggled:!1}))}var Ak=[1,2,3,4,5,6];var Ek=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};var Mk=Dd.a.memo((function(e){var t=e.children,n=(e.toggled,e.onOpen),r=e.sx,o=Ek(e,["children","toggled","onOpen","sx"]),i=Object(jd.useRef)(null),a=Hd();return Object(Cd.jsxs)(Cd.Fragment,{children:[Object(Cd.jsxs)(rf.Flex,Object.assign({ref:i,sx:{borderRadius:"default"}},{children:[Object(Cd.jsx)(yf,Object.assign({},o,{sx:Object.assign({mr:0,":hover":{bg:"hover"}},r),toggled:!1})),Object(Cd.jsx)(vf,Object.assign({sx:{flexShrink:0,p:0,m:0,px:"3px",bg:"bgSecondary",":hover":{bg:"hover"},":last-of-type":{mr:0}},onClick:n},{children:Object(Cd.jsx)(pf,{path:"bottom"===a?hf.chevronUp:hf.chevronDown,color:"text",size:"small",sx:{flexShrink:0}})}))]})),t]})}),(function(e,t){return e.toggled===t.toggled&&JSON.stringify(e.sx)===JSON.stringify(t.sx)}));function Tk(e,t){var n,r=e.state.selection.$anchor,o=e.state.doc.nodeAt(r.pos),i=t.includes((null===o||void 0===o?void 0:o.type.name)||"")?r.pos:null===(n=mo((function(e){return t.includes(e.type.name)}))(e.state.selection))||void 0===n?void 0:n.pos;return i&&e.view.nodeDOM(i)||null}function Lk(e,t){var n,r=e.state.selection.$anchor,o=e.state.doc.nodeAt(r.pos),i=(null===o||void 0===o?void 0:o.type.name)===t?r.pos:null===(n=mo((function(e){return e.type.name===t}))(e.state.selection))||void 0===n?void 0:n.pos;return i?e.state.doc.nodeAt(i):null}function Nk(e,t){return e.marks.find((function(e){return e.type.name===t}))}function Pk(e){var t=e.selection,n=t.$from,r=t.from;return{node:e.doc.nodeAt(r)||void 0,from:r,to:r+n.node().nodeSize}}function Rk(e){var t=e.isActive("taskList"),n=e.isActive("outlineList");return e.isActive("bulletList")||e.isActive("orderedList")?"listItem":n?"outlineListItem":t?"taskItem":null}var Hk=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};var Fk=Dd.a.memo((function(e){var t=e.editor,n=e.onClick,r=(e.isActive,e.subTypes),o=e.type,a=Hk(e,["editor","onClick","isActive","subTypes","type"]),s="bottom"===Hd(),l=Object(jd.useState)(!1),u=Object(i.a)(l,2),c=u[0],d=u[1],f=Object(jd.useRef)();return Object(Cd.jsx)(Mk,Object.assign({},a,{buttonRef:f,onClick:n,toggled:c,sx:{mr:0},onOpen:function(){return d((function(e){return!e}))}},{children:Object(Cd.jsx)(Kb,{isOpen:c,group:"lists",id:a.title,blocking:!1,focusOnRender:!1,position:{isTargetAbsolute:!0,target:s?zb():f.current||"mouse",align:"center",location:s?"top":"below",yOffset:10},onClosed:function(){return d(!1)},renderPopup:function(){return Object(Cd.jsx)(rf.Box,Object.assign({sx:{bg:"background",display:"grid",gridTemplateColumns:"1fr 1fr 1fr",p:1}},{children:r.map((function(e){return Object(Cd.jsx)(sf,Object.assign({variant:"menuitem",sx:{width:80},onClick:function(){var n,r=null===(n=t.current)||void 0===n?void 0:n.chain().focus();if(r&&t.current)return function(e){var t=e.isActive("taskList"),n=e.isActive("outlineList"),r=e.isActive("bulletList")||e.isActive("orderedList");return t||n||r}(t.current)||(r="bulletList"===o?r.toggleBulletList():r.toggleOrderedList()),r.updateAttributes(o,{listType:e.type}).run()}},{children:Object(Cd.jsx)(Vk,{listStyleType:e.type})}),e.title)}))}))}})}))}),(function(e,t){return e.isActive===t.isActive}));function Vk(e){var t=e.listStyleType;return Object(Cd.jsx)(rf.Flex,Object.assign({as:"ul",sx:{flexDirection:"column",flex:1,p:0,listStyleType:t},onMouseDown:function(e){return e.preventDefault()}},{children:[0,1,2].map((function(e){return Object(Cd.jsx)(rf.Box,Object.assign({as:"li",sx:{display:"list-item",color:"text",fontSize:8,mb:"1px"}},{children:Object(Cd.jsx)(rf.Flex,Object.assign({sx:{alignItems:"center"}},{children:Object(Cd.jsx)(rf.Box,{sx:{width:"100%",flexShrink:0,height:4,bg:"#cbcbcb",borderRadius:"small"}})}))}),e.toString())}))}))}var zk=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function Bk(e){var t=e.editor,n=e.direction,r=zk(e,["editor","direction"]),o=Sk(n);return Object(Cd.jsx)(yf,Object.assign({},r,{onClick:function(){var e;return null===(e=t.current)||void 0===e?void 0:e.chain().focus().setTextDirection(o.current).run()},toggled:!1}))}var Ik=n(26),_k=n.n(Ik);var $k={set:function(e,t){if(!t)return window.localStorage.removeItem(e);window.localStorage.setItem(e,JSON.stringify(t))},get:function(e,t){var n=window.localStorage.getItem(e);return n?function(e){if("undefined"===e||"null"===e)return;try{return JSON.parse(e)}catch(t){return e}}(n):t}};function qk(){return(qk=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Wk(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(o[n]=e[n]);return o}function Uk(e){var t=Object(jd.useRef)(e),n=Object(jd.useRef)((function(e){t.current&&t.current(e)}));return t.current=e,n.current}var Kk=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e<t?t:e},Gk=function(e){return"touches"in e},Jk=function(e){return e&&e.ownerDocument.defaultView||self},Yk=function(e,t,n){var r=e.getBoundingClientRect(),o=Gk(t)?function(e,t){for(var n=0;n<e.length;n++)if(e[n].identifier===t)return e[n];return e[0]}(t.touches,n):t;return{left:Kk((o.pageX-(r.left+Jk(e).pageXOffset))/r.width),top:Kk((o.pageY-(r.top+Jk(e).pageYOffset))/r.height)}},Zk=function(e){!Gk(e)&&e.preventDefault()},Xk=Dd.a.memo((function(e){var t=e.onMove,n=e.onKey,r=Wk(e,["onMove","onKey"]),o=Object(jd.useRef)(null),i=Uk(t),a=Uk(n),s=Object(jd.useRef)(null),l=Object(jd.useRef)(!1),u=Object(jd.useMemo)((function(){var e=function(e){Zk(e),(Gk(e)?e.touches.length>0:e.buttons>0)&&o.current?i(Yk(o.current,e,s.current)):n(!1)},t=function(){return n(!1)};function n(n){var r=l.current,i=Jk(o.current),a=n?i.addEventListener:i.removeEventListener;a(r?"touchmove":"mousemove",e),a(r?"touchend":"mouseup",t)}return[function(e){var t=e.nativeEvent,r=o.current;if(r&&(Zk(t),!function(e,t){return t&&!Gk(e)}(t,l.current)&&r)){if(Gk(t)){l.current=!0;var a=t.changedTouches||[];a.length&&(s.current=a[0].identifier)}r.focus(),i(Yk(r,t,s.current)),n(!0)}},function(e){var t=e.which||e.keyCode;t<37||t>40||(e.preventDefault(),a({left:39===t?.05:37===t?-.05:0,top:40===t?.05:38===t?-.05:0}))},n]}),[a,i]),c=u[0],d=u[1],f=u[2];return Object(jd.useEffect)((function(){return f}),[f]),Dd.a.createElement("div",qk({},r,{onTouchStart:c,onMouseDown:c,className:"react-colorful__interactive",ref:o,onKeyDown:d,tabIndex:0,role:"slider"}))})),Qk=function(e){return e.filter(Boolean).join(" ")},ex=function(e){var t=e.color,n=e.left,r=e.top,o=void 0===r?.5:r,i=Qk(["react-colorful__pointer",e.className]);return Dd.a.createElement("div",{className:i,style:{top:100*o+"%",left:100*n+"%"}},Dd.a.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},tx=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n},nx=(Math.PI,function(e){return"#"===e[0]&&(e=e.substr(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:1}:{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:1}}),rx=function(e){var t=e.s,n=e.v,r=e.a,o=(200-t)*n/100;return{h:tx(e.h),s:tx(o>0&&o<200?t*n/100/(o<=100?o:200-o)*100:0),l:tx(o/2),a:tx(r,2)}},ox=function(e){var t=rx(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},ix=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var i=Math.floor(t),a=r*(1-n),s=r*(1-(t-i)*n),l=r*(1-(1-t+i)*n),u=i%6;return{r:tx(255*[r,s,a,a,l,r][u]),g:tx(255*[l,r,r,s,a,a][u]),b:tx(255*[a,a,l,r,r,s][u]),a:tx(o,2)}},ax=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},sx=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=Math.max(t,n,r),a=i-Math.min(t,n,r),s=a?i===t?(n-r)/a:i===n?2+(r-t)/a:4+(t-n)/a:0;return{h:tx(60*(s<0?s+6:s)),s:tx(i?a/i*100:0),v:tx(i/255*100),a:o}},lx=Dd.a.memo((function(e){var t=e.hue,n=e.onChange,r=Qk(["react-colorful__hue",e.className]);return Dd.a.createElement("div",{className:r},Dd.a.createElement(Xk,{onMove:function(e){n({h:360*e.left})},onKey:function(e){n({h:Kk(t+360*e.left,0,360)})},"aria-label":"Hue","aria-valuetext":tx(t)},Dd.a.createElement(ex,{className:"react-colorful__hue-pointer",left:t/360,color:ox({h:t,s:100,v:100,a:1})})))})),ux=Dd.a.memo((function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:ox({h:t.h,s:100,v:100,a:1})};return Dd.a.createElement("div",{className:"react-colorful__saturation",style:r},Dd.a.createElement(Xk,{onMove:function(e){n({s:100*e.left,v:100-100*e.top})},onKey:function(e){n({s:Kk(t.s+100*e.left,0,100),v:Kk(t.v-100*e.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+tx(t.s)+"%, Brightness "+tx(t.v)+"%"},Dd.a.createElement(ex,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:ox(t)})))})),cx=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function dx(e,t,n){var r=Uk(n),o=Object(jd.useState)((function(){return e.toHsva(t)})),i=o[0],a=o[1],s=Object(jd.useRef)({color:t,hsva:i});Object(jd.useEffect)((function(){if(!e.equal(t,s.current.color)){var n=e.toHsva(t);s.current={hsva:n,color:t},a(n)}}),[t,e]),Object(jd.useEffect)((function(){var t;cx(i,s.current.hsva)||e.equal(t=e.fromHsva(i),s.current.color)||(s.current={hsva:i,color:t},r(t))}),[i,e,r]);var l=Object(jd.useCallback)((function(e){a((function(t){return Object.assign({},t,e)}))}),[]);return[i,l]}var fx,px="undefined"!=typeof window?jd.useLayoutEffect:jd.useEffect,hx=new Map,mx=function(e){px((function(){var t=e.current?e.current.ownerDocument:document;if(void 0!==t&&!hx.has(t)){var r=t.createElement("style");r.innerHTML='.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url(\'data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>\')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}',hx.set(t,r);var o=fx||n.nc;o&&r.setAttribute("nonce",o),t.head.appendChild(r)}}),[])},vx=function(e){var t=e.className,n=e.colorModel,r=e.color,o=void 0===r?n.defaultColor:r,i=e.onChange,a=Wk(e,["className","colorModel","color","onChange"]),s=Object(jd.useRef)(null);mx(s);var l=dx(n,o,i),u=l[0],c=l[1],d=Qk(["react-colorful",t]);return Dd.a.createElement("div",qk({},a,{ref:s,className:d}),Dd.a.createElement(ux,{hsva:u,onChange:c}),Dd.a.createElement(lx,{hue:u.h,onChange:c,className:"react-colorful__last-control"}))},gx={defaultColor:"000",toHsva:function(e){return sx(nx(e))},fromHsva:function(e){return n=(t=ix(e)).g,r=t.b,"#"+ax(t.r)+ax(n)+ax(r);var t,n,r},equal:function(e,t){return e.toLowerCase()===t.toLowerCase()||cx(nx(e),nx(t))}},yx=function(e){return Dd.a.createElement(vx,qk({},e,{colorModel:gx}))};var bx=["#e91e63","#9c27b0","#673ab7","#3f51b5","#2196f3","#03a9f4","#00bcd4","#009688","#4caf50","#8bc34a","#cddc39","#ffeb3b","#ffc107","#f44336"],wx=[35,35,25];function kx(e){var t=e.colors,n=void 0===t?bx:t,r=e.color,o=e.onClear,a=e.onChange,s=e.title,l=e.onClose,u=e.expanded,c=Object(jd.useRef)(),d=Object(jd.useState)(u||!1),f=Object(i.a)(d,2),p=f[0],h=f[1],m=Object(jd.useState)(_k()(r||n[0]).toHexString()),v=Object(i.a)(m,2),g=v[0],y=v[1],b=_k()(g);Object(jd.useEffect)((function(){c.current&&p&&c.current.focus({preventScroll:!0})}),[p]);var w=Object(jd.useCallback)(function(e,t){var n;return function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];n&&clearTimeout(n),n=setTimeout((function(){return e.apply(void 0,o)}),t)}}((function(e){a(e)}),500),[a]);return Object(Cd.jsxs)(rf.Flex,Object.assign({ref:c,tabIndex:-1,sx:{bg:"background",flexDirection:"column",".react-colorful":{width:"auto",height:150},".react-colorful__saturation":{borderRadius:["default",0]},width:["calc(100vw - 20px)",250]}},{children:[l&&Object(Cd.jsxs)(rf.Box,Object.assign({sx:{display:["none","flex"],justifyContent:"space-between",p:2,pb:p?2:0,alignItems:"center"},onClick:l},{children:[Object(Cd.jsx)(af,Object.assign({variant:"title"},{children:s})),Object(Cd.jsx)(vf,Object.assign({variant:"icon",sx:{p:0}},{children:Object(Cd.jsx)(pf,{path:hf.close,size:"big"})}))]})),p?Object(Cd.jsxs)(Cd.Fragment,{children:[Object(Cd.jsx)(yx,{onChange:function(e){y(e),w(e)},onTouchEnd:function(){return a(g)},onMouseUp:function(){return a(g)}}),Object(Cd.jsx)(Ow,{variant:"clean",placeholder:"#000000",spellCheck:!1,sx:{my:2,p:0,borderRadius:0,fontSize:["title","title","body"],color:"fontTertiary",textAlign:"center",letterSpacing:1.5},value:g.toUpperCase(),maxLength:7,onChange:function(e){var t=e.target.value;t&&_k()(t,{format:"hex"}).isValid()&&(y(t),a(t))}})]}):null,Object(Cd.jsxs)(rf.Flex,{children:[Object(Cd.jsxs)(rf.Flex,Object.assign({className:"hide-scrollbar",sx:{flex:1,p:1,overflowX:["auto","hidden"],flexWrap:["nowrap","wrap"]}},{children:[Object(Cd.jsx)(vf,Object.assign({variant:"icon",sx:{flexShrink:0,width:wx,height:wx,borderRadius:50,boxShadow:"menu",p:0,ml:[2,2,1]},onClick:o},{children:Object(Cd.jsx)(pf,{path:hf.colorClear,color:"text",size:15})})),Object(Cd.jsx)(vf,Object.assign({variant:"secondary",sx:{flexShrink:0,bg:g,width:wx,height:wx,borderRadius:50,p:0,ml:[2,2,1],":hover":{bg:g}},onClick:function(){return h((function(e){return!e}))}},{children:Object(Cd.jsx)(pf,{path:hf.palette,color:b.isDark()?"static":"icon",size:18})})),n.map((function(e){return Object(Cd.jsx)(vf,{sx:{flex:"0 0 auto",bg:e,width:wx,height:wx,ml:[2,1,1],mb:[0,1,1],borderRadius:50,":hover":{bg:e}},onClick:function(){y(e),a(e)}},e)}))]})),l&&Object(Cd.jsx)(vf,Object.assign({variant:"icon",sx:{display:["block","none"],px:2},onClick:l},{children:Object(Cd.jsx)(pf,{path:hf.close,size:"big"})}))]})]}))}var xx,Ox,Sx=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function Cx(e){e.editor;var t=e.onColorChange,n=e.activeColor,r=e.title,o=e.cacheKey,a=Sx(e,["editor","onColorChange","activeColor","title","cacheKey"]),s=n||$k.get(o),l=_k()(s),u="bottom"===Hd(),c=Object(jd.useState)(!1),d=Object(i.a)(c,2),f=d[0],p=d[1];return Object(Cd.jsx)(Mk,Object.assign({},a,{iconColor:s&&l.isDark()?"static":"icon",sx:{mr:0,bg:s||"transparent",":hover":{bg:s?l.darken(5).toRgbString():"transparent"}},onOpen:function(){return p((function(e){return!e}))},toggled:f,onClick:function(){return t(s)}},{children:Object(Cd.jsx)(Kb,{isOpen:f,id:e.icon,group:"color",position:{isTargetAbsolute:!0,target:zb(),align:u?"center":"end",location:u?"top":"below",yOffset:10},focusOnRender:!1,blocking:!1,renderPopup:function(e){return Object(Cd.jsx)(kx,{color:s,onClear:function(){t(),$k.set(o,null)},onChange:function(e){t(e),$k.set(o,e)},onClose:e,title:r})}})}))}if("undefined"!=typeof WeakMap){var jx=new WeakMap;xx=function(e){return jx.get(e)},Ox=function(e,t){return jx.set(e,t),t}}else{var Dx=[],Ax=0;xx=function(e){for(var t=0;t<Dx.length;t+=2)if(Dx[t]==e)return Dx[t+1]},Ox=function(e,t){return 10==Ax&&(Ax=0),Dx[Ax++]=e,Dx[Ax++]=t}}var Ex=Object(d.a)((function e(t,n,r,o){Object(c.a)(this,e),this.left=t,this.top=n,this.right=r,this.bottom=o})),Mx=function(){function e(t,n,r,o){Object(c.a)(this,e),this.width=t,this.height=n,this.map=r,this.problems=o}return Object(d.a)(e,[{key:"findCell",value:function(e){for(var t=0;t<this.map.length;t++){var n=this.map[t];if(n==e){for(var r=t%this.width,o=t/this.width|0,i=r+1,a=o+1,s=1;i<this.width&&this.map[t+s]==n;s++)i++;for(var l=1;a<this.height&&this.map[t+this.width*l]==n;l++)a++;return new Ex(r,o,i,a)}}throw new RangeError("No cell with offset "+e+" found")}},{key:"colCount",value:function(e){for(var t=0;t<this.map.length;t++)if(this.map[t]==e)return t%this.width;throw new RangeError("No cell with offset "+e+" found")}},{key:"nextCell",value:function(e,t,n){var r=this.findCell(e),o=r.left,i=r.right,a=r.top,s=r.bottom;return"horiz"==t?(n<0?0==o:i==this.width)?null:this.map[a*this.width+(n<0?o-1:i)]:(n<0?0==a:s==this.height)?null:this.map[o+this.width*(n<0?a-1:s)]}},{key:"rectBetween",value:function(e,t){var n=this.findCell(e),r=n.left,o=n.right,i=n.top,a=n.bottom,s=this.findCell(t),l=s.left,u=s.right,c=s.top,d=s.bottom;return new Ex(Math.min(r,l),Math.min(i,c),Math.max(o,u),Math.max(a,d))}},{key:"cellsInRect",value:function(e){for(var t=[],n={},r=e.top;r<e.bottom;r++)for(var o=e.left;o<e.right;o++){var i=r*this.width+o,a=this.map[i];n[a]||(n[a]=!0,o==e.left&&o&&this.map[i-1]==a||r==e.top&&r&&this.map[i-this.width]==a||t.push(a))}return t}},{key:"positionAt",value:function(e,t,n){for(var r=0,o=0;;r++){var i=o+n.child(r).nodeSize;if(r==e){for(var a=t+e*this.width,s=(e+1)*this.width;a<s&&this.map[a]<o;)a++;return a==s?i-1:this.map[a]}o=i}}}],[{key:"get",value:function(e){return xx(e)||Ox(e,function(e){if("table"!=e.type.spec.tableRole)throw new RangeError("Not a table node: "+e.type.name);for(var t=function(e){for(var t=-1,n=!1,r=0;r<e.childCount;r++){var o=e.child(r),i=0;if(n)for(var a=0;a<r;a++)for(var s=e.child(a),l=0;l<s.childCount;l++){var u=s.child(l);a+u.attrs.rowspan>r&&(i+=u.attrs.colspan)}for(var c=0;c<o.childCount;c++){var d=o.child(c);i+=d.attrs.colspan,d.attrs.rowspan>1&&(n=!0)}-1==t?t=i:t!=i&&(t=Math.max(t,i))}return t}(e),n=e.childCount,r=[],o=0,i=null,a=[],s=0,l=t*n;s<l;s++)r[s]=0;for(var u=0,c=0;u<n;u++){var d=e.child(u);c++;for(var f=0;;f++){for(;o<r.length&&0!=r[o];)o++;if(f==d.childCount)break;for(var p=d.child(f),h=p.attrs,m=h.colspan,v=h.rowspan,g=h.colwidth,y=0;y<v;y++){if(y+u>=n){(i||(i=[])).push({type:"overlong_rowspan",pos:c,n:v-y});break}for(var b=o+y*t,w=0;w<m;w++){0==r[b+w]?r[b+w]=c:(i||(i=[])).push({type:"collision",row:u,pos:c,n:m-w});var k=g&&g[w];if(k){var x=(b+w)%t*2,O=a[x];null==O||O!=k&&1==a[x+1]?(a[x]=k,a[x+1]=1):O==k&&a[x+1]++}}}o+=m,c+=p.nodeSize}for(var S=(u+1)*t,C=0;o<S;)0==r[o++]&&C++;C&&(i||(i=[])).push({type:"missing",row:u,n:C}),c++}for(var j=new Mx(t,n,r,i),D=!1,A=0;!D&&A<a.length;A+=2)null!=a[A]&&a[A+1]<n&&(D=!0);D&&function(e,t,n){e.problems||(e.problems=[]);for(var r=0,o={};r<e.map.length;r++){var i=e.map[r];if(!o[i]){o[i]=!0;for(var a=n.nodeAt(i),s=null,l=0;l<a.attrs.colspan;l++){var u=t[2*((r+l)%e.width)];null==u||a.attrs.colwidth&&a.attrs.colwidth[l]==u||((s||(s=Tx(a.attrs)))[l]=u)}s&&e.problems.unshift({type:"colwidth mismatch",pos:i,colwidth:s})}}}(j,a,e);return j}(e))}}]),e}();function Tx(e){if(e.colwidth)return e.colwidth.slice();for(var t=[],n=0;n<e.colspan;n++)t.push(0);return t}function Lx(e){var t=e.cached.tableNodeTypes;if(!t)for(var n in t=e.cached.tableNodeTypes={},e.nodes){var r=e.nodes[n],o=r.spec.tableRole;o&&(t[o]=r)}return t}var Nx=new p.PluginKey("selectingCells");function Px(e){for(var t=e.depth-1;t>0;t--)if("row"==e.node(t).type.spec.tableRole)return e.node(0).resolve(e.before(t+1));return null}function Rx(e){for(var t=e.selection.$head,n=t.depth;n>0;n--)if("row"==t.node(n).type.spec.tableRole)return!0;return!1}function Hx(e){var t=e.selection;return t.$anchorCell?t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell:t.node&&"cell"==t.node.type.spec.tableRole?t.$anchor:Px(t.$head)||function(e){for(var t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){var r=t.type.spec.tableRole;if("cell"==r||"header_cell"==r)return e.doc.resolve(n)}for(var o=e.nodeBefore,i=e.pos;o;o=o.lastChild,i--){var a=o.type.spec.tableRole;if("cell"==a||"header_cell"==a)return e.doc.resolve(i-o.nodeSize)}}(t.$head)}function Fx(e){return"row"==e.parent.type.spec.tableRole&&e.nodeAfter}function Vx(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function zx(e,t,n){var r=e.start(-1),o=Mx.get(e.node(-1)).nextCell(e.pos-r,t,n);return null==o?null:e.node(0).resolve(r+o)}function Bx(e,t,n){var r={};for(var o in e)r[o]=e[o];return r[t]=n,r}function Ix(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=Bx(e,"colspan",e.colspan-n);return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(t,n),r.colwidth.some((function(e){return e>0}))||(r.colwidth=null)),r}function _x(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=Bx(e,"colspan",e.colspan+n);if(r.colwidth){r.colwidth=r.colwidth.slice();for(var o=0;o<n;o++)r.colwidth.splice(t,0,0)}return r}var $x=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;Object(c.a)(this,n);var i=e.node(-1),a=Mx.get(i),s=e.start(-1),l=a.rectBetween(e.pos-s,o.pos-s),u=e.node(0),d=a.cellsInRect(l).filter((function(e){return e!=o.pos-s}));d.unshift(o.pos-s);var f=d.map((function(e){var t=i.nodeAt(e),n=e+s+1;return new p.SelectionRange(u.resolve(n),u.resolve(n+t.content.size))}));return(r=t.call(this,f[0].$from,f[0].$to,f)).$anchorCell=e,r.$headCell=o,r}return Object(d.a)(n,[{key:"map",value:function(e,t){var r=e.resolve(t.map(this.$anchorCell.pos)),o=e.resolve(t.map(this.$headCell.pos));if(Fx(r)&&Fx(o)&&Vx(r,o)){var i=this.$anchorCell.node(-1)!=r.node(-1);return i&&this.isRowSelection()?n.rowSelection(r,o):i&&this.isColSelection()?n.colSelection(r,o):new n(r,o)}return p.TextSelection.between(r,o)}},{key:"content",value:function(){for(var e=this.$anchorCell.node(-1),t=Mx.get(e),n=this.$anchorCell.start(-1),r=t.rectBetween(this.$anchorCell.pos-n,this.$headCell.pos-n),o={},i=[],a=r.top;a<r.bottom;a++){for(var s=[],l=a*t.width+r.left,u=r.left;u<r.right;u++,l++){var c=t.map[l];if(!o[c]){o[c]=!0;var d=t.findCell(c),f=e.nodeAt(c),p=r.left-d.left,h=d.right-r.right;if(p>0||h>0){var m=f.attrs;p>0&&(m=Ix(m,0,p)),h>0&&(m=Ix(m,m.colspan-h,h)),f=d.left<r.left?f.type.createAndFill(m):f.type.create(m,f.content)}if(d.top<r.top||d.bottom>r.bottom){var g=Bx(f.attrs,"rowspan",Math.min(d.bottom,r.bottom)-Math.max(d.top,r.top));f=d.top<r.top?f.type.createAndFill(g):f.type.create(g,f.content)}s.push(f)}}i.push(e.child(a).copy(v.Fragment.from(s)))}var y=this.isColSelection()&&this.isRowSelection()?e:i;return new v.Slice(v.Fragment.from(y),1,1)}},{key:"replace",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:v.Slice.empty,n=e.steps.length,r=this.ranges,o=0;o<r.length;o++){var i=r[o],a=i.$from,s=i.$to,l=e.mapping.slice(n);e.replace(l.map(a.pos),l.map(s.pos),o?v.Slice.empty:t)}var u=p.Selection.findFrom(e.doc.resolve(e.mapping.slice(n).map(this.to)),-1);u&&e.setSelection(u)}},{key:"replaceWith",value:function(e,t){this.replace(e,new v.Slice(v.Fragment.from(t),0,0))}},{key:"forEachCell",value:function(e){for(var t=this.$anchorCell.node(-1),n=Mx.get(t),r=this.$anchorCell.start(-1),o=n.cellsInRect(n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r)),i=0;i<o.length;i++)e(t.nodeAt(o[i]),r+o[i])}},{key:"isColSelection",value:function(){var e=this.$anchorCell.index(-1),t=this.$headCell.index(-1);if(Math.min(e,t)>0)return!1;var n=e+this.$anchorCell.nodeAfter.attrs.rowspan,r=t+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(n,r)==this.$headCell.node(-1).childCount}},{key:"isRowSelection",value:function(){var e=Mx.get(this.$anchorCell.node(-1)),t=this.$anchorCell.start(-1),n=e.colCount(this.$anchorCell.pos-t),r=e.colCount(this.$headCell.pos-t);if(Math.min(n,r)>0)return!1;var o=n+this.$anchorCell.nodeAfter.attrs.colspan,i=r+this.$headCell.nodeAfter.attrs.colspan;return Math.max(o,i)==e.width}},{key:"eq",value:function(e){return e instanceof n&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}},{key:"toJSON",value:function(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}},{key:"getBookmark",value:function(){return new qx(this.$anchorCell.pos,this.$headCell.pos)}}],[{key:"colSelection",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,r=Mx.get(e.node(-1)),o=e.start(-1),i=r.findCell(e.pos-o),a=r.findCell(t.pos-o),s=e.node(0);return i.top<=a.top?(i.top>0&&(e=s.resolve(o+r.map[i.left])),a.bottom<r.height&&(t=s.resolve(o+r.map[r.width*(r.height-1)+a.right-1]))):(a.top>0&&(t=s.resolve(o+r.map[a.left])),i.bottom<r.height&&(e=s.resolve(o+r.map[r.width*(r.height-1)+i.right-1]))),new n(e,t)}},{key:"rowSelection",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,r=Mx.get(e.node(-1)),o=e.start(-1),i=r.findCell(e.pos-o),a=r.findCell(t.pos-o),s=e.node(0);return i.left<=a.left?(i.left>0&&(e=s.resolve(o+r.map[i.top*r.width])),a.right<r.width&&(t=s.resolve(o+r.map[r.width*(a.top+1)-1]))):(a.left>0&&(t=s.resolve(o+r.map[a.top*r.width])),i.right<r.width&&(e=s.resolve(o+r.map[r.width*(i.top+1)-1]))),new n(e,t)}},{key:"fromJSON",value:function(e,t){return new n(e.resolve(t.anchor),e.resolve(t.head))}},{key:"create",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;return new n(e.resolve(t),e.resolve(r))}}]),n}(p.Selection);$x.prototype.visible=!1,p.Selection.jsonID("cell",$x);var qx=function(){function e(t,n){Object(c.a)(this,e),this.anchor=t,this.head=n}return Object(d.a)(e,[{key:"map",value:function(t){return new e(t.map(this.anchor),t.map(this.head))}},{key:"resolve",value:function(e){var t=e.resolve(this.anchor),n=e.resolve(this.head);return"row"==t.parent.type.spec.tableRole&&"row"==n.parent.type.spec.tableRole&&t.index()<t.parent.childCount&&n.index()<n.parent.childCount&&Vx(t,n)?new $x(t,n):p.Selection.near(n,1)}}]),e}();function Wx(e){if(!(e.selection instanceof $x))return null;var t=[];return e.selection.forEachCell((function(e,n){t.push(zu.node(n,n+e.nodeSize,{class:"selectedCell"}))})),_u.create(e.doc,t)}function Ux(e,t,n){var r,o,i=(t||e).selection,a=(t||e).doc;if(i instanceof p.NodeSelection&&(o=i.node.type.spec.tableRole)){if("cell"==o||"header_cell"==o)r=$x.create(a,i.from);else if("row"==o){var s=a.resolve(i.from+1);r=$x.rowSelection(s,s)}else if(!n){var l=Mx.get(i.node),u=i.from+1,c=u+l.map[l.width*l.height-1];r=$x.create(a,u+1,c)}}else i instanceof p.TextSelection&&function(e){var t=e.$from,n=e.$to;if(t.pos==n.pos||t.pos<t.pos-6)return!1;for(var r=t.pos,o=n.pos,i=t.depth;i>=0&&!(t.after(i+1)<t.end(i));i--,r++);for(var a=n.depth;a>=0&&!(n.before(a+1)>n.start(a));a--,o--);return r==o&&/row|table/.test(t.node(i).type.spec.tableRole)}(i)?r=p.TextSelection.create(a,i.from):i instanceof p.TextSelection&&function(e){for(var t,n,r=e.$from,o=e.$to,i=r.depth;i>0;i--){var a=r.node(i);if("cell"===a.type.spec.tableRole||"header_cell"===a.type.spec.tableRole){t=a;break}}for(var s=o.depth;s>0;s--){var l=o.node(s);if("cell"===l.type.spec.tableRole||"header_cell"===l.type.spec.tableRole){n=l;break}}return t!==n&&0===o.parentOffset}(i)&&(r=p.TextSelection.create(a,i.$from.start(),i.$from.end()));return r&&(t||(t=e.tr)).setSelection(r),t}function Kx(e){if(!e.size)return null;for(var t=e.content,n=e.openStart,r=e.openEnd;1==t.childCount&&(n>0&&r>0||"table"==t.firstChild.type.spec.tableRole);)n--,r--,t=t.firstChild.content;var o=t.firstChild,i=o.type.spec.tableRole,a=o.type.schema,s=[];if("row"==i)for(var l=0;l<t.childCount;l++){var u=t.child(l).content,c=l?0:Math.max(0,n-1),d=l<t.childCount-1?0:Math.max(0,r-1);(c||d)&&(u=Gx(Lx(a).row,new v.Slice(u,c,d)).content),s.push(u)}else{if("cell"!=i&&"header_cell"!=i)return null;s.push(n||r?Gx(Lx(a).row,new v.Slice(t,n,r)).content:t)}return function(e,t){for(var n=[],r=0;r<t.length;r++)for(var o=t[r],i=o.childCount-1;i>=0;i--)for(var a=o.child(i).attrs,s=a.rowspan,l=a.colspan,u=r;u<r+s;u++)n[u]=(n[u]||0)+l;for(var c=0,d=0;d<n.length;d++)c=Math.max(c,n[d]);for(var f=0;f<n.length;f++)if(f>=t.length&&t.push(v.Fragment.empty),n[f]<c){for(var p=Lx(e).cell.createAndFill(),h=[],m=n[f];m<c;m++)h.push(p);t[f]=t[f].append(v.Fragment.from(h))}return{height:t.length,width:c,rows:t}}(a,s)}function Gx(e,t){var n=e.createAndFill();return new g.e(n).replace(0,n.content.size,t).doc}function Jx(e,t,n,r,o,i,a,s){if(0==a||a==t.height)return!1;for(var l=!1,u=o;u<i;u++){var c=a*t.width+u,d=t.map[c];if(t.map[c-t.width]==d){l=!0;var f=n.nodeAt(d),p=t.findCell(d),h=p.top,m=p.left;e.setNodeMarkup(e.mapping.slice(s).map(d+r),null,Bx(f.attrs,"rowspan",a-h)),e.insert(e.mapping.slice(s).map(t.positionAt(a,m,n)),f.type.createAndFill(Bx(f.attrs,"rowspan",h+f.attrs.rowspan-a))),u+=f.attrs.colspan-1}}return l}function Yx(e,t,n,r,o,i,a,s){if(0==a||a==t.width)return!1;for(var l=!1,u=o;u<i;u++){var c=u*t.width+a,d=t.map[c];if(t.map[c-1]==d){l=!0;var f=n.nodeAt(d),p=t.colCount(d),h=e.mapping.slice(s).map(d+r);e.setNodeMarkup(h,null,Ix(f.attrs,a-p,f.attrs.colspan-(a-p))),e.insert(h+f.nodeSize,f.type.createAndFill(Ix(f.attrs,0,a-p))),u+=f.attrs.rowspan-1}}return l}function Zx(e,t,n,r,o){var i=n?e.doc.nodeAt(n-1):e.doc,a=Mx.get(i),s=r.top,l=r.left,u=l+o.width,c=s+o.height,d=e.tr,f=0;function p(){i=n?d.doc.nodeAt(n-1):d.doc,a=Mx.get(i),f=d.mapping.maps.length}(function(e,t,n,r,o,i,a){var s,l,u=Lx(e.doc.type.schema);if(o>t.width)for(var c=0,d=0;c<t.height;c++){var f=n.child(c);d+=f.nodeSize;var p=[],h=void 0;h=null==f.lastChild||f.lastChild.type==u.cell?s||(s=u.cell.createAndFill()):l||(l=u.header_cell.createAndFill());for(var m=t.width;m<o;m++)p.push(h);e.insert(e.mapping.slice(a).map(d-1+r),p)}if(i>t.height){for(var g=[],y=0,b=(t.height-1)*t.width;y<Math.max(t.width,o);y++){var w=!(y>=t.width)&&n.nodeAt(t.map[b+y]).type==u.header_cell;g.push(w?l||(l=u.header_cell.createAndFill()):s||(s=u.cell.createAndFill()))}for(var k=u.row.create(null,v.Fragment.from(g)),x=[],O=t.height;O<i;O++)x.push(k);e.insert(e.mapping.slice(a).map(r+n.nodeSize-2),x)}return!(!s&&!l)})(d,a,i,n,u,c,f)&&p(),Jx(d,a,i,n,l,u,s,f)&&p(),Jx(d,a,i,n,l,u,c,f)&&p(),Yx(d,a,i,n,s,c,l,f)&&p(),Yx(d,a,i,n,s,c,u,f)&&p();for(var h=s;h<c;h++){var m=a.positionAt(h,l,i),g=a.positionAt(h,u,i);d.replace(d.mapping.slice(f).map(m+n),d.mapping.slice(f).map(g+n),new v.Slice(o.rows[h-s],0,0))}p(),d.setSelection(new $x(d.doc.resolve(n+a.positionAt(s,l,i)),d.doc.resolve(n+a.positionAt(c-1,u-1,i)))),t(d)}var Xx=Bn({ArrowLeft:eO("horiz",-1),ArrowRight:eO("horiz",1),ArrowUp:eO("vert",-1),ArrowDown:eO("vert",1),"Shift-ArrowLeft":tO("horiz",-1),"Shift-ArrowRight":tO("horiz",1),"Shift-ArrowUp":tO("vert",-1),"Shift-ArrowDown":tO("vert",1),Backspace:nO,"Mod-Backspace":nO,Delete:nO,"Mod-Delete":nO});function Qx(e,t,n){return!n.eq(e.selection)&&(t&&t(e.tr.setSelection(n).scrollIntoView()),!0)}function eO(e,t){return function(n,r,o){var i=n.selection;if(i instanceof $x)return Qx(n,r,p.Selection.near(i.$headCell,t));if("horiz"!=e&&!i.empty)return!1;var a=aO(o,e,t);if(null==a)return!1;if("horiz"==e)return Qx(n,r,p.Selection.near(n.doc.resolve(i.head+t),t));var s,l=n.doc.resolve(a),u=zx(l,e,t);return s=u?p.Selection.near(u,1):t<0?p.Selection.near(n.doc.resolve(l.before(-1)),-1):p.Selection.near(n.doc.resolve(l.after(-1)),1),Qx(n,r,s)}}function tO(e,t){return function(n,r,o){var i=n.selection;if(!(i instanceof $x)){var a=aO(o,e,t);if(null==a)return!1;i=new $x(n.doc.resolve(a))}var s=zx(i.$headCell,e,t);return!!s&&Qx(n,r,new $x(i.$anchorCell,s))}}function nO(e,t){var n=e.selection;if(!(n instanceof $x))return!1;if(t){var r=e.tr,o=Lx(e.schema).cell.createAndFill().content;n.forEachCell((function(e,t){e.content.eq(o)||r.replace(r.mapping.map(t+1),r.mapping.map(t+e.nodeSize-1),new v.Slice(o,0,0))})),r.docChanged&&t(r)}return!0}function rO(e,t){var n=Px(e.state.doc.resolve(t));return!!n&&(e.dispatch(e.state.tr.setSelection(new $x(n))),!0)}function oO(e,t,n){if(!Rx(e.state))return!1;var r=Kx(n),o=e.state.selection;if(o instanceof $x){r||(r={width:1,height:1,rows:[v.Fragment.from(Gx(Lx(e.state.schema).cell,n))]});var i=o.$anchorCell.node(-1),a=o.$anchorCell.start(-1),s=Mx.get(i).rectBetween(o.$anchorCell.pos-a,o.$headCell.pos-a);return r=function(e,t,n){var r=e.width,o=e.height,i=e.rows;if(r!=t){for(var a=[],s=[],l=0;l<i.length;l++){for(var u=i[l],c=[],d=a[l]||0,f=0;d<t;f++){var p=u.child(f%u.childCount);d+p.attrs.colspan>t&&(p=p.type.create(Ix(p.attrs,p.attrs.colspan,d+p.attrs.colspan-t),p.content)),c.push(p),d+=p.attrs.colspan;for(var h=1;h<p.attrs.rowspan;h++)a[l+h]=(a[l+h]||0)+p.attrs.colspan}s.push(v.Fragment.from(c))}i=s,r=t}if(o!=n){for(var m=[],g=0,y=0;g<n;g++,y++){for(var b=[],w=i[y%o],k=0;k<w.childCount;k++){var x=w.child(k);g+x.attrs.rowspan>n&&(x=x.type.create(Bx(x.attrs,"rowspan",Math.max(1,n-x.attrs.rowspan)),x.content)),b.push(x)}m.push(v.Fragment.from(b))}i=m,o=n}return{width:r,height:o,rows:i}}(r,s.right-s.left,s.bottom-s.top),Zx(e.state,e.dispatch,a,s,r),!0}if(r){var l=Hx(e.state),u=l.start(-1);return Zx(e.state,e.dispatch,u,Mx.get(l.node(-1)).findCell(l.pos-u),r),!0}return!1}function iO(e,t){if(!t.ctrlKey&&!t.metaKey){var n,r=sO(e,t.target);if(t.shiftKey&&e.state.selection instanceof $x)o(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&r&&null!=(n=Px(e.state.selection.$anchor))&&lO(e,t).pos!=n.pos)o(n,t),t.preventDefault();else if(!r)return;e.root.addEventListener("mouseup",i),e.root.addEventListener("dragstart",i),e.root.addEventListener("mousemove",a)}function o(t,n){var r=lO(e,n),o=null==Nx.getState(e.state);if(!r||!Vx(t,r)){if(!o)return;r=t}var i=new $x(t,r);if(o||!e.state.selection.eq(i)){var a=e.state.tr.setSelection(i);o&&a.setMeta(Nx,t.pos),e.dispatch(a)}}function i(){e.root.removeEventListener("mouseup",i),e.root.removeEventListener("dragstart",i),e.root.removeEventListener("mousemove",a),null!=Nx.getState(e.state)&&e.dispatch(e.state.tr.setMeta(Nx,-1))}function a(n){var a,s=Nx.getState(e.state);if(null!=s)a=e.state.doc.resolve(s);else if(sO(e,n.target)!=r&&!(a=lO(e,t)))return i();a&&o(a,n)}}function aO(e,t,n){if(!(e.state.selection instanceof p.TextSelection))return null;for(var r=e.state.selection.$head,o=r.depth-1;o>=0;o--){var i=r.node(o);if((n<0?r.index(o):r.indexAfter(o))!=(n<0?0:i.childCount))return null;if("cell"==i.type.spec.tableRole||"header_cell"==i.type.spec.tableRole){var a=r.before(o),s="vert"==t?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(s)?a:null}}return null}function sO(e,t){for(;t&&t!=e.dom;t=t.parentNode)if("TD"==t.nodeName||"TH"==t.nodeName)return t}function lO(e,t){var n=e.posAtCoords({left:t.clientX,top:t.clientY});return n&&n?Px(e.state.doc.resolve(n.pos)):null}var uO=new p.PluginKey("fix-tables");function cO(e,t,n,r){var o=e.childCount,i=t.childCount;e:for(var a=0,s=0;a<i;a++){for(var l=t.child(a),u=s,c=Math.min(o,a+3);u<c;u++)if(e.child(u)==l){s=u+1,n+=l.nodeSize;continue e}r(l,n),s<o&&e.child(s).sameMarkup(l)?cO(e.child(s),l,n+1,r):l.nodesBetween(0,l.content.size,r,n+1),n+=l.nodeSize}}function dO(e,t){var n,r=function(t,r){"table"==t.type.spec.tableRole&&(n=function(e,t,n,r){var o=Mx.get(t);if(!o.problems)return r;r||(r=e.tr);for(var i,a,s=[],l=0;l<o.height;l++)s.push(0);for(var u=0;u<o.problems.length;u++){var c=o.problems[u];if("collision"==c.type){for(var d=t.nodeAt(c.pos),f=0;f<d.attrs.rowspan;f++)s[c.row+f]+=c.n;r.setNodeMarkup(r.mapping.map(n+1+c.pos),null,Ix(d.attrs,d.attrs.colspan-c.n,c.n))}else if("missing"==c.type)s[c.row]+=c.n;else if("overlong_rowspan"==c.type){var p=t.nodeAt(c.pos);r.setNodeMarkup(r.mapping.map(n+1+c.pos),null,Bx(p.attrs,"rowspan",p.attrs.rowspan-c.n))}else if("colwidth mismatch"==c.type){var h=t.nodeAt(c.pos);r.setNodeMarkup(r.mapping.map(n+1+c.pos),null,Bx(h.attrs,"colwidth",c.colwidth))}}for(var m=0;m<s.length;m++)s[m]&&(null==i&&(i=m),a=m);for(var v=0,g=n+1;v<o.height;v++){var y=t.child(v),b=g+y.nodeSize,w=s[v];if(w>0){var k="cell";y.firstChild&&(k=y.firstChild.type.spec.tableRole);for(var x=[],O=0;O<w;O++)x.push(Lx(e.schema)[k].createAndFill());var S=0!=v&&i!=v-1||a!=v?b-1:g+1;r.insert(r.mapping.map(S),x)}g=b}return r.setMeta(uO,{fixTables:!0})}(e,t,r,n))};return t?t.doc!=e.doc&&cO(t.doc,e.doc,0,r):e.doc.descendants(r),n}function fO(e){var t,n=e.selection,r=Hx(e),o=r.node(-1),i=r.start(-1),a=Mx.get(o);return(t=n instanceof $x?a.rectBetween(n.$anchorCell.pos-i,n.$headCell.pos-i):a.findCell(r.pos-i)).tableStart=i,t.map=a,t.table=o,t}function pO(e,t,n){var r=t.map,o=t.tableStart,i=t.table,a=n>0?-1:0;(function(e,t,n){for(var r=Lx(t.type.schema).header_cell,o=0;o<e.height;o++)if(t.nodeAt(e.map[n+o*e.width]).type!=r)return!1;return!0})(r,i,n+a)&&(a=0==n||n==r.width?null:0);for(var s=0;s<r.height;s++){var l=s*r.width+n;if(n>0&&n<r.width&&r.map[l-1]==r.map[l]){var u=r.map[l],c=i.nodeAt(u);e.setNodeMarkup(e.mapping.map(o+u),null,_x(c.attrs,n-r.colCount(u))),s+=c.attrs.rowspan-1}else{var d=null==a?Lx(i.type.schema).cell:i.nodeAt(r.map[l+a]).type,f=r.positionAt(s,n,i);e.insert(e.mapping.map(o+f),d.createAndFill())}}return e}function hO(e,t,n){for(var r=t.map,o=t.table,i=t.tableStart,a=e.mapping.maps.length,s=0;s<r.height;){var l=s*r.width+n,u=r.map[l],c=o.nodeAt(u);if(n>0&&r.map[l-1]==u||n<r.width-1&&r.map[l+1]==u)e.setNodeMarkup(e.mapping.slice(a).map(i+u),null,Ix(c.attrs,n-r.colCount(u)));else{var d=e.mapping.slice(a).map(i+u);e.delete(d,d+c.nodeSize)}s+=c.attrs.rowspan}}function mO(e,t,n){for(var r=t.map,o=t.tableStart,i=t.table,a=o,s=0;s<n;s++)a+=i.child(s).nodeSize;var l=[],u=n>0?-1:0;(function(e,t,n){for(var r=Lx(t.type.schema).header_cell,o=0;o<e.width;o++)if(t.nodeAt(e.map[o+n*e.width]).type!=r)return!1;return!0})(r,i,n+u)&&(u=0==n||n==r.height?null:0);for(var c=0,d=r.width*n;c<r.width;c++,d++)if(n>0&&n<r.height&&r.map[d]==r.map[d-r.width]){var f=r.map[d],p=i.nodeAt(f).attrs;e.setNodeMarkup(o+f,null,Bx(p,"rowspan",p.rowspan+1)),c+=p.colspan-1}else{var h=null==u?Lx(i.type.schema).cell:i.nodeAt(r.map[d+u*r.width]).type;l.push(h.createAndFill())}return e.insert(a,Lx(i.type.schema).row.create(null,l)),e}function vO(e,t,n){for(var r=t.map,o=t.table,i=t.tableStart,a=0,s=0;s<n;s++)a+=o.child(s).nodeSize;var l=a+o.child(n).nodeSize,u=e.mapping.maps.length;e.delete(a+i,l+i);for(var c=0,d=n*r.width;c<r.width;c++,d++){var f=r.map[d];if(n>0&&f==r.map[d-r.width]){var p=o.nodeAt(f).attrs;e.setNodeMarkup(e.mapping.slice(u).map(f+i),null,Bx(p,"rowspan",p.rowspan-1)),c+=p.colspan-1}else if(n<r.width&&f==r.map[d+r.width]){var h=o.nodeAt(f),m=h.type.create(Bx(h.attrs,"rowspan",h.attrs.rowspan-1),h.content),v=r.positionAt(n+1,c,o);e.insert(e.mapping.slice(u).map(i+v),m),c+=h.attrs.colspan-1}}}function gO(e){var t=e.content;return 1==t.childCount&&t.firstChild.isTextblock&&0==t.firstChild.childCount}function yO(e,t){var n=e.selection;if(!(n instanceof $x)||n.$anchorCell.pos==n.$headCell.pos)return!1;var r=fO(e),o=r.map;if(function(e,t){for(var n=e.width,r=e.height,o=e.map,i=t.top*n+t.left,a=i,s=(t.bottom-1)*n+t.left,l=i+(t.right-t.left-1),u=t.top;u<t.bottom;u++){if(t.left>0&&o[a]==o[a-1]||t.right<n&&o[l]==o[l+1])return!0;a+=n,l+=n}for(var c=t.left;c<t.right;c++){if(t.top>0&&o[i]==o[i-n]||t.bottom<r&&o[s]==o[s+n])return!0;i++,s++}return!1}(o,r))return!1;if(t){for(var i,a,s=e.tr,l={},u=v.Fragment.empty,c=r.top;c<r.bottom;c++)for(var d=r.left;d<r.right;d++){var f=o.map[c*o.width+d],p=r.table.nodeAt(f);if(!l[f])if(l[f]=!0,null==i)i=f,a=p;else{gO(p)||(u=u.append(p.content));var h=s.mapping.map(f+r.tableStart);s.delete(h,h+p.nodeSize)}}if(s.setNodeMarkup(i+r.tableStart,null,Bx(_x(a.attrs,a.attrs.colspan,r.right-r.left-a.attrs.colspan),"rowspan",r.bottom-r.top)),u.size){var m=i+1+a.content.size,g=gO(a)?i+1:m;s.replaceWith(g+r.tableStart,m+r.tableStart,u)}s.setSelection(new $x(s.doc.resolve(i+r.tableStart))),t(s)}return!0}function bO(e,t){var n,r=Lx(e.schema);return(n=function(e){var t=e.node;return r[t.type.spec.tableRole]},function(e,t){var r,o,i=e.selection;if(i instanceof $x){if(i.$anchorCell.pos!=i.$headCell.pos)return!1;r=i.$anchorCell.nodeAfter,o=i.$anchorCell.pos}else{if(!(r=function(e){for(var t=e.depth;t>0;t--){var n=e.node(t).type.spec.tableRole;if("cell"===n||"header_cell"===n)return e.node(t)}return null}(i.$from)))return!1;o=Px(i.$from).pos}if(1==r.attrs.colspan&&1==r.attrs.rowspan)return!1;if(t){var a=r.attrs,s=[],l=a.colwidth;a.rowspan>1&&(a=Bx(a,"rowspan",1)),a.colspan>1&&(a=Bx(a,"colspan",1));for(var u,c=fO(e),d=e.tr,f=0;f<c.right-c.left;f++)s.push(l?Bx(a,"colwidth",l&&l[f]?[l[f]]:null):a);for(var p=c.top;p<c.bottom;p++){var h=c.map.positionAt(p,c.left,c.table);p==c.top&&(h+=r.nodeSize);for(var m=c.left,v=0;m<c.right;m++,v++)m==c.left&&p==c.top||d.insert(u=d.mapping.map(h+c.tableStart,1),n({node:r,row:p,col:m}).createAndFill(s[v]))}d.setNodeMarkup(o,n({node:r,row:c.top,col:c.left}),s[0]),i instanceof $x&&d.setSelection(new $x(d.doc.resolve(i.$anchorCell.pos),u&&d.doc.resolve(u))),t(d)}return!0})(e,t)}function wO(e,t,n){for(var r=t.map.cellsInRect({left:0,top:0,right:"row"==e?t.map.width:1,bottom:"column"==e?t.map.height:1}),o=0;o<r.length;o++){var i=t.table.nodeAt(r[o]);if(i&&i.type!==n.header_cell)return!1}return!0}function kO(e,t){return(t=t||{useDeprecatedLogic:!1}).useDeprecatedLogic?function(e){return function(t,n){if(!Rx(t))return!1;if(n){for(var r=Lx(t.schema),o=fO(t),i=t.tr,a=o.map.cellsInRect("column"==e?new Ex(o.left,0,o.right,o.map.height):"row"==e?new Ex(0,o.top,o.map.width,o.bottom):o),s=a.map((function(e){return o.table.nodeAt(e)})),l=0;l<a.length;l++)s[l].type==r.header_cell&&i.setNodeMarkup(o.tableStart+a[l],r.cell,s[l].attrs);if(0==i.steps.length)for(var u=0;u<a.length;u++)i.setNodeMarkup(o.tableStart+a[u],r.header_cell,s[u].attrs);n(i)}return!0}}(e):function(t,n){if(!Rx(t))return!1;if(n){var r=Lx(t.schema),o=fO(t),i=t.tr,a=wO("row",o,r),s=wO("column",o,r),l=("column"===e?a:"row"===e&&s)?1:0,u="column"==e?new Ex(0,l,1,o.map.height):"row"==e?new Ex(l,0,o.map.width,1):o,c="column"==e?s?r.cell:r.header_cell:"row"==e?a?r.cell:r.header_cell:r.cell;o.map.cellsInRect(u).forEach((function(e){var t=e+o.tableStart,n=i.doc.nodeAt(t);n&&i.setNodeMarkup(t,c,n.attrs)})),n(i)}return!0}}kO("row",{useDeprecatedLogic:!0}),kO("column",{useDeprecatedLogic:!0});var xO=kO("cell",{useDeprecatedLogic:!0});function OO(e){return function(t,n){if(!Rx(t))return!1;var r=function(e,t){if(t<0){var n=e.nodeBefore;if(n)return e.pos-n.nodeSize;for(var r=e.index(-1)-1,o=e.before();r>=0;r--){var i=e.node(-1).child(r);if(i.childCount)return o-1-i.lastChild.nodeSize;o-=i.nodeSize}}else{if(e.index()<e.parent.childCount-1)return e.pos+e.nodeAfter.nodeSize;for(var a=e.node(-1),s=e.indexAfter(-1),l=e.after();s<a.childCount;s++){var u=a.child(s);if(u.childCount)return l+1;l+=u.nodeSize}}}(Hx(t),e);if(null!=r){if(n){var o=t.doc.resolve(r);n(t.tr.setSelection(p.TextSelection.between(o,(i=o,i.node(0).resolve(i.pos+i.nodeAfter.nodeSize)))).scrollIntoView())}var i;return!0}}}var SO=function(){function e(t,n){Object(c.a)(this,e),this.node=t,this.cellMinWidth=n,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),CO(t,this.colgroup,this.table,n),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}return Object(d.a)(e,[{key:"update",value:function(e){return e.type==this.node.type&&(this.node=e,CO(e,this.colgroup,this.table,this.cellMinWidth),!0)}},{key:"ignoreMutation",value:function(e){return"attributes"==e.type&&(e.target==this.table||this.colgroup.contains(e.target))}}]),e}();function CO(e,t,n,r,o,i){for(var a=0,s=!0,l=t.firstChild,u=e.firstChild,c=0,d=0;c<u.childCount;c++)for(var f=u.child(c).attrs,p=f.colspan,h=f.colwidth,m=0;m<p;m++,d++){var v=o==d?i:h&&h[m],g=v?v+"px":"";a+=v||r,v||(s=!1),l?(l.style.width!=g&&(l.style.width=g),l=l.nextSibling):t.appendChild(document.createElement("col")).style.width=g}for(;l;){var y=l.nextSibling;l.parentNode.removeChild(l),l=y}s?(n.style.width=a+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=a+"px")}var jO=new p.PluginKey("tableColumnResizing");function DO(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.handleWidth,n=void 0===t?5:t,r=e.cellMinWidth,o=void 0===r?25:r,i=e.View,a=void 0===i?SO:i,s=e.lastColumnResizable,l=void 0===s||s,u=new p.Plugin({key:jO,state:{init:function(e,t){return this.spec.props.nodeViews[Lx(t.schema).table.name]=function(e,t){return new a(e,o,t)},new AO(-1,!1)},apply:function(e,t){return t.apply(e)}},props:{attributes:function(e){return jO.getState(e).activeHandle>-1?{class:"resize-cursor"}:null},handleDOMEvents:{mousemove:function(e,t){EO(e,t,n,o,l)},mouseleave:function(e){MO(e)},mousedown:function(e,t){TO(e,t,o)}},decorations:function(e){var t=jO.getState(e);if(t.activeHandle>-1)return HO(e,t.activeHandle)},nodeViews:{}}});return u}var AO=function(){function e(t,n){Object(c.a)(this,e),this.activeHandle=t,this.dragging=n}return Object(d.a)(e,[{key:"apply",value:function(t){var n=this,r=t.getMeta(jO);if(r&&null!=r.setHandle)return new e(r.setHandle,null);if(r&&void 0!==r.setDragging)return new e(n.activeHandle,r.setDragging);if(n.activeHandle>-1&&t.docChanged){var o=t.mapping.map(n.activeHandle,-1);Fx(t.doc.resolve(o))||(o=null),n=new e(o,n.dragging)}return n}}]),e}();function EO(e,t,n,r,o){var i=jO.getState(e.state);if(!i.dragging){var a=function(e){for(;e&&"TD"!=e.nodeName&&"TH"!=e.nodeName;)e=e.classList.contains("ProseMirror")?null:e.parentNode;return e}(t.target),s=-1;if(a){var l=a.getBoundingClientRect(),u=l.left,c=l.right;t.clientX-u<=n?s=LO(e,t,"left"):c-t.clientX<=n&&(s=LO(e,t,"right"))}if(s!=i.activeHandle){if(!o&&-1!==s){var d=e.state.doc.resolve(s),f=d.node(-1),p=Mx.get(f),h=d.start(-1);if(p.colCount(d.pos-h)+d.nodeAfter.attrs.colspan-1==p.width-1)return}PO(e,s)}}}function MO(e){var t=jO.getState(e.state);t.activeHandle>-1&&!t.dragging&&PO(e,-1)}function TO(e,t,n){var r=jO.getState(e.state);if(-1==r.activeHandle||r.dragging)return!1;var o=e.state.doc.nodeAt(r.activeHandle),i=function(e,t,n){var r=n.colspan,o=n.colwidth,i=o&&o[o.length-1];if(i)return i;var a=e.domAtPos(t),s=a.node.childNodes[a.offset].offsetWidth,l=r;if(o)for(var u=0;u<r;u++)o[u]&&(s-=o[u],l--);return s/l}(e,r.activeHandle,o.attrs);function a(t){window.removeEventListener("mouseup",a),window.removeEventListener("mousemove",s);var r=jO.getState(e.state);r.dragging&&(!function(e,t,n){for(var r=e.state.doc.resolve(t),o=r.node(-1),i=Mx.get(o),a=r.start(-1),s=i.colCount(r.pos-a)+r.nodeAfter.attrs.colspan-1,l=e.state.tr,u=0;u<i.height;u++){var c=u*i.width+s;if(!u||i.map[c]!=i.map[c-i.width]){var d=i.map[c],f=o.nodeAt(d).attrs,p=1==f.colspan?0:s-i.colCount(d);if(!f.colwidth||f.colwidth[p]!=n){var h=f.colwidth?f.colwidth.slice():RO(f.colspan);h[p]=n,l.setNodeMarkup(a+d,null,Bx(f,"colwidth",h))}}}l.docChanged&&e.dispatch(l)}(e,r.activeHandle,NO(r.dragging,t,n)),e.dispatch(e.state.tr.setMeta(jO,{setDragging:null})))}function s(t){if(!t.which)return a(t);var r=jO.getState(e.state),o=NO(r.dragging,t,n);!function(e,t,n,r){var o=e.state.doc.resolve(t),i=o.node(-1),a=o.start(-1),s=Mx.get(i).colCount(o.pos-a)+o.nodeAfter.attrs.colspan-1,l=e.domAtPos(o.start(-1)).node;for(;"TABLE"!=l.nodeName;)l=l.parentNode;CO(i,l.firstChild,l,r,s,n)}(e,r.activeHandle,o,n)}return e.dispatch(e.state.tr.setMeta(jO,{setDragging:{startX:t.clientX,startWidth:i}})),window.addEventListener("mouseup",a),window.addEventListener("mousemove",s),t.preventDefault(),!0}function LO(e,t,n){var r=e.posAtCoords({left:t.clientX,top:t.clientY});if(!r)return-1;var o=r.pos,i=Px(e.state.doc.resolve(o));if(!i)return-1;if("right"==n)return i.pos;var a=Mx.get(i.node(-1)),s=i.start(-1),l=a.map.indexOf(i.pos-s);return l%a.width==0?-1:s+a.map[l-1]}function NO(e,t,n){var r=t.clientX-e.startX;return Math.max(n,e.startWidth+r)}function PO(e,t){e.dispatch(e.state.tr.setMeta(jO,{setHandle:t}))}function RO(e){for(var t=[],n=0;n<e;n++)t.push(0);return t}function HO(e,t){for(var n=[],r=e.doc.resolve(t),o=r.node(-1),i=Mx.get(o),a=r.start(-1),s=i.colCount(r.pos-a)+r.nodeAfter.attrs.colspan,l=0;l<i.height;l++){var u=s+l*i.width-1;if((s==i.width||i.map[u]!=i.map[u+1])&&(0==l||i.map[u-1]!=i.map[u-1-i.width])){var c=i.map[u],d=a+c+o.nodeAt(c).nodeSize-1,f=document.createElement("div");f.className="column-resize-handle",n.push(zu.widget(d,f))}}return _u.create(e.doc,n)}function FO(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.allowTableNodeSelection,n=void 0!==t&&t;return new p.Plugin({key:Nx,state:{init:function(){return null},apply:function(e,t){var n=e.getMeta(Nx);if(null!=n)return-1==n?null:n;if(null==t||!e.docChanged)return t;var r=e.mapping.mapResult(t),o=r.deleted,i=r.pos;return o?null:i}},props:{decorations:Wx,handleDOMEvents:{mousedown:iO},createSelectionBetween:function(e){if(null!=Nx.getState(e.state))return e.state.selection},handleTripleClick:rO,handleKeyDown:Xx,handlePaste:oO},appendTransaction:function(e,t,r){return Ux(r,dO(r,t),n)}})}function VO(e,t,n,r){return _O(e,t,zO(t,n),zO(t,r))}function zO(e,t){for(var n=e.map,r=e.table,o=[],i=0;i<n.height;){var a=i*n.width+t;if(a>=n.map.length)break;var s=n.map[a],l=r.nodeAt(s);l&&(o.push({cell:l,pos:s}),i+=l.attrs.rowspan)}return o}function BO(e,t,n,r){return _O(e,t,IO(t,n),IO(t,r))}function IO(e,t){for(var n=e.map,r=e.table,o=[],i=0,a=t*n.width;i<n.width&&!(a>=n.map.length);i++,a++){var s=n.map[a],l=r.nodeAt(s);l&&(o.push({cell:l,pos:s}),i+=l.attrs.colspan-1)}return o}function _O(e,t,n,r){if(n.length===r.length){for(var o=e.mapping.maps.length,i=0;i<r.length;++i){var a=n[i],s=r[i],l=e.mapping.slice(o).map(t.tableStart+a.pos),u=l+a.cell.nodeSize,c=e.doc.slice(l,u),d=e.mapping.slice(o).map(t.tableStart+s.pos),f=d+s.cell.nodeSize,p=e.doc.slice(d,f);e.replace(d,f,c),u=(l=e.mapping.slice(o).map(t.tableStart+a.pos))+a.cell.nodeSize,e.replace(l,u,p)}return e}}function $O(e){var t=e.popupId,n=e.editor,r=e.tools,o=e.autoCloseOnUnmount,a="bottom"===Hd(),s=Object(jd.useRef)(),l=Object(jd.useState)(!1),u=Object(i.a)(l,2),c=u[0],d=u[1];return Object(Cd.jsxs)(Cd.Fragment,{children:[Object(Cd.jsx)(yf,Object.assign({},e,{toggled:c,buttonRef:s,onClick:function(){return d((function(e){return!e}))}})),Object(Cd.jsx)(Kb,{isOpen:c,group:"toolbarGroup",id:t,onClosed:function(){return d(!1)},position:{isTargetAbsolute:!0,target:a?zb():s.current||"mouse",align:"center",location:a?"top":"below",yOffset:10},autoCloseOnUnmount:o,focusOnRender:!1,blocking:!1,renderPopup:function(){return Object(Cd.jsx)(NS,{tools:r,editor:n,sx:{flex:1,p:"5px",boxShadow:"menu",bg:"background",borderRadius:"default",overflowX:"auto",maxWidth:"95vw"}})}})]})}function qO(e){return function(t){var n=e(t.editor);return Object(Cd.jsx)(yf,Object.assign({},t,{icon:n.icon||t.icon,toggled:n.isChecked||!1,title:n.title,onClick:n.onClick}))}}var WO={bold:{icon:"bold",title:"Bold"},italic:{icon:"italic",title:"Italic"},underline:{icon:"underline",title:"Underline"},strikethrough:{icon:"strikethrough",title:"Strikethrough"},addLink:{icon:"link",title:"Link"},editLink:{icon:"linkEdit",title:"Edit link",conditional:!0},removeLink:{icon:"linkRemove",title:"Remove link",conditional:!0},openLink:{icon:"openLink",title:"Open link",conditional:!0},linkSettings:{icon:"linkSettings",title:"Link settings",conditional:!0},code:{icon:"code",title:"Code"},codeRemove:{icon:"codeRemove",title:"Code",conditional:!0},clearformatting:{icon:"formatClear",title:"Clear all formatting"},subscript:{icon:"subscript",title:"Subscript"},superscript:{icon:"superscript",title:"Superscript"},insertBlock:{icon:"plus",title:"Insert",conditional:!0},bulletList:{icon:"bulletList",title:"Bullet list"},numberedList:{icon:"numberedList",title:"Numbered list"},fontFamily:{icon:"fontFamily",title:"Font family"},fontSize:{icon:"fontSize",title:"Font size"},headings:{icon:"heading",title:"Headings"},alignment:{icon:"alignCenter",title:"Alignment"},textDirection:{icon:"ltr",title:"Text direction"},highlight:{icon:"highlight",title:"Highlight"},textColor:{icon:"textColor",title:"Text color"},math:{icon:"math",title:"Math (inline)"},tableSettings:{icon:"tableSettings",title:"Table settings",conditional:!0},columnProperties:{icon:"columnProperties",title:"Column properties",conditional:!0},rowProperties:{icon:"rowProperties",title:"Row properties",conditional:!0},cellProperties:{icon:"cellProperties",title:"Cell properties",conditional:!0},insertColumnLeft:{icon:"insertColumnLeft",title:"Insert column left",conditional:!0},insertColumnRight:{icon:"insertColumnRight",title:"Insert column right",conditional:!0},moveColumnLeft:{icon:"moveColumnLeft",title:"Move column left",conditional:!0},moveColumnRight:{icon:"moveColumnRight",title:"Move column right",conditional:!0},deleteColumn:{icon:"deleteColumn",title:"Delete column",conditional:!0},splitCells:{icon:"splitCells",title:"Split cells",conditional:!0},mergeCells:{icon:"mergeCells",title:"Merge cells",conditional:!0},insertRowAbove:{icon:"insertRowAbove",title:"Insert row above",conditional:!0},insertRowBelow:{icon:"insertRowBelow",title:"Insert row below",conditional:!0},moveRowUp:{icon:"moveRowUp",title:"Move row up",conditional:!0},moveRowDown:{icon:"moveRowDown",title:"Move row down",conditional:!0},deleteRow:{icon:"deleteRow",title:"Delete row",conditional:!0},deleteTable:{icon:"deleteTable",title:"Delete table",conditional:!0},cellBackgroundColor:{icon:"backgroundColor",title:"Cell background color",conditional:!0},cellBorderColor:{icon:"cellBorderColor",title:"Cell border color",conditional:!0},cellTextColor:{icon:"textColor",title:"Cell text color",conditional:!0},cellBorderWidth:{icon:"none",title:"Cell border width",conditional:!0},imageSettings:{icon:"imageSettings",title:"Image settings",conditional:!0},imageAlignCenter:{icon:"alignCenter",title:"Align center",conditional:!0},imageAlignLeft:{icon:"alignLeft",title:"Align left",conditional:!0},imageAlignRight:{icon:"alignRight",title:"Align right",conditional:!0},imageProperties:{icon:"more",title:"Image properties",conditional:!0},attachmentSettings:{icon:"attachmentSettings",title:"Attachment settings",conditional:!0},downloadAttachment:{icon:"download",title:"Download attachment",conditional:!0},removeAttachment:{icon:"delete",title:"Remove attachment",conditional:!0},embedSettings:{icon:"embedSettings",title:"Embed settings",conditional:!0},embedAlignCenter:{icon:"alignCenter",title:"Align center",conditional:!0},embedAlignLeft:{icon:"alignLeft",title:"Align left",conditional:!0},embedAlignRight:{icon:"alignRight",title:"Align right",conditional:!0},embedProperties:{icon:"more",title:"Embed properties",conditional:!0},outdent:{icon:"outdent",title:"Lift list item",conditional:!0},indent:{icon:"indent",title:"Sink list item",conditional:!0}};function UO(e){return WO[e]}function KO(){return JO}var GO=[["insertBlock","tableSettings","imageSettings","embedSettings","attachmentSettings","linkSettings","codeRemove","outdent","indent"]],JO={default:[["bold","italic","underline",["strikethrough","code","subscript","superscript","highlight","textColor","math"]],["fontSize"],["headings","fontFamily"],["numberedList","bulletList"],["addLink"],["alignment","textDirection"],["clearformatting"]],minimal:[["bold","italic","underline","strikethrough","code"],["headings","addLink"],["clearformatting"]]};function YO(e){var t=e.editor,n=e.onClose,r=t.getAttributes("tableCell");return Object(Cd.jsx)(iw,Object.assign({title:"Cell properties",onClose:n},{children:Object(Cd.jsxs)(Gw,Object.assign({activeIndex:0},{children:[Object(Cd.jsxs)(Kw,Object.assign({title:Object(Cd.jsx)(pf,{title:"Cell background color",path:hf.backgroundColor,size:16})},{children:[Object(Cd.jsx)(rf.Box,{mt:2}),Object(Cd.jsx)(kx,{expanded:!0,color:r.backgroundColor,onChange:function(e){var n;return null===(n=t.current)||void 0===n?void 0:n.commands.setCellAttribute("backgroundColor",e)},onClear:function(){var e;return null===(e=t.current)||void 0===e?void 0:e.commands.setCellAttribute("backgroundColor",void 0)}})]})),Object(Cd.jsxs)(Kw,Object.assign({title:Object(Cd.jsx)(pf,{title:"Cell text color",path:hf.textColor,size:16})},{children:[Object(Cd.jsx)(rf.Box,{mt:2}),Object(Cd.jsx)(kx,{expanded:!0,color:r.color,onChange:function(e){var n;return null===(n=t.current)||void 0===n?void 0:n.commands.setCellAttribute("color",e)},onClear:function(){var e;return null===(e=t.current)||void 0===e?void 0:e.commands.setCellAttribute("color",void 0)}})]})),Object(Cd.jsxs)(Kw,Object.assign({title:Object(Cd.jsx)(pf,{title:"Cell border color",path:hf.cellBorderColor,size:16})},{children:[Object(Cd.jsx)(rf.Box,{mt:2}),Object(Cd.jsx)(kx,{expanded:!0,color:r.borderColor,onChange:function(e){var n;return null===(n=t.current)||void 0===n?void 0:n.commands.setCellAttribute("borderColor",e)},onClear:function(){var e;return null===(e=t.current)||void 0===e?void 0:e.commands.setCellAttribute("borderColor",void 0)}})]}))]}))}))}function ZO(e){var t=e.editor,n=Object(jd.useRef)(),r=Object(jd.useState)(!1),o=Object(i.a)(r,2),a=o[0],s=o[1],l=Object(jd.useMemo)((function(){return[aS(t),sS(t),lS(t),uS(t),cS(t)]}),[]);return Object(Cd.jsxs)(Cd.Fragment,{children:[Object(Cd.jsx)(yf,Object.assign({},e,{buttonRef:n,toggled:a,onClick:function(){return s(!0)}})),Object(Cd.jsx)(ow,{title:"Row properties",mobile:"sheet",desktop:"menu",isOpen:a,onClose:function(){return s(!1)},position:{target:n.current,isTargetAbsolute:!0,location:"below",yOffset:5},items:l})]})}function XO(e){var t=e.editor,n=Object(jd.useRef)(),r=Object(jd.useState)(!1),o=Object(i.a)(r,2),a=o[0],s=o[1],l=Object(jd.useMemo)((function(){return[QO(t),eS(t),tS(t),nS(t),rS(t),{type:"separator",key:"cellSeperator"},iS(t),oS(t),fS(t),{type:"separator",key:"tableSeperator"},dS(t)]}),[]);return Object(Cd.jsxs)(Cd.Fragment,{children:[Object(Cd.jsx)(yf,Object.assign({},e,{buttonRef:n,toggled:a,onClick:function(){return s(!0)}})),Object(Cd.jsx)(ow,{title:"Table properties",mobile:"sheet",desktop:"menu",isOpen:a,onClose:function(){return s(!1)},position:{target:n.current,isTargetAbsolute:!0,location:"below",yOffset:5},items:l})]})}var QO=function(e){return Object.assign(Object.assign({},UO("insertColumnLeft")),{key:"addColumnLeft",type:"button",onClick:function(){var t;return null===(t=e.current)||void 0===t?void 0:t.chain().focus().addColumnBefore().run()}})},eS=function(e){return Object.assign(Object.assign({},UO("insertColumnRight")),{key:"addColumnRight",type:"button",title:"Add column right",onClick:function(){var t;return null===(t=e.current)||void 0===t?void 0:t.chain().focus().addColumnAfter().run()},icon:"insertColumnRight"})},tS=function(e){return Object.assign(Object.assign({},UO("moveColumnLeft")),{key:"moveColumnLeft",type:"button",onClick:function(){return function(e){var t=e.state.tr,n=fO(e.state);if(0!==n.left){var r=VO(t,n,n.left,n.left-1);r&&e.view.dispatch(r)}}(e)}})},nS=function(e){return Object.assign(Object.assign({},UO("moveColumnRight")),{key:"moveColumnRight",type:"button",onClick:function(){return function(e){var t=e.state.tr,n=fO(e.state);if(n.right!==n.map.width){var r=VO(t,n,n.left,n.left+1);r&&e.view.dispatch(r)}}(e)}})},rS=function(e){return Object.assign(Object.assign({},UO("deleteColumn")),{key:"deleteColumn",type:"button",onClick:function(){var t;return null===(t=e.current)||void 0===t?void 0:t.chain().focus().deleteColumn().run()}})},oS=function(e){return Object.assign(Object.assign({},UO("splitCells")),{key:"splitCells",type:"button",onClick:function(){var t;return null===(t=e.current)||void 0===t?void 0:t.chain().focus().splitCell().run()}})},iS=function(e){return Object.assign(Object.assign({},UO("mergeCells")),{key:"mergeCells",type:"button",onClick:function(){var t;return null===(t=e.current)||void 0===t?void 0:t.chain().focus().mergeCells().run()}})},aS=function(e){return Object.assign(Object.assign({},UO("insertRowAbove")),{key:"insertRowAbove",type:"button",onClick:function(){var t;return null===(t=e.current)||void 0===t?void 0:t.chain().focus().addRowBefore().run()}})},sS=function(e){return Object.assign(Object.assign({},UO("insertRowBelow")),{key:"insertRowBelow",type:"button",onClick:function(){var t;return null===(t=e.current)||void 0===t?void 0:t.chain().focus().addRowAfter().run()}})},lS=function(e){return Object.assign(Object.assign({},UO("moveRowUp")),{key:"moveRowUp",type:"button",onClick:function(){return function(e){var t=e.state.tr,n=fO(e.state);if(0!==n.top){var r=BO(t,n,n.top,n.top-1);r&&e.view.dispatch(r)}}(e)}})},uS=function(e){return Object.assign(Object.assign({},UO("moveRowDown")),{key:"moveRowDown",type:"button",onClick:function(){return function(e){var t=e.state.tr,n=fO(e.state);if(n.top+1!==n.map.height){var r=BO(t,n,n.top,n.top+1);r&&e.view.dispatch(r)}}(e)}})},cS=function(e){return Object.assign(Object.assign({},UO("deleteRow")),{key:"deleteRow",type:"button",onClick:function(){var t;return null===(t=e.current)||void 0===t?void 0:t.chain().focus().deleteRow().run()}})},dS=function(e){return Object.assign(Object.assign({},UO("deleteTable")),{key:"deleteTable",type:"button",onClick:function(){var t;return null===(t=e.current)||void 0===t?void 0:t.chain().focus().deleteTable().run()}})},fS=function(e){return Object.assign(Object.assign({},UO("cellProperties")),{key:"cellProperties",type:"button",onClick:function(){Jb({popup:function(t){return Object(Cd.jsx)(YO,{onClose:t,editor:e})}})}})},pS=qO(QO),hS=qO(eS),mS=qO(tS),vS=qO(nS),gS=qO(rS),yS=qO(oS),bS=qO(iS),wS=qO(aS),kS=qO(sS),xS=qO(lS),OS=qO(uS),SS=qO(cS),CS=qO(dS);function jS(e){var t=e.height,n=e.width,r=e.float,o=e.editor,i=e.onClose,a=Object(jd.useCallback)((function(e,r){var i,a=e?{width:e,height:e*(t/n)}:r?{width:r*(n/t),height:r}:{width:0,height:0};null===(i=o.current)||void 0===i||i.chain().setImageSize(a).run()}),[n,t]);return Object(Cd.jsx)(iw,Object.assign({title:"Image properties",onClose:i},{children:Object(Cd.jsxs)(rf.Flex,Object.assign({sx:{width:["auto",300],flexDirection:"column",p:1}},{children:[Object(Cd.jsx)(nw,{children:Object(Cd.jsxs)(xw,Object.assign({variant:"text.body",sx:{justifyContent:"space-between",alignItems:"center"}},{children:["Float image",Object(Cd.jsx)(Lw,{checked:r,onClick:function(){return o.chain().setImageAlignment({float:!r,align:"left"}).run()}})]}))}),Object(Cd.jsxs)(rf.Flex,Object.assign({sx:{alignItems:"center",mt:2}},{children:[Object(Cd.jsx)(Uw,{label:"width",type:"number",value:n,containerProps:{sx:{mr:1}},onChange:function(e){return a(e.target.valueAsNumber)}}),Object(Cd.jsx)(Uw,{label:"height",type:"number",value:t,onChange:function(e){return a(void 0,e.target.valueAsNumber)}})]}))]}))}))}function DS(e){var t,n,r,o=e.link,i=e.isEditing,a=void 0!==i&&i,s=e.onDone,l=e.onClose,u=Sk(o);return Object(Cd.jsx)(iw,Object.assign({title:a?"Edit link":"Insert link",onClose:l,action:{title:a?"Save edits":"Insert link",onClick:function(){u.current&&s(u.current)}}},{children:Object(Cd.jsxs)(rf.Flex,Object.assign({sx:{p:1,flexDirection:"column",width:["auto",250]}},{children:[!(null===(t=u.current)||void 0===t?void 0:t.isImage)&&Object(Cd.jsx)(Ow,{type:"text",placeholder:"Link text",defaultValue:null===(n=u.current)||void 0===n?void 0:n.text,sx:{mb:1},onChange:function(e){return u.current=Object.assign(Object.assign({},u.current),{text:e.target.value})}}),Object(Cd.jsx)(Ow,{type:"url",autoFocus:!0,placeholder:"https://example.com/",defaultValue:null===(r=u.current)||void 0===r?void 0:r.href,onChange:function(e){return u.current=Object.assign(Object.assign({},u.current),{href:e.target.value})}})]}))}))}var AS=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function ES(e){var t=e.editor,n=Sk(e.selectedNode||Pk(t.state)),r=Object(jd.useCallback)((function(e){var r=e.href,o=e.text,i=e.isImage,a=n.current,s=a.from,l=a.node,u=a.to;if(r&&t.current&&l){var c=Nk(l,"link");if(c){var d=t.current.state.selection,f=t.current.chain();i||(f=f.command((function(e){var t=e.tr;return t.removeMark(s,u,c.type),t.insertText(o||l.textContent,t.mapping.map(s),t.mapping.map(u)),t.setSelection(p.TextSelection.create(t.doc,t.mapping.map(s),t.mapping.map(u))),!0}))),f.extendMarkRange("link").toggleLink({href:r,target:"_blank"}).command((function(e){var t=e.tr;return t.setSelection(p.TextSelection.create(t.doc,t.mapping.map(d.from),t.mapping.map(d.to))),!0})).focus(void 0,{scrollIntoView:!0}).run()}}}),[]);return Object(Cd.jsx)(MS,Object.assign({},e,{isEditing:!0,onDone:r,onClick:function(){var e=n.current.node;if(e){var t=e.textContent,r=Nk(e,"link");if(r)return{text:t,href:r.attrs.href,isImage:e.type.name===gC.name}}}}))}function MS(e){var t=e.isEditing,n=e.onClick,r=e.onDone,o=e.editor,a=AS(e,["isEditing","onClick","onDone","editor"]),s=Object(jd.useRef)(null),l=Object(jd.useState)(!1),u=Object(i.a)(l,2),c=u[0],d=u[1],f=Object(jd.useState)(),p=Object(i.a)(f,2),h=p[0],m=p[1];return Object(Cd.jsxs)(Cd.Fragment,{children:[Object(Cd.jsx)(yf,Object.assign({},a,{buttonRef:s,onClick:function(){var e=n();e&&(m(e),d(!0))},toggled:c})),Object(Cd.jsx)(ow,Object.assign({mobile:"sheet",desktop:"menu",position:{target:s.current||void 0,isTargetAbsolute:!0,location:"below",align:"center",yOffset:5},title:t?"Edit link":"Insert link",isOpen:c,items:[],onClose:function(){var e;d(!1),null===(e=o.current)||void 0===e||e.commands.focus()},focusOnRender:!1},{children:Object(Cd.jsx)(DS,{link:h,isEditing:t,onClose:function(){return d(!1)},onDone:function(e){r(e),d(!1)}})}))]})}var TS={bold:function(e){var t=e.editor;return Object(Cd.jsx)(yf,Object.assign({},e,{toggled:t.isActive("bold"),onClick:function(){var e;return null===(e=t.current)||void 0===e?void 0:e.chain().focus().toggleBold().run()}}))},italic:function(e){var t=e.editor;return Object(Cd.jsx)(yf,Object.assign({},e,{toggled:t.isActive("italic"),onClick:function(){var e;return null===(e=t.current)||void 0===e?void 0:e.chain().focus().toggleItalic().run()}}))},underline:function(e){var t=e.editor;return Object(Cd.jsx)(yf,Object.assign({},e,{toggled:t.isActive("underline"),onClick:function(){var e;return null===(e=t.current)||void 0===e?void 0:e.chain().focus().toggleUnderline().run()}}))},strikethrough:function(e){var t=e.editor;return Object(Cd.jsx)(yf,Object.assign({},e,{toggled:t.isActive("strike"),onClick:function(){var e;return null===(e=t.current)||void 0===e?void 0:e.chain().focus().toggleStrike().run()}}))},code:function(e){var t=e.editor;return Object(Cd.jsx)(yf,Object.assign({},e,{toggled:t.isActive("code"),onClick:function(){var e;return null===(e=t.current)||void 0===e?void 0:e.chain().focus().toggleCode().run()}}))},codeRemove:function(e){var t=e.editor,n="bottom"===Hd();return t.isActive("code")&&n?Object(Cd.jsx)(yf,Object.assign({},e,{toggled:!1,onClick:function(){var e;return null===(e=t.current)||void 0===e?void 0:e.chain().focus().unsetMark("code").run()}})):null},subscript:function(e){var t=e.editor;return Object(Cd.jsx)(yf,Object.assign({},e,{toggled:t.isActive("subscript"),onClick:function(){var e;return null===(e=t.current)||void 0===e?void 0:e.chain().focus().toggleSubscript().run()}}))},superscript:function(e){var t=e.editor;return Object(Cd.jsx)(yf,Object.assign({},e,{toggled:t.isActive("superscript"),onClick:function(){var e;return null===(e=t.current)||void 0===e?void 0:e.chain().focus().toggleSuperscript().run()}}))},clearformatting:function(e){var t=e.editor;return Object(Cd.jsx)(yf,Object.assign({},e,{toggled:!1,onClick:function(){var e;return null===(e=t.current)||void 0===e?void 0:e.chain().focus().clearNodes().unsetAllMarks().unsetMark("link").run()}}))},addLink:function(e){var t=e.editor,n=e.editor.isActive("link"),r=Object(jd.useCallback)((function(e){var n,r,o=e.href,i=e.text,a=e.isImage;if(o){var s=null===(n=t.current)||void 0===n?void 0:n.chain().focus();if(s){var l=!(null===(r=t.current)||void 0===r?void 0:r.state.selection.empty);s=s.extendMarkRange("link").toggleLink({href:o,target:"_blank"}),a||(s=s.insertContent(i||o)),s=s.focus(),l||a||(s=s.unsetMark("link").insertContent(" ")),s.run()}}}),[]);return n?Object(Cd.jsx)(ES,Object.assign({},e,{icon:"linkEdit"})):Object(Cd.jsx)(MS,Object.assign({},e,{onDone:r,onClick:function(){var e;if(t.current){var n=t.current.state,r=n.selection,o=r.from,i=r.to,a=(null===(e=n.doc.nodeAt(o))||void 0===e?void 0:e.type.name)===gC.name;return a?{isImage:a}:{text:n.doc.textBetween(o,i)}}}}))},editLink:ES,removeLink:function(e){var t=e.editor,n=e.selectedNode;return Object(Cd.jsx)(yf,Object.assign({},e,{toggled:!1,onClick:function(){var e,r;n&&(null===(e=t.current)||void 0===e||e.commands.setTextSelection({from:n.from,to:n.to})),null===(r=t.current)||void 0===r||r.chain().focus().unsetLink().run()}}))},linkSettings:function(e){var t=e.editor,n="bottom"===Hd();return t.isActive("link")&&n?Object(Cd.jsx)($O,Object.assign({},e,{autoCloseOnUnmount:!0,popupId:"linkSettings",tools:["openLink","editLink","removeLink"]})):null},openLink:function(e){var t=e.editor,n=Sk(e.selectedNode||Pk(t.state)).current.node,r=n?Nk(n,"link"):null;if(!r)return null;var o=null===r||void 0===r?void 0:r.attrs.href;return Object(Cd.jsxs)(rf.Flex,Object.assign({sx:{alignItems:"center"}},{children:[Object(Cd.jsx)(af,Object.assign({as:"a",href:o,target:"_blank",variant:"body",sx:{mr:1}},{children:o})),Object(Cd.jsx)(yf,Object.assign({},e,{toggled:!1,onClick:function(){return window.open(o,"_blank")}}))]}))},insertBlock:function(e){var t=e.editor,n=Object(jd.useRef)(null),r=Object(jd.useState)(!1),o=Object(i.a)(r,2),a=o[0],s=o[1],l=Hd(),u=Fd(),c=Object(jd.useMemo)((function(){return[yk(t),bk(t),uk(t),ck(t),fk(t),dk(t),pk(t,u),gk(t),u?mk(t):vk(t),hk(t)]}),[u]);return Object(Cd.jsxs)(Cd.Fragment,{children:[Object(Cd.jsx)(vf,Object.assign({ref:n,sx:{p:1,m:0,bg:a?"hover":"transparent",mr:1,display:"flex",alignItems:"center",":hover":{bg:"hover"},":last-of-type":{mr:0}},onMouseDown:function(e){return e.preventDefault()},onClick:function(){return s((function(e){return!e}))}},{children:Object(Cd.jsx)(pf,{path:hf.plus,size:18,color:"primary"})})),Object(Cd.jsx)(ow,{desktop:"menu",mobile:"sheet",title:"Choose a block to insert",isOpen:a,items:c,onClose:function(){return s(!1)},position:{target:n.current||void 0,isTargetAbsolute:!0,location:"bottom"===l?"top":"below",yOffset:5}})]})},numberedList:function(e){var t=e.editor,n=Object(jd.useCallback)((function(){var e;return null===(e=t.current)||void 0===e?void 0:e.chain().focus().toggleOrderedList().run()}),[]);return Object(Cd.jsx)(Fk,Object.assign({},e,{type:"orderedList",isActive:t.isActive("orderedList"),onClick:n,subTypes:[{type:"decimal",title:"Decimal",items:["1","2","3"]},{type:"upper-alpha",title:"Upper alpha",items:["A","B","C"]},{type:"lower-alpha",title:"Lower alpha",items:["a","b","c"]},{type:"upper-roman",title:"Upper Roman",items:["I","II","III"]},{type:"lower-roman",title:"Lower Roman",items:["i","ii","iii"]},{type:"lower-greek",title:"Lower Greek",items:["\u03b1","\u03b2","\u03b3"]}]}))},bulletList:function(e){var t=e.editor,n=Object(jd.useCallback)((function(){var e;return null===(e=t.current)||void 0===e?void 0:e.chain().focus().toggleBulletList().run()}),[]);return Object(Cd.jsx)(Fk,Object.assign({},e,{type:"bulletList",onClick:n,isActive:t.isActive("bulletList"),subTypes:[{type:"disc",title:"Decimal",items:["1","2","3"]},{type:"circle",title:"Upper alpha",items:["A","B","C"]},{type:"square",title:"Lower alpha",items:["a","b","c"]}]}))},fontSize:function(e){var t=e.editor,n=t.getAttributes("textStyle").fontSize||"16px",r=Sk(parseInt(n.replace("px",""))),o=Object(jd.useCallback)((function(){return Math.max(8,r.current-1)}),[]),i=Object(jd.useCallback)((function(){return Math.min(120,r.current+1)}),[]);return Object(Cd.jsx)(Ok,{title:"font size",onDecrease:function(){var e;return null===(e=t.current)||void 0===e?void 0:e.chain().focus().setFontSize("".concat(o(),"px")).run()},onIncrease:function(){var e;null===(e=t.current)||void 0===e||e.chain().focus().setFontSize("".concat(i(),"px")).run()},onReset:function(){var e;return null===(e=t.current)||void 0===e?void 0:e.chain().focus().setFontSize("16px").run()},value:n})},fontFamily:function(e){var t,n,r=e.editor,o=(null===(n=null===(t=Object.entries(Ck).find((function(e){var t=Object(i.a)(e,2),n=(t[0],t[1]);return r.isActive("textStyle",{fontFamily:n})})))||void 0===t?void 0:t.map((function(e){return e})))||void 0===n?void 0:n.at(0))||"Sans-serif",a=Object(jd.useMemo)((function(){return function(e,t){var n=[],r=function(r){var o=Ck[r];n.push({key:r,type:"button",title:r,isChecked:r===t,onClick:function(){var t;return null===(t=e.current)||void 0===t?void 0:t.chain().focus().setFontFamily(o).run()},styles:{fontFamily:o}})};for(var o in Ck)r(o);return n}(r,o)}),[o]);return Object(Cd.jsx)(xk,{id:"fontFamily",group:"font",selectedItem:o,items:a,menuWidth:130})},headings:function(e){var t=e.editor,n=Hd(),r=Ak.find((function(e){return t.isActive("heading",{level:e})})),i=Object(jd.useMemo)((function(){return function(e,t,n){var r=Ak.map((function(r){return{type:"button",key:"heading-".concat(r),title:"bottom"===t?"H".concat(r):"Heading ".concat(r),isChecked:r===n,onClick:function(){var t;return null===(t=e.current)||void 0===t?void 0:t.chain().focus().updateAttributes("textStyle",{fontSize:null,fontStyle:null}).setHeading({level:r}).run()}}}));return[{key:"paragraph",type:"button",title:"Paragraph",isChecked:!n,onClick:function(){var t;return null===(t=e.current)||void 0===t?void 0:t.chain().focus().setParagraph().run()}}].concat(Object(o.a)(r))}(t,n,r)}),[r]);return Object(Cd.jsx)(xk,{id:"headings",group:"headings",selectedItem:r?"Heading ".concat(r):"Paragraph",items:i,menuWidth:130})},alignment:function(e){var t=e.editor,n=Object.assign(Object.assign({},t.getAttributes("paragraph")),t.getAttributes("heading")).textAlign,r="left"===n?"center":"center"===n?"right":"right"===n?"justify":"left",o="center"===n?"alignCenter":"justify"===n?"alignJustify":"right"===n?"alignRight":"alignLeft";return Object(Cd.jsx)(Dk,Object.assign({alignment:r},e,{icon:o}))},textDirection:function(e){var t=e.editor,n=Object.assign(Object.assign({},t.getAttributes("paragraph")),t.getAttributes("heading")).textDirection,r="ltr"===n?"rtl":"ltr",o="ltr"===n?"ltr":"rtl";return Object(Cd.jsx)(Bk,Object.assign({direction:r},e,{icon:o}))},textColor:function(e){var t=e.editor;return Object(Cd.jsx)(Cx,Object.assign({},e,{cacheKey:"textColor",activeColor:t.getAttributes("textStyle").color,title:"Text color",onColorChange:function(e){var n,r;return e?null===(n=t.current)||void 0===n?void 0:n.chain().focus().setColor(e).run():null===(r=t.current)||void 0===r?void 0:r.chain().focus().unsetColor().run()}}))},highlight:function(e){var t=e.editor;return Object(Cd.jsx)(Cx,Object.assign({},e,{cacheKey:"highlight",activeColor:t.getAttributes("textStyle").backgroundColor,title:"Background color",onColorChange:function(e){var n,r;return e?null===(n=t.current)||void 0===n?void 0:n.chain().focus().setHighlight(e).run():null===(r=t.current)||void 0===r?void 0:r.chain().focus().unsetHighlight().run()}}))},math:function(e){var t=e.editor;return Object(Cd.jsx)(yf,Object.assign({},e,{toggled:!1,onClick:function(){var e;return null===(e=t.current)||void 0===e?void 0:e.chain().focus().insertMathInline().run()}}))},imageSettings:function(e){var t,n,r=e.editor,o="bottom"===Hd();return r.isActive("image")&&o?Object(Cd.jsx)($O,Object.assign({},e,{autoCloseOnUnmount:!0,popupId:"imageSettings",tools:(null===(n=null===(t=Lk(r,"image"))||void 0===t?void 0:t.attrs)||void 0===n?void 0:n.float)?["imageAlignLeft","imageAlignRight","imageProperties"]:["imageAlignLeft","imageAlignCenter","imageAlignRight","imageProperties"]})):null},imageAlignCenter:function(e){var t=e.editor;return Object(Cd.jsx)(yf,Object.assign({},e,{toggled:!1,onClick:function(){var e;return null===(e=t.current)||void 0===e?void 0:e.chain().focus().setImageAlignment({align:"center"}).run()}}))},imageAlignLeft:function(e){var t=e.editor;return Object(Cd.jsx)(yf,Object.assign({},e,{toggled:!1,onClick:function(){var e;return null===(e=t.current)||void 0===e?void 0:e.chain().focus().setImageAlignment({align:"left"}).run()}}))},imageAlignRight:function(e){var t=e.editor;return Object(Cd.jsx)(yf,Object.assign({},e,{toggled:!1,onClick:function(){var e;return null===(e=t.current)||void 0===e?void 0:e.chain().focus().setImageAlignment({align:"right"}).run()}}))},imageProperties:function(e){var t=e.editor,n=Object(jd.useState)(!1),r=Object(i.a)(n,2),o=r[0],a=r[1],s=Object(jd.useRef)(),l=Lk(t,"image"),u=(null===l||void 0===l?void 0:l.attrs)||{},c=u.float,d=u.align,f=u.width,p=u.height;return Object(Cd.jsxs)(Cd.Fragment,{children:[Object(Cd.jsx)(yf,Object.assign({buttonRef:s,toggled:o},e,{onClick:function(){return a((function(e){return!e}))}})),Object(Cd.jsx)(ow,Object.assign({isOpen:o,desktop:"menu",mobile:"sheet",onClose:function(){return a(!1)},blocking:!0,focusOnRender:!1,position:{target:s.current||"mouse",align:"start",location:"below",yOffset:10,isTargetAbsolute:!0}},{children:Object(Cd.jsx)(jS,{editor:t,height:p,width:f,align:d,float:c,onClose:function(){return a(!1)}})}))]})},embedAlignCenter:function(e){var t=e.editor;return Object(Cd.jsx)(yf,Object.assign({},e,{toggled:!1,onClick:function(){var e;return null===(e=t.current)||void 0===e?void 0:e.chain().focus().setEmbedAlignment({align:"center"}).run()}}))},embedAlignLeft:function(e){var t=e.editor;return Object(Cd.jsx)(yf,Object.assign({},e,{toggled:!1,onClick:function(){var e;return null===(e=t.current)||void 0===e?void 0:e.chain().focus().setEmbedAlignment({align:"left"}).run()}}))},embedAlignRight:function(e){var t=e.editor;return Object(Cd.jsx)(yf,Object.assign({},e,{toggled:!1,onClick:function(){var e;return null===(e=t.current)||void 0===e?void 0:e.chain().focus().setEmbedAlignment({align:"right"}).run()}}))},embedProperties:function(e){var t=e.editor,n=Object(jd.useState)(!1),r=Object(i.a)(n,2),o=r[0],a=r[1],s=Object(jd.useRef)(),l=Object(jd.useMemo)((function(){return Lk(t,"embed")}),[]),u=(null===l||void 0===l?void 0:l.attrs)||{};return Object(Cd.jsxs)(Cd.Fragment,{children:[Object(Cd.jsx)(yf,Object.assign({buttonRef:s,toggled:o},e,{onClick:function(){return a((function(e){return!e}))}})),Object(Cd.jsx)(ow,Object.assign({isOpen:o,desktop:"menu",mobile:"sheet",onClose:function(){return a(!1)},blocking:!0,focusOnRender:!1,position:{target:s.current||"mouse",align:"start",location:"below",yOffset:10,isTargetAbsolute:!0}},{children:Object(Cd.jsx)(Jw,{title:"Embed properties",onClose:function(e){var n,r;e?e.src!==u.src&&(null===(r=t.current)||void 0===r||r.commands.setEmbedSource(e.src)):null===(n=t.current)||void 0===n||n.commands.setEmbedSize(u),a(!1)},embed:u,onSizeChanged:function(e){var n;return null===(n=t.current)||void 0===n?void 0:n.commands.setEmbedSize(e)}})}))]})},embedSettings:function(e){var t=e.editor,n="bottom"===Hd();return t.isActive("embed")&&n?Object(Cd.jsx)($O,Object.assign({},e,{autoCloseOnUnmount:!0,popupId:"embedSettings",tools:[]})):null},attachmentSettings:function(e){var t=e.editor,n="bottom"===Hd();return t.isActive("attachment")&&n?Object(Cd.jsx)($O,Object.assign({},e,{autoCloseOnUnmount:!0,popupId:"attachmentSettings",tools:["downloadAttachment","removeAttachment"]})):null},downloadAttachment:function(e){var t=e.editor;return Object(Cd.jsx)(yf,Object.assign({},e,{toggled:!1,onClick:function(){var e,n=Lk(t,"attachment"),r=(null===n||void 0===n?void 0:n.attrs)||{};null===(e=t.current)||void 0===e||e.chain().focus().downloadAttachment(r).run()}}))},removeAttachment:function(e){var t=e.editor;return Object(Cd.jsx)(yf,Object.assign({},e,{toggled:!1,onClick:function(){var e;return null===(e=t.current)||void 0===e?void 0:e.chain().focus().removeAttachment().run()}}))},tableSettings:function(e){var t=e.editor,n="bottom"===Hd();return t.isActive("table")&&n?Object(Cd.jsx)($O,Object.assign({},e,{autoCloseOnUnmount:!0,popupId:"tableSettings",tools:["insertColumnLeft","insertColumnRight","insertRowAbove","insertRowBelow","cellProperties","columnProperties","rowProperties","deleteRow","deleteColumn","deleteTable"]})):null},columnProperties:function(e){var t=e.editor,n=Object(jd.useRef)(),r=Object(jd.useState)(!1),o=Object(i.a)(r,2),a=o[0],s=o[1],l=Object(jd.useMemo)((function(){return[QO(t),eS(t),tS(t),nS(t),rS(t)]}),[]);return Object(Cd.jsxs)(Cd.Fragment,{children:[Object(Cd.jsx)(yf,Object.assign({},e,{buttonRef:n,toggled:a,onClick:function(){return s(!0)}})),Object(Cd.jsx)(ow,{title:"Column properties",mobile:"sheet",desktop:"menu",isOpen:a,onClose:function(){return s(!1)},position:{target:n.current,isTargetAbsolute:!0,location:"below",yOffset:5},items:l})]})},rowProperties:ZO,cellProperties:function(e){return Object(Cd.jsx)(Cd.Fragment,{children:Object(Cd.jsx)($O,Object.assign({},e,{popupId:"cellProperties",tools:["mergeCells","splitCells","cellBackgroundColor","cellTextColor","cellBorderColor","cellBorderWidth"]}))})},insertColumnLeft:pS,insertColumnRight:hS,moveColumnLeft:mS,moveColumnRight:vS,deleteColumn:gS,splitCells:yS,mergeCells:bS,cellBackgroundColor:function(e){var t,n=e.editor;return Object(Cd.jsx)(Cx,Object.assign({},e,{cacheKey:"cellBackgroundColor",activeColor:null===(t=n.current)||void 0===t?void 0:t.getAttributes("tableCell").backgroundColor,title:"Cell background color",onColorChange:function(e){var t;return null===(t=n.current)||void 0===t?void 0:t.chain().setCellAttribute("backgroundColor",e).run()}}))},cellBorderColor:function(e){var t,n=e.editor;return Object(Cd.jsx)(Cx,Object.assign({},e,{cacheKey:"cellBorderColor",activeColor:null===(t=n.current)||void 0===t?void 0:t.getAttributes("tableCell").borderColor,title:"Cell border color",onColorChange:function(e){var t;return null===(t=n.current)||void 0===t?void 0:t.chain().focus().setCellAttribute("borderColor",e).run()}}))},cellTextColor:function(e){var t,n=e.editor;return Object(Cd.jsx)(Cx,Object.assign({},e,{cacheKey:"cellTextColor",activeColor:null===(t=n.current)||void 0===t?void 0:t.getAttributes("tableCell").color,title:"Cell text color",onColorChange:function(e){var t;return null===(t=n.current)||void 0===t?void 0:t.chain().focus().setCellAttribute("color",e).run()}}))},cellBorderWidth:function(e){var t=e.editor,n=t.getAttributes("tableCell").borderWidth,r=n||1,o=Object(jd.useCallback)((function(){return Math.max(1,r-1)}),[r]),i=Object(jd.useCallback)((function(){return Math.min(10,r+1)}),[r]);return Object(Cd.jsxs)(rf.Flex,Object.assign({sx:{justifyContent:"center",alignItems:"center"}},{children:[Object(Cd.jsx)(af,Object.assign({variant:"subBody",sx:{mx:1}},{children:"Border width:"})),Object(Cd.jsx)(Ok,{title:"cell border width",onDecrease:function(){var e;return null===(e=t.current)||void 0===e?void 0:e.commands.setCellAttribute("borderWidth",o())},onIncrease:function(){var e;return null===(e=t.current)||void 0===e?void 0:e.commands.setCellAttribute("borderWidth",i())},onReset:function(){var e;return null===(e=t.current)||void 0===e?void 0:e.commands.setCellAttribute("borderWidth",1)},value:r+"px"})]}))},insertRowAbove:wS,insertRowBelow:kS,moveRowUp:xS,moveRowDown:OS,deleteRow:SS,deleteTable:CS,outdent:function(e){var t=e.editor,n=Hk(e,["editor"]),r="bottom"===Hd(),o=Rk(t);return o&&r?Object(Cd.jsx)(yf,Object.assign({},n,{toggled:!1,onClick:function(){var e;return null===(e=t.current)||void 0===e?void 0:e.chain().focus().liftListItem(o).run()}})):null},indent:function(e){var t=e.editor,n=Hk(e,["editor"]),r="bottom"===Hd(),o=Rk(t);return o&&r?Object(Cd.jsx)(yf,Object.assign({},n,{toggled:!1,onClick:function(){var e;return null===(e=t.current)||void 0===e?void 0:e.chain().focus().sinkListItem(o).run()}})):null}};var LS=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function NS(e){var t=e.tools,n=e.editor,r=e.force,o=e.selectedNode,i=LS(e,["tools","editor","force","selectedNode"]);return Object(Cd.jsx)(rf.Flex,Object.assign({className:"toolbar-group"},i,{children:t.map((function(e){if(Array.isArray(e))return Object(Cd.jsx)($O,{title:"More",icon:"more",popupId:e.join(""),tools:e,editor:n},"more-tools");var t=TS[e],i=UO(e);return Object(Cd.jsx)(t,Object.assign({editor:n,force:r,selectedNode:o},i),i.title)}))}))}function PS(e){var t=e.editor,n=e.node,r=e.selected,o=n.attrs,i=(o.hash,o.filename),a=o.size,s=o.progress,l=Object(jd.useRef)();return Object(Cd.jsx)(Cd.Fragment,{children:Object(Cd.jsxs)(rf.Box,Object.assign({ref:l,as:"span",contentEditable:!1,variant:"body",sx:{display:"inline-flex",position:"relative",justifyContent:"center",userSelect:"none",alignItems:"center",backgroundColor:"bgSecondary",px:1,borderRadius:"default",border:"1px solid var(--border)",cursor:"pointer",maxWidth:250,borderColor:r?"primary":"border",":hover":{bg:"hover"}},title:i},{children:[Object(Cd.jsx)(pf,{path:hf.attachment,size:14}),Object(Cd.jsx)(af,Object.assign({as:"span",sx:{ml:"small",fontSize:"body",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden"}},{children:i})),Object(Cd.jsx)(af,Object.assign({as:"span",sx:{ml:1,fontSize:"0.65rem",color:"fontTertiary",flexShrink:0}},{children:s?"".concat(s,"%"):RS(a)})),Object(Cd.jsx)(nw,{children:r&&Object(Cd.jsx)(NS,{editor:t,tools:["removeAttachment","downloadAttachment"],sx:{boxShadow:"menu",borderRadius:"default",bg:"background",position:"absolute",top:-35}})})]}))})}function RS(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(0===e)return"0B";var n=1024,r=t<0?0:t,o=["B","K","M","G","T","P","E","Z","Y"],i=Math.floor(Math.log(e)/Math.log(n));return parseFloat((e/Math.pow(n,i)).toFixed(r))+o[i]}var HS=Bo.create({name:"attachment",content:"inline*",marks:"",inline:!0,atom:!0,addOptions:function(){return{HTMLAttributes:{},onDownloadAttachment:function(){return!1},onOpenAttachmentPicker:function(){return!1}}},group:function(){return"inline"},draggable:!0,addAttributes:function(){return{progress:{default:0,rendered:!1},hash:FS("hash"),filename:FS("filename"),type:FS("mime"),size:FS("size")}},parseHTML:function(){return[{tag:"span[data-hash]"}]},renderHTML:function(e){var t=e.HTMLAttributes;return["span",Sr(this.options.HTMLAttributes,t)]},addNodeView:function(){return nf(PS,{shouldUpdate:function(e,t){var n=e.attrs,r=t.attrs;return n.progress!==r.progress}})},addCommands:function(){var e=this;return{insertAttachment:function(t){return function(n){return n.commands.insertContent({type:e.name,attrs:t})}},removeAttachment:function(){return function(e){var t=e.commands;e.tr;return t.deleteSelection()}},downloadAttachment:function(t){return function(n){var r=n.editor;return e.options.onDownloadAttachment(r,t)}},openAttachmentPicker:function(t){return function(n){var r=n.editor;return e.options.onOpenAttachmentPicker(r,t)}},setAttachmentProgress:function(t){return function(n){var r,o=n.state,i=n.tr,a=n.dispatch,s=t.hash,l=t.progress,u=(t.type,To(o.doc,(function(t){return(t.type.name===e.name||"image"===t.type.name)&&t.attrs.hash===s}))),c=Object(Sd.a)(u);try{for(c.s();!(r=c.n()).done;){var d=r.value;i.setNodeMarkup(d.pos,d.node.type,Object.assign(Object.assign({},d.node.attrs),{progress:100===l?null:l}))}}catch(f){c.e(f)}finally{c.f()}return i.setMeta("preventUpdate",!0),i.setMeta("addToHistory",!1),a&&a(i),!0}}}}});function FS(e,t){return{default:t,parseHTML:function(t){return t.dataset[e]},renderHTML:function(t){return t[e]?Object(u.a)({},"data-".concat(e),t[e]):{}}}}var VS=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),zS=function(){return zS=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},zS.apply(this,arguments)},BS={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},IS={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},_S={width:"20px",height:"20px",position:"absolute"},$S={top:zS(zS({},BS),{top:"-5px"}),right:zS(zS({},IS),{left:void 0,right:"-5px"}),bottom:zS(zS({},BS),{top:void 0,bottom:"-5px"}),left:zS(zS({},IS),{left:"-5px"}),topRight:zS(zS({},_S),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:zS(zS({},_S),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:zS(zS({},_S),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:zS(zS({},_S),{left:"-10px",top:"-10px",cursor:"nw-resize"})},qS=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onMouseDown=function(e){t.props.onResizeStart(e,t.props.direction)},t.onTouchStart=function(e){t.props.onResizeStart(e,t.props.direction)},t}return VS(t,e),t.prototype.render=function(){return jd.createElement("div",{className:this.props.className||"",style:zS(zS({position:"absolute",userSelect:"none"},$S[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},t}(jd.PureComponent),WS=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),US=function(){return US=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},US.apply(this,arguments)},KS={width:"auto",height:"auto"},GS=function(e,t,n){return Math.max(Math.min(e,n),t)},JS=function(e,t){return Math.round(e/t)*t},YS=function(e,t){return new RegExp(e,"i").test(t)},ZS=function(e){return Boolean(e.touches&&e.touches.length)},XS=function(e,t,n){void 0===n&&(n=0);var r=t.reduce((function(n,r,o){return Math.abs(r-e)<Math.abs(t[n]-e)?o:n}),0),o=Math.abs(t[r]-e);return 0===n||o<n?t[r]:e},QS=function(e){return"auto"===(e=e.toString())||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:e+"px"},eC=function(e,t,n,r){if(e&&"string"===typeof e){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%"))return t*(Number(e.replace("%",""))/100);if(e.endsWith("vw"))return n*(Number(e.replace("vw",""))/100);if(e.endsWith("vh"))return r*(Number(e.replace("vh",""))/100)}return e},tC=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],nC="__resizable_base__",rC=function(e){function t(t){var n=e.call(this,t)||this;return n.ratio=1,n.resizable=null,n.parentLeft=0,n.parentTop=0,n.resizableLeft=0,n.resizableRight=0,n.resizableTop=0,n.resizableBottom=0,n.targetLeft=0,n.targetTop=0,n.appendBase=function(){if(!n.resizable||!n.window)return null;var e=n.parentNode;if(!e)return null;var t=n.window.document.createElement("div");return t.style.width="100%",t.style.height="100%",t.style.position="absolute",t.style.transform="scale(0, 0)",t.style.left="0",t.style.flex="0 0 100%",t.classList?t.classList.add(nC):t.className+=nC,e.appendChild(t),t},n.removeBase=function(e){var t=n.parentNode;t&&t.removeChild(e)},n.ref=function(e){e&&(n.resizable=e)},n.state={isResizing:!1,width:"undefined"===typeof(n.propsSize&&n.propsSize.width)?"auto":n.propsSize&&n.propsSize.width,height:"undefined"===typeof(n.propsSize&&n.propsSize.height)?"auto":n.propsSize&&n.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},n.onResizeStart=n.onResizeStart.bind(n),n.onMouseMove=n.onMouseMove.bind(n),n.onMouseUp=n.onMouseUp.bind(n),n}return WS(t,e),Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return this.resizable&&this.resizable.ownerDocument?this.resizable.ownerDocument.defaultView:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||KS},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var e=0,t=0;if(this.resizable&&this.window){var n=this.resizable.offsetWidth,r=this.resizable.offsetHeight,o=this.resizable.style.position;"relative"!==o&&(this.resizable.style.position="relative"),e="auto"!==this.resizable.style.width?this.resizable.offsetWidth:n,t="auto"!==this.resizable.style.height?this.resizable.offsetHeight:r,this.resizable.style.position=o}return{width:e,height:t}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var e=this,t=this.props.size,n=function(t){if("undefined"===typeof e.state[t]||"auto"===e.state[t])return"auto";if(e.propsSize&&e.propsSize[t]&&e.propsSize[t].toString().endsWith("%")){if(e.state[t].toString().endsWith("%"))return e.state[t].toString();var n=e.getParentSize();return Number(e.state[t].toString().replace("px",""))/n[t]*100+"%"}return QS(e.state[t])};return{width:t&&"undefined"!==typeof t.width&&!this.state.isResizing?QS(t.width):n("width"),height:t&&"undefined"!==typeof t.height&&!this.state.isResizing?QS(t.height):n("height")}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var e=this.appendBase();if(!e)return{width:0,height:0};var t=!1,n=this.parentNode.style.flexWrap;"wrap"!==n&&(t=!0,this.parentNode.style.flexWrap="wrap"),e.style.position="relative",e.style.minWidth="100%",e.style.minHeight="100%";var r={width:e.offsetWidth,height:e.offsetHeight};return t&&(this.parentNode.style.flexWrap=n),this.removeBase(e),r},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(this.resizable&&this.window){var e=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==e.flexBasis?e.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(e,t){var n=this.propsSize&&this.propsSize[t];return"auto"!==this.state[t]||this.state.original[t]!==e||"undefined"!==typeof n&&"auto"!==n?e:"auto"},t.prototype.calculateNewMaxFromBoundary=function(e,t){var n,r,o=this.props.boundsByDirection,i=this.state.direction,a=o&&YS("left",i),s=o&&YS("top",i);if("parent"===this.props.bounds){var l=this.parentNode;l&&(n=a?this.resizableRight-this.parentLeft:l.offsetWidth+(this.parentLeft-this.resizableLeft),r=s?this.resizableBottom-this.parentTop:l.offsetHeight+(this.parentTop-this.resizableTop))}else"window"===this.props.bounds?this.window&&(n=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,r=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(n=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),r=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return n&&Number.isFinite(n)&&(e=e&&e<n?e:n),r&&Number.isFinite(r)&&(t=t&&t<r?t:r),{maxWidth:e,maxHeight:t}},t.prototype.calculateNewSizeFromDirection=function(e,t){var n=this.props.scale||1,r=this.props.resizeRatio||1,o=this.state,i=o.direction,a=o.original,s=this.props,l=s.lockAspectRatio,u=s.lockAspectRatioExtraHeight,c=s.lockAspectRatioExtraWidth,d=a.width,f=a.height,p=u||0,h=c||0;return YS("right",i)&&(d=a.width+(e-a.x)*r/n,l&&(f=(d-h)/this.ratio+p)),YS("left",i)&&(d=a.width-(e-a.x)*r/n,l&&(f=(d-h)/this.ratio+p)),YS("bottom",i)&&(f=a.height+(t-a.y)*r/n,l&&(d=(f-p)*this.ratio+h)),YS("top",i)&&(f=a.height-(t-a.y)*r/n,l&&(d=(f-p)*this.ratio+h)),{newWidth:d,newHeight:f}},t.prototype.calculateNewSizeFromAspectRatio=function(e,t,n,r){var o=this.props,i=o.lockAspectRatio,a=o.lockAspectRatioExtraHeight,s=o.lockAspectRatioExtraWidth,l="undefined"===typeof r.width?10:r.width,u="undefined"===typeof n.width||n.width<0?e:n.width,c="undefined"===typeof r.height?10:r.height,d="undefined"===typeof n.height||n.height<0?t:n.height,f=a||0,p=s||0;if(i){var h=(c-f)*this.ratio+p,m=(d-f)*this.ratio+p,v=(l-p)/this.ratio+f,g=(u-p)/this.ratio+f,y=Math.max(l,h),b=Math.min(u,m),w=Math.max(c,v),k=Math.min(d,g);e=GS(e,y,b),t=GS(t,w,k)}else e=GS(e,l,u),t=GS(t,c,d);return{newWidth:e,newHeight:t}},t.prototype.setBoundingClientRect=function(){if("parent"===this.props.bounds){var e=this.parentNode;if(e){var t=e.getBoundingClientRect();this.parentLeft=t.left,this.parentTop=t.top}}if(this.props.bounds&&"string"!==typeof this.props.bounds){var n=this.props.bounds.getBoundingClientRect();this.targetLeft=n.left,this.targetTop=n.top}if(this.resizable){var r=this.resizable.getBoundingClientRect(),o=r.left,i=r.top,a=r.right,s=r.bottom;this.resizableLeft=o,this.resizableRight=a,this.resizableTop=i,this.resizableBottom=s}},t.prototype.onResizeStart=function(e,t){if(this.resizable&&this.window){var n,r=0,o=0;if(e.nativeEvent&&function(e){return Boolean((e.clientX||0===e.clientX)&&(e.clientY||0===e.clientY))}(e.nativeEvent)?(r=e.nativeEvent.clientX,o=e.nativeEvent.clientY):e.nativeEvent&&ZS(e.nativeEvent)&&(r=e.nativeEvent.touches[0].clientX,o=e.nativeEvent.touches[0].clientY),this.props.onResizeStart)if(this.resizable)if(!1===this.props.onResizeStart(e,t,this.resizable))return;this.props.size&&("undefined"!==typeof this.props.size.height&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),"undefined"!==typeof this.props.size.width&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio="number"===typeof this.props.lockAspectRatio?this.props.lockAspectRatio:this.size.width/this.size.height;var i=this.window.getComputedStyle(this.resizable);if("auto"!==i.flexBasis){var a=this.parentNode;if(a){var s=this.window.getComputedStyle(a).flexDirection;this.flexDir=s.startsWith("row")?"row":"column",n=i.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var l={original:{x:r,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:US(US({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(e.target).cursor||"auto"}),direction:t,flexBasis:n};this.setState(l)}},t.prototype.onMouseMove=function(e){var t=this;if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&ZS(e))try{e.preventDefault(),e.stopPropagation()}catch(j){}var n=this.props,r=n.maxWidth,o=n.maxHeight,i=n.minWidth,a=n.minHeight,s=ZS(e)?e.touches[0].clientX:e.clientX,l=ZS(e)?e.touches[0].clientY:e.clientY,u=this.state,c=u.direction,d=u.original,f=u.width,p=u.height,h=this.getParentSize(),m=function(e,t,n,r,o,i,a){return r=eC(r,e.width,t,n),o=eC(o,e.height,t,n),i=eC(i,e.width,t,n),a=eC(a,e.height,t,n),{maxWidth:"undefined"===typeof r?void 0:Number(r),maxHeight:"undefined"===typeof o?void 0:Number(o),minWidth:"undefined"===typeof i?void 0:Number(i),minHeight:"undefined"===typeof a?void 0:Number(a)}}(h,this.window.innerWidth,this.window.innerHeight,r,o,i,a);r=m.maxWidth,o=m.maxHeight,i=m.minWidth,a=m.minHeight;var v=this.calculateNewSizeFromDirection(s,l),g=v.newHeight,y=v.newWidth,b=this.calculateNewMaxFromBoundary(r,o);this.props.snap&&this.props.snap.x&&(y=XS(y,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(g=XS(g,this.props.snap.y,this.props.snapGap));var w=this.calculateNewSizeFromAspectRatio(y,g,{width:b.maxWidth,height:b.maxHeight},{width:i,height:a});if(y=w.newWidth,g=w.newHeight,this.props.grid){var k=JS(y,this.props.grid[0]),x=JS(g,this.props.grid[1]),O=this.props.snapGap||0;y=0===O||Math.abs(k-y)<=O?k:y,g=0===O||Math.abs(x-g)<=O?x:g}var S={width:y-d.width,height:g-d.height};if(f&&"string"===typeof f)if(f.endsWith("%"))y=y/h.width*100+"%";else if(f.endsWith("vw")){y=y/this.window.innerWidth*100+"vw"}else if(f.endsWith("vh")){y=y/this.window.innerHeight*100+"vh"}if(p&&"string"===typeof p)if(p.endsWith("%"))g=g/h.height*100+"%";else if(p.endsWith("vw")){g=g/this.window.innerWidth*100+"vw"}else if(p.endsWith("vh")){g=g/this.window.innerHeight*100+"vh"}var C={width:this.createSizeForCssProperty(y,"width"),height:this.createSizeForCssProperty(g,"height")};"row"===this.flexDir?C.flexBasis=C.width:"column"===this.flexDir&&(C.flexBasis=C.height),Object($d.flushSync)((function(){t.setState(C)})),this.props.onResize&&this.props.onResize(e,c,this.resizable,S)}},t.prototype.onMouseUp=function(e){var t=this.state,n=t.isResizing,r=t.direction,o=t.original;if(n&&this.resizable){var i={width:this.size.width-o.width,height:this.size.height-o.height};this.props.onResizeStop&&this.props.onResizeStop(e,r,this.resizable,i),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:US(US({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(e){this.setState({width:e.width,height:e.height})},t.prototype.renderResizer=function(){var e=this,t=this.props,n=t.enable,r=t.handleStyles,o=t.handleClasses,i=t.handleWrapperStyle,a=t.handleWrapperClass,s=t.handleComponent;if(!n)return null;var l=Object.keys(n).map((function(t){return!1!==n[t]?jd.createElement(qS,{key:t,direction:t,onResizeStart:e.onResizeStart,replaceStyles:r&&r[t],className:o&&o[t]},s&&s[t]?s[t]:null):null}));return jd.createElement("div",{className:a,style:i},l)},t.prototype.render=function(){var e=this,t=Object.keys(this.props).reduce((function(t,n){return-1!==tC.indexOf(n)||(t[n]=e.props[n]),t}),{}),n=US(US(US({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(n.flexBasis=this.state.flexBasis);var r=this.props.as||"div";return jd.createElement(r,US({ref:this.ref,style:n,className:this.props.className},t),this.state.isResizing&&jd.createElement("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer())},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(jd.PureComponent);var oC=[{isActive:function(e){return!!e.closest("a")},popup:function(e){var t=e.editor,n=e.selectedNode,r=n.node;return!(null===r||void 0===r?void 0:r.isText)||r.marks.length<=0||!r.marks.some((function(e){return"link"===e.type.name}))?null:Object(Cd.jsx)(NS,{force:!0,tools:["openLink","editLink","removeLink"],editor:t,selectedNode:n,sx:{bg:"background",boxShadow:"menu",borderRadius:"default",p:1}})}}];function iC(e){var t=e.editor,n=Object(jd.useRef)(),r=Object(jd.useRef)();return Object(jd.useEffect)((function(){function e(e){if(e.target&&e.target instanceof HTMLElement&&!e.target.classList.contains("ProseMirror")){var o=e.target;if(r.current){var i=!o.closest(".ProseMirror"),a=o.closest(".popup-presenter-portal"),s=r.current.element===o;if(a)return;if(i||!s)return r.current.hide(),void(r.current=void 0)}clearTimeout(n.current),n.current=setTimeout((function(){var e=oC.find((function(e){return e.isActive(o)}));if(e&&t.current){var n=e.popup,i=t.current.view.posAtDOM(o,0),a=t.current.view.state.doc.nodeAt(i);if(a){var s=Jb({popup:function(){return Object(Cd.jsx)(n,{editor:t,selectedNode:{node:a,from:i,to:i+a.nodeSize}})},blocking:!1,focusOnRender:!1,position:{target:o,align:"center",location:"top",isTargetAbsolute:!0}});r.current={element:o,hide:s}}}}),500,{})}}return window.addEventListener("mouseover",e),function(){window.removeEventListener("mouseover",e)}}),[]),null}function aC(e){var t=e.editor,n=t.storage.searchreplace,r=n.selectedText,o=n.results,a=n.selectedIndex,s=Object(jd.useState)(!1),l=Object(i.a)(s,2),u=l[0],c=l[1],d=Object(jd.useState)(!1),f=Object(i.a)(d,2),p=f[0],h=f[1],m=Object(jd.useState)(!1),v=Object(i.a)(m,2),g=v[0],y=v[1],b=Object(jd.useState)(!1),w=Object(i.a)(b,2),k=w[0],x=w[1],O=Object(jd.useState)(!1),S=Object(i.a)(O,2),C=S[0],j=S[1],D=Object(jd.useRef)(""),A=Object(jd.useRef)(),E=Object(jd.useCallback)((function(e){t.commands.search(e,{matchCase:g,enableRegex:C,matchWholeWord:k})}),[g,C,k]);return Object(jd.useEffect)((function(){A.current&&E(A.current.value)}),[E,g,k,C]),Object(jd.useEffect)((function(){if(r){if(A.current){var e=A.current;setTimeout((function(){e.value=r,e.focus()}),0)}E(r)}}),[r,E]),Object(Cd.jsx)(rf.Flex,Object.assign({sx:{p:1,bg:"background",flexDirection:"column",boxShadow:["none","menu"],borderRadius:[0,"default"]}},{children:Object(Cd.jsxs)(rf.Flex,{children:[Object(Cd.jsxs)(rf.Flex,Object.assign({sx:{flexDirection:"column",flex:1,width:["auto",300],mr:1}},{children:[Object(Cd.jsxs)(rf.Flex,Object.assign({sx:{flex:1,position:"relative",alignItems:"center",outline:"1px solid var(--border)",borderRadius:"default",p:1,py:0,":focus-within":{outlineColor:"primary",outlineWidth:"1.8px"},":hover":{outlineColor:"primary"}}},{children:[Object(Cd.jsx)(Ow,{variant:"clean",defaultValue:r,ref:A,autoFocus:!0,placeholder:"Find",sx:{p:0},onChange:function(e){E(e.target.value)},onKeyDown:function(e){"Enter"===e.key&&t.commands.moveToNextResult()}}),Object(Cd.jsxs)(rf.Flex,Object.assign({sx:{flexShrink:0,mr:0,alignItems:"center"}},{children:[Object(Cd.jsx)(yf,{sx:{mr:0},toggled:p,title:"Expand",id:"expand",icon:p?"chevronRight":"chevronLeft",onClick:function(){return h((function(e){return!e}))},iconSize:"medium"}),p&&Object(Cd.jsxs)(Cd.Fragment,{children:[Object(Cd.jsx)(yf,{sx:{mr:0},toggled:g,title:"Match case",id:"matchCase",icon:"caseSensitive",onClick:function(){return y((function(e){return!e}))},iconSize:"medium"}),Object(Cd.jsx)(yf,{sx:{mr:0},toggled:k,title:"Match whole word",id:"matchWholeWord",icon:"wholeWord",onClick:function(){return x((function(e){return!e}))},iconSize:"medium"}),Object(Cd.jsx)(yf,{sx:{mr:0},toggled:C,title:"Enable regex",id:"enableRegex",icon:"regex",onClick:function(){return j((function(e){return!e}))},iconSize:"medium"})]}),Object(Cd.jsx)(af,Object.assign({variant:"subBody",sx:{flexShrink:0,borderLeft:"1px solid var(--border)",color:"fontTertiary",px:1}},{children:o?"".concat(a+1,"/").concat(o.length):""}))]}))]})),u&&Object(Cd.jsx)(Ow,{sx:{mt:1,p:"7px"},placeholder:"Replace",onChange:function(e){return D.current=e.target.value}})]})),Object(Cd.jsxs)(rf.Flex,Object.assign({sx:{flexDirection:"column"}},{children:[Object(Cd.jsxs)(rf.Flex,Object.assign({sx:{alignItems:"center",height:"33.2px"}},{children:[Object(Cd.jsx)(yf,{toggled:u,title:"Toggle replace",id:"toggleReplace",icon:"replace",onClick:function(){return c((function(e){return!e}))},sx:{mr:0},iconSize:"big"}),Object(Cd.jsx)(yf,{toggled:!1,title:"Previous match",id:"previousMatch",icon:"previousMatch",onClick:function(){return t.commands.moveToPreviousResult()},sx:{mr:0},iconSize:"big"}),Object(Cd.jsx)(yf,{toggled:!1,title:"Next match",id:"nextMatch",icon:"nextMatch",onClick:function(){return t.commands.moveToNextResult()},sx:{mr:0},iconSize:"big"}),Object(Cd.jsx)(yf,{toggled:!1,title:"Close",id:"close",icon:"close",onClick:function(){return t.chain().focus().endSearch().run()},sx:{mr:0},iconSize:"big"})]})),u&&Object(Cd.jsxs)(rf.Flex,Object.assign({sx:{alignItems:"center",height:"33.2px",mt:1}},{children:[Object(Cd.jsx)(yf,{toggled:!1,title:"Replace",id:"replace",icon:"replaceOne",onClick:function(){return t.commands.replace(D.current)},sx:{mr:0},iconSize:18}),Object(Cd.jsx)(yf,{toggled:!1,title:"Replace all",id:"replaceAll",icon:"replaceAll",onClick:function(){return t.commands.replaceAll(D.current)},sx:{mr:0},iconSize:18})]}))]}))]})}))}function sC(e){var t=e.editor,n=t.storage.searchreplace.isSearching;return Object(Cd.jsx)(ow,Object.assign({mobile:"sheet",desktop:"menu",isOpen:n,onClose:function(){return t.commands.endSearch()},position:{target:zb(),isTargetAbsolute:!0,location:"below",align:"end",yOffset:5},blocking:!1,focusOnRender:!1,draggable:!1},{children:Object(Cd.jsx)(aC,{editor:t})}))}function lC(e){return Object(Cd.jsxs)(Cd.Fragment,{children:[Object(Cd.jsx)(sC,Object.assign({},e)),Object(Cd.jsx)(nw,{children:Object(Cd.jsx)(iC,Object.assign({},e))})]})}var uC=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};var cC=function(e){var t=e.editor,n=e.theme,r=e.location,i=e.tools,a=void 0===i?KO().default:i,s=e.sx,l=uC(e,["editor","theme","location","tools","sx"]),u=Object(jd.useMemo)((function(){return[].concat(Object(o.a)(GO),Object(o.a)(a))}),[a]),c=Fd(),d=Rd((function(e){return e.setToolbarLocation}));return Object(jd.useEffect)((function(){d(r)}),[r]),t?Object(Cd.jsx)(Nd,Object.assign({theme:n},{children:Object(Cd.jsx)(_b.Provider,Object.assign({value:t},{children:Object(Cd.jsxs)($b,Object.assign({editor:t},{children:[Object(Cd.jsx)(rf.Flex,Object.assign({className:"editor-toolbar",sx:Object.assign(Object.assign({},s),{flexWrap:c?"nowrap":"wrap",overflowX:c?"auto":"hidden"})},l,{children:u.map((function(e){return Object(Cd.jsx)(NS,{tools:e,editor:t,sx:{flexShrink:0,pr:2,mr:2,borderRight:"1px solid var(--border)",":last-of-type":{mr:0,pr:0,borderRight:"none"}}},e.join(""))}))})),Object(Cd.jsx)(lC,{editor:t})]}))}))})):null};function dC(e){var t=e.editor,n=e.selected,r=e.onResize,o=e.width,i=e.height,a=e.children,s=e.handleColor;return t.isEditable?Object(Cd.jsx)(rC,Object.assign({enable:{bottom:!1,left:!1,right:!1,top:!1,bottomLeft:!1,bottomRight:n,topLeft:!1,topRight:!1},size:{height:i||"auto",width:o||"auto"},maxWidth:"100%",minWidth:135,handleComponent:{bottomRight:Object(Cd.jsx)(pf,{sx:{width:25,height:25,marginLeft:-20,marginTop:-20,borderTopLeftRadius:"default",borderBottomRightRadius:"default"},path:hf.resize,size:25,color:s||"icon"})},onResizeStop:function(e,t,n,o){try{r(n.clientWidth,n.clientHeight)}catch(AM){}},lockAspectRatio:!0},{children:a})):Object(Cd.jsx)(Cd.Fragment,{children:a})}var fC=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(t){i(t)}}function s(e){try{l(r.throw(e))}catch(t){i(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};function pC(e){var t=this,n=e.editor,r=e.node,o=e.selected,a=Fd(),s=r.attrs,l=s.src,u=s.alt,c=s.title,d=s.width,f=s.height,p=s.align,h=s.float,m=Object(jd.useRef)(),v=Object(jd.useState)(),g=Object(i.a)(v,2),y=g[0],b=g[1],w=Object(jd.useState)(),k=Object(i.a)(w,2),x=k[0],O=k[1];return Object(jd.useEffect)((function(){fC(t,void 0,void 0,tk().mark((function e(){var t,r,o,i,a,s;return tk().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(l){e.next=2;break}return e.abrupt("return");case 2:if(e.prev=2,!ik(l)){e.next=11;break}return e.t0=O,e.next=7,ak(l);case 7:e.t1=e.sent,(0,e.t0)(e.t1),e.next=33;break;case 11:return e.next=13,rk(l);case 13:if(r=e.sent,o=r.url,i=r.size,a=r.blob,s=r.type,O(o),console.log(o,i,a,s),null!==(t=n.current)&&void 0!==t){e.next=24;break}e.next=33;break;case 24:return e.t2=t.commands,e.t3={src:l},e.next=28,ok(a);case 28:e.t4=e.sent,e.t5=i,e.t6=s,e.t7={src:e.t4,size:e.t5,type:e.t6},e.t2.updateImage.call(e.t2,e.t3,e.t7);case 33:e.next=39;break;case 35:e.prev=35,e.t8=e.catch(2),console.error(e.t8),e.t8 instanceof Error&&b(e.t8.message);case 39:case"end":return e.stop()}}),e,null,[[2,35]])})))}),[l,m]),a&&(h=!1),Object(Cd.jsx)(Cd.Fragment,{children:Object(Cd.jsx)(rf.Box,Object.assign({sx:{display:h?"inline":"flex",ml:h&&"right"===p?2:0,mr:h&&"left"===p?2:0,float:h?p:"none",justifyContent:h?"stretch":"center"===p?"center":"left"===p?"start":"end",":hover .drag-handle, :active .drag-handle":{opacity:1}}},{children:!x||y?Object(Cd.jsxs)(rf.Flex,Object.assign({width:d,maxWidth:"100%",minWidth:135,sx:{bg:"bgSecondary",border:o?"2px solid var(--primary)":"2px solid transparent",borderRadius:"default",flexDirection:"column",alignItems:"center",justifyContent:"center",py:50}},{children:[Object(Cd.jsx)(pf,{path:y?hf.imageFailed:mC(x,l)?hf.imageDownload:hf.image,size:72,color:"gray"}),Object(Cd.jsx)(af,Object.assign({as:"span",variant:"subBody",sx:{display:"inline-block",textDecoration:"none",textAlign:"center",mx:2,mt:2}},{children:y?"There was an error loading the image: ".concat(y):mC(x,l)?"Downloading image from ".concat(hC(l)):""})),y?Object(Cd.jsx)(sf,Object.assign({variant:"secondary",sx:{mt:1},onClick:function(){O(l),b(void 0)}},{children:"Skip downloading (unsafe)"})):null]})):Object(Cd.jsxs)(dC,Object.assign({editor:n,selected:o,width:d,height:f,onResize:function(e,t){n.commands.setImageSize({width:e,height:t})}},{children:[Object(Cd.jsx)(nw,{children:o&&Object(Cd.jsx)(rf.Flex,Object.assign({sx:{position:"relative",justifyContent:"end"}},{children:Object(Cd.jsx)(rf.Flex,Object.assign({sx:{position:"absolute",top:-40,mb:2,alignItems:"end"}},{children:Object(Cd.jsx)(NS,{editor:n,tools:h?["imageAlignLeft","imageAlignRight","imageProperties"]:["imageAlignLeft","imageAlignCenter","imageAlignRight","imageProperties"],sx:{boxShadow:"menu",borderRadius:"default",bg:"background"}})}))}))}),o&&Object(Cd.jsx)(pf,{className:"drag-handle","data-drag-handle":!0,draggable:!0,path:hf.dragHandle,sx:{cursor:"grab",position:"absolute",top:2,left:2,zIndex:999}}),Object(Cd.jsx)(lf,Object.assign({"data-drag-image":!0,ref:m,alt:u,src:x,title:c,width:n.isEditable?"100%":d,height:n.isEditable?"100%":f,sx:{bg:"bgSecondary",border:o?"2px solid var(--primary)":"2px solid transparent",borderRadius:"default"}},e))]}))}))})}function hC(e){return e?new URL(e).hostname:null}function mC(e,t){return!e&&t&&!ik(t)}var vC=/(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,gC=Bo.create({name:"image",addOptions:function(){return{inline:!0,allowBase64:!0,HTMLAttributes:{}}},inline:function(){return this.options.inline},group:function(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes:function(){return{src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null},float:FS("float",!1),align:FS("align","left"),hash:FS("hash"),filename:FS("filename"),type:FS("mime"),size:FS("size")}},parseHTML:function(){return[{tag:this.options.allowBase64?"img":'img:not([src^="data:"])'}]},renderHTML:function(e){var t=e.HTMLAttributes;return["img",Sr(this.options.HTMLAttributes,t)]},addNodeView:function(){return nf(pC)},addCommands:function(){var e=this;return{insertImage:function(t){return function(n){return n.commands.insertContent({type:e.name,attrs:t})}},setImageAlignment:function(t){return function(n){var r=n.chain,o=n.tr.selection.from;return r().updateAttributes(e.name,Object.assign({},t)).setNodeSelection(o).run()}},setImageSize:function(t){return function(n){var r=n.chain,o=n.tr.selection.from;return r().updateAttributes(e.name,Object.assign({},t)).setNodeSelection(o).run()}},updateImage:function(t,n){return function(r){var o=r.state,i=r.tr,a=r.dispatch,s=t.hash?{key:"hash",value:t.hash}:t.src?{key:"src",value:t.src}:null;if(!s)return!1;var l,u=To(o.doc,(function(t){return t.type.name===e.name&&t.attrs[s.key]===s.value})),c=Object(Sd.a)(u);try{for(c.s();!(l=c.n()).done;){var d=l.value;i.setNodeMarkup(d.pos,d.node.type,Object.assign(Object.assign({},d.node.attrs),n))}}catch(f){c.e(f)}finally{c.f()}return i.setMeta("preventUpdate",n.preventUpdate||!1),i.setMeta("addToHistory",!1),a&&a(i),!0}}}},addInputRules:function(){return[Ho({find:vC,type:this.type,getAttributes:function(e){var t=Object(i.a)(e,5),n=t[2];return{src:t[3],alt:n,title:t[4]}}})]}}),yC=Bo.create({name:"taskList",addOptions:function(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content:function(){return"".concat(this.options.itemTypeName,"+")},parseHTML:function(){return[{tag:'ul[data-type="'.concat(this.name,'"]'),priority:51}]},renderHTML:function(e){var t=e.HTMLAttributes;return["ul",Sr(this.options.HTMLAttributes,t,{"data-type":this.name}),0]},addCommands:function(){var e=this;return{toggleTaskList:function(){return function(t){return t.commands.toggleList(e.name,e.options.itemTypeName)}}}},addKeyboardShortcuts:function(){var e=this;return{"Mod-Shift-9":function(){return e.editor.commands.toggleTaskList()}}}}),bC=n(28);function wC(e,t,n){var r=e.state.selection,o=r.empty,i=r.$from;if(!o||!function(e,t,n){var r=n.selection.$from,o=t||n.schema.nodes[e],i=n.schema.nodes.paragraph;return Object(bC.hasParentNodeOfType)(o)(n.selection)&&r.parent.type===i}(t,n,e.state)||0!==i.parentOffset||!function(e){var t=e.selection.$from;return!(t.depth>1)||(0===t.parentOffset||0===t.index(t.depth-1))}(e.state)||!e.can().liftListItem(n))return!1;var a=function(e,t){var n=Object(bC.findParentNodeOfType)(e)(t.selection);return!!n&&!n.node.textContent.length}(n,e.state);if(a){if(kC(n,e.state)){var s=xC(n,e.state);return!!s&&(s.childCount>1?e.commands.deleteNode(n):e.commands.deleteNode(s.type))}return e.commands.deleteNode(n)}return kC(n,e.state)?e.commands.liftListItem(n):e.chain().joinBackward().joinBackward().run()}var kC=function(e,t){var n=Object(bC.findParentNodeOfType)(e)(t.selection);if(!n)return!1;var r=n.pos,o=t.doc.resolve(r);return console.log("isFirstOfType",o),!o.nodeBefore},xC=function(e,t){var n,r=Object(bC.findParentNodeOfType)(e)(t.selection);if(r){var o=r.pos,i=t.doc.resolve(o);if(i.parent.type.spec.group&&!((null===(n=i.parent.type.spec.group)||void 0===n?void 0:n.indexOf("list"))<=-1))return i.parent}};var OC=/^\s*(\[([( |x])?\])\s$/;function SC(e){var t=e.editor,n=e.updateAttributes,r=e.getPos,o=e.forwardRef,i=e.node.attrs.checked,a=Fd(),s=Object(jd.useCallback)((function(){var e;if(!t.isEditable||!t.current)return!1;var o=t.current.state.selection,a=o.empty,s=o.from,l=o.to;if(a){n({checked:!i});var u=r(),c=null===(e=t.current)||void 0===e?void 0:e.state.doc.nodeAt(u);if(!c)return!1;t.commands.command((function(e){var t=e.tr;return CC(c,t,!i,u),!0}))}else{var d=Lo(t.current.state.doc,{from:s,to:l},(function(e){return e.type.name===jC.name}));t.current.commands.command((function(e){var t,n=e.tr,r=Object(Sd.a)(d);try{for(r.s();!(t=r.n()).done;){var o=t.value,a=o.node,s=o.pos;n.setNodeMarkup(s,null,{checked:!i}),CC(a,n,!i,s)}}catch(l){r.e(l)}finally{r.f()}return!0}))}return!0}),[t,r,i]);return Object(Cd.jsx)(Cd.Fragment,{children:Object(Cd.jsxs)(rf.Flex,Object.assign({"data-drag-image":!0,sx:{bg:"background",borderRadius:"default",":hover > .dragHandle":{opacity:t.isEditable?1:0}}},{children:[t.isEditable&&Object(Cd.jsx)(pf,{className:"dragHandle",draggable:"true","data-drag-handle":!0,path:hf.dragHandle,sx:{opacity:[1,1,0],alignSelf:"start",mr:2,bg:"transparent",cursor:"grab",".icon:hover path":{fill:"var(--checked) !important"}},size:a?24:20}),Object(Cd.jsx)(pf,{path:i?hf.check:"",stroke:"1px",contentEditable:!1,tabIndex:1,sx:{border:"2px solid",borderColor:i?"checked":"icon",borderRadius:"default",alignSelf:"start",mr:2,p:"1px",cursor:t.isEditable?"pointer":"unset",":hover":{borderColor:"checked"},":hover .icon path":{fill:"var(--checked) !important"}},onMouseDown:function(e){zd.current&&e.preventDefault(),s()},onTouchEnd:function(e){(zd.current||["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document)&&(e.preventDefault(),s())},color:i?"checked":"icon",size:a?16:14}),Object(Cd.jsx)(af,{as:"div",ref:o,sx:{"> .taskitem-content-wrapper > p":{textDecorationLine:i?"line-through":"none",opacity:i?.8:1},flex:1}})]}))})}function CC(e,t,n,r){var o,i=To(e,(function(e){return e.type.name===jC.name})),a=Object(Sd.a)(i);try{for(a.s();!(o=a.n()).done;){var s=o.value.pos+r+1;t.setNodeMarkup(s,void 0,{checked:n})}}catch(l){a.e(l)}finally{a.f()}return t}var jC=Bo.create({name:"taskItem",addOptions:function(){return{nested:!1,HTMLAttributes:{}}},content:function(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes:function(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:function(e){return"true"===e.getAttribute("data-checked")},renderHTML:function(e){return{"data-checked":e.checked}}}}},parseHTML:function(){return[{tag:'li[data-type="'.concat(this.name,'"]'),priority:51}]},renderHTML:function(e){var t=e.node,n=e.HTMLAttributes;return["li",Sr(this.options.HTMLAttributes,n,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:t.attrs.checked?"checked":null}],["span"]],["div",0]]},addKeyboardShortcuts:function(){var e=this,t={Enter:function(){return e.editor.commands.splitListItem(e.name)},"Shift-Tab":function(){return e.editor.commands.liftListItem(e.name)}};return this.options.nested?Object(f.a)(Object(f.a)({},t),{},{Tab:function(){return e.editor.commands.sinkListItem(e.name)}}):t},addNodeView:function(){var e=this;return function(t){var n=t.node,r=t.HTMLAttributes,o=t.getPos,a=t.editor,s=document.createElement("li"),l=document.createElement("label"),u=document.createElement("span"),c=document.createElement("input"),d=document.createElement("div");return l.contentEditable="false",c.type="checkbox",c.addEventListener("change",(function(t){if(a.isEditable||e.options.onReadOnlyChecked){var r=t.target.checked;a.isEditable&&"function"===typeof o&&a.chain().focus(void 0,{scrollIntoView:!1}).command((function(e){var t=e.tr,n=o(),i=t.doc.nodeAt(n);return t.setNodeMarkup(n,void 0,Object(f.a)(Object(f.a)({},null===i||void 0===i?void 0:i.attrs),{},{checked:r})),!0})).run(),!a.isEditable&&e.options.onReadOnlyChecked&&(e.options.onReadOnlyChecked(n,r)||(c.checked=!c.checked))}else c.checked=!c.checked})),Object.entries(e.options.HTMLAttributes).forEach((function(e){var t=Object(i.a)(e,2),n=t[0],r=t[1];s.setAttribute(n,r)})),s.dataset.checked=n.attrs.checked,n.attrs.checked&&c.setAttribute("checked","checked"),l.append(c,u),s.append(l,d),Object.entries(r).forEach((function(e){var t=Object(i.a)(e,2),n=t[0],r=t[1];s.setAttribute(n,r)})),{dom:s,contentDOM:d,update:function(t){return t.type===e.type&&(s.dataset.checked=t.attrs.checked,t.attrs.checked?c.setAttribute("checked","checked"):c.removeAttribute("checked"),!0)}}}},addInputRules:function(){return[Vo({find:OC,type:this.type,getAttributes:function(e){return{checked:"x"===e[e.length-1]}}})]}}).extend({draggable:!0,addAttributes:function(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:function(e){return e.classList.contains("checked")},renderHTML:function(e){return{class:e.checked?"checked":""}}}}},renderHTML:function(e){e.node;var t=e.HTMLAttributes;return["li",Sr(this.options.HTMLAttributes,t,{class:"checklist--item"}),0]},parseHTML:function(){return[{tag:"li",getAttrs:function(e){var t;return e instanceof Node&&e instanceof HTMLElement&&(!(!e.classList.contains("checklist--item")&&!(null===(t=e.parentElement)||void 0===t?void 0:t.classList.contains("checklist")))&&null)},priority:51}]},addKeyboardShortcuts:function(){var e,t=this;return Object.assign(Object.assign({},null===(e=this.parent)||void 0===e?void 0:e.call(this)),{Backspace:function(e){return wC(e.editor,t.name,t.type)}})},addNodeView:function(){return _d(SC,{contentDOMFactory:!0,wrapperFactory:function(){return document.createElement("li")},shouldUpdate:function(e,t){var n=e.attrs,r=t.attrs;return n.checked!==r.checked||n.collapsed!==r.collapsed}})}});function DC(e){var t=Fd(),n=e.editor,r=e.getPos,o=e.node,a=e.updateAttributes,s=e.forwardRef,l=Or(jC.name,n.schema),u=o.attrs,c=u.title,d=u.collapsed,f=Object(jd.useState)({checked:0,total:0,percentage:0}),p=Object(i.a)(f,2),h=p[0],m=p[1],v=Object(jd.useCallback)((function(){var e=n.state.doc.resolve(r());return Object(bC.findParentNodeOfTypeClosestToPos)(e,l)}),[]),g=Object(jd.useMemo)((function(){return!!v()}),[v]);return Object(jd.useEffect)((function(){var e=v();if(e){var t=e.node,r=e.pos,o=function(e,t,n){var r,o=To(e,(function(e){return e.type.name===jC.name})),i=Object(Sd.a)(o);try{for(i.s();!(r=i.n()).done;){var a=t+r.value.pos+1,s=n.nodeAt(a);if(!(null===s||void 0===s?void 0:s.attrs.checked))return!1}}catch(l){i.e(l)}finally{i.f()}return!0}(t,r,n.state.doc);t.attrs.checked!==o&&n.commands.command((function(e){return e.tr.setNodeMarkup(r,void 0,{checked:o}),!0}))}}),[o,o.childCount]),Object(jd.useEffect)((function(){var e=To(o,(function(e){return e.type.name===jC.name})),t=e.filter((function(e){return e.node.attrs.checked})).length,n=e.length,r=Math.round(t/n*100);m({checked:t,total:n,percentage:r})}),[g,o]),Object(Cd.jsxs)(Cd.Fragment,{children:[Object(Cd.jsx)(rf.Flex,Object.assign({sx:{flexDirection:"column",":hover > div > .toggleSublist":{opacity:1}}},{children:g?Object(Cd.jsxs)(rf.Flex,Object.assign({sx:{position:"absolute",top:0,right:0},contentEditable:!1},{children:[d&&Object(Cd.jsxs)(af,Object.assign({variant:"body",sx:{color:"fontTertiary",mr:35}},{children:[h.checked,"/",h.total]})),Object(Cd.jsx)(pf,{className:"toggleSublist",path:d?hf.chevronDown:hf.chevronUp,sx:{opacity:t||d?1:0,position:"absolute",right:0,alignSelf:"start",mr:2,cursor:"pointer",".icon:hover path":{fill:"var(--checked) !important"}},size:t?24:20,onClick:function(){a({collapsed:!d},{addToHistory:!1,preventUpdate:!0})}})]})):Object(Cd.jsxs)(rf.Flex,Object.assign({sx:{position:"relative",bg:"bgSecondary",py:1,borderRadius:"default",mb:2,alignItems:"center",justifyContent:"end",overflow:"hidden"},contentEditable:!1},{children:[Object(Cd.jsx)(rf.Box,{sx:{height:"100%",width:"".concat(h.percentage,"%"),position:"absolute",bg:"border",zIndex:0,left:0,transition:"width 250ms ease-out"}}),Object(Cd.jsx)(Ow,{readOnly:!n.isEditable,value:c||"",variant:"clean",sx:{p:0,px:2,zIndex:1,color:"fontTertiary",fontSize:"body"},placeholder:"Untitled",onChange:function(e){a({title:e.target.value},{addToHistory:!0,preventUpdate:!1})}}),Object(Cd.jsxs)(rf.Flex,Object.assign({sx:{flexShrink:0,pr:2}},{children:[Object(Cd.jsx)(pf,{path:hf.checkbox,size:15,color:"fontTertiary"}),Object(Cd.jsxs)(af,Object.assign({variant:"body",sx:{ml:1,color:"fontTertiary"}},{children:[h.checked,"/",h.total]}))]}))]}))})),Object(Cd.jsx)(af,{as:"div",ref:s,sx:{ul:{display:d?"none":"block",paddingInlineStart:0,marginBlockStart:g?10:0,marginBlockEnd:0,marginLeft:g?n.isEditable?-35:-10:0},li:{listStyleType:"none",position:"relative",marginBottom:g?[1,"3px"]:[2,"7px"]}}})]})}var AC=yC.extend({addAttributes:function(){return{collapsed:{default:!1,keepOnSplit:!1,parseHTML:function(e){return"true"===e.dataset.collapsed},renderHTML:function(e){return{"data-collapsed":!0===e.collapsed}}},title:{default:null,keepOnSplit:!1,parseHTML:function(e){return e.dataset.title},renderHTML:function(e){return!e.title||e.nested?{}:{"data-title":e.title}}}}},parseHTML:function(){return[{tag:"ul",getAttrs:function(e){return e instanceof Node&&e instanceof HTMLElement&&(e.classList.contains("checklist")&&null)},priority:51}]},renderHTML:function(e){var t=e.HTMLAttributes;return["ul",Sr(this.options.HTMLAttributes,t,{class:"checklist"}),0]},addCommands:function(){var e=this;return{toggleTaskList:function(){return function(t){var n=t.editor,r=t.commands,o=t.state,i=t.tr,a=o.selection,s=a.$from,l=a.$to;r.toggleList(e.name,e.options.itemTypeName);var u={from:i.mapping.map(s.pos),to:i.mapping.map(l.pos)};return setTimeout((function(){return n.commands.setTextSelection(u)}),0),!0}}}},addNodeView:function(){var e=this;return _d(DC,{contentDOMFactory:function(){var t=document.createElement("ul");return t.classList.add("".concat(e.name.toLowerCase(),"-content-wrapper")),t.style.whiteSpace="inherit",{dom:t}}})}});function EC(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new p.Plugin({view:function(t){return new MC(t,e)}})}var MC=function(){function e(t,n){var r=this;Object(c.a)(this,e),this.editorView=t,this.width=n.width||1,this.color=n.color||"black",this.class=n.class||"",this.cursorPos=null,this.element=null,this.timeout=null,this.handlers=["dragover","dragend","drop","dragleave"].map((function(e){var n=function(t){return r[e](t)};return t.dom.addEventListener(e,n),{name:e,handler:n}}))}return Object(d.a)(e,[{key:"destroy",value:function(){var e=this;this.handlers.forEach((function(t){var n=t.name,r=t.handler;return e.editorView.dom.removeEventListener(n,r)}))}},{key:"update",value:function(e,t){null!=this.cursorPos&&t.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}},{key:"setCursor",value:function(e){e!=this.cursorPos&&(this.cursorPos=e,null==e&&this.element&&this.element.parentNode?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}},{key:"updateOverlay",value:function(){if(this.cursorPos){var e,t=this.editorView.state.doc.resolve(this.cursorPos);if(!t.parent.inlineContent){var n=t.nodeBefore,r=t.nodeAfter;if(n||r){var o=this.editorView.nodeDOM(this.cursorPos-(n?n.nodeSize:0));if(!o)return;var i=o.getBoundingClientRect(),a=n?i.bottom:i.top;if(n&&r){var s=this.editorView.nodeDOM(this.cursorPos);if(!s)return;a=(a+s.getBoundingClientRect().top)/2}e={left:i.left,right:i.right,top:a-this.width/2,bottom:a+this.width/2}}}if(!e){var l=this.editorView.coordsAtPos(this.cursorPos);e={left:l.left-this.width/2,right:l.left+this.width/2,top:l.top,bottom:l.bottom}}var u,c,d=this.editorView.dom.offsetParent;if(!this.element&&d&&(this.element=d.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none; background-color: "+this.color),!d||d==document.body&&"static"==getComputedStyle(d).position)u=-pageXOffset,c=-pageYOffset;else{var f=d.getBoundingClientRect();u=f.left-d.scrollLeft,c=f.top-d.scrollTop}this.element&&(this.element.style.left=e.left-u+"px",this.element.style.top=e.top-c+"px",this.element.style.width=e.right-e.left+"px",this.element.style.height=e.bottom-e.top+"px")}}},{key:"scheduleRemoval",value:function(e){var t=this;clearTimeout(this.timeout||void 0),this.timeout=setTimeout((function(){return t.setCursor(null)}),e)}},{key:"dragover",value:function(e){if(this.editorView.editable){var t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),n=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),r=n&&n.type.spec.disableDropCursor,o="function"==typeof r?r(this.editorView,t):r;if(t&&!o){var i=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){var a=Object(g.h)(this.editorView.state.doc,i,this.editorView.dragging.slice);if(!a)return this.setCursor(null);i=a}this.setCursor(i),this.scheduleRemoval(5e3)}}}},{key:"dragend",value:function(){this.scheduleRemoval(20)}},{key:"drop",value:function(){this.scheduleRemoval(20)}},{key:"dragleave",value:function(e){e.target!=this.editorView.dom&&this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}]),e}(),TC=_r.create({name:"dropCursor",addOptions:function(){return{color:"currentColor",width:1,class:null}},addProseMirrorPlugins:function(){return[EC(this.options)]}}),LC=function(e,t){e.tr&&(e.tr.setMeta("forceUpdate",!0),t(e.tr))};var NC=_r.create({name:"searchreplace",addOptions:function(){return{searchResultClass:"search-result"}},addCommands:function(){var e=this;return{startSearch:function(){return function(t){var n=t.state;return e.storage.isSearching=!0,n.selection.empty||(e.storage.selectedText=n.doc.textBetween(n.selection.$from.pos,n.selection.$to.pos)),!0}},endSearch:function(){return function(t){var n=t.state,r=t.dispatch,o=t.editor;return e.storage.isSearching=!1,e.storage.selectedText=void 0,e.storage.searchTerm="",o.commands.focus(),LC(n,r),!0}},search:function(t,n){return function(r){var o=r.state,i=r.dispatch;return e.storage.selectedIndex=0,e.storage.searchTerm=t,e.storage.enableRegex=(null===n||void 0===n?void 0:n.enableRegex)||!1,e.storage.matchCase=(null===n||void 0===n?void 0:n.matchCase)||!1,e.storage.matchWholeWord=(null===n||void 0===n?void 0:n.matchWholeWord)||!1,e.storage.results=[],LC(o,i),!0}},moveToNextResult:function(){return function(t){var n=t.state,r=t.dispatch,o=t.commands,i=e.storage,a=i.selectedIndex,s=i.results;if(!s||s.length<=0)return!1;var l=a+1;(isNaN(l)||l>=s.length)&&(l=0);var u=s[l],c=u.from,d=u.to;return o.setTextSelection({from:c,to:d}),PC(e.editor,c),e.storage.selectedIndex=l,LC(n,r),!0}},moveToPreviousResult:function(){return function(t){var n=t.state,r=t.dispatch,o=t.commands,i=e.storage,a=i.selectedIndex,s=i.results;if(!s||s.length<=0)return!1;var l=a-1;(isNaN(l)||l<0)&&(l=s.length-1);var u=s[l],c=u.from,d=u.to;return o.setTextSelection({from:c,to:d}),PC(e.editor,c),e.storage.selectedIndex=l,LC(n,r),!0}},replace:function(t){return function(n){var r=n.commands,o=n.tr,i=n.dispatch,a=e.storage,s=a.selectedIndex,l=a.results;if(!i||!l||l.length<=0)return!1;var u=void 0===s?0:s,c=l[u],d=c.from,f=c.to;if(o.insertText(t,d,f),u+1<l.length){var h=l[u+1],m=h.from,v=h.to,g=l[u+1]={from:o.mapping.map(m),to:o.mapping.map(v)};r.focus(),o.setSelection(new p.TextSelection(o.doc.resolve(g.from),o.doc.resolve(g.to)))}return i(o),l.splice(u,1),!0}},replaceAll:function(t){return function(n){n.state;var r=n.tr,o=n.dispatch;if(!o)return!1;var i=e.storage.results;return!(!o||!i||i.length<=0)&&(o(function(e,t,n){if(t.length){for(var r=n.mapping,o=0;o<t.length;o+=1){var i=t[o],a=i.from,s=i.to;if(n.insertText(e,a,s),o+1<t.length){var l=t[o+1],u=l.from,c=l.to;t[o+1]={from:r.map(u),to:r.map(c)}}}return n}}(t,i,r)),!0)}}}},addKeyboardShortcuts:function(){return{"Mod-f":function(e){return e.editor.commands.startSearch()},Escape:function(e){return e.editor.commands.endSearch()}}},addProseMirrorPlugins:function(){var e=this,t=new p.PluginKey("searchreplace");return[new p.Plugin({key:t,state:{init:function(){return _u.empty},apply:function(t,n){var r=t.docChanged,o=t.getMeta("forceUpdate"),i=e.storage,a=i.searchTerm,s=i.enableRegex,l=i.matchCase,u=i.matchWholeWord,c=i.selectedIndex,d=i.isSearching;if(r||o){var f=e.options.searchResultClass,p=a?function(e,t){var n=t.enableRegex,r=t.matchCase,o=t.matchWholeWord?"\\b":"";return console.log(o),RegExp(o+(n?e:e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"))+o,r?"gu":"gui")}(a,{enableRegex:s,matchCase:l,matchWholeWord:u}):void 0,h=function(e,t,n,r){if(!n)return{decorationSet:_u.empty,results:[],startIndex:r||0};var o=e.doc,i=[],a=[],s=0,l=[];null===o||void 0===o||o.descendants((function(e,t){e.isText?l[s]?l[s]={text:l[s].text+e.text,pos:l[s].pos}:l[s]={text:e.text||"",pos:t}:s+=1})),l=l.filter(Boolean);var u,c=Object(Sd.a)(l);try{for(c.s();!(u=c.n()).done;){var d,f=u.value,p=f.text,h=f.pos,m=p.matchAll(n),v=Object(Sd.a)(m);try{for(v.s();!(d=v.n()).done;){var g=d.value;if(""===g[0])break;void 0!==g.index&&a.push({from:h+g.index,to:h+g.index+g[0].length})}}catch(M){v.e(M)}finally{v.f()}}}catch(M){c.e(M)}finally{c.f()}for(var y=e.selection,b=y.from,w=y.to,k=0;k<a.length;k++){var x=a[k],O=x.from,S=x.to;if(b===O&&S===w||O>=b){r=k;break}}for(var C=0;C<a.length;C++){var j=a[C],D=j.from,A=j.to,E=C===r?"".concat(t," selected"):t;i.push(zu.inline(D,A,{class:E}))}return{startIndex:r||0,decorationSet:_u.create(o,i),results:a}}(t,f,p,c),m=h.decorationSet,v=h.results,g=h.startIndex;return e.storage.results=v,e.storage.selectedIndex=g,m}return d?n:_u.empty}},props:{decorations:function(e){return t.getState(e)}}})]}});function PC(e,t){var n=e.view.domAtPos(t).node;n.nodeType===Node.TEXT_NODE&&n.parentNode&&(n=n.parentNode),n instanceof HTMLElement&&n.scrollIntoView({behavior:"smooth",block:"nearest"})}function RC(e){var t=e.editor,n=e.updateAttributes,r=e.selected,o=e.node,a=Object(jd.useState)(!0),s=Object(i.a)(a,2),l=s[0],u=s[1],c=Object(jd.useRef)(),d=o.attrs,f=d.src,p=d.width,h=d.height,m=d.align;return Object(Cd.jsx)(Cd.Fragment,{children:Object(Cd.jsx)(rf.Box,Object.assign({sx:{display:"flex",flexDirection:"column",justifyContent:"center"===m?"center":"left"===m?"start":"end",position:"relative"}},{children:Object(Cd.jsxs)(dC,Object.assign({handleColor:"primary",editor:t,selected:r,width:p,height:h,onResize:function(e,t){n({width:e,height:t},{addToHistory:!0,preventUpdate:!1})}},{children:[Object(Cd.jsxs)(rf.Box,Object.assign({width:"100%",sx:{display:t.isEditable?"flex":"none",position:"absolute",top:-24,justifyContent:"end",p:"small",bg:t.isEditable?"bgSecondary":"transparent",borderTopLeftRadius:"default",borderTopRightRadius:"default",borderColor:r?"border":"bgSecondary",cursor:"pointer",":hover":{borderColor:"border"}}},{children:[Object(Cd.jsx)(pf,{path:hf.dragHandle,size:"big"}),Object(Cd.jsx)(nw,{children:r&&Object(Cd.jsx)(rf.Flex,Object.assign({sx:{position:"relative",justifyContent:"end"}},{children:Object(Cd.jsx)(rf.Flex,Object.assign({sx:{position:"absolute",top:-10,mb:2,alignItems:"end"}},{children:Object(Cd.jsx)(NS,{editor:t,tools:["embedAlignLeft","embedAlignCenter","embedAlignRight","embedProperties"],sx:{boxShadow:"menu",borderRadius:"default",bg:"background"}})}))}))})]})),Object(Cd.jsx)(rf.Box,Object.assign({as:"iframe",ref:c,src:f,width:"100%",height:"100%",sx:{bg:"bgSecondary",border:r?"2px solid var(--primary)":"2px solid transparent",borderRadius:"default"},onLoad:function(){return u(!1)}},e)),l&&Object(Cd.jsx)(rf.Flex,Object.assign({sx:{position:"absolute",bottom:0,width:"100%",height:"calc(100% - 20px)",alignItems:"center",justifyContent:"center"}},{children:Object(Cd.jsx)(pf,{path:hf.loading,rotate:!0,size:32,color:"disabled"})}))]}))}))})}var HC=Bo.create({name:"embed",content:"",marks:"",draggable:!0,addOptions:function(){return{HTMLAttributes:{}}},group:function(){return"block"},addAttributes:function(){return{src:{default:null},width:{default:null},height:{default:null},align:{default:"left"}}},parseHTML:function(){return[{tag:"iframe[src]"}]},renderHTML:function(e){var t=e.HTMLAttributes;return["iframe",Sr(this.options.HTMLAttributes,t)]},addNodeView:function(){return nf(RC)},addCommands:function(){var e=this;return{insertEmbed:function(t){return function(n){return n.commands.insertContent({type:e.name,attrs:t})}},setEmbedAlignment:function(t){return function(n){return n.commands.updateAttributes(e.name,Object.assign({},t))}},setEmbedSize:function(t){return function(n){return n.commands.updateAttributes(e.name,Object.assign({},t))}},setEmbedSource:function(t){return function(n){return n.commands.updateAttributes(e.name,{src:t})}}}}}),FC=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(t){i(t)}}function s(e){try{l(r.throw(e))}catch(t){i(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},VC={};function zC(e){return FC(this,void 0,void 0,tk().mark((function t(){var n,r;return tk().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!VC[e]){t.next=2;break}return t.abrupt("return",VC[e]);case 2:return n="https://esm.sh/[email protected]/lang/".concat(e,".js?bundle=true"),t.next=5,BC(e,n);case 5:return r=t.sent,VC[e]=r,t.abrupt("return",r);case 8:case"end":return t.stop()}}),t)})))}function BC(e,t){return FC(this,void 0,void 0,tk().mark((function n(){return tk().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",new Promise((function(n,r){var o="on".concat(e,"Loaded"),i=document.createElement("script");i.type="module",i.innerHTML='\n import LanguageDefinition from "'.concat(t,'";\n if (window["').concat(o,'"]) {\n window["').concat(o,'"](LanguageDefinition)\n }\n'),window[o]=function(e){i.remove(),window[o]=null,n(e)},document.head.appendChild(i)})));case 1:case"end":return n.stop()}}),n)})))}var IC=Object(d.a)((function e(t,n,r){Object(c.a)(this,e),this.property=t,this.normal=n,r&&(this.space=r)}));function _C(e,t){for(var n={},r={},o=-1;++o<e.length;)Object.assign(n,e[o].property),Object.assign(r,e[o].normal);return new IC(n,r,t)}function $C(e){return e.toLowerCase()}IC.prototype.property={},IC.prototype.normal={},IC.prototype.space=null;var qC=Object(d.a)((function e(t,n){Object(c.a)(this,e),this.property=t,this.attribute=n}));qC.prototype.space=null,qC.prototype.boolean=!1,qC.prototype.booleanish=!1,qC.prototype.overloadedBoolean=!1,qC.prototype.number=!1,qC.prototype.commaSeparated=!1,qC.prototype.spaceSeparated=!1,qC.prototype.commaOrSpaceSeparated=!1,qC.prototype.mustUseProperty=!1,qC.prototype.defined=!1;var WC=0,UC=QC(),KC=QC(),GC=QC(),JC=QC(),YC=QC(),ZC=QC(),XC=QC();function QC(){return Math.pow(2,++WC)}var ej=Object.keys(r),tj=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e,o,i,s){var l;Object(c.a)(this,n);var u=-1;if(l=t.call(this,e,o),nj(Object(a.a)(l),"space",s),"number"===typeof i)for(;++u<ej.length;){var d=ej[u];nj(Object(a.a)(l),ej[u],(i&r[d])===r[d])}return l}return Object(d.a)(n)}(qC);function nj(e,t,n){n&&(e[t]=n)}tj.prototype.defined=!0;var rj={}.hasOwnProperty;function oj(e){var t,n={},r={};for(t in e.properties)if(rj.call(e.properties,t)){var o=e.properties[t],i=new tj(t,e.transform(e.attributes||{},t),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(t)&&(i.mustUseProperty=!0),n[t]=i,r[$C(t)]=t,r[$C(i.attribute)]=t}return new IC(n,r,e.space)}var ij=oj({space:"xlink",transform:function(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),aj=oj({space:"xml",transform:function(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function sj(e,t){return t in e?e[t]:t}function lj(e,t){return sj(e,t.toLowerCase())}var uj=oj({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:lj,properties:{xmlns:null,xmlnsXLink:null}}),cj=oj({transform:function(e,t){return"role"===t?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:KC,ariaAutoComplete:null,ariaBusy:KC,ariaChecked:KC,ariaColCount:JC,ariaColIndex:JC,ariaColSpan:JC,ariaControls:YC,ariaCurrent:null,ariaDescribedBy:YC,ariaDetails:null,ariaDisabled:KC,ariaDropEffect:YC,ariaErrorMessage:null,ariaExpanded:KC,ariaFlowTo:YC,ariaGrabbed:KC,ariaHasPopup:null,ariaHidden:KC,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:YC,ariaLevel:JC,ariaLive:null,ariaModal:KC,ariaMultiLine:KC,ariaMultiSelectable:KC,ariaOrientation:null,ariaOwns:YC,ariaPlaceholder:null,ariaPosInSet:JC,ariaPressed:KC,ariaReadOnly:KC,ariaRelevant:null,ariaRequired:KC,ariaRoleDescription:YC,ariaRowCount:JC,ariaRowIndex:JC,ariaRowSpan:JC,ariaSelected:KC,ariaSetSize:JC,ariaSort:null,ariaValueMax:JC,ariaValueMin:JC,ariaValueNow:JC,ariaValueText:null,role:null}}),dj=oj({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:lj,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ZC,acceptCharset:YC,accessKey:YC,action:null,allow:null,allowFullScreen:UC,allowPaymentRequest:UC,allowUserMedia:UC,alt:null,as:null,async:UC,autoCapitalize:null,autoComplete:YC,autoFocus:UC,autoPlay:UC,capture:UC,charSet:null,checked:UC,cite:null,className:YC,cols:JC,colSpan:null,content:null,contentEditable:KC,controls:UC,controlsList:YC,coords:JC|ZC,crossOrigin:null,data:null,dateTime:null,decoding:null,default:UC,defer:UC,dir:null,dirName:null,disabled:UC,download:GC,draggable:KC,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:UC,formTarget:null,headers:YC,height:JC,hidden:UC,high:JC,href:null,hrefLang:null,htmlFor:YC,httpEquiv:YC,id:null,imageSizes:null,imageSrcSet:null,inputMode:null,integrity:null,is:null,isMap:UC,itemId:null,itemProp:YC,itemRef:YC,itemScope:UC,itemType:YC,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:UC,low:JC,manifest:null,max:null,maxLength:JC,media:null,method:null,min:null,minLength:JC,multiple:UC,muted:UC,name:null,nonce:null,noModule:UC,noValidate:UC,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforePrint:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:UC,optimum:JC,pattern:null,ping:YC,placeholder:null,playsInline:UC,poster:null,preload:null,readOnly:UC,referrerPolicy:null,rel:YC,required:UC,reversed:UC,rows:JC,rowSpan:JC,sandbox:YC,scope:null,scoped:UC,seamless:UC,selected:UC,shape:null,size:JC,sizes:null,slot:null,span:JC,spellCheck:KC,src:null,srcDoc:null,srcLang:null,srcSet:null,start:JC,step:null,style:null,tabIndex:JC,target:null,title:null,translate:null,type:null,typeMustMatch:UC,useMap:null,value:KC,width:JC,wrap:null,align:null,aLink:null,archive:YC,axis:null,background:null,bgColor:null,border:JC,borderColor:null,bottomMargin:JC,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:UC,declare:UC,event:null,face:null,frame:null,frameBorder:null,hSpace:JC,leftMargin:JC,link:null,longDesc:null,lowSrc:null,marginHeight:JC,marginWidth:JC,noResize:UC,noHref:UC,noShade:UC,noWrap:UC,object:null,profile:null,prompt:null,rev:null,rightMargin:JC,rules:null,scheme:null,scrolling:KC,standby:null,summary:null,text:null,topMargin:JC,valueType:null,version:null,vAlign:null,vLink:null,vSpace:JC,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:UC,disableRemotePlayback:UC,prefix:null,property:null,results:JC,security:null,unselectable:null}}),fj=oj({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:sj,properties:{about:XC,accentHeight:JC,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:JC,amplitude:JC,arabicForm:null,ascent:JC,attributeName:null,attributeType:null,azimuth:JC,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:JC,by:null,calcMode:null,capHeight:JC,className:YC,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:JC,diffuseConstant:JC,direction:null,display:null,dur:null,divisor:JC,dominantBaseline:null,download:UC,dx:null,dy:null,edgeMode:null,editable:null,elevation:JC,enableBackground:null,end:null,event:null,exponent:JC,externalResourcesRequired:null,fill:null,fillOpacity:JC,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ZC,g2:ZC,glyphName:ZC,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:JC,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:JC,horizOriginX:JC,horizOriginY:JC,id:null,ideographic:JC,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:JC,k:JC,k1:JC,k2:JC,k3:JC,k4:JC,kernelMatrix:XC,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:JC,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:JC,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:JC,overlineThickness:JC,paintOrder:null,panose1:null,path:null,pathLength:JC,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:YC,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:JC,pointsAtY:JC,pointsAtZ:JC,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:XC,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:XC,rev:XC,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:XC,requiredFeatures:XC,requiredFonts:XC,requiredFormats:XC,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:JC,specularExponent:JC,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:JC,strikethroughThickness:JC,string:null,stroke:null,strokeDashArray:XC,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:JC,strokeOpacity:JC,strokeWidth:null,style:null,surfaceScale:JC,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:XC,tabIndex:JC,tableValues:null,target:null,targetX:JC,targetY:JC,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:XC,to:null,transform:null,u1:null,u2:null,underlinePosition:JC,underlineThickness:JC,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:JC,values:null,vAlphabetic:JC,vMathematical:JC,vectorEffect:null,vHanging:JC,vIdeographic:JC,version:null,vertAdvY:JC,vertOriginX:JC,vertOriginY:JC,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:JC,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),pj=_C([aj,ij,uj,cj,dj],"html"),hj=(_C([aj,ij,uj,cj,fj],"svg"),/^data[-\w.:]+$/i),mj=/-[a-z]/g,vj=/[A-Z]/g;function gj(e){return"-"+e.toLowerCase()}function yj(e){return e.charAt(1).toUpperCase()}var bj=/[#.]/g,wj=function(e){for(var t,n,r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"div",i=e||"",a={},s=0;s<i.length;)bj.lastIndex=s,r=bj.exec(i),(t=i.slice(s,r?r.index:i.length))&&(n?"#"===n?a.id=t:Array.isArray(a.className)?a.className.push(t):a.className=[t]:o=t,s+=t.length),r&&(n=r[0],s++);return{type:"element",tagName:o,properties:a,children:[]}};function kj(e){var t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function xj(e){for(var t,n,r=[],o=String(e||""),i=o.indexOf(","),a=0;!t;)-1===i&&(i=o.length,t=!0),!(n=o.slice(a,i).trim())&&t||r.push(n),a=i+1,i=o.indexOf(",",a);return r}var Oj=new Set(["menu","submit","reset","button"]),Sj={}.hasOwnProperty;function Cj(e,t){return null!==e&&void 0!==e&&"object"===typeof e&&!Array.isArray(e)&&("input"===t||!e.type||"string"!==typeof e.type||(!("children"in e)||!Array.isArray(e.children))&&("button"===t?Oj.has(e.type.toLowerCase()):!("value"in e)))}function jj(e,t,n,r){var o,i=function(e,t){var n=$C(t),r=t,o=qC;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&hj.test(t)){if("-"===t.charAt(4)){var i=t.slice(5).replace(mj,yj);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{var a=t.slice(4);if(!mj.test(a)){var s=a.replace(vj,gj);"-"!==s.charAt(0)&&(s="-"+s),t="data"+s}}o=tj}return new o(r,t)}(e,n),a=-1;if(void 0!==r&&null!==r){if("number"===typeof r){if(Number.isNaN(r))return;o=r}else o="boolean"===typeof r?r:"string"===typeof r?i.spaceSeparated?kj(r):i.commaSeparated?xj(r):i.commaOrSpaceSeparated?kj(xj(r).join(" ")):Aj(i,i.property,r):Array.isArray(r)?r.concat():"style"===i.property?function(e){var t,n=[];for(t in e)Sj.call(e,t)&&n.push([t,e[t]].join(": "));return n.join("; ")}(r):String(r);if(Array.isArray(o)){for(var s=[];++a<o.length;)s[a]=Aj(i,i.property,o[a]);o=s}"className"===i.property&&Array.isArray(t.className)&&(o=t.className.concat(o)),t[i.property]=o}}function Dj(e,t){var n=-1;if(void 0===t||null===t);else if("string"===typeof t||"number"===typeof t)e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(;++n<t.length;)Dj(e,t[n]);else{if("object"!==typeof t||!("type"in t))throw new Error("Expected node, nodes, or string, got `"+t+"`");"root"===t.type?Dj(e,t.children):e.push(t)}}function Aj(e,t,n){if("string"===typeof n){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(""===n||$C(n)===$C(t)))return!0}return n}var Ej=function(e,t,n){var r=n&&function(e){var t={},n=-1;for(;++n<e.length;)t[e[n].toLowerCase()]=e[n];return t}(n);return function(n,o){for(var i,a,s=-1,l=arguments.length,u=new Array(l>2?l-2:0),c=2;c<l;c++)u[c-2]=arguments[c];if(void 0===n||null===n)i={type:"root",children:[]},u.unshift(o);else if((i=wj(n,t)).tagName=i.tagName.toLowerCase(),r&&Sj.call(r,i.tagName)&&(i.tagName=r[i.tagName]),Cj(o,i.tagName))for(a in o)Sj.call(o,a)&&jj(e,i.properties,a,o[a]);else u.unshift(o);for(;++s<u.length;)Dj(i.children,u[s]);return"element"===i.type&&"template"===i.tagName&&(i.content={type:"root",children:i.children},i.children=[]),i}}(pj,"div"),Mj=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],Tj={0:"\ufffd",128:"\u20ac",130:"\u201a",131:"\u0192",132:"\u201e",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02c6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017d",145:"\u2018",146:"\u2019",147:"\u201c",148:"\u201d",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02dc",153:"\u2122",154:"\u0161",155:"\u203a",156:"\u0153",158:"\u017e",159:"\u0178"};function Lj(e){var t="string"===typeof e?e.charCodeAt(0):e;return t>=48&&t<=57}function Nj(e){var t="string"===typeof e?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function Pj(e){return function(e){var t="string"===typeof e?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}(e)||Lj(e)}var Rj={AElig:"\xc6",AMP:"&",Aacute:"\xc1",Abreve:"\u0102",Acirc:"\xc2",Acy:"\u0410",Afr:"\ud835\udd04",Agrave:"\xc0",Alpha:"\u0391",Amacr:"\u0100",And:"\u2a53",Aogon:"\u0104",Aopf:"\ud835\udd38",ApplyFunction:"\u2061",Aring:"\xc5",Ascr:"\ud835\udc9c",Assign:"\u2254",Atilde:"\xc3",Auml:"\xc4",Backslash:"\u2216",Barv:"\u2ae7",Barwed:"\u2306",Bcy:"\u0411",Because:"\u2235",Bernoullis:"\u212c",Beta:"\u0392",Bfr:"\ud835\udd05",Bopf:"\ud835\udd39",Breve:"\u02d8",Bscr:"\u212c",Bumpeq:"\u224e",CHcy:"\u0427",COPY:"\xa9",Cacute:"\u0106",Cap:"\u22d2",CapitalDifferentialD:"\u2145",Cayleys:"\u212d",Ccaron:"\u010c",Ccedil:"\xc7",Ccirc:"\u0108",Cconint:"\u2230",Cdot:"\u010a",Cedilla:"\xb8",CenterDot:"\xb7",Cfr:"\u212d",Chi:"\u03a7",CircleDot:"\u2299",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201d",CloseCurlyQuote:"\u2019",Colon:"\u2237",Colone:"\u2a74",Congruent:"\u2261",Conint:"\u222f",ContourIntegral:"\u222e",Copf:"\u2102",Coproduct:"\u2210",CounterClockwiseContourIntegral:"\u2233",Cross:"\u2a2f",Cscr:"\ud835\udc9e",Cup:"\u22d3",CupCap:"\u224d",DD:"\u2145",DDotrahd:"\u2911",DJcy:"\u0402",DScy:"\u0405",DZcy:"\u040f",Dagger:"\u2021",Darr:"\u21a1",Dashv:"\u2ae4",Dcaron:"\u010e",Dcy:"\u0414",Del:"\u2207",Delta:"\u0394",Dfr:"\ud835\udd07",DiacriticalAcute:"\xb4",DiacriticalDot:"\u02d9",DiacriticalDoubleAcute:"\u02dd",DiacriticalGrave:"`",DiacriticalTilde:"\u02dc",Diamond:"\u22c4",DifferentialD:"\u2146",Dopf:"\ud835\udd3b",Dot:"\xa8",DotDot:"\u20dc",DotEqual:"\u2250",DoubleContourIntegral:"\u222f",DoubleDot:"\xa8",DoubleDownArrow:"\u21d3",DoubleLeftArrow:"\u21d0",DoubleLeftRightArrow:"\u21d4",DoubleLeftTee:"\u2ae4",DoubleLongLeftArrow:"\u27f8",DoubleLongLeftRightArrow:"\u27fa",DoubleLongRightArrow:"\u27f9",DoubleRightArrow:"\u21d2",DoubleRightTee:"\u22a8",DoubleUpArrow:"\u21d1",DoubleUpDownArrow:"\u21d5",DoubleVerticalBar:"\u2225",DownArrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21f5",DownBreve:"\u0311",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295e",DownLeftVector:"\u21bd",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295f",DownRightVector:"\u21c1",DownRightVectorBar:"\u2957",DownTee:"\u22a4",DownTeeArrow:"\u21a7",Downarrow:"\u21d3",Dscr:"\ud835\udc9f",Dstrok:"\u0110",ENG:"\u014a",ETH:"\xd0",Eacute:"\xc9",Ecaron:"\u011a",Ecirc:"\xca",Ecy:"\u042d",Edot:"\u0116",Efr:"\ud835\udd08",Egrave:"\xc8",Element:"\u2208",Emacr:"\u0112",EmptySmallSquare:"\u25fb",EmptyVerySmallSquare:"\u25ab",Eogon:"\u0118",Eopf:"\ud835\udd3c",Epsilon:"\u0395",Equal:"\u2a75",EqualTilde:"\u2242",Equilibrium:"\u21cc",Escr:"\u2130",Esim:"\u2a73",Eta:"\u0397",Euml:"\xcb",Exists:"\u2203",ExponentialE:"\u2147",Fcy:"\u0424",Ffr:"\ud835\udd09",FilledSmallSquare:"\u25fc",FilledVerySmallSquare:"\u25aa",Fopf:"\ud835\udd3d",ForAll:"\u2200",Fouriertrf:"\u2131",Fscr:"\u2131",GJcy:"\u0403",GT:">",Gamma:"\u0393",Gammad:"\u03dc",Gbreve:"\u011e",Gcedil:"\u0122",Gcirc:"\u011c",Gcy:"\u0413",Gdot:"\u0120",Gfr:"\ud835\udd0a",Gg:"\u22d9",Gopf:"\ud835\udd3e",GreaterEqual:"\u2265",GreaterEqualLess:"\u22db",GreaterFullEqual:"\u2267",GreaterGreater:"\u2aa2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2a7e",GreaterTilde:"\u2273",Gscr:"\ud835\udca2",Gt:"\u226b",HARDcy:"\u042a",Hacek:"\u02c7",Hat:"^",Hcirc:"\u0124",Hfr:"\u210c",HilbertSpace:"\u210b",Hopf:"\u210d",HorizontalLine:"\u2500",Hscr:"\u210b",Hstrok:"\u0126",HumpDownHump:"\u224e",HumpEqual:"\u224f",IEcy:"\u0415",IJlig:"\u0132",IOcy:"\u0401",Iacute:"\xcd",Icirc:"\xce",Icy:"\u0418",Idot:"\u0130",Ifr:"\u2111",Igrave:"\xcc",Im:"\u2111",Imacr:"\u012a",ImaginaryI:"\u2148",Implies:"\u21d2",Int:"\u222c",Integral:"\u222b",Intersection:"\u22c2",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",Iogon:"\u012e",Iopf:"\ud835\udd40",Iota:"\u0399",Iscr:"\u2110",Itilde:"\u0128",Iukcy:"\u0406",Iuml:"\xcf",Jcirc:"\u0134",Jcy:"\u0419",Jfr:"\ud835\udd0d",Jopf:"\ud835\udd41",Jscr:"\ud835\udca5",Jsercy:"\u0408",Jukcy:"\u0404",KHcy:"\u0425",KJcy:"\u040c",Kappa:"\u039a",Kcedil:"\u0136",Kcy:"\u041a",Kfr:"\ud835\udd0e",Kopf:"\ud835\udd42",Kscr:"\ud835\udca6",LJcy:"\u0409",LT:"<",Lacute:"\u0139",Lambda:"\u039b",Lang:"\u27ea",Laplacetrf:"\u2112",Larr:"\u219e",Lcaron:"\u013d",Lcedil:"\u013b",Lcy:"\u041b",LeftAngleBracket:"\u27e8",LeftArrow:"\u2190",LeftArrowBar:"\u21e4",LeftArrowRightArrow:"\u21c6",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27e6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21c3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230a",LeftRightArrow:"\u2194",LeftRightVector:"\u294e",LeftTee:"\u22a3",LeftTeeArrow:"\u21a4",LeftTeeVector:"\u295a",LeftTriangle:"\u22b2",LeftTriangleBar:"\u29cf",LeftTriangleEqual:"\u22b4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21bf",LeftUpVectorBar:"\u2958",LeftVector:"\u21bc",LeftVectorBar:"\u2952",Leftarrow:"\u21d0",Leftrightarrow:"\u21d4",LessEqualGreater:"\u22da",LessFullEqual:"\u2266",LessGreater:"\u2276",LessLess:"\u2aa1",LessSlantEqual:"\u2a7d",LessTilde:"\u2272",Lfr:"\ud835\udd0f",Ll:"\u22d8",Lleftarrow:"\u21da",Lmidot:"\u013f",LongLeftArrow:"\u27f5",LongLeftRightArrow:"\u27f7",LongRightArrow:"\u27f6",Longleftarrow:"\u27f8",Longleftrightarrow:"\u27fa",Longrightarrow:"\u27f9",Lopf:"\ud835\udd43",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",Lscr:"\u2112",Lsh:"\u21b0",Lstrok:"\u0141",Lt:"\u226a",Map:"\u2905",Mcy:"\u041c",MediumSpace:"\u205f",Mellintrf:"\u2133",Mfr:"\ud835\udd10",MinusPlus:"\u2213",Mopf:"\ud835\udd44",Mscr:"\u2133",Mu:"\u039c",NJcy:"\u040a",Nacute:"\u0143",Ncaron:"\u0147",Ncedil:"\u0145",Ncy:"\u041d",NegativeMediumSpace:"\u200b",NegativeThickSpace:"\u200b",NegativeThinSpace:"\u200b",NegativeVeryThinSpace:"\u200b",NestedGreaterGreater:"\u226b",NestedLessLess:"\u226a",NewLine:"\n",Nfr:"\ud835\udd11",NoBreak:"\u2060",NonBreakingSpace:"\xa0",Nopf:"\u2115",Not:"\u2aec",NotCongruent:"\u2262",NotCupCap:"\u226d",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226f",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226b\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2a7e\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224e\u0338",NotHumpEqual:"\u224f\u0338",NotLeftTriangle:"\u22ea",NotLeftTriangleBar:"\u29cf\u0338",NotLeftTriangleEqual:"\u22ec",NotLess:"\u226e",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226a\u0338",NotLessSlantEqual:"\u2a7d\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2aa2\u0338",NotNestedLessLess:"\u2aa1\u0338",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2aaf\u0338",NotPrecedesSlantEqual:"\u22e0",NotReverseElement:"\u220c",NotRightTriangle:"\u22eb",NotRightTriangleBar:"\u29d0\u0338",NotRightTriangleEqual:"\u22ed",NotSquareSubset:"\u228f\u0338",NotSquareSubsetEqual:"\u22e2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22e3",NotSubset:"\u2282\u20d2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2ab0\u0338",NotSucceedsSlantEqual:"\u22e1",NotSucceedsTilde:"\u227f\u0338",NotSuperset:"\u2283\u20d2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",Nscr:"\ud835\udca9",Ntilde:"\xd1",Nu:"\u039d",OElig:"\u0152",Oacute:"\xd3",Ocirc:"\xd4",Ocy:"\u041e",Odblac:"\u0150",Ofr:"\ud835\udd12",Ograve:"\xd2",Omacr:"\u014c",Omega:"\u03a9",Omicron:"\u039f",Oopf:"\ud835\udd46",OpenCurlyDoubleQuote:"\u201c",OpenCurlyQuote:"\u2018",Or:"\u2a54",Oscr:"\ud835\udcaa",Oslash:"\xd8",Otilde:"\xd5",Otimes:"\u2a37",Ouml:"\xd6",OverBar:"\u203e",OverBrace:"\u23de",OverBracket:"\u23b4",OverParenthesis:"\u23dc",PartialD:"\u2202",Pcy:"\u041f",Pfr:"\ud835\udd13",Phi:"\u03a6",Pi:"\u03a0",PlusMinus:"\xb1",Poincareplane:"\u210c",Popf:"\u2119",Pr:"\u2abb",Precedes:"\u227a",PrecedesEqual:"\u2aaf",PrecedesSlantEqual:"\u227c",PrecedesTilde:"\u227e",Prime:"\u2033",Product:"\u220f",Proportion:"\u2237",Proportional:"\u221d",Pscr:"\ud835\udcab",Psi:"\u03a8",QUOT:'"',Qfr:"\ud835\udd14",Qopf:"\u211a",Qscr:"\ud835\udcac",RBarr:"\u2910",REG:"\xae",Racute:"\u0154",Rang:"\u27eb",Rarr:"\u21a0",Rarrtl:"\u2916",Rcaron:"\u0158",Rcedil:"\u0156",Rcy:"\u0420",Re:"\u211c",ReverseElement:"\u220b",ReverseEquilibrium:"\u21cb",ReverseUpEquilibrium:"\u296f",Rfr:"\u211c",Rho:"\u03a1",RightAngleBracket:"\u27e9",RightArrow:"\u2192",RightArrowBar:"\u21e5",RightArrowLeftArrow:"\u21c4",RightCeiling:"\u2309",RightDoubleBracket:"\u27e7",RightDownTeeVector:"\u295d",RightDownVector:"\u21c2",RightDownVectorBar:"\u2955",RightFloor:"\u230b",RightTee:"\u22a2",RightTeeArrow:"\u21a6",RightTeeVector:"\u295b",RightTriangle:"\u22b3",RightTriangleBar:"\u29d0",RightTriangleEqual:"\u22b5",RightUpDownVector:"\u294f",RightUpTeeVector:"\u295c",RightUpVector:"\u21be",RightUpVectorBar:"\u2954",RightVector:"\u21c0",RightVectorBar:"\u2953",Rightarrow:"\u21d2",Ropf:"\u211d",RoundImplies:"\u2970",Rrightarrow:"\u21db",Rscr:"\u211b",Rsh:"\u21b1",RuleDelayed:"\u29f4",SHCHcy:"\u0429",SHcy:"\u0428",SOFTcy:"\u042c",Sacute:"\u015a",Sc:"\u2abc",Scaron:"\u0160",Scedil:"\u015e",Scirc:"\u015c",Scy:"\u0421",Sfr:"\ud835\udd16",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",Sigma:"\u03a3",SmallCircle:"\u2218",Sopf:"\ud835\udd4a",Sqrt:"\u221a",Square:"\u25a1",SquareIntersection:"\u2293",SquareSubset:"\u228f",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",Sscr:"\ud835\udcae",Star:"\u22c6",Sub:"\u22d0",Subset:"\u22d0",SubsetEqual:"\u2286",Succeeds:"\u227b",SucceedsEqual:"\u2ab0",SucceedsSlantEqual:"\u227d",SucceedsTilde:"\u227f",SuchThat:"\u220b",Sum:"\u2211",Sup:"\u22d1",Superset:"\u2283",SupersetEqual:"\u2287",Supset:"\u22d1",THORN:"\xde",TRADE:"\u2122",TSHcy:"\u040b",TScy:"\u0426",Tab:"\t",Tau:"\u03a4",Tcaron:"\u0164",Tcedil:"\u0162",Tcy:"\u0422",Tfr:"\ud835\udd17",Therefore:"\u2234",Theta:"\u0398",ThickSpace:"\u205f\u200a",ThinSpace:"\u2009",Tilde:"\u223c",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",Topf:"\ud835\udd4b",TripleDot:"\u20db",Tscr:"\ud835\udcaf",Tstrok:"\u0166",Uacute:"\xda",Uarr:"\u219f",Uarrocir:"\u2949",Ubrcy:"\u040e",Ubreve:"\u016c",Ucirc:"\xdb",Ucy:"\u0423",Udblac:"\u0170",Ufr:"\ud835\udd18",Ugrave:"\xd9",Umacr:"\u016a",UnderBar:"_",UnderBrace:"\u23df",UnderBracket:"\u23b5",UnderParenthesis:"\u23dd",Union:"\u22c3",UnionPlus:"\u228e",Uogon:"\u0172",Uopf:"\ud835\udd4c",UpArrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21c5",UpDownArrow:"\u2195",UpEquilibrium:"\u296e",UpTee:"\u22a5",UpTeeArrow:"\u21a5",Uparrow:"\u21d1",Updownarrow:"\u21d5",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",Upsi:"\u03d2",Upsilon:"\u03a5",Uring:"\u016e",Uscr:"\ud835\udcb0",Utilde:"\u0168",Uuml:"\xdc",VDash:"\u22ab",Vbar:"\u2aeb",Vcy:"\u0412",Vdash:"\u22a9",Vdashl:"\u2ae6",Vee:"\u22c1",Verbar:"\u2016",Vert:"\u2016",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200a",Vfr:"\ud835\udd19",Vopf:"\ud835\udd4d",Vscr:"\ud835\udcb1",Vvdash:"\u22aa",Wcirc:"\u0174",Wedge:"\u22c0",Wfr:"\ud835\udd1a",Wopf:"\ud835\udd4e",Wscr:"\ud835\udcb2",Xfr:"\ud835\udd1b",Xi:"\u039e",Xopf:"\ud835\udd4f",Xscr:"\ud835\udcb3",YAcy:"\u042f",YIcy:"\u0407",YUcy:"\u042e",Yacute:"\xdd",Ycirc:"\u0176",Ycy:"\u042b",Yfr:"\ud835\udd1c",Yopf:"\ud835\udd50",Yscr:"\ud835\udcb4",Yuml:"\u0178",ZHcy:"\u0416",Zacute:"\u0179",Zcaron:"\u017d",Zcy:"\u0417",Zdot:"\u017b",ZeroWidthSpace:"\u200b",Zeta:"\u0396",Zfr:"\u2128",Zopf:"\u2124",Zscr:"\ud835\udcb5",aacute:"\xe1",abreve:"\u0103",ac:"\u223e",acE:"\u223e\u0333",acd:"\u223f",acirc:"\xe2",acute:"\xb4",acy:"\u0430",aelig:"\xe6",af:"\u2061",afr:"\ud835\udd1e",agrave:"\xe0",alefsym:"\u2135",aleph:"\u2135",alpha:"\u03b1",amacr:"\u0101",amalg:"\u2a3f",amp:"&",and:"\u2227",andand:"\u2a55",andd:"\u2a5c",andslope:"\u2a58",andv:"\u2a5a",ang:"\u2220",ange:"\u29a4",angle:"\u2220",angmsd:"\u2221",angmsdaa:"\u29a8",angmsdab:"\u29a9",angmsdac:"\u29aa",angmsdad:"\u29ab",angmsdae:"\u29ac",angmsdaf:"\u29ad",angmsdag:"\u29ae",angmsdah:"\u29af",angrt:"\u221f",angrtvb:"\u22be",angrtvbd:"\u299d",angsph:"\u2222",angst:"\xc5",angzarr:"\u237c",aogon:"\u0105",aopf:"\ud835\udd52",ap:"\u2248",apE:"\u2a70",apacir:"\u2a6f",ape:"\u224a",apid:"\u224b",apos:"'",approx:"\u2248",approxeq:"\u224a",aring:"\xe5",ascr:"\ud835\udcb6",ast:"*",asymp:"\u2248",asympeq:"\u224d",atilde:"\xe3",auml:"\xe4",awconint:"\u2233",awint:"\u2a11",bNot:"\u2aed",backcong:"\u224c",backepsilon:"\u03f6",backprime:"\u2035",backsim:"\u223d",backsimeq:"\u22cd",barvee:"\u22bd",barwed:"\u2305",barwedge:"\u2305",bbrk:"\u23b5",bbrktbrk:"\u23b6",bcong:"\u224c",bcy:"\u0431",bdquo:"\u201e",becaus:"\u2235",because:"\u2235",bemptyv:"\u29b0",bepsi:"\u03f6",bernou:"\u212c",beta:"\u03b2",beth:"\u2136",between:"\u226c",bfr:"\ud835\udd1f",bigcap:"\u22c2",bigcirc:"\u25ef",bigcup:"\u22c3",bigodot:"\u2a00",bigoplus:"\u2a01",bigotimes:"\u2a02",bigsqcup:"\u2a06",bigstar:"\u2605",bigtriangledown:"\u25bd",bigtriangleup:"\u25b3",biguplus:"\u2a04",bigvee:"\u22c1",bigwedge:"\u22c0",bkarow:"\u290d",blacklozenge:"\u29eb",blacksquare:"\u25aa",blacktriangle:"\u25b4",blacktriangledown:"\u25be",blacktriangleleft:"\u25c2",blacktriangleright:"\u25b8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20e5",bnequiv:"\u2261\u20e5",bnot:"\u2310",bopf:"\ud835\udd53",bot:"\u22a5",bottom:"\u22a5",bowtie:"\u22c8",boxDL:"\u2557",boxDR:"\u2554",boxDl:"\u2556",boxDr:"\u2553",boxH:"\u2550",boxHD:"\u2566",boxHU:"\u2569",boxHd:"\u2564",boxHu:"\u2567",boxUL:"\u255d",boxUR:"\u255a",boxUl:"\u255c",boxUr:"\u2559",boxV:"\u2551",boxVH:"\u256c",boxVL:"\u2563",boxVR:"\u2560",boxVh:"\u256b",boxVl:"\u2562",boxVr:"\u255f",boxbox:"\u29c9",boxdL:"\u2555",boxdR:"\u2552",boxdl:"\u2510",boxdr:"\u250c",boxh:"\u2500",boxhD:"\u2565",boxhU:"\u2568",boxhd:"\u252c",boxhu:"\u2534",boxminus:"\u229f",boxplus:"\u229e",boxtimes:"\u22a0",boxuL:"\u255b",boxuR:"\u2558",boxul:"\u2518",boxur:"\u2514",boxv:"\u2502",boxvH:"\u256a",boxvL:"\u2561",boxvR:"\u255e",boxvh:"\u253c",boxvl:"\u2524",boxvr:"\u251c",bprime:"\u2035",breve:"\u02d8",brvbar:"\xa6",bscr:"\ud835\udcb7",bsemi:"\u204f",bsim:"\u223d",bsime:"\u22cd",bsol:"\\",bsolb:"\u29c5",bsolhsub:"\u27c8",bull:"\u2022",bullet:"\u2022",bump:"\u224e",bumpE:"\u2aae",bumpe:"\u224f",bumpeq:"\u224f",cacute:"\u0107",cap:"\u2229",capand:"\u2a44",capbrcup:"\u2a49",capcap:"\u2a4b",capcup:"\u2a47",capdot:"\u2a40",caps:"\u2229\ufe00",caret:"\u2041",caron:"\u02c7",ccaps:"\u2a4d",ccaron:"\u010d",ccedil:"\xe7",ccirc:"\u0109",ccups:"\u2a4c",ccupssm:"\u2a50",cdot:"\u010b",cedil:"\xb8",cemptyv:"\u29b2",cent:"\xa2",centerdot:"\xb7",cfr:"\ud835\udd20",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",chi:"\u03c7",cir:"\u25cb",cirE:"\u29c3",circ:"\u02c6",circeq:"\u2257",circlearrowleft:"\u21ba",circlearrowright:"\u21bb",circledR:"\xae",circledS:"\u24c8",circledast:"\u229b",circledcirc:"\u229a",circleddash:"\u229d",cire:"\u2257",cirfnint:"\u2a10",cirmid:"\u2aef",cirscir:"\u29c2",clubs:"\u2663",clubsuit:"\u2663",colon:":",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2a6d",conint:"\u222e",copf:"\ud835\udd54",coprod:"\u2210",copy:"\xa9",copysr:"\u2117",crarr:"\u21b5",cross:"\u2717",cscr:"\ud835\udcb8",csub:"\u2acf",csube:"\u2ad1",csup:"\u2ad0",csupe:"\u2ad2",ctdot:"\u22ef",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22de",cuesc:"\u22df",cularr:"\u21b6",cularrp:"\u293d",cup:"\u222a",cupbrcap:"\u2a48",cupcap:"\u2a46",cupcup:"\u2a4a",cupdot:"\u228d",cupor:"\u2a45",cups:"\u222a\ufe00",curarr:"\u21b7",curarrm:"\u293c",curlyeqprec:"\u22de",curlyeqsucc:"\u22df",curlyvee:"\u22ce",curlywedge:"\u22cf",curren:"\xa4",curvearrowleft:"\u21b6",curvearrowright:"\u21b7",cuvee:"\u22ce",cuwed:"\u22cf",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232d",dArr:"\u21d3",dHar:"\u2965",dagger:"\u2020",daleth:"\u2138",darr:"\u2193",dash:"\u2010",dashv:"\u22a3",dbkarow:"\u290f",dblac:"\u02dd",dcaron:"\u010f",dcy:"\u0434",dd:"\u2146",ddagger:"\u2021",ddarr:"\u21ca",ddotseq:"\u2a77",deg:"\xb0",delta:"\u03b4",demptyv:"\u29b1",dfisht:"\u297f",dfr:"\ud835\udd21",dharl:"\u21c3",dharr:"\u21c2",diam:"\u22c4",diamond:"\u22c4",diamondsuit:"\u2666",diams:"\u2666",die:"\xa8",digamma:"\u03dd",disin:"\u22f2",div:"\xf7",divide:"\xf7",divideontimes:"\u22c7",divonx:"\u22c7",djcy:"\u0452",dlcorn:"\u231e",dlcrop:"\u230d",dollar:"$",dopf:"\ud835\udd55",dot:"\u02d9",doteq:"\u2250",doteqdot:"\u2251",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22a1",doublebarwedge:"\u2306",downarrow:"\u2193",downdownarrows:"\u21ca",downharpoonleft:"\u21c3",downharpoonright:"\u21c2",drbkarow:"\u2910",drcorn:"\u231f",drcrop:"\u230c",dscr:"\ud835\udcb9",dscy:"\u0455",dsol:"\u29f6",dstrok:"\u0111",dtdot:"\u22f1",dtri:"\u25bf",dtrif:"\u25be",duarr:"\u21f5",duhar:"\u296f",dwangle:"\u29a6",dzcy:"\u045f",dzigrarr:"\u27ff",eDDot:"\u2a77",eDot:"\u2251",eacute:"\xe9",easter:"\u2a6e",ecaron:"\u011b",ecir:"\u2256",ecirc:"\xea",ecolon:"\u2255",ecy:"\u044d",edot:"\u0117",ee:"\u2147",efDot:"\u2252",efr:"\ud835\udd22",eg:"\u2a9a",egrave:"\xe8",egs:"\u2a96",egsdot:"\u2a98",el:"\u2a99",elinters:"\u23e7",ell:"\u2113",els:"\u2a95",elsdot:"\u2a97",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",emptyv:"\u2205",emsp13:"\u2004",emsp14:"\u2005",emsp:"\u2003",eng:"\u014b",ensp:"\u2002",eogon:"\u0119",eopf:"\ud835\udd56",epar:"\u22d5",eparsl:"\u29e3",eplus:"\u2a71",epsi:"\u03b5",epsilon:"\u03b5",epsiv:"\u03f5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2a96",eqslantless:"\u2a95",equals:"=",equest:"\u225f",equiv:"\u2261",equivDD:"\u2a78",eqvparsl:"\u29e5",erDot:"\u2253",erarr:"\u2971",escr:"\u212f",esdot:"\u2250",esim:"\u2242",eta:"\u03b7",eth:"\xf0",euml:"\xeb",euro:"\u20ac",excl:"!",exist:"\u2203",expectation:"\u2130",exponentiale:"\u2147",fallingdotseq:"\u2252",fcy:"\u0444",female:"\u2640",ffilig:"\ufb03",fflig:"\ufb00",ffllig:"\ufb04",ffr:"\ud835\udd23",filig:"\ufb01",fjlig:"fj",flat:"\u266d",fllig:"\ufb02",fltns:"\u25b1",fnof:"\u0192",fopf:"\ud835\udd57",forall:"\u2200",fork:"\u22d4",forkv:"\u2ad9",fpartint:"\u2a0d",frac12:"\xbd",frac13:"\u2153",frac14:"\xbc",frac15:"\u2155",frac16:"\u2159",frac18:"\u215b",frac23:"\u2154",frac25:"\u2156",frac34:"\xbe",frac35:"\u2157",frac38:"\u215c",frac45:"\u2158",frac56:"\u215a",frac58:"\u215d",frac78:"\u215e",frasl:"\u2044",frown:"\u2322",fscr:"\ud835\udcbb",gE:"\u2267",gEl:"\u2a8c",gacute:"\u01f5",gamma:"\u03b3",gammad:"\u03dd",gap:"\u2a86",gbreve:"\u011f",gcirc:"\u011d",gcy:"\u0433",gdot:"\u0121",ge:"\u2265",gel:"\u22db",geq:"\u2265",geqq:"\u2267",geqslant:"\u2a7e",ges:"\u2a7e",gescc:"\u2aa9",gesdot:"\u2a80",gesdoto:"\u2a82",gesdotol:"\u2a84",gesl:"\u22db\ufe00",gesles:"\u2a94",gfr:"\ud835\udd24",gg:"\u226b",ggg:"\u22d9",gimel:"\u2137",gjcy:"\u0453",gl:"\u2277",glE:"\u2a92",gla:"\u2aa5",glj:"\u2aa4",gnE:"\u2269",gnap:"\u2a8a",gnapprox:"\u2a8a",gne:"\u2a88",gneq:"\u2a88",gneqq:"\u2269",gnsim:"\u22e7",gopf:"\ud835\udd58",grave:"`",gscr:"\u210a",gsim:"\u2273",gsime:"\u2a8e",gsiml:"\u2a90",gt:">",gtcc:"\u2aa7",gtcir:"\u2a7a",gtdot:"\u22d7",gtlPar:"\u2995",gtquest:"\u2a7c",gtrapprox:"\u2a86",gtrarr:"\u2978",gtrdot:"\u22d7",gtreqless:"\u22db",gtreqqless:"\u2a8c",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\ufe00",gvnE:"\u2269\ufe00",hArr:"\u21d4",hairsp:"\u200a",half:"\xbd",hamilt:"\u210b",hardcy:"\u044a",harr:"\u2194",harrcir:"\u2948",harrw:"\u21ad",hbar:"\u210f",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22b9",hfr:"\ud835\udd25",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21ff",homtht:"\u223b",hookleftarrow:"\u21a9",hookrightarrow:"\u21aa",hopf:"\ud835\udd59",horbar:"\u2015",hscr:"\ud835\udcbd",hslash:"\u210f",hstrok:"\u0127",hybull:"\u2043",hyphen:"\u2010",iacute:"\xed",ic:"\u2063",icirc:"\xee",icy:"\u0438",iecy:"\u0435",iexcl:"\xa1",iff:"\u21d4",ifr:"\ud835\udd26",igrave:"\xec",ii:"\u2148",iiiint:"\u2a0c",iiint:"\u222d",iinfin:"\u29dc",iiota:"\u2129",ijlig:"\u0133",imacr:"\u012b",image:"\u2111",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",imof:"\u22b7",imped:"\u01b5",in:"\u2208",incare:"\u2105",infin:"\u221e",infintie:"\u29dd",inodot:"\u0131",int:"\u222b",intcal:"\u22ba",integers:"\u2124",intercal:"\u22ba",intlarhk:"\u2a17",intprod:"\u2a3c",iocy:"\u0451",iogon:"\u012f",iopf:"\ud835\udd5a",iota:"\u03b9",iprod:"\u2a3c",iquest:"\xbf",iscr:"\ud835\udcbe",isin:"\u2208",isinE:"\u22f9",isindot:"\u22f5",isins:"\u22f4",isinsv:"\u22f3",isinv:"\u2208",it:"\u2062",itilde:"\u0129",iukcy:"\u0456",iuml:"\xef",jcirc:"\u0135",jcy:"\u0439",jfr:"\ud835\udd27",jmath:"\u0237",jopf:"\ud835\udd5b",jscr:"\ud835\udcbf",jsercy:"\u0458",jukcy:"\u0454",kappa:"\u03ba",kappav:"\u03f0",kcedil:"\u0137",kcy:"\u043a",kfr:"\ud835\udd28",kgreen:"\u0138",khcy:"\u0445",kjcy:"\u045c",kopf:"\ud835\udd5c",kscr:"\ud835\udcc0",lAarr:"\u21da",lArr:"\u21d0",lAtail:"\u291b",lBarr:"\u290e",lE:"\u2266",lEg:"\u2a8b",lHar:"\u2962",lacute:"\u013a",laemptyv:"\u29b4",lagran:"\u2112",lambda:"\u03bb",lang:"\u27e8",langd:"\u2991",langle:"\u27e8",lap:"\u2a85",laquo:"\xab",larr:"\u2190",larrb:"\u21e4",larrbfs:"\u291f",larrfs:"\u291d",larrhk:"\u21a9",larrlp:"\u21ab",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21a2",lat:"\u2aab",latail:"\u2919",late:"\u2aad",lates:"\u2aad\ufe00",lbarr:"\u290c",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298b",lbrksld:"\u298f",lbrkslu:"\u298d",lcaron:"\u013e",lcedil:"\u013c",lceil:"\u2308",lcub:"{",lcy:"\u043b",ldca:"\u2936",ldquo:"\u201c",ldquor:"\u201e",ldrdhar:"\u2967",ldrushar:"\u294b",ldsh:"\u21b2",le:"\u2264",leftarrow:"\u2190",leftarrowtail:"\u21a2",leftharpoondown:"\u21bd",leftharpoonup:"\u21bc",leftleftarrows:"\u21c7",leftrightarrow:"\u2194",leftrightarrows:"\u21c6",leftrightharpoons:"\u21cb",leftrightsquigarrow:"\u21ad",leftthreetimes:"\u22cb",leg:"\u22da",leq:"\u2264",leqq:"\u2266",leqslant:"\u2a7d",les:"\u2a7d",lescc:"\u2aa8",lesdot:"\u2a7f",lesdoto:"\u2a81",lesdotor:"\u2a83",lesg:"\u22da\ufe00",lesges:"\u2a93",lessapprox:"\u2a85",lessdot:"\u22d6",lesseqgtr:"\u22da",lesseqqgtr:"\u2a8b",lessgtr:"\u2276",lesssim:"\u2272",lfisht:"\u297c",lfloor:"\u230a",lfr:"\ud835\udd29",lg:"\u2276",lgE:"\u2a91",lhard:"\u21bd",lharu:"\u21bc",lharul:"\u296a",lhblk:"\u2584",ljcy:"\u0459",ll:"\u226a",llarr:"\u21c7",llcorner:"\u231e",llhard:"\u296b",lltri:"\u25fa",lmidot:"\u0140",lmoust:"\u23b0",lmoustache:"\u23b0",lnE:"\u2268",lnap:"\u2a89",lnapprox:"\u2a89",lne:"\u2a87",lneq:"\u2a87",lneqq:"\u2268",lnsim:"\u22e6",loang:"\u27ec",loarr:"\u21fd",lobrk:"\u27e6",longleftarrow:"\u27f5",longleftrightarrow:"\u27f7",longmapsto:"\u27fc",longrightarrow:"\u27f6",looparrowleft:"\u21ab",looparrowright:"\u21ac",lopar:"\u2985",lopf:"\ud835\udd5d",loplus:"\u2a2d",lotimes:"\u2a34",lowast:"\u2217",lowbar:"_",loz:"\u25ca",lozenge:"\u25ca",lozf:"\u29eb",lpar:"(",lparlt:"\u2993",lrarr:"\u21c6",lrcorner:"\u231f",lrhar:"\u21cb",lrhard:"\u296d",lrm:"\u200e",lrtri:"\u22bf",lsaquo:"\u2039",lscr:"\ud835\udcc1",lsh:"\u21b0",lsim:"\u2272",lsime:"\u2a8d",lsimg:"\u2a8f",lsqb:"[",lsquo:"\u2018",lsquor:"\u201a",lstrok:"\u0142",lt:"<",ltcc:"\u2aa6",ltcir:"\u2a79",ltdot:"\u22d6",lthree:"\u22cb",ltimes:"\u22c9",ltlarr:"\u2976",ltquest:"\u2a7b",ltrPar:"\u2996",ltri:"\u25c3",ltrie:"\u22b4",ltrif:"\u25c2",lurdshar:"\u294a",luruhar:"\u2966",lvertneqq:"\u2268\ufe00",lvnE:"\u2268\ufe00",mDDot:"\u223a",macr:"\xaf",male:"\u2642",malt:"\u2720",maltese:"\u2720",map:"\u21a6",mapsto:"\u21a6",mapstodown:"\u21a7",mapstoleft:"\u21a4",mapstoup:"\u21a5",marker:"\u25ae",mcomma:"\u2a29",mcy:"\u043c",mdash:"\u2014",measuredangle:"\u2221",mfr:"\ud835\udd2a",mho:"\u2127",micro:"\xb5",mid:"\u2223",midast:"*",midcir:"\u2af0",middot:"\xb7",minus:"\u2212",minusb:"\u229f",minusd:"\u2238",minusdu:"\u2a2a",mlcp:"\u2adb",mldr:"\u2026",mnplus:"\u2213",models:"\u22a7",mopf:"\ud835\udd5e",mp:"\u2213",mscr:"\ud835\udcc2",mstpos:"\u223e",mu:"\u03bc",multimap:"\u22b8",mumap:"\u22b8",nGg:"\u22d9\u0338",nGt:"\u226b\u20d2",nGtv:"\u226b\u0338",nLeftarrow:"\u21cd",nLeftrightarrow:"\u21ce",nLl:"\u22d8\u0338",nLt:"\u226a\u20d2",nLtv:"\u226a\u0338",nRightarrow:"\u21cf",nVDash:"\u22af",nVdash:"\u22ae",nabla:"\u2207",nacute:"\u0144",nang:"\u2220\u20d2",nap:"\u2249",napE:"\u2a70\u0338",napid:"\u224b\u0338",napos:"\u0149",napprox:"\u2249",natur:"\u266e",natural:"\u266e",naturals:"\u2115",nbsp:"\xa0",nbump:"\u224e\u0338",nbumpe:"\u224f\u0338",ncap:"\u2a43",ncaron:"\u0148",ncedil:"\u0146",ncong:"\u2247",ncongdot:"\u2a6d\u0338",ncup:"\u2a42",ncy:"\u043d",ndash:"\u2013",ne:"\u2260",neArr:"\u21d7",nearhk:"\u2924",nearr:"\u2197",nearrow:"\u2197",nedot:"\u2250\u0338",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",nexist:"\u2204",nexists:"\u2204",nfr:"\ud835\udd2b",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2a7e\u0338",nges:"\u2a7e\u0338",ngsim:"\u2275",ngt:"\u226f",ngtr:"\u226f",nhArr:"\u21ce",nharr:"\u21ae",nhpar:"\u2af2",ni:"\u220b",nis:"\u22fc",nisd:"\u22fa",niv:"\u220b",njcy:"\u045a",nlArr:"\u21cd",nlE:"\u2266\u0338",nlarr:"\u219a",nldr:"\u2025",nle:"\u2270",nleftarrow:"\u219a",nleftrightarrow:"\u21ae",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2a7d\u0338",nles:"\u2a7d\u0338",nless:"\u226e",nlsim:"\u2274",nlt:"\u226e",nltri:"\u22ea",nltrie:"\u22ec",nmid:"\u2224",nopf:"\ud835\udd5f",not:"\xac",notin:"\u2209",notinE:"\u22f9\u0338",notindot:"\u22f5\u0338",notinva:"\u2209",notinvb:"\u22f7",notinvc:"\u22f6",notni:"\u220c",notniva:"\u220c",notnivb:"\u22fe",notnivc:"\u22fd",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2afd\u20e5",npart:"\u2202\u0338",npolint:"\u2a14",npr:"\u2280",nprcue:"\u22e0",npre:"\u2aaf\u0338",nprec:"\u2280",npreceq:"\u2aaf\u0338",nrArr:"\u21cf",nrarr:"\u219b",nrarrc:"\u2933\u0338",nrarrw:"\u219d\u0338",nrightarrow:"\u219b",nrtri:"\u22eb",nrtrie:"\u22ed",nsc:"\u2281",nsccue:"\u22e1",nsce:"\u2ab0\u0338",nscr:"\ud835\udcc3",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22e2",nsqsupe:"\u22e3",nsub:"\u2284",nsubE:"\u2ac5\u0338",nsube:"\u2288",nsubset:"\u2282\u20d2",nsubseteq:"\u2288",nsubseteqq:"\u2ac5\u0338",nsucc:"\u2281",nsucceq:"\u2ab0\u0338",nsup:"\u2285",nsupE:"\u2ac6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20d2",nsupseteq:"\u2289",nsupseteqq:"\u2ac6\u0338",ntgl:"\u2279",ntilde:"\xf1",ntlg:"\u2278",ntriangleleft:"\u22ea",ntrianglelefteq:"\u22ec",ntriangleright:"\u22eb",ntrianglerighteq:"\u22ed",nu:"\u03bd",num:"#",numero:"\u2116",numsp:"\u2007",nvDash:"\u22ad",nvHarr:"\u2904",nvap:"\u224d\u20d2",nvdash:"\u22ac",nvge:"\u2265\u20d2",nvgt:">\u20d2",nvinfin:"\u29de",nvlArr:"\u2902",nvle:"\u2264\u20d2",nvlt:"<\u20d2",nvltrie:"\u22b4\u20d2",nvrArr:"\u2903",nvrtrie:"\u22b5\u20d2",nvsim:"\u223c\u20d2",nwArr:"\u21d6",nwarhk:"\u2923",nwarr:"\u2196",nwarrow:"\u2196",nwnear:"\u2927",oS:"\u24c8",oacute:"\xf3",oast:"\u229b",ocir:"\u229a",ocirc:"\xf4",ocy:"\u043e",odash:"\u229d",odblac:"\u0151",odiv:"\u2a38",odot:"\u2299",odsold:"\u29bc",oelig:"\u0153",ofcir:"\u29bf",ofr:"\ud835\udd2c",ogon:"\u02db",ograve:"\xf2",ogt:"\u29c1",ohbar:"\u29b5",ohm:"\u03a9",oint:"\u222e",olarr:"\u21ba",olcir:"\u29be",olcross:"\u29bb",oline:"\u203e",olt:"\u29c0",omacr:"\u014d",omega:"\u03c9",omicron:"\u03bf",omid:"\u29b6",ominus:"\u2296",oopf:"\ud835\udd60",opar:"\u29b7",operp:"\u29b9",oplus:"\u2295",or:"\u2228",orarr:"\u21bb",ord:"\u2a5d",order:"\u2134",orderof:"\u2134",ordf:"\xaa",ordm:"\xba",origof:"\u22b6",oror:"\u2a56",orslope:"\u2a57",orv:"\u2a5b",oscr:"\u2134",oslash:"\xf8",osol:"\u2298",otilde:"\xf5",otimes:"\u2297",otimesas:"\u2a36",ouml:"\xf6",ovbar:"\u233d",par:"\u2225",para:"\xb6",parallel:"\u2225",parsim:"\u2af3",parsl:"\u2afd",part:"\u2202",pcy:"\u043f",percnt:"%",period:".",permil:"\u2030",perp:"\u22a5",pertenk:"\u2031",pfr:"\ud835\udd2d",phi:"\u03c6",phiv:"\u03d5",phmmat:"\u2133",phone:"\u260e",pi:"\u03c0",pitchfork:"\u22d4",piv:"\u03d6",planck:"\u210f",planckh:"\u210e",plankv:"\u210f",plus:"+",plusacir:"\u2a23",plusb:"\u229e",pluscir:"\u2a22",plusdo:"\u2214",plusdu:"\u2a25",pluse:"\u2a72",plusmn:"\xb1",plussim:"\u2a26",plustwo:"\u2a27",pm:"\xb1",pointint:"\u2a15",popf:"\ud835\udd61",pound:"\xa3",pr:"\u227a",prE:"\u2ab3",prap:"\u2ab7",prcue:"\u227c",pre:"\u2aaf",prec:"\u227a",precapprox:"\u2ab7",preccurlyeq:"\u227c",preceq:"\u2aaf",precnapprox:"\u2ab9",precneqq:"\u2ab5",precnsim:"\u22e8",precsim:"\u227e",prime:"\u2032",primes:"\u2119",prnE:"\u2ab5",prnap:"\u2ab9",prnsim:"\u22e8",prod:"\u220f",profalar:"\u232e",profline:"\u2312",profsurf:"\u2313",prop:"\u221d",propto:"\u221d",prsim:"\u227e",prurel:"\u22b0",pscr:"\ud835\udcc5",psi:"\u03c8",puncsp:"\u2008",qfr:"\ud835\udd2e",qint:"\u2a0c",qopf:"\ud835\udd62",qprime:"\u2057",qscr:"\ud835\udcc6",quaternions:"\u210d",quatint:"\u2a16",quest:"?",questeq:"\u225f",quot:'"',rAarr:"\u21db",rArr:"\u21d2",rAtail:"\u291c",rBarr:"\u290f",rHar:"\u2964",race:"\u223d\u0331",racute:"\u0155",radic:"\u221a",raemptyv:"\u29b3",rang:"\u27e9",rangd:"\u2992",range:"\u29a5",rangle:"\u27e9",raquo:"\xbb",rarr:"\u2192",rarrap:"\u2975",rarrb:"\u21e5",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291e",rarrhk:"\u21aa",rarrlp:"\u21ac",rarrpl:"\u2945",rarrsim:"\u2974",rarrtl:"\u21a3",rarrw:"\u219d",ratail:"\u291a",ratio:"\u2236",rationals:"\u211a",rbarr:"\u290d",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298c",rbrksld:"\u298e",rbrkslu:"\u2990",rcaron:"\u0159",rcedil:"\u0157",rceil:"\u2309",rcub:"}",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201d",rdquor:"\u201d",rdsh:"\u21b3",real:"\u211c",realine:"\u211b",realpart:"\u211c",reals:"\u211d",rect:"\u25ad",reg:"\xae",rfisht:"\u297d",rfloor:"\u230b",rfr:"\ud835\udd2f",rhard:"\u21c1",rharu:"\u21c0",rharul:"\u296c",rho:"\u03c1",rhov:"\u03f1",rightarrow:"\u2192",rightarrowtail:"\u21a3",rightharpoondown:"\u21c1",rightharpoonup:"\u21c0",rightleftarrows:"\u21c4",rightleftharpoons:"\u21cc",rightrightarrows:"\u21c9",rightsquigarrow:"\u219d",rightthreetimes:"\u22cc",ring:"\u02da",risingdotseq:"\u2253",rlarr:"\u21c4",rlhar:"\u21cc",rlm:"\u200f",rmoust:"\u23b1",rmoustache:"\u23b1",rnmid:"\u2aee",roang:"\u27ed",roarr:"\u21fe",robrk:"\u27e7",ropar:"\u2986",ropf:"\ud835\udd63",roplus:"\u2a2e",rotimes:"\u2a35",rpar:")",rpargt:"\u2994",rppolint:"\u2a12",rrarr:"\u21c9",rsaquo:"\u203a",rscr:"\ud835\udcc7",rsh:"\u21b1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22cc",rtimes:"\u22ca",rtri:"\u25b9",rtrie:"\u22b5",rtrif:"\u25b8",rtriltri:"\u29ce",ruluhar:"\u2968",rx:"\u211e",sacute:"\u015b",sbquo:"\u201a",sc:"\u227b",scE:"\u2ab4",scap:"\u2ab8",scaron:"\u0161",sccue:"\u227d",sce:"\u2ab0",scedil:"\u015f",scirc:"\u015d",scnE:"\u2ab6",scnap:"\u2aba",scnsim:"\u22e9",scpolint:"\u2a13",scsim:"\u227f",scy:"\u0441",sdot:"\u22c5",sdotb:"\u22a1",sdote:"\u2a66",seArr:"\u21d8",searhk:"\u2925",searr:"\u2198",searrow:"\u2198",sect:"\xa7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",sfr:"\ud835\udd30",sfrown:"\u2322",sharp:"\u266f",shchcy:"\u0449",shcy:"\u0448",shortmid:"\u2223",shortparallel:"\u2225",shy:"\xad",sigma:"\u03c3",sigmaf:"\u03c2",sigmav:"\u03c2",sim:"\u223c",simdot:"\u2a6a",sime:"\u2243",simeq:"\u2243",simg:"\u2a9e",simgE:"\u2aa0",siml:"\u2a9d",simlE:"\u2a9f",simne:"\u2246",simplus:"\u2a24",simrarr:"\u2972",slarr:"\u2190",smallsetminus:"\u2216",smashp:"\u2a33",smeparsl:"\u29e4",smid:"\u2223",smile:"\u2323",smt:"\u2aaa",smte:"\u2aac",smtes:"\u2aac\ufe00",softcy:"\u044c",sol:"/",solb:"\u29c4",solbar:"\u233f",sopf:"\ud835\udd64",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\ufe00",sqcup:"\u2294",sqcups:"\u2294\ufe00",sqsub:"\u228f",sqsube:"\u2291",sqsubset:"\u228f",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",squ:"\u25a1",square:"\u25a1",squarf:"\u25aa",squf:"\u25aa",srarr:"\u2192",sscr:"\ud835\udcc8",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22c6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03f5",straightphi:"\u03d5",strns:"\xaf",sub:"\u2282",subE:"\u2ac5",subdot:"\u2abd",sube:"\u2286",subedot:"\u2ac3",submult:"\u2ac1",subnE:"\u2acb",subne:"\u228a",subplus:"\u2abf",subrarr:"\u2979",subset:"\u2282",subseteq:"\u2286",subseteqq:"\u2ac5",subsetneq:"\u228a",subsetneqq:"\u2acb",subsim:"\u2ac7",subsub:"\u2ad5",subsup:"\u2ad3",succ:"\u227b",succapprox:"\u2ab8",succcurlyeq:"\u227d",succeq:"\u2ab0",succnapprox:"\u2aba",succneqq:"\u2ab6",succnsim:"\u22e9",succsim:"\u227f",sum:"\u2211",sung:"\u266a",sup1:"\xb9",sup2:"\xb2",sup3:"\xb3",sup:"\u2283",supE:"\u2ac6",supdot:"\u2abe",supdsub:"\u2ad8",supe:"\u2287",supedot:"\u2ac4",suphsol:"\u27c9",suphsub:"\u2ad7",suplarr:"\u297b",supmult:"\u2ac2",supnE:"\u2acc",supne:"\u228b",supplus:"\u2ac0",supset:"\u2283",supseteq:"\u2287",supseteqq:"\u2ac6",supsetneq:"\u228b",supsetneqq:"\u2acc",supsim:"\u2ac8",supsub:"\u2ad4",supsup:"\u2ad6",swArr:"\u21d9",swarhk:"\u2926",swarr:"\u2199",swarrow:"\u2199",swnwar:"\u292a",szlig:"\xdf",target:"\u2316",tau:"\u03c4",tbrk:"\u23b4",tcaron:"\u0165",tcedil:"\u0163",tcy:"\u0442",tdot:"\u20db",telrec:"\u2315",tfr:"\ud835\udd31",there4:"\u2234",therefore:"\u2234",theta:"\u03b8",thetasym:"\u03d1",thetav:"\u03d1",thickapprox:"\u2248",thicksim:"\u223c",thinsp:"\u2009",thkap:"\u2248",thksim:"\u223c",thorn:"\xfe",tilde:"\u02dc",times:"\xd7",timesb:"\u22a0",timesbar:"\u2a31",timesd:"\u2a30",tint:"\u222d",toea:"\u2928",top:"\u22a4",topbot:"\u2336",topcir:"\u2af1",topf:"\ud835\udd65",topfork:"\u2ada",tosa:"\u2929",tprime:"\u2034",trade:"\u2122",triangle:"\u25b5",triangledown:"\u25bf",triangleleft:"\u25c3",trianglelefteq:"\u22b4",triangleq:"\u225c",triangleright:"\u25b9",trianglerighteq:"\u22b5",tridot:"\u25ec",trie:"\u225c",triminus:"\u2a3a",triplus:"\u2a39",trisb:"\u29cd",tritime:"\u2a3b",trpezium:"\u23e2",tscr:"\ud835\udcc9",tscy:"\u0446",tshcy:"\u045b",tstrok:"\u0167",twixt:"\u226c",twoheadleftarrow:"\u219e",twoheadrightarrow:"\u21a0",uArr:"\u21d1",uHar:"\u2963",uacute:"\xfa",uarr:"\u2191",ubrcy:"\u045e",ubreve:"\u016d",ucirc:"\xfb",ucy:"\u0443",udarr:"\u21c5",udblac:"\u0171",udhar:"\u296e",ufisht:"\u297e",ufr:"\ud835\udd32",ugrave:"\xf9",uharl:"\u21bf",uharr:"\u21be",uhblk:"\u2580",ulcorn:"\u231c",ulcorner:"\u231c",ulcrop:"\u230f",ultri:"\u25f8",umacr:"\u016b",uml:"\xa8",uogon:"\u0173",uopf:"\ud835\udd66",uparrow:"\u2191",updownarrow:"\u2195",upharpoonleft:"\u21bf",upharpoonright:"\u21be",uplus:"\u228e",upsi:"\u03c5",upsih:"\u03d2",upsilon:"\u03c5",upuparrows:"\u21c8",urcorn:"\u231d",urcorner:"\u231d",urcrop:"\u230e",uring:"\u016f",urtri:"\u25f9",uscr:"\ud835\udcca",utdot:"\u22f0",utilde:"\u0169",utri:"\u25b5",utrif:"\u25b4",uuarr:"\u21c8",uuml:"\xfc",uwangle:"\u29a7",vArr:"\u21d5",vBar:"\u2ae8",vBarv:"\u2ae9",vDash:"\u22a8",vangrt:"\u299c",varepsilon:"\u03f5",varkappa:"\u03f0",varnothing:"\u2205",varphi:"\u03d5",varpi:"\u03d6",varpropto:"\u221d",varr:"\u2195",varrho:"\u03f1",varsigma:"\u03c2",varsubsetneq:"\u228a\ufe00",varsubsetneqq:"\u2acb\ufe00",varsupsetneq:"\u228b\ufe00",varsupsetneqq:"\u2acc\ufe00",vartheta:"\u03d1",vartriangleleft:"\u22b2",vartriangleright:"\u22b3",vcy:"\u0432",vdash:"\u22a2",vee:"\u2228",veebar:"\u22bb",veeeq:"\u225a",vellip:"\u22ee",verbar:"|",vert:"|",vfr:"\ud835\udd33",vltri:"\u22b2",vnsub:"\u2282\u20d2",vnsup:"\u2283\u20d2",vopf:"\ud835\udd67",vprop:"\u221d",vrtri:"\u22b3",vscr:"\ud835\udccb",vsubnE:"\u2acb\ufe00",vsubne:"\u228a\ufe00",vsupnE:"\u2acc\ufe00",vsupne:"\u228b\ufe00",vzigzag:"\u299a",wcirc:"\u0175",wedbar:"\u2a5f",wedge:"\u2227",wedgeq:"\u2259",weierp:"\u2118",wfr:"\ud835\udd34",wopf:"\ud835\udd68",wp:"\u2118",wr:"\u2240",wreath:"\u2240",wscr:"\ud835\udccc",xcap:"\u22c2",xcirc:"\u25ef",xcup:"\u22c3",xdtri:"\u25bd",xfr:"\ud835\udd35",xhArr:"\u27fa",xharr:"\u27f7",xi:"\u03be",xlArr:"\u27f8",xlarr:"\u27f5",xmap:"\u27fc",xnis:"\u22fb",xodot:"\u2a00",xopf:"\ud835\udd69",xoplus:"\u2a01",xotime:"\u2a02",xrArr:"\u27f9",xrarr:"\u27f6",xscr:"\ud835\udccd",xsqcup:"\u2a06",xuplus:"\u2a04",xutri:"\u25b3",xvee:"\u22c1",xwedge:"\u22c0",yacute:"\xfd",yacy:"\u044f",ycirc:"\u0177",ycy:"\u044b",yen:"\xa5",yfr:"\ud835\udd36",yicy:"\u0457",yopf:"\ud835\udd6a",yscr:"\ud835\udcce",yucy:"\u044e",yuml:"\xff",zacute:"\u017a",zcaron:"\u017e",zcy:"\u0437",zdot:"\u017c",zeetrf:"\u2128",zeta:"\u03b6",zfr:"\ud835\udd37",zhcy:"\u0436",zigrarr:"\u21dd",zopf:"\ud835\udd6b",zscr:"\ud835\udccf",zwj:"\u200d",zwnj:"\u200c"},Hj={}.hasOwnProperty;function Fj(e){return!!Hj.call(Rj,e)&&Rj[e]}var Vj=String.fromCharCode,zj=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function Bj(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o="string"===typeof r.additional?r.additional.charCodeAt(0):r.additional,i=[],a=0,s=-1,l="";r.position&&("start"in r.position||"indent"in r.position?(n=r.position.indent,t=r.position.start):t=r.position);var u,c=(t?t.line:0)||1,d=(t?t.column:0)||1,f=N();for(a--;++a<=e.length;)if(10===u&&(d=(n?n[s]:0)||1),38===(u=e.charCodeAt(a))){var p=e.charCodeAt(a+1);if(9===p||10===p||12===p||32===p||38===p||60===p||Number.isNaN(p)||o&&p===o){l+=Vj(u),d++;continue}var h=a+1,m=h,v=h,g=void 0;if(35===p){v=++m;var y=e.charCodeAt(v);88===y||120===y?(g="hexadecimal",v=++m):g="decimal"}else g="named";var b="",w="",k="",x="named"===g?Pj:"decimal"===g?Lj:Nj;for(v--;++v<=e.length;){var O=e.charCodeAt(v);if(!x(O))break;k+=Vj(O),"named"===g&&Mj.includes(k)&&(b=k,w=Fj(k))}var S=59===e.charCodeAt(v);if(S){v++;var C="named"===g&&Fj(k);C&&(b=k,w=C)}var j=1+v-h,D="";if(S||!1!==r.nonTerminated)if(k)if("named"===g){if(S&&!w)P(5,1);else if(b!==k&&(j=1+(v=m+b.length)-m,S=!1),!S){var A=b?1:3;if(r.attribute){var E=e.charCodeAt(v);61===E?(P(A,j),w=""):Pj(E)?w="":P(A,j)}else P(A,j)}D=w}else{S||P(2,j);var M=Number.parseInt(k,"hexadecimal"===g?16:10);if(Ij(M))P(7,j),D=Vj(65533);else if(M in Tj)P(6,j),D=Tj[M];else{var T="";_j(M)&&P(6,j),M>65535&&(T+=Vj((M-=65536)>>>10|55296),M=56320|1023&M),D=T+Vj(M)}}else"named"!==g&&P(4,j);else;if(D){R(),f=N(),a=v-1,d+=v-h+1,i.push(D);var L=N();L.offset++,r.reference&&r.reference.call(r.referenceContext,D,{start:f,end:L},e.slice(h-1,v)),f=L}else k=e.slice(h-1,v),l+=k,d+=k.length,a=v-1}else 10===u&&(c++,s++,d=0),Number.isNaN(u)?R():(l+=Vj(u),d++);return i.join("");function N(){return{line:c,column:d,offset:a+((t?t.offset:0)||0)}}function P(e,t){var n;r.warning&&((n=N()).column+=t,n.offset+=t,r.warning.call(r.warningContext,zj[e],n,e))}function R(){l&&(i.push(l),r.text&&r.text.call(r.textContext,l,{start:f,end:N()}),l="")}}function Ij(e){return e>=55296&&e<=57343||e>1114111}function _j(e){return e>=1&&e<=8||11===e||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||65535===(65535&e)||65534===(65535&e)}var $j=0,qj={},Wj={util:{type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++$j}),e.__id},clone:function e(t,n){var r,o;switch(n=n||{},Wj.util.type(t)){case"Object":if(o=Wj.util.objId(t),n[o])return n[o];for(var i in r={},n[o]=r,t)t.hasOwnProperty(i)&&(r[i]=e(t[i],n));return r;case"Array":return o=Wj.util.objId(t),n[o]?n[o]:(r=[],n[o]=r,t.forEach((function(t,o){r[o]=e(t,n)})),r);default:return t}}},languages:{plain:qj,plaintext:qj,text:qj,txt:qj,extend:function(e,t){var n=Wj.util.clone(Wj.languages[e]);for(var r in t)n[r]=t[r];return n},insertBefore:function(e,t,n,r){var o=(r=r||Wj.languages)[e],i={};for(var a in o)if(o.hasOwnProperty(a)){if(a==t)for(var s in n)n.hasOwnProperty(s)&&(i[s]=n[s]);n.hasOwnProperty(a)||(i[a]=o[a])}var l=r[e];return r[e]=i,Wj.languages.DFS(Wj.languages,(function(t,n){n===l&&t!=e&&(this[t]=i)})),i},DFS:function e(t,n,r,o){o=o||{};var i=Wj.util.objId;for(var a in t)if(t.hasOwnProperty(a)){n.call(t,a,t[a],r||a);var s=t[a],l=Wj.util.type(s);"Object"!==l||o[i(s)]?"Array"!==l||o[i(s)]||(o[i(s)]=!0,e(s,n,a,o)):(o[i(s)]=!0,e(s,n,null,o))}}},plugins:{},highlight:function(e,t,n){var r={code:e,grammar:t,language:n};if(Wj.hooks.run("before-tokenize",r),!r.grammar)throw new Error('The language "'+r.language+'" has no grammar.');return r.tokens=Wj.tokenize(r.code,r.grammar),Wj.hooks.run("after-tokenize",r),Uj.stringify(Wj.util.encode(r.tokens),r.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var o=new Jj;return Yj(o,o.head,e),Gj(e,o,t,o.head,0),function(e){var t=[],n=e.head.next;for(;n!==e.tail;)t.push(n.value),n=n.next;return t}(o)},hooks:{all:{},add:function(e,t){var n=Wj.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=Wj.hooks.all[e];if(n&&n.length)for(var r,o=0;r=n[o++];)r(t)}},Token:Uj};function Uj(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length}function Kj(e,t,n,r){e.lastIndex=t;var o=e.exec(n);if(o&&r&&o[1]){var i=o[1].length;o.index+=i,o[0]=o[0].slice(i)}return o}function Gj(e,t,n,r,o,i){for(var a in n)if(n.hasOwnProperty(a)&&n[a]){var s=n[a];s=Array.isArray(s)?s:[s];for(var l=0;l<s.length;++l){if(i&&i.cause==a+","+l)return;var u=s[l],c=u.inside,d=!!u.lookbehind,f=!!u.greedy,p=u.alias;if(f&&!u.pattern.global){var h=u.pattern.toString().match(/[imsuy]*$/)[0];u.pattern=RegExp(u.pattern.source,h+"g")}for(var m=u.pattern||u,v=r.next,g=o;v!==t.tail&&!(i&&g>=i.reach);g+=v.value.length,v=v.next){var y=v.value;if(t.length>e.length)return;if(!(y instanceof Uj)){var b,w=1;if(f){if(!(b=Kj(m,g,e,d))||b.index>=e.length)break;var k=b.index,x=b.index+b[0].length,O=g;for(O+=v.value.length;k>=O;)O+=(v=v.next).value.length;if(g=O-=v.value.length,v.value instanceof Uj)continue;for(var S=v;S!==t.tail&&(O<x||"string"===typeof S.value);S=S.next)w++,O+=S.value.length;w--,y=e.slice(g,O),b.index-=g}else if(!(b=Kj(m,0,y,d)))continue;k=b.index;var C=b[0],j=y.slice(0,k),D=y.slice(k+C.length),A=g+y.length;i&&A>i.reach&&(i.reach=A);var E=v.prev;if(j&&(E=Yj(t,E,j),g+=j.length),Zj(t,E,w),v=Yj(t,E,new Uj(a,c?Wj.tokenize(C,c):C,p,C)),D&&Yj(t,v,D),w>1){var M={cause:a+","+l,reach:A};Gj(e,t,n,v.prev,g,M),i&&M.reach>i.reach&&(i.reach=M.reach)}}}}}}function Jj(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function Yj(e,t,n){var r=t.next,o={value:n,prev:t,next:r};return t.next=o,r.prev=o,e.length++,o}function Zj(e,t,n){for(var r=t.next,o=0;o<n&&r!==e.tail;o++)r=r.next;t.next=r,r.prev=t,e.length-=o}var Xj=Wj,Qj={}.hasOwnProperty;function eD(){}eD.prototype=Xj;var tD=new eD;tD.highlight=function(e,t){if("string"!==typeof e)throw new TypeError("Expected `string` for `value`, got `"+e+"`");var n,r;if(t&&"object"===typeof t)n=t;else{if("string"!==typeof(r=t))throw new TypeError("Expected `string` for `name`, got `"+r+"`");if(!Qj.call(tD.languages,r))throw new Error("Unknown language: `"+r+"` is not registered");n=tD.languages[r]}return{type:"root",children:Xj.highlight.call(tD,e,n,r)}},tD.register=function(e){if("function"!==typeof e||!e.displayName)throw new Error("Expected `function` for `syntax`, got `"+e+"`");Qj.call(tD.languages,e.displayName)||e(tD)},tD.alias=function(e,t){var n,r=tD.languages,o={};"string"===typeof e?t&&(o[e]=t):o=e;for(n in o)if(Qj.call(o,n))for(var i=o[n],a="string"===typeof i?[i]:i,s=-1;++s<a.length;)r[a[s]]=r[n]},tD.registered=function(e){if("string"!==typeof e)throw new TypeError("Expected `string` for `aliasOrLanguage`, got `"+e+"`");return Qj.call(tD.languages,e)},tD.listLanguages=function(){var e,t=tD.languages,n=[];for(e in t)Qj.call(t,e)&&"object"===typeof t[e]&&n.push(e);return n},tD.util.encode=function(e){return e},tD.Token.stringify=function e(t,n){if("string"===typeof t)return{type:"text",value:t};if(Array.isArray(t)){for(var r=[],i=-1;++i<t.length;)""!==t[i]&&null!==t[i]&&void 0!==t[i]&&r.push(e(t[i],n));return r}var a,s={type:t.type,content:e(t.content,n),tag:"span",classes:["token",t.type],attributes:{},language:n};t.alias&&(a=s.classes).push.apply(a,Object(o.a)("string"===typeof t.alias?[t.alias]:t.alias));return tD.hooks.run("wrap",s),Ej(s.tag+"."+s.classes.join("."),function(e){var t;for(t in e)Qj.call(e,t)&&(e[t]=Bj(e[t]));return e}(s.attributes),s.content)};var nD=n(39),rD=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(t){i(t)}}function s(e){try{l(r.throw(e))}catch(t){i(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};function oD(e){var t=e.editor,n=e.updateAttributes,r=e.node,o=e.forwardRef,a=null===r||void 0===r?void 0:r.attrs,s=a.language,l=a.indentLength,u=a.indentType,c=a.caretPosition,d=Object(jd.useState)(!1),f=Object(i.a)(d,2),p=f[0],h=f[1],m=Object(jd.useRef)(null),v=nD.find((function(e){var t;return e.filename===s||(null===(t=e.alias)||void 0===t?void 0:t.some((function(e){return e===s})))}));return Object(jd.useEffect)((function(){!function(){rD(this,void 0,void 0,tk().mark((function e(){var t,r;return tk().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s&&v&&!VC[s]){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,zC(v.filename);case 4:if(t=e.sent){e.next=7;break}return e.abrupt("return");case 7:tD.register(t),r=s===v.filename,n({language:v.filename},{preventUpdate:r,addToHistory:!1});case 10:case"end":return e.stop()}}),e)})))}()}),[s]),Object(Cd.jsxs)(Cd.Fragment,{children:[Object(Cd.jsxs)(rf.Flex,Object.assign({sx:{flexDirection:"column",borderRadius:"default",overflow:"hidden"}},{children:[Object(Cd.jsx)(af,{ref:o,as:"pre",autoCorrect:"off",autoCapitalize:"none",sx:{"div, span.token, span.line-number-widget, span.line-number::before":{fontFamily:"monospace",fontSize:"code",whiteSpace:"pre !important",tabSize:1},position:"relative",lineHeight:"20px",bg:"codeBg",color:"static",overflowX:"auto",display:"flex",px:2,pt:2,pb:1},spellCheck:!1}),Object(Cd.jsxs)(rf.Flex,Object.assign({ref:m,contentEditable:!1,sx:{bg:"codeBg",alignItems:"center",justifyContent:"flex-end",borderTop:"1px solid var(--codeBorder)"}},{children:[c?Object(Cd.jsxs)(af,Object.assign({variant:"subBody",sx:{mr:2,color:"codeFg"}},{children:["Line ",c.line,", Column ",c.column," ",c.selected?"(".concat(c.selected," selected)"):""]})):null,Object(Cd.jsx)(vf,Object.assign({variant:"icon",sx:{p:1,mr:1,opacity:"1 !important",":hover":{bg:"codeSelection"}},title:"Toggle indentation mode",disabled:!t.isEditable,onClick:function(){t.isEditable&&t.commands.changeCodeBlockIndentation({type:"space"===u?"tab":"space",amount:l})}},{children:Object(Cd.jsxs)(af,Object.assign({variant:"subBody",sx:{color:"codeFg"}},{children:["space"===u?"Spaces":"Tabs",": ",l]}))})),Object(Cd.jsx)(vf,Object.assign({variant:"icon",sx:{opacity:"1 !important",p:1,mr:1,bg:p?"codeSelection":"transparent",":hover":{bg:"codeSelection"}},disabled:!t.isEditable,onClick:function(){t.isEditable&&h(!0)},title:"Change language"},{children:Object(Cd.jsx)(af,Object.assign({variant:"subBody",spellCheck:!1,sx:{color:"codeFg"}},{children:(null===v||void 0===v?void 0:v.title)||"Plaintext"}))}))]}))]})),Object(Cd.jsx)(ow,Object.assign({isOpen:p,onClose:function(){h(!1),t.commands.focus()},focusOnRender:!1,mobile:"sheet",desktop:"menu",position:{target:m.current||void 0,align:"end",isTargetAbsolute:!0,location:"top",yOffset:5},title:"Change code block language"},{children:Object(Cd.jsx)(iD,{selectedLanguage:(null===v||void 0===v?void 0:v.filename)||"Plaintext",onLanguageSelected:function(e){n({language:e},{addToHistory:!0,preventUpdate:!1}),h(!1)},onClose:function(){return h(!1)}})}))]})}function iD(e){var t=e.onLanguageSelected,n=e.selectedLanguage,r=e.onClose,o=Object(jd.useState)(nD),a=Object(i.a)(o,2),s=a[0],l=a[1];return Object(Cd.jsx)(iw,Object.assign({title:"Select language",onClose:r},{children:Object(Cd.jsxs)(rf.Flex,Object.assign({sx:{flexDirection:"column",height:200,width:["auto",300],overflowY:"auto",bg:"background"}},{children:[Object(Cd.jsx)(Ow,{onFocus:function(){console.log("EHLLO!")},autoFocus:!0,placeholder:"Search languages",sx:{width:"auto",position:"sticky",top:0,bg:"background",mx:2,p:"7px",zIndex:999},onChange:function(e){if(!e.target.value)return l(nD);var t=e.target.value.toLowerCase();l(nD.filter((function(e){var n;return e.title.toLowerCase().indexOf(t)>-1||(null===(n=e.alias)||void 0===n?void 0:n.some((function(e){return e.toLowerCase().indexOf(t)>-1})))})))}}),Object(Cd.jsx)(rf.Flex,Object.assign({sx:{flexDirection:"column",pt:1,mt:1}},{children:s.map((function(e){return Object(Cd.jsxs)(vf,Object.assign({variant:"menuitem",sx:{textAlign:"left",py:1,display:"flex",justifyContent:"space-between",alignItems:"center"},onClick:function(){return t(e.filename)}},{children:[Object(Cd.jsx)(af,Object.assign({variant:"body"},{children:e.title})),n===e.filename?Object(Cd.jsx)(pf,{path:hf.check,size:"small"}):e.alias?Object(Cd.jsx)(af,Object.assign({variant:"subBody",sx:{fontSize:"10px"}},{children:e.alias.slice(0,3).join(", ")})):null]}),e.title)}))}))]}))}))}function aD(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e.reduce((function(e,n){if("comment"===n.type||"doctype"===n.type)return e;var r=Object(o.a)(t);return"element"===n.type&&n.properties&&r.push.apply(r,Object(o.a)(n.properties.className)),"element"===n.type?e.push.apply(e,Object(o.a)(aD(n.children,r))):e.push({classes:r,text:n.value}),e}),[])}function sD(e){var t=e.block,n=e.defaultLanguage,r=[],o=tD.listLanguages(),i=t.node,a=t.pos,s=i.textContent,l=i.attrs.language||n,u=o.includes(l)?tD.highlight(s,l).children||[]:null;if(u){var c=a+1;return aD(u).forEach((function(e){var t=c+e.text.length;if(e.classes.length){var n=zu.inline(c,t,{class:e.classes.join(" ")});r.push(n)}c=t})),r}}function lD(e){var t=e.name,n=e.defaultLanguage,r=new p.PluginKey("highlighter");return new p.Plugin({key:r,state:{init:function(e,r){var i=[];return To(r.doc,(function(e){return e.type.name===t})).forEach((function(e){i.push.apply(i,Object(o.a)(sD({block:e,defaultLanguage:n})||[]))})),_u.create(r.doc,i)},apply:function(e,r,o,i){var a=o.selection.$head.parent.type.name,s=i.selection.$head.parent.type.name,l=a===t||s===t;if(e.docChanged&&l){var u=ho(i.selection.$head,(function(e){return e.type.name===t}));if(!u)return r.map(e.mapping,e.doc);var c=sD({block:u,defaultLanguage:n});return c?r.map(e.mapping,e.doc).add(e.doc,c):r.map(e.mapping,e.doc)}return r.map(e.mapping,e.doc)}},props:{decorations:function(e){return r.getState(e)}},appendTransaction:function(e,n,r){var o,i=n.selection.$head.parent.type.name,a=r.selection.$head.parent.type.name,s=e.some((function(e){return e.docChanged})),l=(i===t||a===t)&&!n.selection.eq(r.selection);if(s||l){var u=ho(r.selection.$head,(function(e){return e.type.name===t}));if(!u)return null;var c=r.tr,d=u.node,f=u.pos,p=Object.assign({},d.attrs);if(s||!(null===(o=p.lines)||void 0===o?void 0:o.length)){var h=xD(d.textContent,f);p.lines=h.slice()}if(s){var m=function(e,t){var n=e.$from,r=e.$to,o=e.$head;if(n.parent.type.name!==kD.name)return;t=t||function(e){return e.attrs.lines||[]}(n.parent);var i,a=Object(Sd.a)(t);try{for(a.s();!(i=a.n()).done;){var s=i.value;if(o.pos>=s.from&&o.pos<=s.to){var l=s.length+1;return{line:s.index+1,column:l-(s.to-o.pos),selected:r.pos-n.pos,total:t.length,from:s.from}}}}catch(u){a.e(u)}finally{a.f()}return}(r.selection,s?xD(d.textContent,f):void 0);p.caretPosition=m}return(s||l)&&c.setNodeMarkup(f,d.type,p),c}}})}var uD=/^(?:( )+|\t+)/,cD="space";function dD(e,t){var n,r,o,i=new Map,a=0,s=Object(Sd.a)(e.split(/\n/g));try{for(s.s();!(o=s.n()).done;){var l=o.value;if(l){var u=void 0,c=void 0,d=void 0,f=void 0,p=l.match(uD);if(null===p)a=0,n="";else{if(u=p[0].length,c=p[1]?cD:"tab",t&&c===cD&&1===u)continue;c!==n&&(a=0),n=c,d=0;var h=u-a;if(a=u,0===h)d++;else r=fD(c,h>0?h:-h);f=void 0===(f=i.get(r))?[1,0]:[++f[0],f[1]+d],i.set(r,f)}}}}catch(m){s.e(m)}finally{s.f()}return i}function fD(e,t){return(e===cD?"s":"t")+String(t)}function pD(e){if("string"!==typeof e)throw new TypeError("Expected a string");var t=dD(e,!0);0===t.size&&(t=dD(e,!1));var n,r,o=function(e){var t,n,r=0,o=0,a=Object(Sd.a)(e);try{for(a.s();!(n=a.n()).done;){var s=Object(i.a)(n.value,2),l=s[0],u=Object(i.a)(s[1],2),c=u[0],d=u[1];(c>r||c===r&&d>o)&&(r=c,o=d,t=l)}}catch(f){a.e(f)}finally{a.f()}return t}(t),a=0,s="";if(void 0!==o){var l={type:"s"===(r=o)[0]?cD:"tab",amount:Number(r.slice(1))};s=function(e,t){return(e===cD?" ":"\t").repeat(t)}(n=l.type,a=l.amount)}return{amount:a,type:n,indent:s}}var hD=n(60),mD=n.n(hD);function vD(e){var t=mD()(e);if(0===t)return e;var n=new RegExp("^[ \\t]{".concat(t,"}"),"gm");return e.replace(n,"")}function gD(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.indent,o=void 0===r?" ":r,i=n.includeEmptyLines,a=void 0!==i&&i;if("string"!==typeof e)throw new TypeError("Expected `input` to be a `string`, got `".concat(typeof e,"`"));if("number"!==typeof t)throw new TypeError("Expected `count` to be a `number`, got `".concat(typeof t,"`"));if(t<0)throw new RangeError("Expected `count` to be at least 0, got `".concat(t,"`"));if("string"!==typeof o)throw new TypeError("Expected `options.indent` to be a `string`, got `".concat(typeof o,"`"));if(0===t)return e;var s=a?/^/gm:/^(?!\s*$)/gm;return e.replace(s,o.repeat(t))}function yD(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return gD(vD(e),t,n)}var bD=/^```([a-z]+)?[\s\n]$/,wD=/^~~~([a-z]+)?[\s\n]$/,kD=Bo.create({name:"codeblock",addOptions:function(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,exitOnArrowUp:!0,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes:function(){var e=this;return{caretPosition:{default:void 0,rendered:!1},lines:{default:[],rendered:!1},indentType:{default:"space",parseHTML:function(e){return e.dataset.indentType},renderHTML:function(e){return e.indentType?{"data-indent-type":e.indentType}:{}}},indentLength:{default:2,parseHTML:function(e){return e.dataset.indentLength},renderHTML:function(e){return e.indentLength?{"data-indent-length":e.indentLength}:{}}},language:{default:null,parseHTML:function(t){var n,r=e.options.languageClassPrefix,i=[].concat(Object(o.a)(t.classList||[]),Object(o.a)((null===(n=null===t||void 0===t?void 0:t.firstElementChild)||void 0===n?void 0:n.classList)||[])).filter((function(e){return e.startsWith(r)})).map((function(e){return e.replace(r,"")}))[0];return i||null},renderHTML:function(e){return e.language?{class:"language-".concat(e.language)}:{}}}}},parseHTML:function(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML:function(e){var t=e.HTMLAttributes;return["pre",Sr(this.options.HTMLAttributes,t),["code",{},0]]},addCommands:function(){var e=this;return{setCodeBlock:function(t){return function(n){return n.commands.setNode(e.name,t)}},toggleCodeBlock:function(t){return function(n){var r=n.commands;return console.log("TOGGLING!"),r.toggleNode(e.name,"paragraph",t)}},changeCodeBlockIndentation:function(t){return function(n){var r=n.editor,o=n.tr,i=n.commands,a=r.state.selection.$from;if(a.parent.type!==e.type)return!1;var s,l=a.parent.attrs.lines,u=Object(Sd.a)(l);try{for(u.s();!(s=u.n()).done;){var c=s.value,d=c.text(),f=d.length-d.trimStart().length;if(f){var p=f,h=jD({type:t.type,amount:p});o.insertText(h,o.mapping.map(c.from),o.mapping.map(c.from+f))}}}catch(m){u.e(m)}finally{u.f()}return i.updateAttributes(e.type,{indentType:t.type,indentLength:t.amount}),!0}}}},addKeyboardShortcuts:function(){var e=this;return{"Mod-Alt-c":function(){return e.editor.commands.toggleCodeBlock()},"Mod-a":function(t){var n=t.editor,r=e.editor.state.selection.$anchor;if(r.parent.type.name!==e.name)return!1;var o=ho(r,(function(t){return t.type.name===e.type.name}));return!!o&&n.commands.setTextSelection({from:o.pos+1,to:o.pos+o.node.nodeSize-1})},Backspace:function(t){var n=t.editor,r=n.state.selection,o=r.empty,i=r.$anchor,a=i.parent,s=n.state.doc.nodeAt(i.pos+1),l=function(t){return t&&t.type.name===e.name},u=1===i.pos;return!!o&&(u||l(a)&&!a.textContent.length?e.editor.commands.deleteNode(e.type):!(!s||!l(s)||s.textContent.length)&&e.editor.commands.command((function(e){return e.tr.delete(i.pos+1,i.pos+1+s.nodeSize),!0})))},Enter:function(t){var n=t.editor,r=n.state.selection,o=r.$from;if(!r.empty||o.parent.type!==e.type)return!1;var i=SD(o.parent);return e.options.exitOnTripleEnter&&function(e,t){var n=t.parentOffset===t.parent.nodeSize-2,r=t.parent.textContent.endsWith("\n\n");if(!n||!r)return!1;return e.chain().command((function(e){return e.tr.delete(t.pos-2,t.pos),!0})).exitCode().run()}(n,o)||function(e,t,n){var r=function(e,t){var n=function(e,t){return e.find((function(e){return t>=e.from&&t<=e.to}))}(e.parent.attrs.lines,e.pos);if(!n)return!1;var r=n.text(),o=r.length-r.trimStart().length;return{newline:"\n",indentation:jD({amount:o,type:t.type})}}(t,n)||{},o=r.indentation,i=r.newline;return!!i&&e.chain().insertContent("".concat(i).concat(o),{parseOptions:{preserveWhitespace:"full"}}).focus().run()}(n,o,i)},ArrowUp:function(t){var n=t.editor;if(!e.options.exitOnArrowUp)return!1;var r=n.state.selection,o=r.$anchor;return!(!r.empty||o.parent.type!==e.type)&&(!(1!==o.pos)&&n.commands.insertContentAt(0,"<p></p>"))},ArrowDown:function(t){var n=t.editor;if(!e.options.exitOnArrowDown)return!1;var r=n.state,o=r.selection,i=r.doc,a=o.$from;if(!o.empty||a.parent.type!==e.type)return!1;if(!(a.parentOffset===a.parent.nodeSize-2))return!1;var s=a.after();return void 0!==s&&(i.nodeAt(s)?(n.commands.setNodeSelection(a.before()),!1):n.commands.exitCode())},"Shift-Tab":function(t){var n=t.editor,r=n.state.selection,o=r.$from;if(o.parent.type!==e.type)return!1;var i=SD(o.parent),a=jD(i),s=OD(o.parent.attrs.lines,r);return n.chain().command((function(e){return DD(e.tr,(function(e){var t,n=Object(Sd.a)(s);try{for(n.s();!(t=n.n()).done;){var r=t.value;r.text(a.length)===a&&e.delete(e.mapping.map(r.from),e.mapping.map(r.from+i.amount))}}catch(o){n.e(o)}finally{n.f()}}))})).run()},Tab:function(t){var n=t.editor,r=n.state.selection,o=r.$from;if(o.parent.type!==e.type)return!1;var i=OD(o.parent.attrs.lines,r);return n.chain().command((function(e){return DD(e.tr,(function(e){var t=jD(SD(o.parent));if(1===i.length)return e.insertText(t,o.pos);var n,r=Object(Sd.a)(i);try{for(r.s();!(n=r.n()).done;){var a=n.value;e.insertText(t,e.mapping.map(a.from))}}catch(s){r.e(s)}finally{r.f()}}))})).run()}}},addInputRules:function(){return[Fo({find:bD,type:this.type,getAttributes:function(e){return{language:e[1]}}}),Fo({find:wD,type:this.type,getAttributes:function(e){return{language:e[1]}}})]},addProseMirrorPlugins:function(){var e=this;return[new p.Plugin({key:new p.PluginKey("codeBlockVSCodeHandler"),props:{handlePaste:function(t,n){if(!n.clipboardData)return!1;var r=n.clipboardData.getData("text/plain"),o=n.clipboardData.getData("vscode-editor-data"),i=o?JSON.parse(o):void 0,a=null===i||void 0===i?void 0:i.mode;if(!r||!a)return!1;var s=function(e,t){var n=t||pD(e),r=n.amount,o=n.type,i=void 0===o?"space":o;return{code:vD(yD(e,r,{includeEmptyLines:!1,indent:"space"===i?" ":"\t"})),amount:r,type:i}}(r,SD(t.state.selection.$from.parent)),l=t.state.tr;return e.editor.isActive(e.type.name)||l.replaceSelectionWith(e.type.create({language:a,indentType:s.type,indentLength:s.amount})),l.insertText(s.code.replace(/\r\n?/g,"\n")),l.setMeta("paste",!0),t.dispatch(l),!0}}}),lD({name:this.name,defaultLanguage:"txt"})]},addNodeView:function(){return _d(oD,{contentDOMFactory:function(){var e=document.createElement("div");return e.classList.add("node-content-wrapper"),e.style.whiteSpace="inherit",e.style.minWidth="20px",{dom:e}},shouldUpdate:function(e,t){var n=e.attrs,r=t.attrs;return function(e,t){return void 0===t||(null===e||void 0===e?void 0:e.column)!==(null===t||void 0===t?void 0:t.column)||(null===e||void 0===e?void 0:e.line)!==(null===t||void 0===t?void 0:t.line)}(n.caretPosition,r.caretPosition)||n.language!==r.language||n.indentType!==r.indentType}})}});function xD(e,t){for(var n=[],r=0,o=t+1,i=0,a=function(){var t=e.indexOf("\n",r);t<=-1&&(t=e.length);var a=t-r,s=o+a,l=r;n.push({index:i,length:a,from:o,to:s,text:function(t){return e.slice(l,t?l+t:l+a)}}),o=s+1,r=t+1,++i};r<=e.length;)a();return n}function OD(e,t){var n=t.$from,r=t.$to;return e.filter((function(e){return CD(e.from,n.pos,r.pos)||CD(e.to,n.pos,r.pos)||CD(n.pos,e.from,e.to)}))}function SD(e){if(e.type.name===kD.name){var t=e.attrs,n=t.indentType,r=t.indentLength;return{type:n,amount:parseInt(r)}}}function CD(e,t,n){return e>=t&&e<=n}function jD(e){return("space"===e.type?" ":"\t").repeat(e.amount)}function DD(e,t){var n=e.selection,r=n.$anchor,o=n.$head;return t(e),e.setSelection(new p.TextSelection(e.doc.resolve(e.mapping.map(r.pos)),e.doc.resolve(e.mapping.map(o.pos)))),!0}var AD=Qc.extend({addKeyboardShortcuts:function(){var e,t=this;return Object.assign(Object.assign({},null===(e=this.parent)||void 0===e?void 0:e.call(this)),{Tab:function(e){var n,r;return"codeblock"!==e.editor.state.selection.$from.parent.type.name&&((null===(r=null===(n=t.parent)||void 0===n?void 0:n.call(t))||void 0===r?void 0:r.Tab(e))||!1)},Backspace:function(e){return wC(e.editor,t.name,t.type)}})}});function ED(e){var t,n,r=e.editor,o=e.node,i=e.getPos,a=e.forwardRef,s=Fd(),l=(null===(t=o.lastChild)||void 0===t?void 0:t.type.name)===RD.name,u=l&&(null===(n=o.lastChild)||void 0===n?void 0:n.attrs.collapsed);return Object(Cd.jsxs)(rf.Flex,{children:[Object(Cd.jsxs)(rf.Flex,Object.assign({className:"outline",sx:{flexDirection:"column",alignItems:"center",mt:s?"0px":"3px"}},{children:[l?Object(Cd.jsx)(pf,{path:u?hf.chevronRight:hf.chevronDown,title:u?"Click to uncollapse list":"Click to collapse list",sx:{cursor:"pointer",transition:"all .2s ease-in-out",":hover":{transform:["unset","scale(1.3)"]},":active":{transform:["scale(1.3)","unset"]},".icon:hover path":{fill:"var(--checked) !important"}},size:s?24:18,onMouseDown:function(e){return e.preventDefault()},onTouchEnd:function(e){e.preventDefault(),MD(r,o,u,i())},onClick:function(){MD(r,o,u,i())}}):Object(Cd.jsx)(pf,{path:hf.circle,size:s?24:18,sx:{transform:"scale(0.4)"}}),l&&!u&&Object(Cd.jsx)(rf.Box,{sx:{flex:1,width:1,mt:2,backgroundColor:"border",borderRadius:50,flexShrink:0,cursor:"pointer",transition:"all .2s ease-in-out",":hover":{backgroundColor:"fontTertiary",width:4}},contentEditable:!1})]})),Object(Cd.jsx)(af,{ref:a,sx:{pl:1,listStyleType:"none",flex:1}})]})}function MD(e,t,n,r){var o,a=To(t,(function(e){return e.type.name===RD.name})),s=Object(i.a)(a,1)[0];if(s){var l=s.pos;null===(o=e.current)||void 0===o||o.commands.toggleOutlineCollapse(l+r+1,!n)}}var TD=Bo.create({name:"outlineListItem",addOptions:function(){return{HTMLAttributes:{}}},content:"heading* paragraph block*",defining:!0,parseHTML:function(){return[{tag:'li[data-type="'.concat(this.name,'"]')}]},renderHTML:function(e){var t=e.HTMLAttributes;return["li",Sr(this.options.HTMLAttributes,t,{"data-type":this.name}),0]},addKeyboardShortcuts:function(){var e=this;return{"Mod-Space":function(t){var n=function(e,t){var n,r,o=e.state.selection.$from,a=Object(bC.findParentNodeOfTypeClosestToPos)(o,t);if(!a)return!1;var s=To(a.node,(function(e){return e.type.name===RD.name})),l=Object(i.a)(s,1)[0];if(!l)return!1;var u=(null===(n=null===l||void 0===l?void 0:l.node)||void 0===n?void 0:n.type.name)===RD.name,c=null===(r=null===l||void 0===l?void 0:l.node)||void 0===r?void 0:r.attrs.collapsed,d=a.pos+l.pos+1;return{isCollapsed:c,isNested:u,subListPos:d}}(t.editor,e.type);if(!n)return!1;var r=n.isCollapsed,o=n.subListPos;return e.editor.commands.toggleOutlineCollapse(o,!r)},Enter:function(t){t.editor;return e.editor.commands.splitListItem(e.name)},Tab:function(){return e.editor.commands.sinkListItem(e.name)},"Shift-Tab":function(){return e.editor.commands.liftListItem(e.name)},Backspace:function(t){return wC(t.editor,e.name,e.type)}}},addCommands:function(){return{toggleOutlineCollapse:function(e,t){return function(n){return n.tr.setNodeMarkup(e,void 0,{collapsed:t}),!0}}}},addNodeView:function(){return _d(ED,{contentDOMFactory:!0,wrapperFactory:function(){return document.createElement("li")}})}});function LD(e){var t=e.editor,n=e.getPos,r=e.node,o=(e.updateAttributes,e.forwardRef),i=r.attrs.collapsed,a=Object(jd.useMemo)((function(){var e;return(null===(e=t.state.doc.resolve(n()).parent)||void 0===e?void 0:e.type.name)===TD.name}),[]);return Object(Cd.jsx)(Cd.Fragment,{children:Object(Cd.jsx)(af,{className:"outline-list",as:"div",ref:o,sx:{ul:{display:i?"none":"block",paddingInlineStart:0,paddingLeft:0,marginBlockStart:a?5:0,marginBlockEnd:0},li:{listStyleType:"none"}}})})}var ND=/^\s*(-o)\s$/,PD="outlineListItem",RD=Bo.create({name:"outlineList",addOptions:function(){return{HTMLAttributes:{}}},addAttributes:function(){return{collapsed:{default:!1,keepOnSplit:!1,parseHTML:function(e){return"true"===e.dataset.collapsed},renderHTML:function(e){return{"data-collapsed":!0===e.collapsed}}}}},group:"block list",content:"".concat(PD,"+"),parseHTML:function(){return[{tag:'ul[data-type="'.concat(this.name,'"]'),priority:52}]},renderHTML:function(e){var t=e.HTMLAttributes;return["ul",Sr(this.options.HTMLAttributes,t,{"data-type":this.name}),0]},addCommands:function(){var e=this;return{toggleOutlineList:function(){return function(t){return t.commands.toggleList(e.name,PD)}}}},addKeyboardShortcuts:function(){var e=this;return{"Mod-Shift-O":function(){return e.editor.commands.toggleOutlineList()}}},addInputRules:function(){return[Vo({find:ND,type:this.type})]},addNodeView:function(){var e=this;return _d(LD,{contentDOMFactory:function(){var t=document.createElement("ul");return t.classList.add("".concat(e.name.toLowerCase(),"-content-wrapper")),t.style.whiteSpace="inherit",{dom:t}}})}});function HD(e,t,n,r,o,i){for(var a=0,s=!0,l=t.firstChild,u=e.firstChild,c=0,d=0;c<u.childCount;c+=1)for(var f=u.child(c).attrs,p=f.colspan,h=f.colwidth,m=0;m<p;m+=1,d+=1){var v=o===d?i:h&&h[m],g=v?"".concat(v,"px"):"";a+=v||r,v||(s=!1),l?(l.style.width!==g&&(l.style.width=g),l=l.nextSibling):t.appendChild(document.createElement("col")).style.width=g}for(;l;){var y=l.nextSibling;l.parentNode.removeChild(l),l=y}s?(n.style.width="".concat(a,"px"),n.style.minWidth=""):(n.style.width="",n.style.minWidth="".concat(a,"px"))}var FD=function(){function e(t,n){Object(c.a)(this,e),this.node=t,this.cellMinWidth=n,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),HD(t,this.colgroup,this.table,n),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}return Object(d.a)(e,[{key:"update",value:function(e){return e.type===this.node.type&&(this.node=e,HD(e,this.colgroup,this.table,this.cellMinWidth),!0)}},{key:"ignoreMutation",value:function(e){return"attributes"===e.type&&(e.target===this.table||this.colgroup.contains(e.target))}}]),e}();function VD(e,t){return t?e.createChecked(null,t):e.createAndFill()}function zD(e,t,n,r,o){for(var i=function(e){if(e.cached.tableNodeTypes)return e.cached.tableNodeTypes;var t={};return Object.keys(e.nodes).forEach((function(n){var r=e.nodes[n];r.spec.tableRole&&(t[r.spec.tableRole]=r)})),e.cached.tableNodeTypes=t,t}(e),a=[],s=[],l=0;l<n;l+=1){var u=VD(i.cell,o);if(u&&s.push(u),r){var c=VD(i.header_cell,o);c&&a.push(c)}}for(var d=[],f=0;f<t;f+=1)d.push(i.row.createChecked(null,r&&0===f?a:s));return i.table.createChecked(null,d)}var BD=function(e){var t=e.editor,n=t.state.selection;if(!(n instanceof $x))return!1;var r=0,o=ho(n.ranges[0].$from,(function(e){return"table"===e.type.name}));return null===o||void 0===o||o.node.descendants((function(e){if("table"===e.type.name)return!1;["tableCell","tableHeader"].includes(e.type.name)&&(r+=1)})),r===n.ranges.length&&(t.commands.deleteTable(),!0)},ID=Bo.create({name:"table",addOptions:function(){return{HTMLAttributes:{},resizable:!1,handleWidth:5,cellMinWidth:25,View:FD,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML:function(){return[{tag:"table"}]},renderHTML:function(e){var t=e.HTMLAttributes;return["table",Sr(this.options.HTMLAttributes,t),["tbody",0]]},addCommands:function(){return{insertTable:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.rows,n=void 0===t?3:t,r=e.cols,o=void 0===r?3:r,i=e.withHeaderRow,a=void 0===i||i;return function(e){var t=e.tr,r=e.dispatch,i=zD(e.editor.schema,n,o,a);if(r){var s=t.selection.anchor+1;t.replaceSelectionWith(i).scrollIntoView().setSelection(p.TextSelection.near(t.doc.resolve(s)))}return!0}},addColumnBefore:function(){return function(e){return function(e,t){if(!Rx(e))return!1;if(t){var n=fO(e);t(pO(e.tr,n,n.left))}return!0}(e.state,e.dispatch)}},addColumnAfter:function(){return function(e){return function(e,t){if(!Rx(e))return!1;if(t){var n=fO(e);t(pO(e.tr,n,n.right))}return!0}(e.state,e.dispatch)}},deleteColumn:function(){return function(e){return function(e,t){if(!Rx(e))return!1;if(t){var n=fO(e),r=e.tr;if(0==n.left&&n.right==n.map.width)return!1;for(var o=n.right-1;hO(r,n,o),o!=n.left;o--)n.table=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc,n.map=Mx.get(n.table);t(r)}return!0}(e.state,e.dispatch)}},addRowBefore:function(){return function(e){return function(e,t){if(!Rx(e))return!1;if(t){var n=fO(e);t(mO(e.tr,n,n.top))}return!0}(e.state,e.dispatch)}},addRowAfter:function(){return function(e){return function(e,t){if(!Rx(e))return!1;if(t){var n=fO(e);t(mO(e.tr,n,n.bottom))}return!0}(e.state,e.dispatch)}},deleteRow:function(){return function(e){return function(e,t){if(!Rx(e))return!1;if(t){var n=fO(e),r=e.tr;if(0==n.top&&n.bottom==n.map.height)return!1;for(var o=n.bottom-1;vO(r,n,o),o!=n.top;o--)n.table=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc,n.map=Mx.get(n.table);t(r)}return!0}(e.state,e.dispatch)}},deleteTable:function(){return function(e){return function(e,t){for(var n=e.selection.$anchor,r=n.depth;r>0;r--)if("table"==n.node(r).type.spec.tableRole)return t&&t(e.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1}(e.state,e.dispatch)}},mergeCells:function(){return function(e){return yO(e.state,e.dispatch)}},splitCell:function(){return function(e){return bO(e.state,e.dispatch)}},toggleHeaderColumn:function(){return function(e){var t=e.state,n=e.dispatch;return kO("column")(t,n)}},toggleHeaderRow:function(){return function(e){var t=e.state,n=e.dispatch;return kO("row")(t,n)}},toggleHeaderCell:function(){return function(e){var t=e.state,n=e.dispatch;return xO(t,n)}},mergeOrSplit:function(){return function(e){var t=e.state,n=e.dispatch;return!!yO(t,n)||bO(t,n)}},setCellAttribute:function(e,t){return function(n){var r=n.state,o=n.dispatch;return function(e,t){return function(n,r){if(!Rx(n))return!1;var o=Hx(n);if(o.nodeAfter.attrs[e]===t)return!1;if(r){var i=n.tr;n.selection instanceof $x?n.selection.forEachCell((function(n,r){n.attrs[e]!==t&&i.setNodeMarkup(r,null,Bx(n.attrs,e,t))})):i.setNodeMarkup(o.pos,null,Bx(o.nodeAfter.attrs,e,t)),r(i)}return!0}}(e,t)(r,o)}},goToNextCell:function(){return function(e){var t=e.state,n=e.dispatch;return OO(1)(t,n)}},goToPreviousCell:function(){return function(e){var t=e.state,n=e.dispatch;return OO(-1)(t,n)}},fixTables:function(){return function(e){var t=e.state;return e.dispatch&&dO(t),!0}},setCellSelection:function(e){return function(t){var n=t.tr;if(t.dispatch){var r=$x.create(n.doc,e.anchorCell,e.headCell);n.setSelection(r)}return!0}}}},addKeyboardShortcuts:function(){var e=this;return{Tab:function(){return!!e.editor.commands.goToNextCell()||!!e.editor.can().addRowAfter()&&e.editor.chain().addRowAfter().goToNextCell().run()},"Shift-Tab":function(){return e.editor.commands.goToPreviousCell()},Backspace:BD,"Mod-Backspace":BD,Delete:BD,"Mod-Delete":BD}},addProseMirrorPlugins:function(){var e=this.options.resizable&&this.editor.isEditable;return[].concat(Object(o.a)(e?[DO({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[]),[FO({allowTableNodeSelection:this.options.allowTableNodeSelection})])},extendNodeSchema:function(e){return{tableRole:Dr(wr(e,"tableRole",{name:e.name,options:e.options,storage:e.storage}))}}});function _D(e){var t=e.editor,n=e.node,r=e.forwardRef,o=Object(jd.useRef)(null),i=Object(jd.useRef)(),a=t.isActive("table");return Object(jd.useEffect)((function(){o.current&&i.current&&CO(n,o.current,i.current,50)}),[n]),Object(Cd.jsxs)(Cd.Fragment,{children:[Object(Cd.jsx)(nw,{children:a&&Object(Cd.jsxs)(Cd.Fragment,{children:[Object(Cd.jsx)($D,{editor:t,table:i.current}),Object(Cd.jsx)(qD,{editor:t,table:i.current})]})}),Object(Cd.jsx)("div",Object.assign({className:"tableWrapper"},{children:Object(Cd.jsx)("table",Object.assign({ref:function(e){null===r||void 0===r||r(e),i.current=e||void 0}},{children:Object(Cd.jsx)("colgroup",{ref:o})}))}))]})}function $D(e){var t=e.editor,n=Object(jd.useRef)(null);return Object(jd.useEffect)((function(){if(n.current){var e=Tk(t,["tableRow"]);if(e){var r=Hb(n.current,{location:"left",target:e,align:"start",xOffset:-5,yOffset:-3});n.current.style.top="".concat(r.top,"px"),n.current.style.left="".concat(r.left,"px")}}}),[t.state.selection,n.current]),Object(Cd.jsxs)(rf.Flex,Object.assign({ref:n,sx:{zIndex:999,top:0,left:0,position:"absolute",bg:"background",flexWrap:"nowrap",borderRadius:"default",opacity:.3,":hover":{opacity:1}}},{children:[Object(Cd.jsx)(ZO,Object.assign({},UO("rowProperties"),{icon:"more",variant:"small",editor:t})),Object(Cd.jsx)(kS,Object.assign({},UO("insertRowBelow"),{editor:t,variant:"small"}))]}))}function qD(e){var t=e.editor,n=e.table,r=Object(jd.useRef)(null);return Object(jd.useEffect)((function(){if(r.current&&n){var e=Tk(t,["tableCell","tableHeader"]);if(e){var o=Hb(r.current,{location:"top",align:"center",target:e,yAnchor:n,yOffset:2});r.current.style.left="".concat(o.left,"px"),r.current.style.top="".concat(o.top,"px")}}}),[t.state.selection,r.current,n]),Object(Cd.jsxs)(rf.Flex,Object.assign({ref:r,sx:{zIndex:999,top:0,left:0,position:"absolute",bg:"background",flexWrap:"nowrap",borderRadius:"default",opacity:.3,":hover":{opacity:1}}},{children:[Object(Cd.jsx)(XO,{editor:t,title:"tableProperties",icon:"more",variant:"small"}),Object(Cd.jsx)(hS,Object.assign({},UO("insertColumnRight"),{editor:t,variant:"small",icon:"plus"}))]}))}var WD=ID.extend({addProseMirrorPlugins:function(){var e,t=this.options.resizable&&this.editor.isEditable;return[].concat(Object(o.a)(t?[DO({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,View:(e=this.editor,function(t){Object(s.a)(r,t);var n=Object(l.a)(r);function r(t,o){var i,s;return Object(c.a)(this,r),s=n.call(this,t,e,(function(){return 0}),{component:_D,shouldUpdate:function(e,t){return e.type===t.type},contentDOMFactory:function(){return{dom:document.createElement("tbody")}},wrapperFactory:function(){var e=document.createElement("div");return e.style.position="relative",e}}),Object(h.a)((i=Object(a.a)(s),Object(m.a)(r.prototype)),"init",i).call(i),s}return Object(d.a)(r)}(tf)),lastColumnResizable:this.options.lastColumnResizable})]:[]),[FO({allowTableNodeSelection:this.options.allowTableNodeSelection})])}});function UD(e){this.j={},this.jr=[],this.jd=null,this.t=e}UD.prototype={accepts:function(){return!!this.t},tt:function(e,t){if(t&&t.j)return this.j[e]=t,t;var n=t,r=this.j[e];if(r)return n&&(r.t=n),r;r=KD();var o=ZD(this,e);return o?(Object.assign(r.j,o.j),r.jr.append(o.jr),r.jr=o.jd,r.t=n||o.t):r.t=n,this.j[e]=r,r}};var KD=function(){return new UD},GD=function(e){return new UD(e)},JD=function(e,t,n){e.j[t]||(e.j[t]=n)},YD=function(e,t,n){e.jr.push([t,n])},ZD=function(e,t){var n=e.j[t];if(n)return n;for(var r=0;r<e.jr.length;r++){var o=e.jr[r][0],i=e.jr[r][1];if(o.test(t))return i}return e.jd},XD=function(e,t,n){for(var r=0;r<t.length;r++)JD(e,t[r],n)},QD=function(e,t){for(var n=0;n<t.length;n++){var r=t[n][0],o=t[n][1];JD(e,r,o)}},eA=function(e,t,n,r){for(var o,i=0,a=t.length;i<a&&(o=e.j[t[i]]);)e=o,i++;if(i>=a)return[];for(;i<a-1;)o=r(),JD(e,t[i],o),e=o,i++;JD(e,t[a-1],n)},tA="DOMAIN",nA="LOCALHOST",rA="TLD",oA="NUM",iA="PROTOCOL",aA="MAILTO",sA="WS",lA="NL",uA="OPENBRACE",cA="OPENBRACKET",dA="OPENANGLEBRACKET",fA="OPENPAREN",pA="CLOSEBRACE",hA="CLOSEBRACKET",mA="CLOSEANGLEBRACKET",vA="CLOSEPAREN",gA="AMPERSAND",yA="APOSTROPHE",bA="ASTERISK",wA="AT",kA="BACKSLASH",xA="BACKTICK",OA="CARET",SA="COLON",CA="COMMA",jA="DOLLAR",DA="DOT",AA="EQUALS",EA="EXCLAMATION",MA="HYPHEN",TA="PERCENT",LA="PIPE",NA="PLUS",PA="POUND",RA="QUERY",HA="QUOTE",FA="SEMI",VA="SLASH",zA="TILDE",BA="UNDERSCORE",IA="SYM",_A=Object.freeze({__proto__:null,DOMAIN:tA,LOCALHOST:nA,TLD:rA,NUM:oA,PROTOCOL:iA,MAILTO:aA,WS:sA,NL:lA,OPENBRACE:uA,OPENBRACKET:cA,OPENANGLEBRACKET:dA,OPENPAREN:fA,CLOSEBRACE:pA,CLOSEBRACKET:hA,CLOSEANGLEBRACKET:mA,CLOSEPAREN:vA,AMPERSAND:gA,APOSTROPHE:yA,ASTERISK:bA,AT:wA,BACKSLASH:kA,BACKTICK:xA,CARET:OA,COLON:SA,COMMA:CA,DOLLAR:jA,DOT:DA,EQUALS:AA,EXCLAMATION:EA,HYPHEN:MA,PERCENT:TA,PIPE:LA,PLUS:NA,POUND:PA,QUERY:RA,QUOTE:HA,SEMI:FA,SLASH:VA,TILDE:zA,UNDERSCORE:BA,SYM:IA}),$A="aaa aarp abarth abb abbott abbvie abc able abogado abudhabi ac academy accenture accountant accountants aco actor ad adac ads adult ae aeg aero aetna af afamilycompany afl africa ag agakhan agency ai aig airbus airforce airtel akdn al alfaromeo alibaba alipay allfinanz allstate ally alsace alstom am amazon americanexpress americanfamily amex amfam amica amsterdam analytics android anquan anz ao aol apartments app apple aq aquarelle ar arab aramco archi army arpa art arte as asda asia associates at athleta attorney au auction audi audible audio auspost author auto autos avianca aw aws ax axa az azure ba baby baidu banamex bananarepublic band bank bar barcelona barclaycard barclays barefoot bargains baseball basketball bauhaus bayern bb bbc bbt bbva bcg bcn bd be beats beauty beer bentley berlin best bestbuy bet bf bg bh bharti bi bible bid bike bing bingo bio biz bj black blackfriday blockbuster blog bloomberg blue bm bms bmw bn bnpparibas bo boats boehringer bofa bom bond boo book booking bosch bostik boston bot boutique box br bradesco bridgestone broadway broker brother brussels bs bt budapest bugatti build builders business buy buzz bv bw by bz bzh ca cab cafe cal call calvinklein cam camera camp cancerresearch canon capetown capital capitalone car caravan cards care career careers cars casa case cash casino cat catering catholic cba cbn cbre cbs cc cd center ceo cern cf cfa cfd cg ch chanel channel charity chase chat cheap chintai christmas chrome church ci cipriani circle cisco citadel citi citic city cityeats ck cl claims cleaning click clinic clinique clothing cloud club clubmed cm cn co coach codes coffee college cologne com comcast commbank community company compare computer comsec condos construction consulting contact contractors cooking cookingchannel cool coop corsica country coupon coupons courses cpa cr credit creditcard creditunion cricket crown crs cruise cruises csc cu cuisinella cv cw cx cy cymru cyou cz dabur dad dance data date dating datsun day dclk dds de deal dealer deals degree delivery dell deloitte delta democrat dental dentist desi design dev dhl diamonds diet digital direct directory discount discover dish diy dj dk dm dnp do docs doctor dog domains dot download drive dtv dubai duck dunlop dupont durban dvag dvr dz earth eat ec eco edeka edu education ee eg email emerck energy engineer engineering enterprises epson equipment er ericsson erni es esq estate et etisalat eu eurovision eus events exchange expert exposed express extraspace fage fail fairwinds faith family fan fans farm farmers fashion fast fedex feedback ferrari ferrero fi fiat fidelity fido film final finance financial fire firestone firmdale fish fishing fit fitness fj fk flickr flights flir florist flowers fly fm fo foo food foodnetwork football ford forex forsale forum foundation fox fr free fresenius frl frogans frontdoor frontier ftr fujitsu fujixerox fun fund furniture futbol fyi ga gal gallery gallo gallup game games gap garden gay gb gbiz gd gdn ge gea gent genting george gf gg ggee gh gi gift gifts gives giving gl glade glass gle global globo gm gmail gmbh gmo gmx gn godaddy gold goldpoint golf goo goodyear goog google gop got gov gp gq gr grainger graphics gratis green gripe grocery group gs gt gu guardian gucci guge guide guitars guru gw gy hair hamburg hangout haus hbo hdfc hdfcbank health healthcare help helsinki here hermes hgtv hiphop hisamitsu hitachi hiv hk hkt hm hn hockey holdings holiday homedepot homegoods homes homesense honda horse hospital host hosting hot hoteles hotels hotmail house how hr hsbc ht hu hughes hyatt hyundai ibm icbc ice icu id ie ieee ifm ikano il im imamat imdb immo immobilien in inc industries infiniti info ing ink institute insurance insure int international intuit investments io ipiranga iq ir irish is ismaili ist istanbul it itau itv iveco jaguar java jcb je jeep jetzt jewelry jio jll jm jmp jnj jo jobs joburg jot joy jp jpmorgan jprs juegos juniper kaufen kddi ke kerryhotels kerrylogistics kerryproperties kfh kg kh ki kia kim kinder kindle kitchen kiwi km kn koeln komatsu kosher kp kpmg kpn kr krd kred kuokgroup kw ky kyoto kz la lacaixa lamborghini lamer lancaster lancia land landrover lanxess lasalle lat latino latrobe law lawyer lb lc lds lease leclerc lefrak legal lego lexus lgbt li lidl life lifeinsurance lifestyle lighting like lilly limited limo lincoln linde link lipsy live living lixil lk llc llp loan loans locker locus loft lol london lotte lotto love lpl lplfinancial lr ls lt ltd ltda lu lundbeck luxe luxury lv ly ma macys madrid maif maison makeup man management mango map market marketing markets marriott marshalls maserati mattel mba mc mckinsey md me med media meet melbourne meme memorial men menu merckmsd mg mh miami microsoft mil mini mint mit mitsubishi mk ml mlb mls mm mma mn mo mobi mobile moda moe moi mom monash money monster mormon mortgage moscow moto motorcycles mov movie mp mq mr ms msd mt mtn mtr mu museum mutual mv mw mx my mz na nab nagoya name nationwide natura navy nba nc ne nec net netbank netflix network neustar new news next nextdirect nexus nf nfl ng ngo nhk ni nico nike nikon ninja nissan nissay nl no nokia northwesternmutual norton now nowruz nowtv np nr nra nrw ntt nu nyc nz obi observer off office okinawa olayan olayangroup oldnavy ollo om omega one ong onl online onyourside ooo open oracle orange org organic origins osaka otsuka ott ovh pa page panasonic paris pars partners parts party passagens pay pccw pe pet pf pfizer pg ph pharmacy phd philips phone photo photography photos physio pics pictet pictures pid pin ping pink pioneer pizza pk pl place play playstation plumbing plus pm pn pnc pohl poker politie porn post pr pramerica praxi press prime pro prod productions prof progressive promo properties property protection pru prudential ps pt pub pw pwc py qa qpon quebec quest qvc racing radio raid re read realestate realtor realty recipes red redstone redumbrella rehab reise reisen reit reliance ren rent rentals repair report republican rest restaurant review reviews rexroth rich richardli ricoh ril rio rip rmit ro rocher rocks rodeo rogers room rs rsvp ru rugby ruhr run rw rwe ryukyu sa saarland safe safety sakura sale salon samsclub samsung sandvik sandvikcoromant sanofi sap sarl sas save saxo sb sbi sbs sc sca scb schaeffler schmidt scholarships school schule schwarz science scjohnson scot sd se search seat secure security seek select sener services ses seven sew sex sexy sfr sg sh shangrila sharp shaw shell shia shiksha shoes shop shopping shouji show showtime si silk sina singles site sj sk ski skin sky skype sl sling sm smart smile sn sncf so soccer social softbank software sohu solar solutions song sony soy spa space sport spot spreadbetting sr srl ss st stada staples star statebank statefarm stc stcgroup stockholm storage store stream studio study style su sucks supplies supply support surf surgery suzuki sv swatch swiftcover swiss sx sy sydney systems sz tab taipei talk taobao target tatamotors tatar tattoo tax taxi tc tci td tdk team tech technology tel temasek tennis teva tf tg th thd theater theatre tiaa tickets tienda tiffany tips tires tirol tj tjmaxx tjx tk tkmaxx tl tm tmall tn to today tokyo tools top toray toshiba total tours town toyota toys tr trade trading training travel travelchannel travelers travelersinsurance trust trv tt tube tui tunes tushu tv tvs tw tz ua ubank ubs ug uk unicom university uno uol ups us uy uz va vacations vana vanguard vc ve vegas ventures verisign versicherung vet vg vi viajes video vig viking villas vin vip virgin visa vision viva vivo vlaanderen vn vodka volkswagen volvo vote voting voto voyage vu vuelos wales walmart walter wang wanggou watch watches weather weatherchannel webcam weber website wed wedding weibo weir wf whoswho wien wiki williamhill win windows wine winners wme wolterskluwer woodside work works world wow ws wtc wtf xbox xerox xfinity xihuan xin xxx xyz yachts yahoo yamaxun yandex ye yodobashi yoga yokohama you youtube yt yun za zappos zara zero zip zm zone zuerich zw verm\xf6gensberater-ctb verm\xf6gensberatung-pwb \u03b5\u03bb \u03b5\u03c5 \u0431\u0433 \u0431\u0435\u043b \u0434\u0435\u0442\u0438 \u0435\u044e \u043a\u0430\u0442\u043e\u043b\u0438\u043a \u043a\u043e\u043c \u049b\u0430\u0437 \u043c\u043a\u0434 \u043c\u043e\u043d \u043c\u043e\u0441\u043a\u0432\u0430 \u043e\u043d\u043b\u0430\u0439\u043d \u043e\u0440\u0433 \u0440\u0443\u0441 \u0440\u0444 \u0441\u0430\u0439\u0442 \u0441\u0440\u0431 \u0443\u043a\u0440 \u10d2\u10d4 \u0570\u0561\u0575 \u05d9\u05e9\u05e8\u05d0\u05dc \u05e7\u05d5\u05dd \u0627\u0628\u0648\u0638\u0628\u064a \u0627\u062a\u0635\u0627\u0644\u0627\u062a \u0627\u0631\u0627\u0645\u0643\u0648 \u0627\u0644\u0627\u0631\u062f\u0646 \u0627\u0644\u0628\u062d\u0631\u064a\u0646 \u0627\u0644\u062c\u0632\u0627\u0626\u0631 \u0627\u0644\u0633\u0639\u0648\u062f\u064a\u0629 \u0627\u0644\u0639\u0644\u064a\u0627\u0646 \u0627\u0644\u0645\u063a\u0631\u0628 \u0627\u0645\u0627\u0631\u0627\u062a \u0627\u06cc\u0631\u0627\u0646 \u0628\u0627\u0631\u062a \u0628\u0627\u0632\u0627\u0631 \u0628\u06be\u0627\u0631\u062a \u0628\u064a\u062a\u0643 \u067e\u0627\u06a9\u0633\u062a\u0627\u0646 \u0680\u0627\u0631\u062a \u062a\u0648\u0646\u0633 \u0633\u0648\u062f\u0627\u0646 \u0633\u0648\u0631\u064a\u0629 \u0634\u0628\u0643\u0629 \u0639\u0631\u0627\u0642 \u0639\u0631\u0628 \u0639\u0645\u0627\u0646 \u0641\u0644\u0633\u0637\u064a\u0646 \u0642\u0637\u0631 \u0643\u0627\u062b\u0648\u0644\u064a\u0643 \u0643\u0648\u0645 \u0645\u0635\u0631 \u0645\u0644\u064a\u0633\u064a\u0627 \u0645\u0648\u0631\u064a\u062a\u0627\u0646\u064a\u0627 \u0645\u0648\u0642\u0639 \u0647\u0645\u0631\u0627\u0647 \u0915\u0949\u092e \u0928\u0947\u091f \u092d\u093e\u0930\u0924 \u092d\u093e\u0930\u0924\u092e\u094d \u092d\u093e\u0930\u094b\u0924 \u0938\u0902\u0917\u0920\u0928 \u09ac\u09be\u0982\u09b2\u09be \u09ad\u09be\u09b0\u09a4 \u09ad\u09be\u09f0\u09a4 \u0a2d\u0a3e\u0a30\u0a24 \u0aad\u0abe\u0ab0\u0aa4 \u0b2d\u0b3e\u0b30\u0b24 \u0b87\u0ba8\u0bcd\u0ba4\u0bbf\u0baf\u0bbe \u0b87\u0bb2\u0b99\u0bcd\u0b95\u0bc8 \u0b9a\u0bbf\u0b99\u0bcd\u0b95\u0baa\u0bcd\u0baa\u0bc2\u0bb0\u0bcd \u0c2d\u0c3e\u0c30\u0c24\u0c4d \u0cad\u0cbe\u0cb0\u0ca4 \u0d2d\u0d3e\u0d30\u0d24\u0d02 \u0dbd\u0d82\u0d9a\u0dcf \u0e04\u0e2d\u0e21 \u0e44\u0e17\u0e22 \u0ea5\u0eb2\u0ea7 \ub2f7\ub137 \ub2f7\ucef4 \uc0bc\uc131 \ud55c\uad6d \u30a2\u30de\u30be\u30f3 \u30b0\u30fc\u30b0\u30eb \u30af\u30e9\u30a6\u30c9 \u30b3\u30e0 \u30b9\u30c8\u30a2 \u30bb\u30fc\u30eb \u30d5\u30a1\u30c3\u30b7\u30e7\u30f3 \u30dd\u30a4\u30f3\u30c8 \u307f\u3093\u306a \u4e16\u754c \u4e2d\u4fe1 \u4e2d\u56fd \u4e2d\u570b \u4e2d\u6587\u7f51 \u4e9a\u9a6c\u900a \u4f01\u4e1a \u4f5b\u5c71 \u4fe1\u606f \u5065\u5eb7 \u516b\u5366 \u516c\u53f8 \u516c\u76ca \u53f0\u6e7e \u53f0\u7063 \u5546\u57ce \u5546\u5e97 \u5546\u6807 \u5609\u91cc \u5609\u91cc\u5927\u9152\u5e97 \u5728\u7ebf \u5927\u4f17\u6c7d\u8f66 \u5927\u62ff \u5929\u4e3b\u6559 \u5a31\u4e50 \u5bb6\u96fb \u5e7f\u4e1c \u5fae\u535a \u6148\u5584 \u6211\u7231\u4f60 \u624b\u673a \u62db\u8058 \u653f\u52a1 \u653f\u5e9c \u65b0\u52a0\u5761 \u65b0\u95fb \u65f6\u5c1a \u66f8\u7c4d \u673a\u6784 \u6de1\u9a6c\u9521 \u6e38\u620f \u6fb3\u9580 \u70b9\u770b \u79fb\u52a8 \u7ec4\u7ec7\u673a\u6784 \u7f51\u5740 \u7f51\u5e97 \u7f51\u7ad9 \u7f51\u7edc \u8054\u901a \u8bfa\u57fa\u4e9a \u8c37\u6b4c \u8d2d\u7269 \u901a\u8ca9 \u96c6\u56e2 \u96fb\u8a0a\u76c8\u79d1 \u98de\u5229\u6d66 \u98df\u54c1 \u9910\u5385 \u9999\u683c\u91cc\u62c9 \u9999\u6e2f".split(" "),qA=/(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/,WA=/(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEDD-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDDFF\uDE70-\uDE74\uDE78-\uDE7C\uDE80-\uDE86\uDE90-\uDEAC\uDEB0-\uDEBA\uDEC0-\uDEC5\uDED0-\uDED9\uDEE0-\uDEE7\uDEF0-\uDEF6])/,UA=/\uFE0F/,KA=/\d/,GA=/\s/;function JA(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=KD(),n=GD(oA),r=GD(tA),o=KD(),i=GD(sA),a=[[KA,r],[qA,r],[WA,r],[UA,r]],s=function(){var e=GD(tA);return e.j={"-":o},e.jr=[].concat(a),e},l=function(e){var t=s();return t.t=e,t};QD(t,[["'",GD(yA)],["{",GD(uA)],["[",GD(cA)],["<",GD(dA)],["(",GD(fA)],["}",GD(pA)],["]",GD(hA)],[">",GD(mA)],[")",GD(vA)],["&",GD(gA)],["*",GD(bA)],["@",GD(wA)],["`",GD(xA)],["^",GD(OA)],[":",GD(SA)],[",",GD(CA)],["$",GD(jA)],[".",GD(DA)],["=",GD(AA)],["!",GD(EA)],["-",GD(MA)],["%",GD(TA)],["|",GD(LA)],["+",GD(NA)],["#",GD(PA)],["?",GD(RA)],['"',GD(HA)],["/",GD(VA)],[";",GD(FA)],["~",GD(zA)],["_",GD(BA)],["\\",GD(kA)]]),JD(t,"\n",GD(lA)),YD(t,GA,i),JD(i,"\n",KD()),YD(i,GA,i);for(var u=0;u<$A.length;u++)eA(t,$A[u],l(rA),s);var c=s(),d=s(),f=s(),p=s();eA(t,"file",c,s),eA(t,"ftp",d,s),eA(t,"http",f,s),eA(t,"mailto",p,s);var h=s(),m=GD(iA),v=GD(aA);JD(d,"s",h),JD(d,":",m),JD(f,"s",h),JD(f,":",m),JD(c,":",m),JD(h,":",m),JD(p,":",v);for(var g=s(),y=0;y<e.length;y++)eA(t,e[y],g,s);return JD(g,":",m),eA(t,"localhost",l(nA),s),YD(t,KA,n),YD(t,qA,r),YD(t,WA,r),YD(t,UA,r),YD(n,KA,n),YD(n,qA,r),YD(n,WA,r),YD(n,UA,r),JD(n,"-",o),JD(r,"-",o),JD(o,"-",o),YD(r,KA,r),YD(r,qA,r),YD(r,WA,r),YD(r,UA,r),YD(o,KA,r),YD(o,qA,r),YD(o,WA,r),YD(o,UA,r),t.jd=GD(IA),t}function YA(e){return YA="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},YA(e)}var ZA={defaultProtocol:"http",events:null,format:QA,formatHref:QA,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:0,className:null,attributes:null,ignoreTags:[]};function XA(e){e=e||{},this.defaultProtocol="defaultProtocol"in e?e.defaultProtocol:ZA.defaultProtocol,this.events="events"in e?e.events:ZA.events,this.format="format"in e?e.format:ZA.format,this.formatHref="formatHref"in e?e.formatHref:ZA.formatHref,this.nl2br="nl2br"in e?e.nl2br:ZA.nl2br,this.tagName="tagName"in e?e.tagName:ZA.tagName,this.target="target"in e?e.target:ZA.target,this.rel="rel"in e?e.rel:ZA.rel,this.validate="validate"in e?e.validate:ZA.validate,this.truncate="truncate"in e?e.truncate:ZA.truncate,this.className="className"in e?e.className:ZA.className,this.attributes=e.attributes||ZA.attributes,this.ignoreTags=[];for(var t=("ignoreTags"in e?e.ignoreTags:ZA.ignoreTags),n=0;n<t.length;n++)this.ignoreTags.push(t[n].toUpperCase())}function QA(e){return e}XA.prototype={resolve:function(e){var t=e.toHref(this.defaultProtocol);return{formatted:this.get("format",e.toString(),e),formattedHref:this.get("formatHref",t,e),tagName:this.get("tagName",t,e),className:this.get("className",t,e),target:this.get("target",t,e),rel:this.get("rel",t,e),events:this.getObject("events",t,e),attributes:this.getObject("attributes",t,e),truncate:this.get("truncate",t,e)}},check:function(e){return this.get("validate",e.toString(),e)},get:function(e,t,n){var r,o=this[e];if(!o)return o;switch(YA(o)){case"function":return o(t,n.t);case"object":return"function"===typeof(r=n.t in o?o[n.t]:ZA[e])?r(t,n.t):r}return o},getObject:function(e,t,n){var r=this[e];return"function"===typeof r?r(t,n.t):r}};function eE(){}function tE(e,t){function n(t,n){this.t=e,this.v=t,this.tk=n}return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Object.create(e.prototype);for(var o in n)r[o]=n[o];r.constructor=t,t.prototype=r}(eE,n,t),n}eE.prototype={t:"token",isLink:!1,toString:function(){return this.v},toHref:function(){return this.toString()},startIndex:function(){return this.tk[0].s},endIndex:function(){return this.tk[this.tk.length-1].e},toObject:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ZA.defaultProtocol;return{type:this.t,value:this.v,isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}}};var nE=tE("email",{isLink:!0}),rE=tE("email",{isLink:!0,toHref:function(){return"mailto:"+this.toString()}}),oE=tE("text"),iE=tE("nl"),aE=tE("url",{isLink:!0,toHref:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ZA.defaultProtocol,t=this.tk,n=!1,r=!1,o=[],i=0;t[i].t===iA;)n=!0,o.push(t[i].v),i++;for(;t[i].t===VA;)r=!0,o.push(t[i].v),i++;for(;i<t.length;i++)o.push(t[i].v);return o=o.join(""),n||r||(o="".concat(e,"://").concat(o)),o},hasProtocol:function(){return this.tk[0].t===iA}}),sE=Object.freeze({__proto__:null,MultiToken:eE,Base:eE,createTokenClass:tE,MailtoEmail:nE,Email:rE,Text:oE,Nl:iE,Url:aE});function lE(){var e=KD(),t=KD(),n=KD(),r=KD(),o=KD(),i=KD(),a=KD(),s=GD(aE),l=KD(),u=GD(aE),c=GD(aE),d=KD(),f=KD(),p=KD(),h=KD(),m=KD(),v=GD(aE),g=GD(aE),y=GD(aE),b=GD(aE),w=KD(),k=KD(),x=KD(),O=KD(),S=KD(),C=KD(),j=GD(rE),D=KD(),A=GD(rE),E=GD(nE),M=KD(),T=KD(),L=KD(),N=KD(),P=GD(iE);JD(e,lA,P),JD(e,iA,t),JD(e,aA,n),JD(t,VA,r),JD(r,VA,o),JD(e,rA,i),JD(e,tA,i),JD(e,nA,s),JD(e,oA,i),JD(o,rA,c),JD(o,tA,c),JD(o,oA,c),JD(o,nA,c),JD(i,DA,a),JD(S,DA,C),JD(a,rA,s),JD(a,tA,i),JD(a,oA,i),JD(a,nA,i),JD(C,rA,j),JD(C,tA,S),JD(C,oA,S),JD(C,nA,S),JD(s,DA,a),JD(j,DA,C),JD(s,SA,l),JD(s,VA,c),JD(l,oA,u),JD(u,VA,c),JD(j,SA,D),JD(D,oA,A);var R=[gA,bA,wA,kA,xA,OA,jA,tA,AA,MA,nA,oA,TA,LA,NA,PA,iA,VA,IA,zA,rA,BA],H=[yA,mA,pA,hA,vA,SA,CA,DA,EA,dA,uA,cA,fA,RA,HA,FA];JD(c,uA,f),JD(c,cA,p),JD(c,dA,h),JD(c,fA,m),JD(d,uA,f),JD(d,cA,p),JD(d,dA,h),JD(d,fA,m),JD(f,pA,c),JD(p,hA,c),JD(h,mA,c),JD(m,vA,c),JD(v,pA,c),JD(g,hA,c),JD(y,mA,c),JD(b,vA,c),JD(w,pA,c),JD(k,hA,c),JD(x,mA,c),JD(O,vA,c),XD(f,R,v),XD(p,R,g),XD(h,R,y),XD(m,R,b),XD(f,H,w),XD(p,H,k),XD(h,H,x),XD(m,H,O),XD(v,R,v),XD(g,R,g),XD(y,R,y),XD(b,R,b),XD(v,H,v),XD(g,H,g),XD(y,H,y),XD(b,H,b),XD(w,R,v),XD(k,R,g),XD(x,R,y),XD(O,R,b),XD(w,H,w),XD(k,H,k),XD(x,H,x),XD(O,H,O),XD(c,R,c),XD(d,R,c),XD(c,H,d),XD(d,H,d),JD(n,rA,E),JD(n,tA,E),JD(n,oA,E),JD(n,nA,E),XD(E,R,E),XD(E,H,M),XD(M,R,E),XD(M,H,M);var F=[gA,yA,bA,kA,xA,OA,pA,jA,tA,AA,MA,oA,uA,TA,LA,NA,PA,RA,VA,IA,zA,rA,BA];return XD(i,F,T),JD(i,wA,L),XD(s,F,T),JD(s,wA,L),XD(a,F,T),XD(T,F,T),JD(T,wA,L),JD(T,DA,N),XD(N,F,T),JD(L,rA,S),JD(L,tA,S),JD(L,oA,S),JD(L,nA,j),e}function uE(e,t,n){var r=n[0].s,o=n[n.length-1].e;return new e(t.substr(r,o-r),n)}var cE="undefined"!==typeof console&&console&&console.warn||function(){},dE={scanner:null,parser:null,pluginQueue:[],customProtocols:[],initialized:!1};function fE(e){if(dE.initialized&&cE('linkifyjs: already initialized - will not register custom protocol "'.concat(e,'" until you manually call linkify.init(). To avoid this warning, please register all custom protocols before invoking linkify the first time.')),!/^[a-z-]+$/.test(e))throw Error("linkifyjs: protocols containing characters other than a-z or - (hyphen) are not supported");dE.customProtocols.push(e)}function pE(e){return dE.initialized||function(){dE.scanner={start:JA(dE.customProtocols),tokens:_A},dE.parser={start:lE(),tokens:sE};for(var e={createTokenClass:tE},t=0;t<dE.pluginQueue.length;t++)dE.pluginQueue[t][1]({scanner:dE.scanner,parser:dE.parser,utils:e});dE.initialized=!0}(),function(e,t,n){for(var r=n.length,o=0,i=[],a=[];o<r;){for(var s=e,l=null,u=null,c=0,d=null,f=-1;o<r&&!(l=ZD(s,n[o].t));)a.push(n[o++]);for(;o<r&&(u=l||ZD(s,n[o].t));)l=null,(s=u).accepts()?(f=0,d=s):f>=0&&f++,o++,c++;if(f<0)for(var p=o-c;p<o;p++)a.push(n[p]);else{a.length>0&&(i.push(uE(oE,t,a)),a=[]),o-=f,c-=f;var h=d.t,m=n.slice(o-c,o);i.push(uE(h,t,m))}}return a.length>0&&i.push(uE(oE,t,a)),i}(dE.parser.start,e,function(e,t){for(var n=function(e){for(var t=[],n=e.length,r=0;r<n;){var o=e.charCodeAt(r),i=void 0,a=o<55296||o>56319||r+1===n||(i=e.charCodeAt(r+1))<56320||i>57343?e[r]:e.slice(r,r+2);t.push(a),r+=a.length}return t}(t.replace(/[A-Z]/g,(function(e){return e.toLowerCase()}))),r=n.length,o=[],i=0,a=0;a<r;){for(var s=e,l=null,u=0,c=null,d=-1,f=-1;a<r&&(l=ZD(s,n[a]));)(s=l).accepts()?(d=0,f=0,c=s):d>=0&&(d+=n[a].length,f++),u+=n[a].length,i+=n[a].length,a++;i-=d,a-=f,u-=d,o.push({t:c.t,v:t.substr(i-u,u),s:i-u,e:i})}return o}(dE.scanner.start,e))}function hE(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=pE(e),r=[],o=0;o<n.length;o++){var i=n[o];!i.isLink||t&&i.t!==t||r.push(i.toObject())}return r}function mE(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=pE(e);return 1===n.length&&n[0].isLink&&(!t||n[0].t===t)}function vE(e){return new p.Plugin({key:new p.PluginKey("autolink"),appendTransaction:function(t,n,r){var i=t.some((function(e){return e.docChanged}))&&!n.doc.eq(r.doc),a=t.some((function(e){return e.getMeta("preventAutolink")}));if(i&&!a){var s=r.tr,l=function(e,t){var n=new g.e(e);return t.forEach((function(e){e.steps.forEach((function(e){n.step(e)}))})),n}(n.doc,Object(o.a)(t)),u=l.mapping,c=function(e){var t=e.mapping,n=e.steps,r=[];return t.maps.forEach((function(e,o){var i=[];if(e.ranges.length)e.forEach((function(e,t){i.push({from:e,to:t})}));else{var a=n[o],s=a.from,l=a.to;if(void 0===s||void 0===l)return;i.push({from:s,to:l})}i.forEach((function(e){var n=e.from,i=e.to,a=t.slice(o).map(n,-1),s=t.slice(o).map(i),l=t.invert().map(a,-1),u=t.invert().map(s);r.push({oldRange:{from:l,to:u},newRange:{from:a,to:s}})}))})),No(r)}(l);if(c.forEach((function(t){var o=t.oldRange,i=t.newRange;Po(o.from,o.to,n.doc).filter((function(t){return t.mark.type===e.type})).forEach((function(t){var o=Po(u.map(t.from),u.map(t.to),r.doc).filter((function(t){return t.mark.type===e.type}));if(o.length){var i=o[0],a=n.doc.textBetween(t.from,t.to,void 0," "),l=r.doc.textBetween(i.from,i.to,void 0," "),c=mE(a),d=mE(l);c&&!d&&s.removeMark(i.from,i.to,e.type)}})),Lo(r.doc,i,(function(e){return e.isTextblock})).forEach((function(t){hE(r.doc.textBetween(t.pos,t.pos+t.node.nodeSize,void 0," ")).filter((function(e){return e.isLink})).filter((function(t){return!e.validate||e.validate(t.value)})).map((function(e){return Object(f.a)(Object(f.a)({},e),{},{from:t.pos+e.start+1,to:t.pos+e.end+1})})).filter((function(e){var t=i.from>=e.from&&i.from<=e.to,n=i.to>=e.from&&i.to<=e.to;return t||n})).forEach((function(t){s.addMark(t.from,t.to,e.type.create({href:t.href}))}))}))})),s.steps.length)return s}}})}var gE=zo.create({name:"link",priority:1e3,keepOnSplit:!1,onCreate:function(){this.options.protocols.forEach(fE)},inclusive:function(){return this.options.autolink},addOptions:function(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:void 0}},addAttributes:function(){return{href:{default:null},target:{default:this.options.HTMLAttributes.target},class:{default:this.options.HTMLAttributes.class}}},parseHTML:function(){return[{tag:'a[href]:not([href *= "javascript:" i])'}]},renderHTML:function(e){var t=e.HTMLAttributes;return["a",Sr(this.options.HTMLAttributes,t),0]},addCommands:function(){var e=this;return{setLink:function(t){return function(n){return(0,n.chain)().setMark(e.name,t).setMeta("preventAutolink",!0).run()}},toggleLink:function(t){return function(n){return(0,n.chain)().toggleMark(e.name,t,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},unsetLink:function(){return function(t){return(0,t.chain)().unsetMark(e.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}}}},addPasteRules:function(){var e=this;return[Io({find:function(t){return hE(t).filter((function(t){return!e.options.validate||e.options.validate(t.value)})).filter((function(e){return e.isLink})).map((function(e){return{text:e.value,index:e.start,data:e}}))},type:this.type,getAttributes:function(e){var t;return{href:null===(t=e.data)||void 0===t?void 0:t.href}}})]},addProseMirrorPlugins:function(){var e,t=[];return this.options.autolink&&t.push(vE({type:this.type,validate:this.options.validate})),this.options.openOnClick&&t.push((e={type:this.type},new p.Plugin({key:new p.PluginKey("handleClickLink"),props:{handleClick:function(t,n,r){var o,i=Do(t.state,e.type.name);return!(!(null===(o=r.target)||void 0===o?void 0:o.closest("a"))||!i.href)&&(window.open(i.href,i.target),!0)}}}))),this.options.linkOnPaste&&t.push(function(e){return new p.Plugin({key:new p.PluginKey("handlePasteLink"),props:{handlePaste:function(t,n,r){if(t.state.selection.empty)return!1;var o="";r.content.forEach((function(e){o+=e.textContent}));var i=hE(o).find((function(e){return e.isLink&&e.value===o}));return!(!o||!i)&&(e.editor.commands.setMark(e.type,{href:i.href}),!0)}}})}({editor:this.editor,type:this.type})),t}}),yE=new p.PluginKey("codemark");function bE(e,t){var n,r;return"schema"in e?null!==(n=null===t||void 0===t?void 0:t.markType)&&void 0!==n?n:e.schema.marks.code:null!==(r=null===t||void 0===t?void 0:t.markType)&&void 0!==r?r:e.state.schema.marks.code}function wE(e,t){return e.resolve(Math.min(Math.max(1,t),e.nodeSize-2))}function kE(e,t,n,r){var o,i=e.isInSet(null!==(o=t.state.storedMarks)&&void 0!==o?o:t.state.doc.resolve(n).marks()),a=t.state.doc.rangeHasMark(n,r,e);return!(!i&&!a)}var xE={match:/`((?:[^`\w]|[\w])+)`$/,handler:function(e,t,n,r,o,i,a){if(kE(e,t,o,i))return!1;var s=r[1],l=e.create(),u=o+s.length,c=t.state.tr.delete(o,i).insertText(s).addMark(o,u,l),d=c.setSelection(p.TextSelection.create(c.doc,u)).removeStoredMark(e),f=d.setMeta(a.input,{transform:d,from:o,to:i,text:"`".concat(s).concat(n)});return t.dispatch(f),!0}},OE={match:/^`((?:[^`\w]|[\w])+)`/,handler:function(e,t,n,r,o,i,a){if(kE(e,t,o,i))return!1;var s=e.create(),l=r[1],u=o,c=t.state.tr.delete(o,i).insertText(l).addMark(o,o+l.length,s),d=c.setSelection(p.TextSelection.create(c.doc,u)).addStoredMark(e.create()),f=d.setMeta(a.input,{transform:d,from:o,to:i,text:"`".concat(l).concat(n)});return t.dispatch(f),!0}};function SE(e,t){var n=new p.Plugin({isInputRules:!0,state:{init:function(){return null},apply:function(e,t){var r=e.getMeta(n);return r||(e.selectionSet||e.docChanged?null:t)}},props:{handleTextInput:function(r,o,i,a){return function(e,t,n,r,o,i){if(t.composing)return!1;var a=t.state.doc.resolve(n);if(a.parent.type.spec.code)return!1;var s=a.parent.textBetween(Math.max(0,a.parentOffset-100),a.parentOffset,void 0,"\ufffc")+o,l=o+a.parent.textBetween(a.parentOffset,Math.min(a.parent.nodeSize-2,a.parentOffset+100),void 0,"\ufffc"),u=xE.match.exec(s),c=OE.match.exec(l);if(u){var d=xE.handler(e,t,o,u,n-u[0].length+o.length,r,i);if(d)return d}return!!c&&OE.handler(e,t,o,c,n,r+c[0].length-o.length,i)}(bE(r,t),r,o,i,a,{input:n,cursor:e})}}});return n}function CE(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"next",r={action:n};return e.dispatch(e.state.tr.setMeta(t,r)),!1}function jE(e,t,n,r){var o=function(e,t,n,r){var o;if(n.metaKey)return CE(e,t);if(n.shiftKey||n.altKey||n.ctrlKey)return!1;var i=e.state,a=i.selection,s=i.doc;if(!a.empty)return!1;var l=t.getState(e.state),u=a.$from,c=!!r.isInSet(u.marks()),d=!!r.isInSet(null!==(o=u.marksAcross(wE(s,a.from+1)))&&void 0!==o?o:[]);return u.pos===e.state.doc.nodeSize-3&&u.parentOffset===u.parent.nodeSize-2&&(null===l||void 0===l?void 0:l.active)?(e.dispatch(e.state.tr.removeStoredMark(r)),!0):(c!==d||0===u.parentOffset)&&(!c||(null===l||void 0===l?void 0:l.active)&&-1!==l.side||0===u.parentOffset?!(!d||-1!==(null===l||void 0===l?void 0:l.side))&&(e.dispatch(e.state.tr.addStoredMark(r.create())),!0):(e.dispatch(e.state.tr.removeStoredMark(r)),!0))}(e,t,n,r);if(o)return!0;var i=e.state.selection,a=i.$from;return!(!i.empty||a.parentOffset!==a.parent.nodeSize-2)&&CE(e,t)}function DE(e,t,n,r){var o=function(e,t,n,r){var o;if(n.metaKey)return CE(e,t);if(n.shiftKey||n.altKey||n.ctrlKey)return!1;var i=e.state,a=i.selection,s=i.doc,l=t.getState(e.state),u=!!r.isInSet(a.$from.marks()),c=!!r.isInSet(null!==(o=wE(s,a.empty?a.from-1:a.from+1).marks())&&void 0!==o?o:[]);if(u&&-1===(null===l||void 0===l?void 0:l.side)&&0===a.$from.parentOffset)return!1;if(0===(null===l||void 0===l?void 0:l.side)&&0===a.$from.parentOffset)return e.dispatch(e.state.tr.removeStoredMark(r)),!0;if(u&&c&&0===(null===l||void 0===l?void 0:l.side))return e.dispatch(e.state.tr.addStoredMark(r.create())),!0;if(u&&!c&&(null===l||void 0===l?void 0:l.active)&&0===a.$from.parentOffset)return e.dispatch(e.state.tr.removeStoredMark(r)),!0;if(!u&&(null===l||void 0===l?void 0:l.active)&&0===(null===l||void 0===l?void 0:l.side))return e.dispatch(e.state.tr.removeStoredMark(r)),!0;if(u===c)return!1;if(c||!a.empty&&u){var d=a.empty?a.from-1:a.from,f=e.state.tr.setSelection(p.TextSelection.create(s,d));return!a.empty&&c?e.dispatch(f.addStoredMark(r.create())):e.dispatch(f.removeStoredMark(r)),!0}if((c||!a.empty&&u)&&!(null===l||void 0===l?void 0:l.active)){var h=a.empty?a.from-1:a.from;return e.dispatch(e.state.tr.setSelection(p.TextSelection.create(s,h)).removeStoredMark(r)),!0}if(u&&!(null===l||void 0===l?void 0:l.active)&&a.$from.parentOffset>0)return e.dispatch(e.state.tr.setSelection(p.TextSelection.create(s,a.from-1)).addStoredMark(r.create())),!0;if(u&&!c&&(null===l||void 0===l?void 0:l.active)&&-1!==l.side)return e.dispatch(e.state.tr.addStoredMark(r.create())),!0;if(u&&!c&&(null===l||void 0===l?void 0:l.active)){var m=a.from-1;return e.dispatch(e.state.tr.setSelection(p.TextSelection.create(s,m)).addStoredMark(r.create())),!0}return!1}(e,t,n,r);if(o)return!0;var i=e.state.selection,a=i.$from,s=t.getState(e.state);return 1===a.pos&&0===a.parentOffset&&-1===(null===s||void 0===s?void 0:s.side)||!(!i.empty||0!==a.parentOffset)&&CE(e,t)}function AE(){var e=document.createElement("span");return e.classList.add("fake-cursor"),e}function EE(e){var t=new p.Plugin({key:yE,appendTransaction:function(n,r,o){var i,a=t.getState(r),s=null===(i=n[0])||void 0===i?void 0:i.getMeta(t);return(null===a||void 0===a?void 0:a.next)||"click"===(null===s||void 0===s?void 0:s.action)?function(e,t){var n,r;if(!e)return null;var o=e.selection,i=e.doc;if(!o.empty)return null;var a=!!t.isInSet(null!==(n=e.storedMarks)&&void 0!==n?n:[]),s=!!t.isInSet(o.$from.marks()),l=!!t.isInSet(null!==(r=wE(i,o.from+1).marks())&&void 0!==r?r:[]),u=0===o.$from.parentOffset;return s!==l||!s&&a!==s||s&&u?e.tr.removeStoredMark(t):null}(o,bE(o,e)):null},state:{init:function(){return null},apply:function(n,r,o,i){var a,s=n.getMeta(t);if("next"===(null===s||void 0===s?void 0:s.action))return{next:!0};var l=bE(i,e),u=l.isInSet(null!==(a=i.storedMarks)&&void 0!==a?a:i.doc.resolve(n.selection.from).marks()),c=l.isInSet(i.doc.resolve(n.selection.from).marks()),d=l.isInSet(wE(i.doc,n.selection.from+1).marks()),f=0===n.selection.$from.parentOffset;return n.selection.empty?u||!d||c&&!f?(!u||c&&!f)&&(u||!c||d)?u&&c&&!d?{active:!0,side:-1}:null:{active:!0,side:0}:{active:!0,side:-1}:null}},props:{attributes:function(e){var n,r=(null!==(n=t.getState(e))&&void 0!==n?n:{}).active,o=void 0!==r&&r;return Object.assign({},o?{class:"no-cursor"}:{})},decorations:function(e){var n,r=null!==(n=t.getState(e))&&void 0!==n?n:{},o=r.active,i=r.side;if(!o)return _u.empty;var a=zu.widget(e.selection.from,AE,{side:i});return _u.create(e.doc,[a])},handleKeyDown:function(n,r){switch(r.key){case"`":return function(e,t,n,r){if(e.state.selection.empty)return!1;if(n.metaKey||n.shiftKey||n.altKey||n.ctrlKey)return!1;var o=e.state.selection,i=o.from,a=o.to;if(a-i>=100||e.state.doc.rangeHasMark(i,a,r))return!1;var s=e.state.tr.addMark(i,a,r.create()),l=s.setSelection(p.TextSelection.create(s.doc,a)).removeStoredMark(r);return e.dispatch(l),!0}(n,0,r,bE(n,e));case"ArrowRight":return jE(n,t,r,bE(n,e));case"ArrowLeft":return DE(n,t,r,bE(n,e));case"Backspace":return function(e,t,n,r){if(n.metaKey||n.shiftKey||n.altKey||n.ctrlKey)return!1;var o=e.state,i=o.selection,a=o.doc,s=wE(a,i.from-1),l=!!r.isInSet(s.marks()),u=0===s.parentOffset,c=!!r.isInSet(wE(a,i.to+1).marks());if((!l||u)&&!c)return CE(e,t);var d=t.getState(e.state);if(i.empty&&-1===(null===d||void 0===d?void 0:d.side)){var f=e.state.tr.delete(i.from-1,i.from);return e.dispatch(f),!0}return!1}(n,t,r,bE(n,e));case"Delete":return function(e,t,n,r){if(n.metaKey||n.shiftKey||n.altKey||n.ctrlKey)return!1;var o=e.state,i=o.selection,a=o.doc,s=!!r.isInSet(i.$from.marks()),l=0===i.$from.parentOffset,u=!!r.isInSet(wE(a,i.to+2).marks());return!(s&&!l||u)&&CE(e,t)}(n,t,r,bE(n,e));case"ArrowUp":case"ArrowDown":case"Home":case"End":return CE(n,t);case"e":case"a":return!!r.ctrlKey&&CE(n,t);default:return!1}},handleClick:function(e){return CE(e,t,"click")}}});return t}var ME=function(e){var t=EE(e);return[t,SE(t,e)]},TE=_r.create({name:"codemarkPlugin",addProseMirrorPlugins:function(){return ME({markType:this.editor.schema.marks.code})}}),LE=Object(d.a)((function e(t,n){var r;Object(c.a)(this,e),this.match=t,this.match=t,this.handler="string"==typeof n?(r=n,function(e,t,n,o){var i=r;if(t[1]){var a=t[0].lastIndexOf(t[1]);i+=t[0].slice(a+t[1].length);var s=(n+=a)-o;s>0&&(i=t[0].slice(a-s,a)+i,n=o)}return e.tr.insertText(i,n,o)}):n}));function NE(e){var t=e.rules,n=new p.Plugin({state:{init:function(){return null},apply:function(e,t){var n=e.getMeta(this);return n||(e.selectionSet||e.docChanged?null:t)}},props:{handleTextInput:function(e,r,o,i){return PE(e,r,o,i,t,n)},handleDOMEvents:{compositionend:function(e){setTimeout((function(){var r=e.state.selection.$cursor;r&&PE(e,r.pos,r.pos,"",t,n)}))}}},isInputRules:!0});return n}function PE(e,t,n,r,o,i){if(e.composing)return!1;var a=e.state,s=a.doc.resolve(t);if(s.parent.type.spec.code)return!1;for(var l=s.parent.textBetween(Math.max(0,s.parentOffset-500),s.parentOffset,null,"\ufffc")+r,u=0;u<o.length;u++){var c=o[u].match.exec(l),d=c&&o[u].handler(a,c,t-(c[0].length-r.length),n);if(d)return e.dispatch(d.setMeta(i,{transform:d,from:t,to:n,text:r})),!0}return!1}new LE(/--$/,"\u2014"),new LE(/\.\.\.$/,"\u2026"),new LE(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"\u201c"),new LE(/"$/,"\u201d"),new LE(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"\u2018"),new LE(/'$/,"\u2019");function RE(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return function(o,i){var a=e.state,s=a.selection,l=s.to,u=s.from,c=o.selection,d=c.to,f=c.from;if(r&&d!==f)return!1;var h=t>0?d:f;if(n){var m=o.doc.nodeSize-2;if(t>0&&h<m)return!1;if(t<0&&h>0)return!1}if(i){var v=t>0?l:u;e.dispatch(a.tr.setSelection(p.TextSelection.create(a.doc,v))),e.focus()}return!0}}var HE=function(){function e(t,n,r,o,i,a){var s=this;Object(c.a)(this,e),this.options=o,this._node=t,this._outerView=n,this._getPos=r,this._mathPluginKey=i,this.cursorSide="start",this._isEditing=!1,this._tagName=o.tagName||this._node.type.name.replace("_","-"),this.dom=document.createElement(this._tagName),o.className&&this.dom.classList.add(o.className),this.dom.classList.add("math-node"),this._mathRenderElt=document.createElement("span"),this._mathRenderElt.textContent="",this._mathRenderElt.classList.add("math-render"),this.dom.appendChild(this._mathRenderElt),this._mathSrcElt=document.createElement("span"),this._mathSrcElt.classList.add("math-src"),this.dom.appendChild(this._mathSrcElt),this.dom.addEventListener("click",(function(){return s.ensureFocus()})),this.renderMath()}return Object(d.a)(e,[{key:"destroy",value:function(){this.closeEditor(!1),this._mathRenderElt&&(this._mathRenderElt.remove(),delete this._mathRenderElt),this._mathSrcElt&&(this._mathSrcElt.remove(),delete this._mathSrcElt),this.dom.remove()}},{key:"ensureFocus",value:function(){this._innerView&&this._outerView.hasFocus()&&this._innerView.focus()}},{key:"update",value:function(e,t,n){if(!e.sameMarkup(this._node))return!1;if(this._node=e,this._innerView){var r=this._innerView.state,o=e.content.findDiffStart(r.doc.content);if(null!=o){var i=e.content.findDiffEnd(r.doc.content);if(i){var a=i.a,s=i.b,l=o-Math.min(a,s);l>0&&(a+=l,s+=l),this._innerView.dispatch(r.tr.replace(o,s,e.slice(o,a)).setMeta("fromOutside",!0))}}}return this._isEditing||this.renderMath(),!0}},{key:"updateCursorPos",value:function(e){var t=this._getPos(),n=this._node.nodeSize;e.selection.from<t+n&&t<e.selection.to||(this.cursorSide=t<e.selection.from?"end":"start")}},{key:"selectNode",value:function(){this._outerView.editable&&(this.dom.classList.add("ProseMirror-selectednode"),this._isEditing||this.openEditor())}},{key:"deselectNode",value:function(){this.dom.classList.remove("ProseMirror-selectednode"),this._isEditing&&this.closeEditor()}},{key:"stopEvent",value:function(e){return void 0!==this._innerView&&void 0!==e.target&&this._innerView.dom.contains(e.target)}},{key:"ignoreMutation",value:function(){return!0}},{key:"renderMath",value:function(){if(this._mathRenderElt){var e=this._node.content.content,t="";if(e.length>0&&null!==e[0].textContent&&(t=e[0].textContent.trim()),t.length<1)for(this.dom.classList.add("empty-math");this._mathRenderElt.firstChild;)this._mathRenderElt.firstChild.remove();else{this.dom.classList.remove("empty-math");try{this.options.renderer(t,this._mathRenderElt),this._mathRenderElt.classList.remove("parse-error"),this.dom.setAttribute("title","")}catch(n){n instanceof Error&&(console.error(n),this._mathRenderElt.classList.add("parse-error"),this.dom.setAttribute("title",n.toString()))}}}}},{key:"dispatchInner",value:function(e){if(this._innerView){var t=this._innerView.state.applyTransaction(e),n=t.state,r=t.transactions;if(this._innerView.updateState(n),!e.getMeta("fromOutside")){for(var o=this._outerView.state.tr,i=g.d.offset(this._getPos()+1),a=0;a<r.length;a++)for(var s=r[a].steps,l=0;l<s.length;l++){var u=s[l].map(i);if(!u)throw Error("step discarded!");o.step(u)}o.docChanged&&this._outerView.dispatch(o)}}}},{key:"openEditor",value:function(){var e,t=this;if(this._innerView)throw Error("inner view should not exist!");if(!this._mathSrcElt)throw new Error("_mathSrcElt does not exist!");this._innerView=new uc(this._mathSrcElt,{state:p.EditorState.create({doc:this._node,plugins:[zn({Tab:function(e,t){return t&&t(e.tr.insertText("\t")),!0},Backspace:lr(In,(function(e,n,r){return!!e.selection.empty&&(!(t._node.textContent.length>0)&&(t._outerView.dispatch(t._outerView.state.tr.insertText("")),t._outerView.focus(),!0))})),Enter:lr(Yn,RE(this._outerView,1,!1)),"Ctrl-Enter":RE(this._outerView,1,!1),ArrowLeft:RE(this._outerView,-1,!0),ArrowRight:RE(this._outerView,1,!0),ArrowUp:RE(this._outerView,-1,!0),ArrowDown:RE(this._outerView,1,!0)})]}),dispatchTransaction:this.dispatchInner.bind(this)});var n=this._innerView.state;this._innerView.focus();var r=null===(e=this._mathPluginKey.getState(this._outerView.state))||void 0===e?void 0:e.prevCursorPos;null!==r&&void 0!==r||console.error("[prosemirror-math] Error: Unable to fetch math plugin state from key.");var o=(null!==r&&void 0!==r?r:0)<=this._getPos()?0:this._node.nodeSize-2;setTimeout((function(){t._innerView&&(t._innerView.focus(),t._innerView.dispatch(n.tr.setSelection(p.TextSelection.create(n.doc,o))))})),this._isEditing=!0}},{key:"closeEditor",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this._innerView&&(this._innerView.destroy(),this._innerView=void 0),e&&this.renderMath(),this._isEditing=!1}}]),e}(),FE=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(t){i(t)}}function s(e){try{l(r.throw(e))}catch(t){i(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};function VE(){return FE(this,void 0,void 0,tk().mark((function e(){var t,r;return tk().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.e(0).then(n.t.bind(null,123,7));case 2:return t=e.sent,r=t.default,e.next=6,Promise.all([n.e(0),n.e(4)]).then(n.bind(null,124));case 6:return e.abrupt("return",r);case 7:case"end":return e.stop()}}),e)})))}var zE={inline:function(e,t){VE().then((function(n){n.render(e,t,{displayMode:!1,globalGroup:!0,throwOnError:!1})}))},block:function(e,t){VE().then((function(n){n.render(e,t,{displayMode:!0,globalGroup:!0,throwOnError:!1})}))}},BE=new p.PluginKey("prosemirror-math");function IE(e){return function(t,n,r){var o=BE.getState(n.state);if(!o)throw new Error("no math plugin!");var i=o.activeNodeViews,a=new HE(t,n,r,{className:e?"math-inline":"math-block",renderer:e?zE.inline:zE.block,tagName:e?"span":"div"},BE,(function(){i.splice(i.indexOf(a))}));return i.push(a),a}}var _E={key:BE,state:{init:function(e,t){return{macros:{},activeNodeViews:[],prevCursorPos:0}},apply:function(e,t,n,r){var o=r.selection.from,i=n.selection.from;return{activeNodeViews:t.activeNodeViews,macros:t.macros,prevCursorPos:i!==o?i:t.prevCursorPos}}},props:{nodeViews:{mathInline:IE(!0),mathBlock:IE(!1)}}},$E=new p.Plugin(_E);function qE(e,t){return v.Fragment.from(t.text(e))}function WE(e){var t,n=e.querySelector("img.mwe-math-fallback-image-inline[alt]");return null!==(t=null===n||void 0===n?void 0:n.getAttribute("alt"))&&void 0!==t&&t}function UE(e){var t,n=e.querySelector("math[alttext]");return null!==(t=null===n||void 0===n?void 0:n.getAttribute("alttext"))&&void 0!==t&&t}function KE(e){var t,n=e.querySelector("math annotation[encoding='application/x-tex'");return null!==(t=null===n||void 0===n?void 0:n.textContent)&&void 0!==t&&t}function GE(e){var t=function(e,t){var n,r=Object(Sd.a)(t);try{for(r.s();!(n=r.n()).done;){var o=(0,n.value)(e);if(!1!==o)return o}}catch(i){r.e(i)}finally{r.f()}return!1}(e,[WE,UE,KE]);return t}var JE=[{tag:"span",getAttrs:function(e){return!!e.classList.contains("mwe-math-element")&&null},getContent:function(e,t){return qE(GE(e)||"\\text{\\color{red}(paste error)}",t)}}],YE=[{tag:"dl",getAttrs:function(e){var t=e;if(1!==t.childElementCount)return!1;var n=t.firstChild;return"DD"===n.tagName&&(1===n.childElementCount&&(!!n.firstChild.classList.contains("mwe-math-element")&&null))},getContent:function(e,t){return qE(GE(e)||"\\text{\\color{red}(paste error)}",t)}}];[{tag:"math-inline"}].concat(Object(o.a)(JE)),[{tag:"math-display"}].concat(Object(o.a)(YE));var ZE=/\$\$(.+)\$\$/,XE=(function(){try{new RegExp("(?<!\\\\)\\$(.+)(?<!\\\\)\\$")}catch(e){return ZE}}(),/\$\$\$\s+$/);var QE=function(e){var t=e.selection,n=t.from,r=(t.to,e.selection.content().content),o=[];return r.descendants((function(e,t,r){return"text"!=e.type.name&&(!e.type.name.startsWith("math_")||(o.push({start:Math.max(n+t-1,0),end:n+t+e.nodeSize-1}),!1))})),_u.create(e.doc,o.map((function(e){var t=e.start,n=e.end;return zu.node(t,n,{class:"math-select"})})))},eM=new p.Plugin({state:{init:function(e,t){return QE(t)},apply:function(e,t,n,r){return e.selection&&e.selectionSet?QE(e):n}},props:{decorations:function(e){return eM.getState(e)}}});new(function(){function e(t,n){Object(c.a)(this,e),this.nodes=Object.assign(Object.assign({},null===n||void 0===n?void 0:n.nodes),t.nodes),this.marks=Object.assign(Object.assign({},null===n||void 0===n?void 0:n.marks),t.marks)}return Object(d.a)(e,[{key:"serializeFragment",value:function(e){var t=this,n="\n\n",r="",o=!0,i=e.size;return e.nodesBetween(0,i,(function(e,a){var s,l=t.serializeNode(e);if(null!==l)return r+=l,!1;e.isText?(r+=(null===(s=e.text)||void 0===s?void 0:s.slice(Math.max(0,a)-a,i-a))||"",o=!1):(e.isLeaf,!o&&e.isBlock&&(r+=n,o=!0))}),0),r}},{key:"serializeSlice",value:function(e){return this.serializeFragment(e.content)}},{key:"serializeNode",value:function(e){var t=this.nodes[e.type.name];return void 0!==t?t(e):null}}]),e}())({nodes:{math_inline:function(e){return"$".concat(e.textContent,"$")},math_display:function(e){return"\n\n$$\n".concat(e.textContent,"\n$$")}}});var tM=Bo.create({name:"mathInline",group:"inline math",content:"text*",inline:!0,atom:!0,code:!0,parseHTML:function(){return[{tag:"span[class*='math-inline']"}]},renderHTML:function(e){return["span",Sr({class:"math-inline math-node"},e.HTMLAttributes),0]},addCommands:function(){var e=this;return{insertMathInline:function(){return function(t){var n=t.chain,r=t.tr.selection.$from;return n().insertContent({type:e.name,attrs:{}}).setNodeSelection(r.pos).run()}}}},addProseMirrorPlugins:function(){var e,t,n,r=NE({rules:[(e=ZE,t=this.type,new LE(e,(function(e,r,o,i){var a=e.doc.resolve(o),s=a.index(),l=e.doc.resolve(i),u=n instanceof Function?n(r):n;return a.parent.canReplaceWith(s,l.index(),t)?e.tr.replaceRangeWith(o,i,t.create(u,t.schema.text(r[1]))):null})))]});return[$E,r]}}),nM=Bo.create({name:"mathBlock",group:"block math",content:"text*",atom:!0,code:!0,parseHTML:function(){return[{tag:"div[class*='math-block']"}]},renderHTML:function(e){return["div",Sr({class:"math-block math-node"},e.HTMLAttributes),0]},addCommands:function(){var e=this;return{insertMathBlock:function(){return function(t){var n=t.state,r=t.dispatch,o=t.view;return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return function(n,r){var o=n.selection,i=o.$from,a=o.empty,s=i.index();if(!a&&!i.parent.canReplaceWith(s,s,e))return!1;if(r){var l=e.create({},t?n.schema.text(t):null),u=n.tr.replaceSelectionWith(l);r(u=a?u.setSelection(p.TextSelection.create(u.doc,i.pos+1)):u.setSelection(p.NodeSelection.create(u.doc,i.pos)))}return!0}}(e.type)(n,r,o)}}}},addProseMirrorPlugins:function(){var e,t,n;return[NE({rules:[(e=XE,t=this.type,new LE(e,(function(e,r,o,i){var a=e.doc.resolve(o),s=n instanceof Function?n(r):n;if(!a.node(-1).canReplaceWith(a.index(-1),a.indexAfter(-1),t))return null;var l=e.tr.delete(o,i).setBlockType(o,o,t,s);return l.setSelection(p.NodeSelection.create(l.doc,l.mapping.map(a.pos-1)))})))]})]}}),rM=void 0,oM=_r.create({name:"keepinview",onCreate:function(){var e=this;rM=function(){iM(e.editor)},window.addEventListener("resize",rM)},onDestroy:function(){rM&&(window.removeEventListener("resize",rM),rM=void 0)},addKeyboardShortcuts:function(){return{Enter:function(e){var t=e.editor;return setTimeout((function(){iM(t)})),!1}}}});function iM(e){var t=e.state.selection.$from,n=function(e,t,n){var r=e.state.doc.content.size,o=Qr(t,0,r),i=Qr(n,0,r),a=e.coordsAtPos(o),s=e.coordsAtPos(i,-1),l=Math.min(a.top,s.top),u=Math.max(a.bottom,s.bottom),c=Math.min(a.left,s.left),d=Math.max(a.right,s.right),p={top:l,bottom:u,left:c,right:d,width:d-c,height:u-l,x:c,y:l};return Object(f.a)(Object(f.a)({},p),{},{toJSON:function(){return p}})}(e.view,t.pos,t.pos+1),r=n.top;if(window.innerHeight-r<100){var o=e.view.domAtPos(t.pos).node;if(o.nodeType===Node.TEXT_NODE&&o.parentNode&&(o=o.parentNode),o instanceof HTMLElement){var i=aM(o);i?i.scrollBy({top:100,behavior:"smooth"}):o.scrollIntoView({behavior:"smooth",block:"center"})}}}var aM=function(e){if(e){for(var t=e.parentElement;t;){var n=t.style,r=n.overflow,o=n.overflowY;if(sM(r)||sM(o))return t;t=t.parentElement}return document.documentElement}};function sM(e){return e.split(" ").every((function(e){return"auto"===e||"scroll"===e}))}var lM=new p.PluginKey("selection-persist-key"),uM=_r.create({name:"selection-persist",addProseMirrorPlugins:function(){var e=!1,t=this.editor;return[new p.Plugin({key:lM,props:{decorations:function(e){return lM.getState(e)}},state:{init:function(){return _u.empty},apply:function(n,r,o,i){if((t.storage.searchreplace||{}).isSearching)return _u.empty;var a=!!n.getMeta("blur");!!n.getMeta("focus")&&(e=!1,!0),a&&(e=!0,!1);var s=o.selection,l=s.from,u=s.to;return e?_u.create(n.doc,[zu.inline(l,u,{style:"background-color: var(--dimPrimary)"})]):_u.empty}}})]}}),cM=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(){return Object(c.a)(this,n),t.apply(this,arguments)}return Object(d.a)(n,[{key:"requestPermission",value:function(e){var t=new CustomEvent("permissionrequest",{detail:{id:e},cancelable:!0});if(window.dispatchEvent(t))return this.current}}]),n}(Mo);function dM(){var e=Object(jd.useState)(0),t=Object(i.a)(e,2)[1];return function(){return t((function(e){return e+1}))}}var fM=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=Object(jd.useState)(null),r=Object(i.a)(n,2),o=r[0],a=r[1],s=dM(),l=Object(jd.useRef)(o);return Object(jd.useEffect)((function(){var t=!0,n=new cM(e);return a(n),n.on("transaction",(function(){requestAnimationFrame((function(){requestAnimationFrame((function(){t&&s()}))}))})),function(){n.destroy(),t=!1}}),t),Object(jd.useEffect)((function(){l.current=o,o&&(o.current||Object.defineProperty(o,"current",{get:function(){return l.current}}))}),[o]),Object(jd.useEffect)((function(){function e(e){if(null===o||void 0===o?void 0:o.view.dragging)return e.preventDefault(),!0}return null===o||void 0===o||o.view.dom.addEventListener("dragenter",e),function(){null===o||void 0===o||o.view.dom.removeEventListener("dragenter",e)}}),[null===o||void 0===o?void 0:o.view.dom]),o},pM={premium:["insertImage"]};function hM(e){var t=e.claims,n=e.onPermissionDenied;Object(jd.useEffect)((function(){function e(e){var r=e.detail.id;for(var o in pM){var i=o;if(!(pM[i].indexOf(r)<=-1)&&!t[i]){n(i,r),e.preventDefault();break}}e.preventDefault()}return window.addEventListener("permissionrequest",e),function(){window.removeEventListener("permissionrequest",e)}}),[t,n])}var mM=_r.create({name:"highlight",addOptions:function(){return{types:["textStyle"],HTMLAttributes:{}}},addGlobalAttributes:function(){return[{types:this.options.types,attributes:{backgroundColor:{default:null,parseHTML:function(e){var t;return null===(t=e.style.backgroundColor)||void 0===t?void 0:t.replace(/['"]+/g,"")},renderHTML:function(e){return e.backgroundColor?{style:"background-color: ".concat(e.backgroundColor)}:{}}}}}]},addCommands:function(){return{setHighlight:function(e){return function(t){return t.commands.setMark("textStyle",{backgroundColor:e})}},toggleHighlight:function(e){return function(t){return t.commands.toggleMark("textStyle",{backgroundColor:e})}},unsetHighlight:function(){return function(e){return(0,e.chain)().setMark("textStyle",{backgroundColor:null}).removeEmptyTextStyle().run()}}}}}),vM=Bo.create({name:"paragraph",priority:1e3,addOptions:function(){return{HTMLAttributes:{},doubleSpaced:!0}},group:"block",content:"inline*",addAttributes:function(){return{spacing:{keepOnSplit:!1,default:gM(this.options.doubleSpaced),parseHTML:function(e){return e.dataset.spacing},renderHTML:function(e){if(e.spacing)return{"data-spacing":e.spacing}}}}},parseHTML:function(){return[{tag:"p"}]},renderHTML:function(e){var t=e.HTMLAttributes;return["p",Sr(this.options.HTMLAttributes,t),0]},addCommands:function(){var e=this;return{setParagraph:function(){return function(t){return t.commands.setNode(e.name)}}}},addKeyboardShortcuts:function(){var e=this;return{Enter:function(t){var n=t.editor;if(e.options.doubleSpaced)return!1;var r=n.state.selection,o=r.$from;return!(!r.empty||o.parent.type!==e.type||o.depth>1)&&(!(null!==o.nodeBefore)&&(yM(n,e.type,!0,!1),!0))},"Mod-Enter":function(t){return yM(t.editor,e.type,!1,!0)},"Shift-Enter":function(t){return yM(t.editor,e.type,!1,!0)},"Mod-Alt-0":function(){return e.editor.commands.setParagraph()}}}});function gM(e){return e?"double":"single"}function yM(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return e.chain().command((function(e){var n=e.tr,o=n.selection.from,i=n.doc.nodeAt(o-1);return(null===i||void 0===i?void 0:i.type)!==t||"double"===i.attrs.spacing||r&&2===i.nodeSize||n.delete(o-1,o),!0})).splitBlock({keepMarks:!0}).updateAttributes(t,{spacing:gM(n)}).run()}var bM=_r.create({name:"clipboardTextSerializer",addProseMirrorPlugins:function(){var e=this;return[new p.Plugin({key:new p.PluginKey("clipboardTextSerializer"),props:{clipboardTextSerializer:function(t){return function(e,t){var n={from:0,to:e.size},r=function(e){return"single"===e.attrs.spacing?"\n":"\n\n"},o="",i=!0;return e.content.nodesBetween(0,e.size,(function(e,a,s,l){var u,c=null===(u=t.nodes[e.type.name])||void 0===u?void 0:u.spec.toText;c?(e.isBlock&&!i&&(o+=r(e),i=!0),s&&(o+=c({node:e,pos:a,parent:s,index:l,range:n}))):e.isText?(o+=null===e||void 0===e?void 0:e.text,i=!1):e.isBlock&&!i&&(o+=r(e),i=!0)})),o}(t,e.editor.schema)}}})]}});var wM=_r.create({name:"datetime",addKeyboardShortcuts:function(){return{"Alt-t":function(e){return e.editor.commands.insertTime()},"Alt-d":function(e){return e.editor.commands.insertDate()},"Mod-Alt-d":function(e){return e.editor.commands.insertDateTime()}}},addCommands:function(){return{insertDate:function(){return function(e){return e.commands.insertContent(OM())}},insertTime:function(){return function(e){return e.commands.insertContent(kM())}},insertDateTime:function(){return function(e){return e.commands.insertContent(xM())}}}},addInputRules:function(){return[SM({shortcut:"/time",replace:function(){return kM()}}),SM({shortcut:"/date",replace:function(){return OM()}}),SM({shortcut:"/now",replace:function(){return xM()}})]}});function kM(){return(new Date).toLocaleTimeString(void 0,{second:void 0,minute:"2-digit",hour12:!0,hour:"2-digit"})}function xM(){return(new Date).toLocaleString(void 0,{second:void 0,hour12:!0,hour:"2-digit",minute:"2-digit",day:"2-digit",year:"numeric",month:"2-digit"})}function OM(){return(new Date).toLocaleDateString()}function SM(e){return function(e){return new Pr({find:e.find,handler:function(t){var n=t.state,r=t.range,o=t.match,i=e.replace(o),a=r.from,s=r.to;n.tr.insertText(i,a,s),e.after&&e.after(t)}})}({find:new RegExp("(^| )".concat(e.shortcut,"(\\s)")),replace:function(t){var n="\n"===t[2]?"":t[2];return"".concat(t[1]).concat(e.replace()).concat(n)},after:function(e){var t=e.match,n=e.state,r=e.range;"\n"===t[2]&&n.tr.split(n.tr.mapping.map(r.to))}})}var CM=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},jM=Object.entries(jo).filter((function(e){return"ClipboardTextSerializer"!==Object(i.a)(e,1)[0]})).map((function(e){return Object(i.a)(e,2)[1]}));uc.prototype.updateState=function(e){this.docView&&this.updateStateInner(e,this.state.plugins!=e.plugins)};var DM=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=e.theme,r=e.doubleSpacedLines,i=void 0===r||r,a=e.isMobile,s=e.isKeyboardOpen,l=e.onDownloadAttachment,u=e.onOpenAttachmentPicker,c=e.onBeforeCreate,d=CM(e,["theme","doubleSpacedLines","isMobile","isKeyboardOpen","onDownloadAttachment","onOpenAttachmentPicker","onBeforeCreate"]),f=Gd(),p=Rd((function(e){return e.setIsMobile})),h=Rd((function(e){return e.setTheme})),m=Rd((function(e){return e.setIsKeyboardOpen}));Object(jd.useEffect)((function(){p(a||!1),h(n),m(s||!1)}),[a,n,s]);var v=Object(jd.useMemo)((function(){return{enableCoreExtensions:!1,extensions:[].concat(Object(o.a)(jM),[bM,ef,NC,pd,vM.configure({doubleSpaced:i}),ud.configure({code:!1,dropcursor:!1,codeBlock:!1,listItem:!1,orderedList:!1,bulletList:!1,paragraph:!1,hardBreak:!1,history:{depth:200,newGroupDelay:1e3}}),TC.configure({class:"drop-cursor"}),_o,Ba,dd,fd,hd,md,vd,gd,yd,jC.configure({nested:!0}),AC,gE.configure({openOnClick:!a,autolink:!1}).extend({inclusive:!0}),WD.configure({resizable:!0,allowTableNodeSelection:!0,cellMinWidth:50}),wd,xd,Od,mM,kD,bd,cd.configure({types:["heading","paragraph"],alignments:["left","right","center","justify"],defaultAlignment:"left"}),za.configure({placeholder:"Start writing your note..."}),gC.configure({allowBase64:!0}),HC,HS.configure({onDownloadAttachment:l,onOpenAttachmentPicker:u}),TD,RD,AD,Xa.extend({excludes:""}),TE,tM,nM,oM,uM,wM]),onBeforeCreate:function(e){var t=e.editor;t.storage.portalProviderAPI=f,c&&c({editor:t})},injectCSS:!1}}),[l,u,f,c]),g=fM(Object.assign(Object.assign({},v),d),t);return g}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(37);function o(e,t){if(e){if("string"===typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},function(e,t,n){"use strict";t.a=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}},function(e,t,n){"use strict";n.r(t);var r=n(35),o=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|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|download|draggable|encType|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|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|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|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)-.*))$/,i=Object(r.a)((function(e){return o.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}));t.default=i},function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",(function(){return r}))},,function(e){e.exports=JSON.parse('[{"filename":"markup","title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"]},{"filename":"css","title":"CSS"},{"filename":"clike","title":"C-like"},{"filename":"javascript","title":"JavaScript","alias":["js"]},{"filename":"abap","title":"ABAP"},{"filename":"abnf","title":"ABNF"},{"filename":"actionscript","title":"ActionScript"},{"filename":"ada","title":"Ada"},{"filename":"agda","title":"Agda"},{"filename":"al","title":"AL"},{"filename":"antlr4","title":"ANTLR4","alias":["g4"]},{"filename":"apacheconf","title":"Apache Configuration"},{"filename":"apex","title":"Apex"},{"filename":"apl","title":"APL"},{"filename":"applescript","title":"AppleScript"},{"filename":"aql","title":"AQL"},{"filename":"arduino","title":"Arduino","alias":["ino"]},{"filename":"arff","title":"ARFF"},{"filename":"armasm","title":"ARM Assembly","alias":["arm-asm"]},{"filename":"arturo","title":"Arturo","alias":["art"]},{"filename":"asciidoc","title":"AsciiDoc","alias":["adoc"]},{"filename":"aspnet","title":"ASP.NET (C#)"},{"filename":"asm6502","title":"6502 Assembly"},{"filename":"asmatmel","title":"Atmel AVR Assembly"},{"filename":"autohotkey","title":"AutoHotkey"},{"filename":"autoit","title":"AutoIt"},{"filename":"avisynth","title":"AviSynth","alias":["avs"]},{"filename":"avro-idl","title":"Avro IDL","alias":["avdl"]},{"filename":"awk","title":"AWK","alias":["gawk"]},{"filename":"bash","title":"Bash","alias":["shell"]},{"filename":"basic","title":"BASIC"},{"filename":"batch","title":"Batch"},{"filename":"bbcode","title":"BBcode","alias":["shortcode"]},{"filename":"bicep","title":"Bicep"},{"filename":"birb","title":"Birb"},{"filename":"bison","title":"Bison"},{"filename":"bnf","title":"BNF","alias":["rbnf"]},{"filename":"brainfuck","title":"Brainfuck"},{"filename":"brightscript","title":"BrightScript"},{"filename":"bro","title":"Bro"},{"filename":"bsl","title":"BSL (1C:Enterprise)","alias":["oscript"]},{"filename":"c","title":"C"},{"filename":"csharp","title":"C#","alias":["cs","dotnet"]},{"filename":"cpp","title":"C++"},{"filename":"cfscript","title":"CFScript","alias":["cfc"]},{"filename":"chaiscript","title":"ChaiScript"},{"filename":"cil","title":"CIL"},{"filename":"clojure","title":"Clojure"},{"filename":"cmake","title":"CMake"},{"filename":"cobol","title":"COBOL"},{"filename":"coffeescript","title":"CoffeeScript","alias":["coffee"]},{"filename":"concurnas","title":"Concurnas","alias":["conc"]},{"filename":"csp","title":"Content-Security-Policy"},{"filename":"cooklang","title":"Cooklang"},{"filename":"coq","title":"Coq"},{"filename":"crystal","title":"Crystal"},{"filename":"css-extras","title":"CSS Extras"},{"filename":"csv","title":"CSV"},{"filename":"cue","title":"CUE"},{"filename":"cypher","title":"Cypher"},{"filename":"d","title":"D"},{"filename":"dart","title":"Dart"},{"filename":"dataweave","title":"DataWeave"},{"filename":"dax","title":"DAX"},{"filename":"dhall","title":"Dhall"},{"filename":"diff","title":"Diff"},{"filename":"django","title":"Django/Jinja2","alias":["jinja2"]},{"filename":"dns-zone-file","title":"DNS zone file","alias":["dns-zone"]},{"filename":"docker","title":"Docker","alias":["dockerfile"]},{"filename":"dot","title":"DOT (Graphviz)","alias":["gv"]},{"filename":"ebnf","title":"EBNF"},{"filename":"editorconfig","title":"EditorConfig"},{"filename":"eiffel","title":"Eiffel"},{"filename":"ejs","title":"EJS","alias":["eta"]},{"filename":"elixir","title":"Elixir"},{"filename":"elm","title":"Elm"},{"filename":"etlua","title":"Embedded Lua templating"},{"filename":"erb","title":"ERB"},{"filename":"erlang","title":"Erlang"},{"filename":"excel-formula","title":"Excel Formula","alias":["xlsx","xls"]},{"filename":"fsharp","title":"F#"},{"filename":"factor","title":"Factor"},{"filename":"false","title":"False"},{"filename":"firestore-security-rules","title":"Firestore security rules"},{"filename":"flow","title":"Flow"},{"filename":"fortran","title":"Fortran"},{"filename":"ftl","title":"FreeMarker Template Language"},{"filename":"gml","title":"GameMaker Language","alias":["gamemakerlanguage"]},{"filename":"gap","title":"GAP (CAS)"},{"filename":"gcode","title":"G-code"},{"filename":"gdscript","title":"GDScript"},{"filename":"gedcom","title":"GEDCOM"},{"filename":"gettext","title":"gettext","alias":["po"]},{"filename":"gherkin","title":"Gherkin"},{"filename":"git","title":"Git"},{"filename":"glsl","title":"GLSL"},{"filename":"gn","title":"GN","alias":["gni"]},{"filename":"linker-script","title":"GNU Linker Script","alias":["ld"]},{"filename":"go","title":"Go"},{"filename":"go-module","title":"Go module","alias":["go-mod"]},{"filename":"gradle","title":"Gradle"},{"filename":"graphql","title":"GraphQL"},{"filename":"groovy","title":"Groovy"},{"filename":"haml","title":"Haml"},{"filename":"handlebars","title":"Handlebars","alias":["hbs","mustache"]},{"filename":"haskell","title":"Haskell","alias":["hs"]},{"filename":"haxe","title":"Haxe"},{"filename":"hcl","title":"HCL"},{"filename":"hlsl","title":"HLSL"},{"filename":"hoon","title":"Hoon"},{"filename":"http","title":"HTTP"},{"filename":"hpkp","title":"HTTP Public-Key-Pins"},{"filename":"hsts","title":"HTTP Strict-Transport-Security"},{"filename":"ichigojam","title":"IchigoJam"},{"filename":"icon","title":"Icon"},{"filename":"icu-message-format","title":"ICU Message Format"},{"filename":"idris","title":"Idris","alias":["idr"]},{"filename":"ignore","title":".ignore","alias":["gitignore","hgignore","npmignore"]},{"filename":"inform7","title":"Inform 7"},{"filename":"ini","title":"Ini"},{"filename":"io","title":"Io"},{"filename":"j","title":"J"},{"filename":"java","title":"Java"},{"filename":"javadoc","title":"JavaDoc"},{"filename":"javadoclike","title":"JavaDoc-like"},{"filename":"javastacktrace","title":"Java stack trace"},{"filename":"jexl","title":"Jexl"},{"filename":"jolie","title":"Jolie"},{"filename":"jq","title":"JQ"},{"filename":"jsdoc","title":"JSDoc"},{"filename":"js-extras","title":"JS Extras"},{"filename":"json","title":"JSON","alias":["webmanifest"]},{"filename":"json5","title":"JSON5"},{"filename":"jsonp","title":"JSONP"},{"filename":"jsstacktrace","title":"JS stack trace"},{"filename":"js-templates","title":"JS Templates"},{"filename":"julia","title":"Julia"},{"filename":"keepalived","title":"Keepalived Configure"},{"filename":"keyman","title":"Keyman"},{"filename":"kotlin","title":"Kotlin","alias":["kt","kts"]},{"filename":"kumir","title":"KuMir (\u041a\u0443\u041c\u0438\u0440)","alias":["kum"]},{"filename":"kusto","title":"Kusto"},{"filename":"latex","title":"LaTeX","alias":["tex","context"]},{"filename":"latte","title":"Latte"},{"filename":"less","title":"Less"},{"filename":"lilypond","title":"LilyPond","alias":["ly"]},{"filename":"liquid","title":"Liquid"},{"filename":"lisp","title":"Lisp","alias":["emacs","elisp","emacs-lisp"]},{"filename":"livescript","title":"LiveScript"},{"filename":"llvm","title":"LLVM IR"},{"filename":"log","title":"Log file"},{"filename":"lolcode","title":"LOLCODE"},{"filename":"lua","title":"Lua"},{"filename":"magma","title":"Magma (CAS)"},{"filename":"makefile","title":"Makefile"},{"filename":"markdown","title":"Markdown","alias":["md"]},{"filename":"markup-templating","title":"Markup templating"},{"filename":"mata","title":"Mata"},{"filename":"matlab","title":"MATLAB"},{"filename":"maxscript","title":"MAXScript"},{"filename":"mel","title":"MEL"},{"filename":"mermaid","title":"Mermaid"},{"filename":"mizar","title":"Mizar"},{"filename":"mongodb","title":"MongoDB"},{"filename":"monkey","title":"Monkey"},{"filename":"moonscript","title":"MoonScript","alias":["moon"]},{"filename":"n1ql","title":"N1QL"},{"filename":"n4js","title":"N4JS","alias":["n4jsd"]},{"filename":"nand2tetris-hdl","title":"Nand To Tetris HDL"},{"filename":"naniscript","title":"Naninovel Script","alias":["nani"]},{"filename":"nasm","title":"NASM"},{"filename":"neon","title":"NEON"},{"filename":"nevod","title":"Nevod"},{"filename":"nginx","title":"nginx"},{"filename":"nim","title":"Nim"},{"filename":"nix","title":"Nix"},{"filename":"nsis","title":"NSIS"},{"filename":"objectivec","title":"Objective-C","alias":["objc"]},{"filename":"ocaml","title":"OCaml"},{"filename":"odin","title":"Odin"},{"filename":"opencl","title":"OpenCL"},{"filename":"openqasm","title":"OpenQasm","alias":["qasm"]},{"filename":"oz","title":"Oz"},{"filename":"parigp","title":"PARI/GP"},{"filename":"parser","title":"Parser"},{"filename":"pascal","title":"Pascal","alias":["objectpascal"]},{"filename":"pascaligo","title":"Pascaligo"},{"filename":"psl","title":"PATROL Scripting Language"},{"filename":"pcaxis","title":"PC-Axis","alias":["px"]},{"filename":"peoplecode","title":"PeopleCode","alias":["pcode"]},{"filename":"perl","title":"Perl"},{"filename":"php","title":"PHP"},{"filename":"phpdoc","title":"PHPDoc"},{"filename":"php-extras","title":"PHP Extras"},{"filename":"plant-uml","title":"PlantUML","alias":["plantuml"]},{"filename":"plsql","title":"PL/SQL"},{"filename":"powerquery","title":"PowerQuery","alias":["pq","mscript"]},{"filename":"powershell","title":"PowerShell"},{"filename":"processing","title":"Processing"},{"filename":"prolog","title":"Prolog"},{"filename":"promql","title":"PromQL"},{"filename":"properties","title":".properties"},{"filename":"protobuf","title":"Protocol Buffers"},{"filename":"pug","title":"Pug"},{"filename":"puppet","title":"Puppet"},{"filename":"pure","title":"Pure"},{"filename":"purebasic","title":"PureBasic","alias":["pbfasm"]},{"filename":"purescript","title":"PureScript","alias":["purs"]},{"filename":"python","title":"Python","alias":["py"]},{"filename":"qsharp","title":"Q#","alias":["qs"]},{"filename":"q","title":"Q (kdb+ database)"},{"filename":"qml","title":"QML"},{"filename":"qore","title":"Qore"},{"filename":"r","title":"R"},{"filename":"racket","title":"Racket","alias":["rkt"]},{"filename":"cshtml","title":"Razor C#","alias":["razor"]},{"filename":"jsx","title":"React JSX"},{"filename":"tsx","title":"React TSX"},{"filename":"reason","title":"Reason"},{"filename":"regex","title":"Regex"},{"filename":"rego","title":"Rego"},{"filename":"renpy","title":"Ren\'py","alias":["rpy"]},{"filename":"rescript","title":"ReScript","alias":["res"]},{"filename":"rest","title":"reST (reStructuredText)"},{"filename":"rip","title":"Rip"},{"filename":"roboconf","title":"Roboconf"},{"filename":"robotframework","title":"Robot Framework","alias":["robot"]},{"filename":"ruby","title":"Ruby","alias":["rb"]},{"filename":"rust","title":"Rust"},{"filename":"sas","title":"SAS"},{"filename":"sass","title":"Sass (Sass)"},{"filename":"scss","title":"Sass (Scss)"},{"filename":"scala","title":"Scala"},{"filename":"scheme","title":"Scheme"},{"filename":"shell-session","title":"Shell session","alias":["sh-session","shellsession"]},{"filename":"smali","title":"Smali"},{"filename":"smalltalk","title":"Smalltalk"},{"filename":"smarty","title":"Smarty"},{"filename":"sml","title":"SML","alias":["smlnj"]},{"filename":"solidity","title":"Solidity (Ethereum)","alias":["sol"]},{"filename":"solution-file","title":"Solution file","alias":["sln"]},{"filename":"soy","title":"Soy (Closure Template)"},{"filename":"sparql","title":"SPARQL","alias":["rq"]},{"filename":"splunk-spl","title":"Splunk SPL"},{"filename":"sqf","title":"SQF: Status Quo Function (Arma 3)"},{"filename":"sql","title":"SQL"},{"filename":"squirrel","title":"Squirrel"},{"filename":"stan","title":"Stan"},{"filename":"stata","title":"Stata Ado"},{"filename":"iecst","title":"Structured Text (IEC 61131-3)"},{"filename":"stylus","title":"Stylus"},{"filename":"supercollider","title":"SuperCollider","alias":["sclang"]},{"filename":"swift","title":"Swift"},{"filename":"systemd","title":"Systemd configuration file"},{"filename":"t4-templating","title":"T4 templating"},{"filename":"t4-cs","title":"T4 Text Templates (C#)","alias":["t4"]},{"filename":"t4-vb","title":"T4 Text Templates (VB)"},{"filename":"tap","title":"TAP"},{"filename":"tcl","title":"Tcl"},{"filename":"tt2","title":"Template Toolkit 2"},{"filename":"textile","title":"Textile"},{"filename":"toml","title":"TOML"},{"filename":"tremor","title":"Tremor","alias":["trickle","troy"]},{"filename":"turtle","title":"Turtle","alias":["trig"]},{"filename":"twig","title":"Twig"},{"filename":"typescript","title":"TypeScript","alias":["ts"]},{"filename":"typoscript","title":"TypoScript","alias":["tsconfig"]},{"filename":"unrealscript","title":"UnrealScript","alias":["uscript","uc"]},{"filename":"uorazor","title":"UO Razor Script"},{"filename":"uri","title":"URI","alias":["url"]},{"filename":"v","title":"V"},{"filename":"vala","title":"Vala"},{"filename":"vbnet","title":"VB.Net"},{"filename":"velocity","title":"Velocity"},{"filename":"verilog","title":"Verilog"},{"filename":"vhdl","title":"VHDL"},{"filename":"vim","title":"vim"},{"filename":"visual-basic","title":"Visual Basic","alias":["vb","vba"]},{"filename":"warpscript","title":"WarpScript"},{"filename":"wasm","title":"WebAssembly"},{"filename":"web-idl","title":"Web IDL","alias":["webidl"]},{"filename":"wgsl","title":"WGSL"},{"filename":"wiki","title":"Wiki markup"},{"filename":"wolfram","title":"Wolfram language","alias":["mathematica","nb","wl"]},{"filename":"wren","title":"Wren"},{"filename":"xeora","title":"Xeora","alias":["xeoracube"]},{"filename":"xml-doc","title":"XML doc (.net)"},{"filename":"xojo","title":"Xojo (REALbasic)"},{"filename":"xquery","title":"XQuery"},{"filename":"yaml","title":"YAML","alias":["yml"]},{"filename":"yang","title":"YANG"},{"filename":"zig","title":"Zig"}]')},function(e,t,n){"use strict";function r(){return r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}n.r(t),n.d(t,"get",(function(){return o})),n.d(t,"responsive",(function(){return f})),n.d(t,"css",(function(){return p}));var o=function(e,t,n,r,o){for(t=t&&t.split?t.split("."):[t],r=0;r<t.length;r++)e=e?e[t[r]]:o;return e===o?n:e},i=[40,52,64].map((function(e){return e+"em"})),a={space:[0,4,8,16,32,64,128,256,512],fontSizes:[12,14,16,20,24,32,48,64,72]},s={bg:"backgroundColor",m:"margin",mt:"marginTop",mr:"marginRight",mb:"marginBottom",ml:"marginLeft",mx:"marginX",my:"marginY",p:"padding",pt:"paddingTop",pr:"paddingRight",pb:"paddingBottom",pl:"paddingLeft",px:"paddingX",py:"paddingY"},l={marginX:["marginLeft","marginRight"],marginY:["marginTop","marginBottom"],paddingX:["paddingLeft","paddingRight"],paddingY:["paddingTop","paddingBottom"],size:["width","height"]},u={color:"colors",backgroundColor:"colors",borderColor:"colors",margin:"space",marginTop:"space",marginRight:"space",marginBottom:"space",marginLeft:"space",marginX:"space",marginY:"space",padding:"space",paddingTop:"space",paddingRight:"space",paddingBottom:"space",paddingLeft:"space",paddingX:"space",paddingY:"space",top:"space",right:"space",bottom:"space",left:"space",gridGap:"space",gridColumnGap:"space",gridRowGap:"space",gap:"space",columnGap:"space",rowGap:"space",fontFamily:"fonts",fontSize:"fontSizes",fontWeight:"fontWeights",lineHeight:"lineHeights",letterSpacing:"letterSpacings",border:"borders",borderTop:"borders",borderRight:"borders",borderBottom:"borders",borderLeft:"borders",borderWidth:"borderWidths",borderStyle:"borderStyles",borderRadius:"radii",borderTopRightRadius:"radii",borderTopLeftRadius:"radii",borderBottomRightRadius:"radii",borderBottomLeftRadius:"radii",borderTopWidth:"borderWidths",borderTopColor:"colors",borderTopStyle:"borderStyles",borderBottomWidth:"borderWidths",borderBottomColor:"colors",borderBottomStyle:"borderStyles",borderLeftWidth:"borderWidths",borderLeftColor:"colors",borderLeftStyle:"borderStyles",borderRightWidth:"borderWidths",borderRightColor:"colors",borderRightStyle:"borderStyles",outlineColor:"colors",boxShadow:"shadows",textShadow:"shadows",zIndex:"zIndices",width:"sizes",minWidth:"sizes",maxWidth:"sizes",height:"sizes",minHeight:"sizes",maxHeight:"sizes",flexBasis:"sizes",size:"sizes",fill:"colors",stroke:"colors"},c=function(e,t){if("number"!==typeof t||t>=0)return o(e,t,t);var n=Math.abs(t),r=o(e,n,n);return"string"===typeof r?"-"+r:-1*r},d=["margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","top","bottom","left","right"].reduce((function(e,t){var n;return r({},e,((n={})[t]=c,n))}),{}),f=function(e){return function(t){var n={},r=o(t,"breakpoints",i),a=[null].concat(r.map((function(e){return"@media screen and (min-width: "+e+")"})));for(var s in e){var l="function"===typeof e[s]?e[s](t):e[s];if(null!=l)if(Array.isArray(l))for(var u=0;u<l.slice(0,a.length).length;u++){var c=a[u];c?(n[c]=n[c]||{},null!=l[u]&&(n[c][s]=l[u])):n[s]=l[u]}else n[s]=l}return n}},p=function e(t){return function(n){void 0===n&&(n={});var i=r({},a,{},n.theme||n),c={},p="function"===typeof t?t(i):t,h=f(p)(i);for(var m in h){var v=h[m],g="function"===typeof v?v(i):v;if("variant"!==m)if(g&&"object"===typeof g)c[m]=e(g)(i);else{var y=o(s,m,m),b=o(u,y),w=o(i,b,o(i,y,{})),k=o(d,y,o)(w,g,g);if(l[y])for(var x=l[y],O=0;O<x.length;O++)c[x[O]]=k;else c[y]=k}else c=r({},c,{},e(o(i,g))(i))}return c}};t.default=p},function(e,t,n){"use strict";n.r(t),n.d(t,"props",(function(){return a})),n.d(t,"createShouldForwardProp",(function(){return s}));var r=n(35),o=n(36),i=n(18),a=Object(i.compose)(i.space,i.typography,i.color,i.layout,i.flexbox,i.border,i.background,i.position,i.grid,i.shadow,i.buttonStyle,i.textStyle,i.colorStyle).propNames,s=function(e){var t=new RegExp("^("+e.join("|")+")$");return Object(r.a)((function(e){return Object(o.default)(e)&&!t.test(e)}))};t.default=s(a)},function(e,t,n){"use strict";function r(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";t.a=function(e){var t=new WeakMap;return function(n){if(t.has(n))return t.get(n);var r=e(n);return t.set(n,r),r}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);function o(e){var t,n=new Set,r=function(e,r){var o="function"===typeof e?e(t):e;if(o!==t){var i=t;t=r?o:Object.assign({},t,o),n.forEach((function(e){return e(t,i)}))}},o=function(){return t},i={setState:r,getState:o,subscribe:function(e,r,i){return r||i?function(e,r,i){void 0===r&&(r=o),void 0===i&&(i=Object.is),console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");var a=r(t);function s(){var n=r(t);if(!i(a,n)){var o=a;e(a=n,o)}}return n.add(s),function(){return n.delete(s)}}(e,r,i):(n.add(e),function(){return n.delete(e)})},destroy:function(){return n.clear()}};return t=e(r,o,i),i}var i="undefined"===typeof window||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent)?r.useEffect:r.useLayoutEffect;t.default=function(e){var t="function"===typeof e?o(e):e,n=function(e,n){void 0===e&&(e=t.getState),void 0===n&&(n=Object.is);var o,a=r.useReducer((function(e){return e+1}),0)[1],s=t.getState(),l=r.useRef(s),u=r.useRef(e),c=r.useRef(n),d=r.useRef(!1),f=r.useRef();void 0===f.current&&(f.current=e(s));var p=!1;(l.current!==s||u.current!==e||c.current!==n||d.current)&&(o=e(s),p=!n(f.current,o)),i((function(){p&&(f.current=o),l.current=s,u.current=e,c.current=n,d.current=!1}));var h=r.useRef(s);i((function(){var e=function(){try{var e=t.getState(),n=u.current(e);c.current(f.current,n)||(l.current=e,f.current=n,a())}catch(r){d.current=!0,a()}},n=t.subscribe(e);return t.getState()!==h.current&&e(),n}),[]);var m=p?o:f.current;return r.useDebugValue(m),m};return Object.assign(n,t),n[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");var e=[n,t];return{next:function(){var t=e.length<=0;return{value:e.shift(),done:t}}}},n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=n(90),i=(r=o)&&r.__esModule?r:{default:r};t.default=i.default,e.exports=t.default},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(12),o=n(29);var i=n(42);function a(e,t,n){return a=Object(i.a)()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&Object(o.a)(i,n.prototype),i},a.apply(null,arguments)}function s(e){var t="function"===typeof Map?new Map:void 0;return s=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,i)}function i(){return a(e,arguments,Object(r.a)(this).constructor)}return i.prototype=Object.create(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),Object(o.a)(i,e)},s(e)}},function(e,t,n){e.exports=n(88)()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canUseDOM=t.SafeNodeList=t.SafeHTMLCollection=void 0;var r,o=n(95);var i=((r=o)&&r.__esModule?r:{default:r}).default,a=i.canUseDOM?window.HTMLElement:{};t.SafeHTMLCollection=i.canUseDOM?window.HTMLCollection:{},t.SafeNodeList=i.canUseDOM?window.NodeList:{},t.canUseDOM=i.canUseDOM;t.default=a},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(99),t),o(n(100),t),o(n(54),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){var n=[].slice.call(t.querySelectorAll("*"),0).reduce((function(t,n){return t.concat(n.shadowRoot?e(n.shadowRoot):[n])}),[]);return n.filter(a)};var r=/input|select|textarea|button|object|iframe/;function o(e){var t=e.offsetWidth<=0&&e.offsetHeight<=0;if(t&&!e.innerHTML)return!0;try{var n=window.getComputedStyle(e);return t?"visible"!==n.getPropertyValue("overflow")||e.scrollWidth<=0&&e.scrollHeight<=0:"none"==n.getPropertyValue("display")}catch(r){return console.warn("Failed to inspect element style"),!1}}function i(e,t){var n=e.nodeName.toLowerCase();return(r.test(n)&&!e.disabled||"a"===n&&e.href||t)&&function(e){for(var t=e,n=e.getRootNode&&e.getRootNode();t&&t!==document.body;){if(n&&t===n&&(t=n.host.parentNode),o(t))return!1;t=t.parentNode}return!0}(e)}function a(e){var t=e.getAttribute("tabindex");null===t&&(t=void 0);var n=isNaN(t);return(n||t>=0)&&i(e,!n)}e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){s&&(s.removeAttribute?s.removeAttribute("aria-hidden"):null!=s.length?s.forEach((function(e){return e.removeAttribute("aria-hidden")})):document.querySelectorAll(s).forEach((function(e){return e.removeAttribute("aria-hidden")})));s=null},t.log=function(){0},t.assertNodeList=l,t.setElement=function(e){var t=e;if("string"===typeof t&&a.canUseDOM){var n=document.querySelectorAll(t);l(n,t),t=n}return s=t||s},t.validateElement=u,t.hide=function(e){var t=!0,n=!1,r=void 0;try{for(var o,i=u(e)[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){o.value.setAttribute("aria-hidden","true")}}catch(a){n=!0,r=a}finally{try{!t&&i.return&&i.return()}finally{if(n)throw r}}},t.show=function(e){var t=!0,n=!1,r=void 0;try{for(var o,i=u(e)[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){o.value.removeAttribute("aria-hidden")}}catch(a){n=!0,r=a}finally{try{!t&&i.return&&i.return()}finally{if(n)throw r}}},t.documentNotReadyOrSSRTesting=function(){s=null};var r,o=n(94),i=(r=o)&&r.__esModule?r:{default:r},a=n(49);var s=null;function l(e,t){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+t+".")}function u(e){var t=e||s;return t?Array.isArray(t)||t instanceof HTMLCollection||t instanceof NodeList?t:[t]:((0,i.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),[])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.log=function(){console.log("portalOpenInstances ----------"),console.log(o.openInstances.length),o.openInstances.forEach((function(e){return console.log(e)})),console.log("end portalOpenInstances ----------")},t.resetState=function(){o=new r};var r=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.register=function(e){-1===t.openInstances.indexOf(e)&&(t.openInstances.push(e),t.emit("register"))},this.deregister=function(e){var n=t.openInstances.indexOf(e);-1!==n&&(t.openInstances.splice(n,1),t.emit("deregister"))},this.subscribe=function(e){t.subscribers.push(e)},this.emit=function(e){t.subscribers.forEach((function(n){return n(e,t.openInstances.slice())}))},this.openInstances=[],this.subscribers=[]},o=new r;t.default=o},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=n(101),i=n(104),a=n(109),s=n(111),l=function(){function e(){}return e.prototype.transform=function(e,t){return(new s.TransformerFactory).construct(e,t)},e.prototype.construct=function(e){var t=r(r({breakpoints:["480px","1000px","1000px"],space:[0,5,10,15,20,25,30,35],sizes:{full:"100%",half:"50%"},radii:{none:0,default:5,dialog:10,small:2.5},iconSizes:{big:18,medium:16,small:14},colors:(0,o.getColors)(e.theme,e.accent),shadows:"dark"===e.theme?{menu:"0px 0px 10px 0px #00000078"}:{menu:"0px 0px 10px 0px #00000022"}},(0,a.getFontConfig)(e.scale)),i.variants);return t.space.small=3,t},e}();t.default=l},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getStaticColors=void 0;var o=r(n(26));t.getStaticColors=function(e){return{shade:(0,o.default)(e).setAlpha(.1).toRgbString(),textSelection:(0,o.default)(e).setAlpha(.2).toRgbString(),dimPrimary:(0,o.default)(e).setAlpha(.7).toRgbString(),transparent:"transparent",static:"white",error:"#E53935",errorBg:"#E5393520",success:"#4F8A10",warn:"#FF5722",warnBg:"#FF572220",favorite:"#ffd700",codeBg:"#282a36",codeFg:"#6c7393",codeHighlight:"#50fa7b",codeSelectionFg:"#f8f8f2",codeSelectionBg:"#44475a",codeBorder:"#6c7393",codeSelection:"#9580ff1a"}}},function(e,t,n){"use strict";n.r(t);var r=n(17),o=n(1),i=n(36),a=n(30),s=n(25),l=n(24),u=i.default,c=function(e){return"theme"!==e&&"innerRef"!==e},d=function(e){return"string"===typeof e&&e.charCodeAt(0)>96?u:c};function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var h=function(){return null},m=function e(t,n){var r,i,u;void 0!==n&&(r=n.label,u=n.target,i=t.__emotion_forwardProp&&n.shouldForwardProp?function(e){return t.__emotion_forwardProp(e)&&n.shouldForwardProp(e)}:n.shouldForwardProp);var c=t.__emotion_real===t,f=c&&t.__emotion_base||t;"function"!==typeof i&&c&&(i=t.__emotion_forwardProp);var m=i||d(f),v=!m("as");return function(){var g=arguments,y=c&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==r&&y.push("label:"+r+";"),null==g[0]||void 0===g[0].raw)y.push.apply(y,g);else{0,y.push(g[0][0]);for(var b=g.length,w=1;w<b;w++)y.push(g[w],g[0][w])}var k=Object(a.b)((function(e,t,n){return Object(o.createElement)(a.a.Consumer,null,(function(r){var a=v&&e.as||f,c="",p=[],g=e;if(null==e.theme){for(var b in g={},e)g[b]=e[b];g.theme=r}"string"===typeof e.className?c=Object(s.a)(t.registered,p,e.className):null!=e.className&&(c=e.className+" ");var w=Object(l.a)(y.concat(p),t.registered,g);Object(s.b)(t,w,"string"===typeof a);c+=t.key+"-"+w.name,void 0!==u&&(c+=" "+u);var k=v&&void 0===i?d(a):m,x={};for(var O in e)v&&"as"===O||k(O)&&(x[O]=e[O]);x.className=c,x.ref=n||e.innerRef;var S=Object(o.createElement)(a,x),C=Object(o.createElement)(h,null);return Object(o.createElement)(o.Fragment,null,C,S)}))}));return k.displayName=void 0!==r?r:"Styled("+("string"===typeof f?f:f.displayName||f.name||"Component")+")",k.defaultProps=t.defaultProps,k.__emotion_real=k,k.__emotion_base=f,k.__emotion_styles=y,k.__emotion_forwardProp=i,Object.defineProperty(k,"toString",{value:function(){return"."+u}}),k.withComponent=function(t,r){return e(t,void 0!==r?p({},n||{},{},r):n).apply(void 0,y)},k}},v=m.bind();["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"].forEach((function(e){v[e]=v(e)}));t.default=v},,function(e,t,n){"use strict";var r=n(86),o={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,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?a:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var u=Object.defineProperty,c=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(h){var o=p(n);o&&o!==h&&e(t,o,r)}var a=c(n);d&&(a=a.concat(d(n)));for(var s=l(t),m=l(n),v=0;v<a.length;++v){var g=a[v];if(!i[g]&&(!r||!r[g])&&(!m||!m[g])&&(!s||!s[g])){var y=f(n,g);try{u(t,g,y)}catch(b){}}}}return t}},function(e,t,n){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=2)}([function(e,t){e.exports=n(48)},function(e,t){e.exports=n(1)},function(e,t,n){"use strict";n.r(t);var r=n(1),o=n(0),i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},a=0,s=r.forwardRef((function(e,t){var n=e.title,o=void 0===n?null:n,s=e.description,l=void 0===s?null:s,u=e.size,c=void 0===u?null:u,d=e.color,f=void 0===d?"currentColor":d,p=e.horizontal,h=void 0===p?null:p,m=e.vertical,v=void 0===m?null:m,g=e.rotate,y=void 0===g?null:g,b=e.spin,w=void 0===b?null:b,k=e.style,x=void 0===k?{}:k,O=e.children,S=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["title","description","size","color","horizontal","vertical","rotate","spin","style","children"]);a++;var C,j=null!==w&&w,D=r.Children.map(O,(function(e){var t=e;!0!==j&&(j=!0===(null===w?t.props.spin:w));var n=t.props.size;"number"==typeof c&&"number"==typeof t.props.size&&(n=t.props.size/c);var o={size:n,color:null===f?t.props.color:f,horizontal:null===h?t.props.horizontal:h,vertical:null===v?t.props.vertical:v,rotate:null===y?t.props.rotate:y,spin:null===w?t.props.spin:w,inStack:!0};return r.cloneElement(t,o)}));null!==c&&(x.width="string"==typeof c?c:1.5*c+"rem");var A,E="stack_labelledby_"+a,M="stack_describedby_"+a;if(o)C=l?E+" "+M:E;else if(A="presentation",l)throw new Error("title attribute required when description is set");return r.createElement("svg",i({ref:t,viewBox:"0 0 24 24",style:x,role:A,"aria-labelledby":C},S),o&&r.createElement("title",{id:E},o),l&&r.createElement("desc",{id:M},l),j&&r.createElement("style",null,"@keyframes spin { to { transform: rotate(360deg) } }","@keyframes spin-inverse { to { transform: rotate(-360deg) } }"),D)}));s.displayName="Stack",s.propTypes={size:o.oneOfType([o.number,o.string]),color:o.string,horizontal:o.bool,vertical:o.bool,rotate:o.number,spin:o.oneOfType([o.bool,o.number]),children:o.oneOfType([o.arrayOf(o.node),o.node]).isRequired,className:o.string,style:o.object},s.defaultProps={size:null,color:null,horizontal:null,vertical:null,rotate:null,spin:null};var l=s;n.d(t,"Icon",(function(){return d})),n.d(t,"Stack",(function(){return l}));var u=function(){return(u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},c=0,d=r.forwardRef((function(e,t){var n=e.path,o=e.id,i=void 0===o?++c:o,a=e.title,s=void 0===a?null:a,l=e.description,d=void 0===l?null:l,f=e.size,p=void 0===f?null:f,h=e.color,m=void 0===h?"currentColor":h,v=e.horizontal,g=void 0!==v&&v,y=e.vertical,b=void 0!==y&&y,w=e.rotate,k=void 0===w?0:w,x=e.spin,O=void 0!==x&&x,S=e.style,C=void 0===S?{}:S,j=e.inStack,D=void 0!==j&&j,A=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["path","id","title","description","size","color","horizontal","vertical","rotate","spin","style","inStack"]),E={},M=[];null!==p&&(D?M.push("scale("+p+")"):(C.width="string"==typeof p?p:1.5*p+"rem",C.height=C.width)),g&&M.push("scaleX(-1)"),b&&M.push("scaleY(-1)"),0!==k&&M.push("rotate("+k+"deg)"),null!==m&&(E.fill=m);var T=r.createElement("path",u({d:n,style:E},D?A:{})),L=T;M.length>0&&(C.transform=M.join(" "),C.transformOrigin="center",D&&(L=r.createElement("g",{style:C},T,r.createElement("rect",{width:"24",height:"24",fill:"transparent"}))));var N,P=L,R=!0===O||"number"!=typeof O?2:O,H=!D&&(g||b);if(R<0&&(H=!H),O&&(P=r.createElement("g",{style:{animation:"spin"+(H?"-inverse":"")+" linear "+Math.abs(R)+"s infinite",transformOrigin:"center"}},L,!(g||b||0!==k)&&r.createElement("rect",{width:"24",height:"24",fill:"transparent"}))),D)return P;var F,V="icon_labelledby_"+i,z="icon_describedby_"+i;if(s)N=d?V+" "+z:V;else if(F="presentation",d)throw new Error("title attribute required when description is set");return r.createElement("svg",u({ref:t,viewBox:"0 0 24 24",style:C,role:F,"aria-labelledby":N},A),s&&r.createElement("title",{id:V},s),d&&r.createElement("desc",{id:z},d),!D&&O&&(H?r.createElement("style",null,"@keyframes spin-inverse { to { transform: rotate(-360deg) } }"):r.createElement("style",null,"@keyframes spin { to { transform: rotate(360deg) } }")),P)}));d.displayName="Icon",d.propTypes={path:o.string.isRequired,size:o.oneOfType([o.number,o.string]),color:o.string,horizontal:o.bool,vertical:o.bool,rotate:o.number,spin:o.oneOfType([o.bool,o.number]),style:o.object,inStack:o.bool,className:o.string},d.defaultProps={size:null,color:"currentColor",horizontal:!1,vertical:!1,rotate:0,spin:!1},t.default=d}])},function(e,t,n){"use strict";e.exports=function(e){var t=e.match(/^[ \t]*(?=\S)/gm);return t?t.reduce((function(e,t){return Math.min(e,t.length)}),1/0):0}},,,,function(e,t,n){"use strict";var r,o=(r=n(1))&&"object"===typeof r&&"default"in r?r.default:r,i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=function(e){var t=e.color,n=void 0===t?"currentColor":t,r=e.size,a=void 0===r?24:r,s=(e.children,function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["color","size","children"])),l="mdi-icon "+(s.className||"");return o.createElement("svg",i({},s,{className:l,width:a,height:a,fill:n,viewBox:"0 0 24 24"}),o.createElement("path",{d:"M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z"}))},s=o.memo?o.memo(a):a;e.exports=s},function(e,t,n){"use strict";var r,o=(r=n(1))&&"object"===typeof r&&"default"in r?r.default:r,i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=function(e){var t=e.color,n=void 0===t?"currentColor":t,r=e.size,a=void 0===r?24:r,s=(e.children,function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["color","size","children"])),l="mdi-icon "+(s.className||"");return o.createElement("svg",i({},s,{className:l,width:a,height:a,fill:n,viewBox:"0 0 24 24"}),o.createElement("path",{d:"M19.35,10.04C18.67,6.59 15.64,4 12,4C9.11,4 6.6,5.64 5.35,8.04C2.34,8.36 0,10.91 0,14A6,6 0 0,0 6,20H19A5,5 0 0,0 24,15C24,12.36 21.95,10.22 19.35,10.04M19,18H6A4,4 0 0,1 2,14C2,11.95 3.53,10.24 5.56,10.03L6.63,9.92L7.13,8.97C8.08,7.14 9.94,6 12,6C14.62,6 16.88,7.86 17.39,10.43L17.69,11.93L19.22,12.04C20.78,12.14 22,13.45 22,15A3,3 0 0,1 19,18M8,13H10.55V16H13.45V13H16L12,9L8,13Z"}))},s=o.memo?o.memo(a):a;e.exports=s},function(e,t,n){"use strict";var r,o=(r=n(1))&&"object"===typeof r&&"default"in r?r.default:r,i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=function(e){var t=e.color,n=void 0===t?"currentColor":t,r=e.size,a=void 0===r?24:r,s=(e.children,function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["color","size","children"])),l="mdi-icon "+(s.className||"");return o.createElement("svg",i({},s,{className:l,width:a,height:a,fill:n,viewBox:"0 0 24 24"}),o.createElement("path",{d:"M5 16L3 5L8.5 10L12 4L15.5 10L21 5L19 16H5M19 19C19 19.6 18.6 20 18 20H6C5.4 20 5 19.6 5 19V18H19V19Z"}))},s=o.memo?o.memo(a):a;e.exports=s},function(e,t,n){"use strict";var r,o=(r=n(1))&&"object"===typeof r&&"default"in r?r.default:r,i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=function(e){var t=e.color,n=void 0===t?"currentColor":t,r=e.size,a=void 0===r?24:r,s=(e.children,function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["color","size","children"])),l="mdi-icon "+(s.className||"");return o.createElement("svg",i({},s,{className:l,width:a,height:a,fill:n,viewBox:"0 0 24 24"}),o.createElement("path",{d:"M16,12A2,2 0 0,1 18,10A2,2 0 0,1 20,12A2,2 0 0,1 18,14A2,2 0 0,1 16,12M10,12A2,2 0 0,1 12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12M4,12A2,2 0 0,1 6,10A2,2 0 0,1 8,12A2,2 0 0,1 6,14A2,2 0 0,1 4,12Z"}))},s=o.memo?o.memo(a):a;e.exports=s},function(e,t,n){"use strict";var r,o=(r=n(1))&&"object"===typeof r&&"default"in r?r.default:r,i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=function(e){var t=e.color,n=void 0===t?"currentColor":t,r=e.size,a=void 0===r?24:r,s=(e.children,function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["color","size","children"])),l="mdi-icon "+(s.className||"");return o.createElement("svg",i({},s,{className:l,width:a,height:a,fill:n,viewBox:"0 0 24 24"}),o.createElement("path",{d:"M20 13.5C20 17.09 17.09 20 13.5 20H6V18H13.5C16 18 18 16 18 13.5S16 9 13.5 9H7.83L10.91 12.09L9.5 13.5L4 8L9.5 2.5L10.92 3.91L7.83 7H13.5C17.09 7 20 9.91 20 13.5Z"}))},s=o.memo?o.memo(a):a;e.exports=s},function(e,t,n){"use strict";var r,o=(r=n(1))&&"object"===typeof r&&"default"in r?r.default:r,i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=function(e){var t=e.color,n=void 0===t?"currentColor":t,r=e.size,a=void 0===r?24:r,s=(e.children,function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["color","size","children"])),l="mdi-icon "+(s.className||"");return o.createElement("svg",i({},s,{className:l,width:a,height:a,fill:n,viewBox:"0 0 24 24"}),o.createElement("path",{d:"M10.5 18H18V20H10.5C6.91 20 4 17.09 4 13.5S6.91 7 10.5 7H16.17L13.08 3.91L14.5 2.5L20 8L14.5 13.5L13.09 12.09L16.17 9H10.5C8 9 6 11 6 13.5S8 18 10.5 18Z"}))},s=o.memo?o.memo(a):a;e.exports=s},function(e,t,n){"use strict";var r,o=(r=n(1))&&"object"===typeof r&&"default"in r?r.default:r,i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=function(e){var t=e.color,n=void 0===t?"currentColor":t,r=e.size,a=void 0===r?24:r,s=(e.children,function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["color","size","children"])),l="mdi-icon "+(s.className||"");return o.createElement("svg",i({},s,{className:l,width:a,height:a,fill:n,viewBox:"0 0 24 24"}),o.createElement("path",{d:"M5,5H10V7H7V10H5V5M14,5H19V10H17V7H14V5M17,14H19V19H14V17H17V14M10,17V19H5V14H7V17H10Z"}))},s=o.memo?o.memo(a):a;e.exports=s},function(e,t,n){"use strict";var r,o=(r=n(1))&&"object"===typeof r&&"default"in r?r.default:r,i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=function(e){var t=e.color,n=void 0===t?"currentColor":t,r=e.size,a=void 0===r?24:r,s=(e.children,function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["color","size","children"])),l="mdi-icon "+(s.className||"");return o.createElement("svg",i({},s,{className:l,width:a,height:a,fill:n,viewBox:"0 0 24 24"}),o.createElement("path",{d:"M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z"}))},s=o.memo?o.memo(a):a;e.exports=s},,,,,,function(e,t,n){"use strict";var r=n(20),o=60103,i=60106;t.Fragment=60107,t.StrictMode=60108,t.Profiler=60114;var a=60109,s=60110,l=60112;t.Suspense=60113;var u=60115,c=60116;if("function"===typeof Symbol&&Symbol.for){var d=Symbol.for;o=d("react.element"),i=d("react.portal"),t.Fragment=d("react.fragment"),t.StrictMode=d("react.strict_mode"),t.Profiler=d("react.profiler"),a=d("react.provider"),s=d("react.context"),l=d("react.forward_ref"),t.Suspense=d("react.suspense"),u=d("react.memo"),c=d("react.lazy")}var f="function"===typeof Symbol&&Symbol.iterator;function p(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 h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m={};function v(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||h}function g(){}function y(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error(p(85));this.updater.enqueueSetState(this,e,t,"setState")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},g.prototype=v.prototype;var b=y.prototype=new g;b.constructor=y,r(b,v.prototype),b.isPureReactComponent=!0;var w={current:null},k=Object.prototype.hasOwnProperty,x={key:!0,ref:!0,__self:!0,__source:!0};function O(e,t,n){var r,i={},a=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)k.call(t,r)&&!x.hasOwnProperty(r)&&(i[r]=t[r]);var l=arguments.length-2;if(1===l)i.children=n;else if(1<l){for(var u=Array(l),c=0;c<l;c++)u[c]=arguments[c+2];i.children=u}if(e&&e.defaultProps)for(r in l=e.defaultProps)void 0===i[r]&&(i[r]=l[r]);return{$$typeof:o,type:e,key:a,ref:s,props:i,_owner:w.current}}function S(e){return"object"===typeof e&&null!==e&&e.$$typeof===o}var C=/\/+/g;function j(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function D(e,t,n,r,a){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var l=!1;if(null===e)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case o:case i:l=!0}}if(l)return a=a(l=e),e=""===r?"."+j(l,0):r,Array.isArray(a)?(n="",null!=e&&(n=e.replace(C,"$&/")+"/"),D(a,t,n,"",(function(e){return e}))):null!=a&&(S(a)&&(a=function(e,t){return{$$typeof:o,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,n+(!a.key||l&&l.key===a.key?"":(""+a.key).replace(C,"$&/")+"/")+e)),t.push(a)),1;if(l=0,r=""===r?".":r+":",Array.isArray(e))for(var u=0;u<e.length;u++){var c=r+j(s=e[u],u);l+=D(s,t,n,c,a)}else if(c=function(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=f&&e[f]||e["@@iterator"])?e:null}(e),"function"===typeof c)for(e=c.call(e),u=0;!(s=e.next()).done;)l+=D(s=s.value,t,n,c=r+j(s,u++),a);else if("object"===s)throw t=""+e,Error(p(31,"[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t));return l}function A(e,t,n){if(null==e)return e;var r=[],o=0;return D(e,r,"","",(function(e){return t.call(n,e,o++)})),r}function E(e){if(-1===e._status){var t=e._result;t=t(),e._status=0,e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}if(1===e._status)return e._result;throw e._result}var M={current:null};function T(){var e=M.current;if(null===e)throw Error(p(321));return e}var L={ReactCurrentDispatcher:M,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:w,IsSomeRendererActing:{current:!1},assign:r};t.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(!S(e))throw Error(p(143));return e}},t.Component=v,t.PureComponent=y,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=L,t.cloneElement=function(e,t,n){if(null===e||void 0===e)throw Error(p(267,e));var i=r({},e.props),a=e.key,s=e.ref,l=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,l=w.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var u=e.type.defaultProps;for(c in t)k.call(t,c)&&!x.hasOwnProperty(c)&&(i[c]=void 0===t[c]&&void 0!==u?u[c]:t[c])}var c=arguments.length-2;if(1===c)i.children=n;else if(1<c){u=Array(c);for(var d=0;d<c;d++)u[d]=arguments[d+2];i.children=u}return{$$typeof:o,type:e.type,key:a,ref:s,props:i,_owner:l}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:s,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:a,_context:e},e.Consumer=e},t.createElement=O,t.createFactory=function(e){var t=O.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:l,render:e}},t.isValidElement=S,t.lazy=function(e){return{$$typeof:c,_payload:{_status:-1,_result:e},_init:E}},t.memo=function(e,t){return{$$typeof:u,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return T().useCallback(e,t)},t.useContext=function(e,t){return T().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return T().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return T().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return T().useLayoutEffect(e,t)},t.useMemo=function(e,t){return T().useMemo(e,t)},t.useReducer=function(e,t,n){return T().useReducer(e,t,n)},t.useRef=function(e){return T().useRef(e)},t.useState=function(e){return T().useState(e)},t.version="17.0.2"},function(e,t,n){"use strict";var r=n(1),o=n(20),i=n(79);function a(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."}if(!r)throw Error(a(227));var s=new Set,l={};function u(e,t){c(e,t),c(e+"Capture",t)}function c(e,t){for(l[e]=t,e=0;e<t.length;e++)s.add(t[e])}var d=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),f=/^[: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]*$/,p=Object.prototype.hasOwnProperty,h={},m={};function v(e,t,n,r,o,i,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var g={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){g[e]=new v(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];g[t]=new v(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){g[e]=new v(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){g[e]=new v(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){g[e]=new v(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){g[e]=new v(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){g[e]=new v(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){g[e]=new v(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){g[e]=new v(e,5,!1,e.toLowerCase(),null,!1,!1)}));var y=/[\-:]([a-z])/g;function b(e){return e[1].toUpperCase()}function w(e,t,n,r){var o=g.hasOwnProperty(t)?g[t]:null;(null!==o?0===o.type:!r&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(function(e,t,n,r){if(null===t||"undefined"===typeof t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)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}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!p.call(m,e)||!p.call(h,e)&&(f.test(e)?m[e]=!0:(h[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"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);g[t]=new v(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);g[t]=new v(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);g[t]=new v(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){g[e]=new v(e,1,!1,e.toLowerCase(),null,!1,!1)})),g.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){g[e]=new v(e,1,!1,e.toLowerCase(),null,!0,!0)}));var k=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,x=60103,O=60106,S=60107,C=60108,j=60114,D=60109,A=60110,E=60112,M=60113,T=60120,L=60115,N=60116,P=60121,R=60128,H=60129,F=60130,V=60131;if("function"===typeof Symbol&&Symbol.for){var z=Symbol.for;x=z("react.element"),O=z("react.portal"),S=z("react.fragment"),C=z("react.strict_mode"),j=z("react.profiler"),D=z("react.provider"),A=z("react.context"),E=z("react.forward_ref"),M=z("react.suspense"),T=z("react.suspense_list"),L=z("react.memo"),N=z("react.lazy"),P=z("react.block"),z("react.scope"),R=z("react.opaque.id"),H=z("react.debug_trace_mode"),F=z("react.offscreen"),V=z("react.legacy_hidden")}var B,I="function"===typeof Symbol&&Symbol.iterator;function _(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=I&&e[I]||e["@@iterator"])?e:null}function $(e){if(void 0===B)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);B=t&&t[1]||""}return"\n"+B+e}var q=!1;function W(e,t){if(!e||q)return"";q=!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()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(l){var r=l}Reflect.construct(e,[],t)}else{try{t.call()}catch(l){r=l}e.call(t.prototype)}else{try{throw Error()}catch(l){r=l}e()}}catch(l){if(l&&r&&"string"===typeof l.stack){for(var o=l.stack.split("\n"),i=r.stack.split("\n"),a=o.length-1,s=i.length-1;1<=a&&0<=s&&o[a]!==i[s];)s--;for(;1<=a&&0<=s;a--,s--)if(o[a]!==i[s]){if(1!==a||1!==s)do{if(a--,0>--s||o[a]!==i[s])return"\n"+o[a].replace(" at new "," at ")}while(1<=a&&0<=s);break}}}finally{q=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?$(e):""}function U(e){switch(e.tag){case 5:return $(e.type);case 16:return $("Lazy");case 13:return $("Suspense");case 19:return $("SuspenseList");case 0:case 2:case 15:return e=W(e.type,!1);case 11:return e=W(e.type.render,!1);case 22:return e=W(e.type._render,!1);case 1:return e=W(e.type,!0);default:return""}}function K(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case S:return"Fragment";case O:return"Portal";case j:return"Profiler";case C:return"StrictMode";case M:return"Suspense";case T:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case A:return(e.displayName||"Context")+".Consumer";case D:return(e._context.displayName||"Context")+".Provider";case E:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case L:return K(e.type);case P:return K(e._render);case N:t=e._payload,e=e._init;try{return K(e(t))}catch(n){}}return null}function G(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function J(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function Y(e){e._valueTracker||(e._valueTracker=function(e){var t=J(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,i.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]}}}}(e))}function Z(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=J(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function X(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Q(e,t){var n=t.checked;return o({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function ee(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=G(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function te(e,t){null!=(t=t.checked)&&w(e,"checked",t,!1)}function ne(e,t){te(e,t);var n=G(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?oe(e,t.type,n):t.hasOwnProperty("defaultValue")&&oe(e,t.type,G(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function re(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function oe(e,t,n){"number"===t&&X(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function ie(e,t){return e=o({children:void 0},t),(t=function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function ae(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+G(n),t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function se(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(a(91));return o({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function le(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(a(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:G(n)}}function ue(e,t){var n=G(t.value),r=G(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function ce(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}var de="http://www.w3.org/1999/xhtml",fe="http://www.w3.org/2000/svg";function pe(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 he(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?pe(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var me,ve,ge=(ve=function(e,t){if(e.namespaceURI!==fe||"innerHTML"in e)e.innerHTML=t;else{for((me=me||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=me.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ve(e,t)}))}:ve);function ye(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var be={animationIterationCount:!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},we=["Webkit","ms","Moz","O"];function ke(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||be.hasOwnProperty(e)&&be[e]?(""+t).trim():t+"px"}function xe(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=ke(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(be).forEach((function(e){we.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),be[t]=be[e]}))}));var Oe=o({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 Se(e,t){if(t){if(Oe[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(a(62))}}function Ce(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;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}}function je(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var De=null,Ae=null,Ee=null;function Me(e){if(e=ro(e)){if("function"!==typeof De)throw Error(a(280));var t=e.stateNode;t&&(t=io(t),De(e.stateNode,e.type,t))}}function Te(e){Ae?Ee?Ee.push(e):Ee=[e]:Ae=e}function Le(){if(Ae){var e=Ae,t=Ee;if(Ee=Ae=null,Me(e),t)for(e=0;e<t.length;e++)Me(t[e])}}function Ne(e,t){return e(t)}function Pe(e,t,n,r,o){return e(t,n,r,o)}function Re(){}var He=Ne,Fe=!1,Ve=!1;function ze(){null===Ae&&null===Ee||(Re(),Le())}function Be(e,t){var n=e.stateNode;if(null===n)return null;var r=io(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!==typeof n)throw Error(a(231,t,typeof n));return n}var Ie=!1;if(d)try{var _e={};Object.defineProperty(_e,"passive",{get:function(){Ie=!0}}),window.addEventListener("test",_e,_e),window.removeEventListener("test",_e,_e)}catch(ve){Ie=!1}function $e(e,t,n,r,o,i,a,s,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var qe=!1,We=null,Ue=!1,Ke=null,Ge={onError:function(e){qe=!0,We=e}};function Je(e,t,n,r,o,i,a,s,l){qe=!1,We=null,$e.apply(Ge,arguments)}function Ye(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(1026&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Ze(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function Xe(e){if(Ye(e)!==e)throw Error(a(188))}function Qe(e){if(e=function(e){var t=e.alternate;if(!t){if(null===(t=Ye(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(null===o)break;var i=o.alternate;if(null===i){if(null!==(r=o.return)){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return Xe(o),e;if(i===r)return Xe(o),t;i=i.sibling}throw Error(a(188))}if(n.return!==r.return)n=o,r=i;else{for(var s=!1,l=o.child;l;){if(l===n){s=!0,n=o,r=i;break}if(l===r){s=!0,r=o,n=i;break}l=l.sibling}if(!s){for(l=i.child;l;){if(l===n){s=!0,n=i,r=o;break}if(l===r){s=!0,r=i,n=o;break}l=l.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(e),!e)return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function et(e,t){for(var n=e.alternate;null!==t;){if(t===e||t===n)return!0;t=t.return}return!1}var tt,nt,rt,ot,it=!1,at=[],st=null,lt=null,ut=null,ct=new Map,dt=new Map,ft=[],pt="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 ht(e,t,n,r,o){return{blockedOn:e,domEventName:t,eventSystemFlags:16|n,nativeEvent:o,targetContainers:[r]}}function mt(e,t){switch(e){case"focusin":case"focusout":st=null;break;case"dragenter":case"dragleave":lt=null;break;case"mouseover":case"mouseout":ut=null;break;case"pointerover":case"pointerout":ct.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":dt.delete(t.pointerId)}}function vt(e,t,n,r,o,i){return null===e||e.nativeEvent!==i?(e=ht(t,n,r,o,i),null!==t&&(null!==(t=ro(t))&&nt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==o&&-1===t.indexOf(o)&&t.push(o),e)}function gt(e){var t=no(e.target);if(null!==t){var n=Ye(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Ze(n)))return e.blockedOn=t,void ot(e.lanePriority,(function(){i.unstable_runWithPriority(e.priority,(function(){rt(n)}))}))}else if(3===t&&n.stateNode.hydrate)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function yt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Qt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=ro(n))&&nt(t),e.blockedOn=n,!1;t.shift()}return!0}function bt(e,t,n){yt(e)&&n.delete(t)}function wt(){for(it=!1;0<at.length;){var e=at[0];if(null!==e.blockedOn){null!==(e=ro(e.blockedOn))&&tt(e);break}for(var t=e.targetContainers;0<t.length;){var n=Qt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n){e.blockedOn=n;break}t.shift()}null===e.blockedOn&&at.shift()}null!==st&&yt(st)&&(st=null),null!==lt&&yt(lt)&&(lt=null),null!==ut&&yt(ut)&&(ut=null),ct.forEach(bt),dt.forEach(bt)}function kt(e,t){e.blockedOn===t&&(e.blockedOn=null,it||(it=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,wt)))}function xt(e){function t(t){return kt(t,e)}if(0<at.length){kt(at[0],e);for(var n=1;n<at.length;n++){var r=at[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==st&&kt(st,e),null!==lt&&kt(lt,e),null!==ut&&kt(ut,e),ct.forEach(t),dt.forEach(t),n=0;n<ft.length;n++)(r=ft[n]).blockedOn===e&&(r.blockedOn=null);for(;0<ft.length&&null===(n=ft[0]).blockedOn;)gt(n),null===n.blockedOn&&ft.shift()}function Ot(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var St={animationend:Ot("Animation","AnimationEnd"),animationiteration:Ot("Animation","AnimationIteration"),animationstart:Ot("Animation","AnimationStart"),transitionend:Ot("Transition","TransitionEnd")},Ct={},jt={};function Dt(e){if(Ct[e])return Ct[e];if(!St[e])return e;var t,n=St[e];for(t in n)if(n.hasOwnProperty(t)&&t in jt)return Ct[e]=n[t];return e}d&&(jt=document.createElement("div").style,"AnimationEvent"in window||(delete St.animationend.animation,delete St.animationiteration.animation,delete St.animationstart.animation),"TransitionEvent"in window||delete St.transitionend.transition);var At=Dt("animationend"),Et=Dt("animationiteration"),Mt=Dt("animationstart"),Tt=Dt("transitionend"),Lt=new Map,Nt=new Map,Pt=["abort","abort",At,"animationEnd",Et,"animationIteration",Mt,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Tt,"transitionEnd","waiting","waiting"];function Rt(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],o=e[n+1];o="on"+(o[0].toUpperCase()+o.slice(1)),Nt.set(r,t),Lt.set(r,o),u(o,[r])}}(0,i.unstable_now)();var Ht=8;function Ft(e){if(0!==(1&e))return Ht=15,1;if(0!==(2&e))return Ht=14,2;if(0!==(4&e))return Ht=13,4;var t=24&e;return 0!==t?(Ht=12,t):0!==(32&e)?(Ht=11,32):0!==(t=192&e)?(Ht=10,t):0!==(256&e)?(Ht=9,256):0!==(t=3584&e)?(Ht=8,t):0!==(4096&e)?(Ht=7,4096):0!==(t=4186112&e)?(Ht=6,t):0!==(t=62914560&e)?(Ht=5,t):67108864&e?(Ht=4,67108864):0!==(134217728&e)?(Ht=3,134217728):0!==(t=805306368&e)?(Ht=2,t):0!==(1073741824&e)?(Ht=1,1073741824):(Ht=8,e)}function Vt(e,t){var n=e.pendingLanes;if(0===n)return Ht=0;var r=0,o=0,i=e.expiredLanes,a=e.suspendedLanes,s=e.pingedLanes;if(0!==i)r=i,o=Ht=15;else if(0!==(i=134217727&n)){var l=i&~a;0!==l?(r=Ft(l),o=Ht):0!==(s&=i)&&(r=Ft(s),o=Ht)}else 0!==(i=n&~a)?(r=Ft(i),o=Ht):0!==s&&(r=Ft(s),o=Ht);if(0===r)return 0;if(r=n&((0>(r=31-qt(r))?0:1<<r)<<1)-1,0!==t&&t!==r&&0===(t&a)){if(Ft(t),o<=Ht)return t;Ht=o}if(0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)o=1<<(n=31-qt(t)),r|=e[n],t&=~o;return r}function zt(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function Bt(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return 0===(e=It(24&~t))?Bt(10,t):e;case 10:return 0===(e=It(192&~t))?Bt(8,t):e;case 8:return 0===(e=It(3584&~t))&&(0===(e=It(4186112&~t))&&(e=512)),e;case 2:return 0===(t=It(805306368&~t))&&(t=268435456),t}throw Error(a(358,e))}function It(e){return e&-e}function _t(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function $t(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,(e=e.eventTimes)[t=31-qt(t)]=n}var qt=Math.clz32?Math.clz32:function(e){return 0===e?32:31-(Wt(e)/Ut|0)|0},Wt=Math.log,Ut=Math.LN2;var Kt=i.unstable_UserBlockingPriority,Gt=i.unstable_runWithPriority,Jt=!0;function Yt(e,t,n,r){Fe||Re();var o=Xt,i=Fe;Fe=!0;try{Pe(o,e,t,n,r)}finally{(Fe=i)||ze()}}function Zt(e,t,n,r){Gt(Kt,Xt.bind(null,e,t,n,r))}function Xt(e,t,n,r){var o;if(Jt)if((o=0===(4&t))&&0<at.length&&-1<pt.indexOf(e))e=ht(null,e,t,n,r),at.push(e);else{var i=Qt(e,t,n,r);if(null===i)o&&mt(e,r);else{if(o){if(-1<pt.indexOf(e))return e=ht(i,e,t,n,r),void at.push(e);if(function(e,t,n,r,o){switch(t){case"focusin":return st=vt(st,e,t,n,r,o),!0;case"dragenter":return lt=vt(lt,e,t,n,r,o),!0;case"mouseover":return ut=vt(ut,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return ct.set(i,vt(ct.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,dt.set(i,vt(dt.get(i)||null,e,t,n,r,o)),!0}return!1}(i,e,t,n,r))return;mt(e,r)}Rr(e,t,r,null,n)}}}function Qt(e,t,n,r){var o=je(r);if(null!==(o=no(o))){var i=Ye(o);if(null===i)o=null;else{var a=i.tag;if(13===a){if(null!==(o=Ze(i)))return o;o=null}else if(3===a){if(i.stateNode.hydrate)return 3===i.tag?i.stateNode.containerInfo:null;o=null}else i!==o&&(o=null)}}return Rr(e,t,r,o,n),null}var en=null,tn=null,nn=null;function rn(){if(nn)return nn;var e,t,n=tn,r=n.length,o="value"in en?en.value:en.textContent,i=o.length;for(e=0;e<r&&n[e]===o[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===o[i-t];t++);return nn=o.slice(e,1<t?1-t:void 0)}function on(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function an(){return!0}function sn(){return!1}function ln(e){function t(t,n,r,o,i){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=o,this.target=i,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(o):o[a]);return this.isDefaultPrevented=(null!=o.defaultPrevented?o.defaultPrevented:!1===o.returnValue)?an:sn,this.isPropagationStopped=sn,this}return o(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=an)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=an)},persist:function(){},isPersistent:an}),t}var un,cn,dn,fn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},pn=ln(fn),hn=o({},fn,{view:0,detail:0}),mn=ln(hn),vn=o({},hn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:An,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==dn&&(dn&&"mousemove"===e.type?(un=e.screenX-dn.screenX,cn=e.screenY-dn.screenY):cn=un=0,dn=e),un)},movementY:function(e){return"movementY"in e?e.movementY:cn}}),gn=ln(vn),yn=ln(o({},vn,{dataTransfer:0})),bn=ln(o({},hn,{relatedTarget:0})),wn=ln(o({},fn,{animationName:0,elapsedTime:0,pseudoElement:0})),kn=o({},fn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),xn=ln(kn),On=ln(o({},fn,{data:0})),Sn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Cn={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"},jn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Dn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=jn[e])&&!!t[e]}function An(){return Dn}var En=o({},hn,{key:function(e){if(e.key){var t=Sn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=on(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Cn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:An,charCode:function(e){return"keypress"===e.type?on(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?on(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Mn=ln(En),Tn=ln(o({},vn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Ln=ln(o({},hn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:An})),Nn=ln(o({},fn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Pn=o({},vn,{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}),Rn=ln(Pn),Hn=[9,13,27,32],Fn=d&&"CompositionEvent"in window,Vn=null;d&&"documentMode"in document&&(Vn=document.documentMode);var zn=d&&"TextEvent"in window&&!Vn,Bn=d&&(!Fn||Vn&&8<Vn&&11>=Vn),In=String.fromCharCode(32),_n=!1;function $n(e,t){switch(e){case"keyup":return-1!==Hn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function qn(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var Wn=!1;var Un={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 Kn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Un[e.type]:"textarea"===t}function Gn(e,t,n,r){Te(r),0<(t=Fr(t,"onChange")).length&&(n=new pn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Jn=null,Yn=null;function Zn(e){Er(e,0)}function Xn(e){if(Z(oo(e)))return e}function Qn(e,t){if("change"===e)return t}var er=!1;if(d){var tr;if(d){var nr="oninput"in document;if(!nr){var rr=document.createElement("div");rr.setAttribute("oninput","return;"),nr="function"===typeof rr.oninput}tr=nr}else tr=!1;er=tr&&(!document.documentMode||9<document.documentMode)}function or(){Jn&&(Jn.detachEvent("onpropertychange",ir),Yn=Jn=null)}function ir(e){if("value"===e.propertyName&&Xn(Yn)){var t=[];if(Gn(t,Yn,e,je(e)),e=Zn,Fe)e(t);else{Fe=!0;try{Ne(e,t)}finally{Fe=!1,ze()}}}}function ar(e,t,n){"focusin"===e?(or(),Yn=n,(Jn=t).attachEvent("onpropertychange",ir)):"focusout"===e&&or()}function sr(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Xn(Yn)}function lr(e,t){if("click"===e)return Xn(t)}function ur(e,t){if("input"===e||"change"===e)return Xn(t)}var cr="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},dr=Object.prototype.hasOwnProperty;function fr(e,t){if(cr(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===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++)if(!dr.call(t,n[r])||!cr(e[n[r]],t[n[r]]))return!1;return!0}function pr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function hr(e,t){var n,r=pr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=pr(r)}}function mr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?mr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function vr(){for(var e=window,t=X();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=X((e=t.contentWindow).document)}return t}function gr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var yr=d&&"documentMode"in document&&11>=document.documentMode,br=null,wr=null,kr=null,xr=!1;function Or(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;xr||null==br||br!==X(r)||("selectionStart"in(r=br)&&gr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},kr&&fr(kr,r)||(kr=r,0<(r=Fr(wr,"onSelect")).length&&(t=new pn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=br)))}Rt("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),Rt("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),Rt(Pt,2);for(var Sr="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Cr=0;Cr<Sr.length;Cr++)Nt.set(Sr[Cr],0);c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),u("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),u("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),u("onBeforeInput",["compositionend","keypress","textInput","paste"]),u("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var jr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Dr=new Set("cancel close invalid load scroll toggle".split(" ").concat(jr));function Ar(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,o,i,s,l,u){if(Je.apply(this,arguments),qe){if(!qe)throw Error(a(198));var c=We;qe=!1,We=null,Ue||(Ue=!0,Ke=c)}}(r,t,void 0,e),e.currentTarget=null}function Er(e,t){t=0!==(4&t);for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],l=s.instance,u=s.currentTarget;if(s=s.listener,l!==i&&o.isPropagationStopped())break e;Ar(o,s,u),i=l}else for(a=0;a<r.length;a++){if(l=(s=r[a]).instance,u=s.currentTarget,s=s.listener,l!==i&&o.isPropagationStopped())break e;Ar(o,s,u),i=l}}}if(Ue)throw e=Ke,Ue=!1,Ke=null,e}function Mr(e,t){var n=ao(t),r=e+"__bubble";n.has(r)||(Pr(t,e,2,!1),n.add(r))}var Tr="_reactListening"+Math.random().toString(36).slice(2);function Lr(e){e[Tr]||(e[Tr]=!0,s.forEach((function(t){Dr.has(t)||Nr(t,!1,e,null),Nr(t,!0,e,null)})))}function Nr(e,t,n,r){var o=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,i=n;if("selectionchange"===e&&9!==n.nodeType&&(i=n.ownerDocument),null!==r&&!t&&Dr.has(e)){if("scroll"!==e)return;o|=2,i=r}var a=ao(i),s=e+"__"+(t?"capture":"bubble");a.has(s)||(t&&(o|=4),Pr(i,e,o,t),a.add(s))}function Pr(e,t,n,r){var o=Nt.get(t);switch(void 0===o?2:o){case 0:o=Yt;break;case 1:o=Zt;break;default:o=Xt}n=o.bind(null,t,n,e),o=void 0,!Ie||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(o=!0),r?void 0!==o?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):void 0!==o?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function Rr(e,t,n,r,o){var i=r;if(0===(1&t)&&0===(2&t)&&null!==r)e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===o||8===s.nodeType&&s.parentNode===o)break;if(4===a)for(a=r.return;null!==a;){var l=a.tag;if((3===l||4===l)&&((l=a.stateNode.containerInfo)===o||8===l.nodeType&&l.parentNode===o))return;a=a.return}for(;null!==s;){if(null===(a=no(s)))return;if(5===(l=a.tag)||6===l){r=i=a;continue e}s=s.parentNode}}r=r.return}!function(e,t,n){if(Ve)return e(t,n);Ve=!0;try{He(e,t,n)}finally{Ve=!1,ze()}}((function(){var r=i,o=je(n),a=[];e:{var s=Lt.get(e);if(void 0!==s){var l=pn,u=e;switch(e){case"keypress":if(0===on(n))break e;case"keydown":case"keyup":l=Mn;break;case"focusin":u="focus",l=bn;break;case"focusout":u="blur",l=bn;break;case"beforeblur":case"afterblur":l=bn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=gn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=yn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Ln;break;case At:case Et:case Mt:l=wn;break;case Tt:l=Nn;break;case"scroll":l=mn;break;case"wheel":l=Rn;break;case"copy":case"cut":case"paste":l=xn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=Tn}var c=0!==(4&t),d=!c&&"scroll"===e,f=c?null!==s?s+"Capture":null:s;c=[];for(var p,h=r;null!==h;){var m=(p=h).stateNode;if(5===p.tag&&null!==m&&(p=m,null!==f&&(null!=(m=Be(h,f))&&c.push(Hr(h,m,p)))),d)break;h=h.return}0<c.length&&(s=new l(s,u,null,n,o),a.push({event:s,listeners:c}))}}if(0===(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||0!==(16&t)||!(u=n.relatedTarget||n.fromElement)||!no(u)&&!u[eo])&&(l||s)&&(s=o.window===o?o:(s=o.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=r,null!==(u=(u=n.relatedTarget||n.toElement)?no(u):null)&&(u!==(d=Ye(u))||5!==u.tag&&6!==u.tag)&&(u=null)):(l=null,u=r),l!==u)){if(c=gn,m="onMouseLeave",f="onMouseEnter",h="mouse","pointerout"!==e&&"pointerover"!==e||(c=Tn,m="onPointerLeave",f="onPointerEnter",h="pointer"),d=null==l?s:oo(l),p=null==u?s:oo(u),(s=new c(m,h+"leave",l,n,o)).target=d,s.relatedTarget=p,m=null,no(o)===r&&((c=new c(f,h+"enter",u,n,o)).target=p,c.relatedTarget=d,m=c),d=m,l&&u)e:{for(f=u,h=0,p=c=l;p;p=Vr(p))h++;for(p=0,m=f;m;m=Vr(m))p++;for(;0<h-p;)c=Vr(c),h--;for(;0<p-h;)f=Vr(f),p--;for(;h--;){if(c===f||null!==f&&c===f.alternate)break e;c=Vr(c),f=Vr(f)}c=null}else c=null;null!==l&&zr(a,s,l,c,!1),null!==u&&null!==d&&zr(a,d,u,c,!0)}if("select"===(l=(s=r?oo(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var v=Qn;else if(Kn(s))if(er)v=ur;else{v=sr;var g=ar}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(v=lr);switch(v&&(v=v(e,r))?Gn(a,v,n,o):(g&&g(e,s,r),"focusout"===e&&(g=s._wrapperState)&&g.controlled&&"number"===s.type&&oe(s,"number",s.value)),g=r?oo(r):window,e){case"focusin":(Kn(g)||"true"===g.contentEditable)&&(br=g,wr=r,kr=null);break;case"focusout":kr=wr=br=null;break;case"mousedown":xr=!0;break;case"contextmenu":case"mouseup":case"dragend":xr=!1,Or(a,n,o);break;case"selectionchange":if(yr)break;case"keydown":case"keyup":Or(a,n,o)}var y;if(Fn)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else Wn?$n(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(Bn&&"ko"!==n.locale&&(Wn||"onCompositionStart"!==b?"onCompositionEnd"===b&&Wn&&(y=rn()):(tn="value"in(en=o)?en.value:en.textContent,Wn=!0)),0<(g=Fr(r,b)).length&&(b=new On(b,e,null,n,o),a.push({event:b,listeners:g}),y?b.data=y:null!==(y=qn(n))&&(b.data=y))),(y=zn?function(e,t){switch(e){case"compositionend":return qn(t);case"keypress":return 32!==t.which?null:(_n=!0,In);case"textInput":return(e=t.data)===In&&_n?null:e;default:return null}}(e,n):function(e,t){if(Wn)return"compositionend"===e||!Fn&&$n(e,t)?(e=rn(),nn=tn=en=null,Wn=!1,e):null;switch(e){case"paste":default: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 Bn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Fr(r,"onBeforeInput")).length&&(o=new On("onBeforeInput","beforeinput",null,n,o),a.push({event:o,listeners:r}),o.data=y))}Er(a,t)}))}function Hr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Fr(e,t){for(var n=t+"Capture",r=[];null!==e;){var o=e,i=o.stateNode;5===o.tag&&null!==i&&(o=i,null!=(i=Be(e,n))&&r.unshift(Hr(e,i,o)),null!=(i=Be(e,t))&&r.push(Hr(e,i,o))),e=e.return}return r}function Vr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function zr(e,t,n,r,o){for(var i=t._reactName,a=[];null!==n&&n!==r;){var s=n,l=s.alternate,u=s.stateNode;if(null!==l&&l===r)break;5===s.tag&&null!==u&&(s=u,o?null!=(l=Be(n,i))&&a.unshift(Hr(n,l,s)):o||null!=(l=Be(n,i))&&a.push(Hr(n,l,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}function Br(){}var Ir=null,_r=null;function $r(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function qr(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var Wr="function"===typeof setTimeout?setTimeout:void 0,Ur="function"===typeof clearTimeout?clearTimeout:void 0;function Kr(e){1===e.nodeType?e.textContent="":9===e.nodeType&&(null!=(e=e.body)&&(e.textContent=""))}function Gr(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function Jr(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var Yr=0;var Zr=Math.random().toString(36).slice(2),Xr="__reactFiber$"+Zr,Qr="__reactProps$"+Zr,eo="__reactContainer$"+Zr,to="__reactEvents$"+Zr;function no(e){var t=e[Xr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[eo]||n[Xr]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Jr(e);null!==e;){if(n=e[Xr])return n;e=Jr(e)}return t}n=(e=n).parentNode}return null}function ro(e){return!(e=e[Xr]||e[eo])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function oo(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function io(e){return e[Qr]||null}function ao(e){var t=e[to];return void 0===t&&(t=e[to]=new Set),t}var so=[],lo=-1;function uo(e){return{current:e}}function co(e){0>lo||(e.current=so[lo],so[lo]=null,lo--)}function fo(e,t){lo++,so[lo]=e.current,e.current=t}var po={},ho=uo(po),mo=uo(!1),vo=po;function go(e,t){var n=e.type.contextTypes;if(!n)return po;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function yo(e){return null!==(e=e.childContextTypes)&&void 0!==e}function bo(){co(mo),co(ho)}function wo(e,t,n){if(ho.current!==po)throw Error(a(168));fo(ho,t),fo(mo,n)}function ko(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in e))throw Error(a(108,K(t)||"Unknown",i));return o({},n,r)}function xo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||po,vo=ho.current,fo(ho,e),fo(mo,mo.current),!0}function Oo(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=ko(e,t,vo),r.__reactInternalMemoizedMergedChildContext=e,co(mo),co(ho),fo(ho,e)):co(mo),fo(mo,n)}var So=null,Co=null,jo=i.unstable_runWithPriority,Do=i.unstable_scheduleCallback,Ao=i.unstable_cancelCallback,Eo=i.unstable_shouldYield,Mo=i.unstable_requestPaint,To=i.unstable_now,Lo=i.unstable_getCurrentPriorityLevel,No=i.unstable_ImmediatePriority,Po=i.unstable_UserBlockingPriority,Ro=i.unstable_NormalPriority,Ho=i.unstable_LowPriority,Fo=i.unstable_IdlePriority,Vo={},zo=void 0!==Mo?Mo:function(){},Bo=null,Io=null,_o=!1,$o=To(),qo=1e4>$o?To:function(){return To()-$o};function Wo(){switch(Lo()){case No:return 99;case Po:return 98;case Ro:return 97;case Ho:return 96;case Fo:return 95;default:throw Error(a(332))}}function Uo(e){switch(e){case 99:return No;case 98:return Po;case 97:return Ro;case 96:return Ho;case 95:return Fo;default:throw Error(a(332))}}function Ko(e,t){return e=Uo(e),jo(e,t)}function Go(e,t,n){return e=Uo(e),Do(e,t,n)}function Jo(){if(null!==Io){var e=Io;Io=null,Ao(e)}Yo()}function Yo(){if(!_o&&null!==Bo){_o=!0;var e=0;try{var t=Bo;Ko(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),Bo=null}catch(n){throw null!==Bo&&(Bo=Bo.slice(e+1)),Do(No,Jo),n}finally{_o=!1}}}var Zo=k.ReactCurrentBatchConfig;function Xo(e,t){if(e&&e.defaultProps){for(var n in t=o({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var Qo=uo(null),ei=null,ti=null,ni=null;function ri(){ni=ti=ei=null}function oi(e){var t=Qo.current;co(Qo),e.type._context._currentValue=t}function ii(e,t){for(;null!==e;){var n=e.alternate;if((e.childLanes&t)===t){if(null===n||(n.childLanes&t)===t)break;n.childLanes|=t}else e.childLanes|=t,null!==n&&(n.childLanes|=t);e=e.return}}function ai(e,t){ei=e,ni=ti=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(Fa=!0),e.firstContext=null)}function si(e,t){if(ni!==e&&!1!==t&&0!==t)if("number"===typeof t&&1073741823!==t||(ni=e,t=1073741823),t={context:e,observedBits:t,next:null},null===ti){if(null===ei)throw Error(a(308));ti=t,ei.dependencies={lanes:0,firstContext:t,responders:null}}else ti=ti.next=t;return e._currentValue}var li=!1;function ui(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function ci(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 di(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function fi(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function pi(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var o=null,i=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===i?o=i=a:i=i.next=a,n=n.next}while(null!==n);null===i?o=i=t:i=i.next=t}else o=i=t;return n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function hi(e,t,n,r){var i=e.updateQueue;li=!1;var a=i.firstBaseUpdate,s=i.lastBaseUpdate,l=i.shared.pending;if(null!==l){i.shared.pending=null;var u=l,c=u.next;u.next=null,null===s?a=c:s.next=c,s=u;var d=e.alternate;if(null!==d){var f=(d=d.updateQueue).lastBaseUpdate;f!==s&&(null===f?d.firstBaseUpdate=c:f.next=c,d.lastBaseUpdate=u)}}if(null!==a){for(f=i.baseState,s=0,d=c=u=null;;){l=a.lane;var p=a.eventTime;if((r&l)===l){null!==d&&(d=d.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var h=e,m=a;switch(l=t,p=n,m.tag){case 1:if("function"===typeof(h=m.payload)){f=h.call(p,f,l);break e}f=h;break e;case 3:h.flags=-4097&h.flags|64;case 0:if(null===(l="function"===typeof(h=m.payload)?h.call(p,f,l):h)||void 0===l)break e;f=o({},f,l);break e;case 2:li=!0}}null!==a.callback&&(e.flags|=32,null===(l=i.effects)?i.effects=[a]:l.push(a))}else p={eventTime:p,lane:l,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===d?(c=d=p,u=f):d=d.next=p,s|=l;if(null===(a=a.next)){if(null===(l=i.shared.pending))break;a=l.next,l.next=null,i.lastBaseUpdate=l,i.shared.pending=null}}null===d&&(u=f),i.baseState=u,i.firstBaseUpdate=c,i.lastBaseUpdate=d,Is|=s,e.lanes=s,e.memoizedState=f}}function mi(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(null!==o){if(r.callback=null,r=n,"function"!==typeof o)throw Error(a(191,o));o.call(r)}}}var vi=(new r.Component).refs;function gi(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:o({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var yi={isMounted:function(e){return!!(e=e._reactInternals)&&Ye(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=fl(),o=pl(e),i=di(r,o);i.payload=t,void 0!==n&&null!==n&&(i.callback=n),fi(e,i),hl(e,o,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=fl(),o=pl(e),i=di(r,o);i.tag=1,i.payload=t,void 0!==n&&null!==n&&(i.callback=n),fi(e,i),hl(e,o,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=fl(),r=pl(e),o=di(n,r);o.tag=2,void 0!==t&&null!==t&&(o.callback=t),fi(e,o),hl(e,r,n)}};function bi(e,t,n,r,o,i,a){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,i,a):!t.prototype||!t.prototype.isPureReactComponent||(!fr(n,r)||!fr(o,i))}function wi(e,t,n){var r=!1,o=po,i=t.contextType;return"object"===typeof i&&null!==i?i=si(i):(o=yo(t)?vo:ho.current,i=(r=null!==(r=t.contextTypes)&&void 0!==r)?go(e,o):po),t=new t(n,i),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=yi,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function ki(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&yi.enqueueReplaceState(t,t.state,null)}function xi(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=vi,ui(e);var i=t.contextType;"object"===typeof i&&null!==i?o.context=si(i):(i=yo(t)?vo:ho.current,o.context=go(e,i)),hi(e,n,o,r),o.state=e.memoizedState,"function"===typeof(i=t.getDerivedStateFromProps)&&(gi(e,t,i,n),o.state=e.memoizedState),"function"===typeof t.getDerivedStateFromProps||"function"===typeof o.getSnapshotBeforeUpdate||"function"!==typeof o.UNSAFE_componentWillMount&&"function"!==typeof o.componentWillMount||(t=o.state,"function"===typeof o.componentWillMount&&o.componentWillMount(),"function"===typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&yi.enqueueReplaceState(o,o.state,null),hi(e,n,o,r),o.state=e.memoizedState),"function"===typeof o.componentDidMount&&(e.flags|=4)}var Oi=Array.isArray;function Si(e,t,n){if(null!==(e=n.ref)&&"function"!==typeof e&&"object"!==typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,e));var o=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===o?t.ref:(t=function(e){var t=r.refs;t===vi&&(t=r.refs={}),null===e?delete t[o]:t[o]=e},t._stringRef=o,t)}if("string"!==typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function Ci(e,t){if("textarea"!==e.type)throw Error(a(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function ji(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.flags=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=Ul(e,t)).index=0,e.sibling=null,e}function i(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags=2,n):r:(t.flags=2,n):n}function s(t){return e&&null===t.alternate&&(t.flags=2),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=Yl(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function u(e,t,n,r){return null!==t&&t.elementType===n.type?((r=o(t,n.props)).ref=Si(e,t,n),r.return=e,r):((r=Kl(n.type,n.key,n.props,null,e.mode,r)).ref=Si(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Zl(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function d(e,t,n,r,i){return null===t||7!==t.tag?((t=Gl(n,e.mode,r,i)).return=e,t):((t=o(t,n)).return=e,t)}function f(e,t,n){if("string"===typeof t||"number"===typeof t)return(t=Yl(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case x:return(n=Kl(t.type,t.key,t.props,null,e.mode,n)).ref=Si(e,null,t),n.return=e,n;case O:return(t=Zl(t,e.mode,n)).return=e,t}if(Oi(t)||_(t))return(t=Gl(t,e.mode,n,null)).return=e,t;Ci(e,t)}return null}function p(e,t,n,r){var o=null!==t?t.key:null;if("string"===typeof n||"number"===typeof n)return null!==o?null:l(e,t,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case x:return n.key===o?n.type===S?d(e,t,n.props.children,r,o):u(e,t,n,r):null;case O:return n.key===o?c(e,t,n,r):null}if(Oi(n)||_(n))return null!==o?null:d(e,t,n,r,null);Ci(e,n)}return null}function h(e,t,n,r,o){if("string"===typeof r||"number"===typeof r)return l(t,e=e.get(n)||null,""+r,o);if("object"===typeof r&&null!==r){switch(r.$$typeof){case x:return e=e.get(null===r.key?n:r.key)||null,r.type===S?d(t,e,r.props.children,o,r.key):u(t,e,r,o);case O:return c(t,e=e.get(null===r.key?n:r.key)||null,r,o)}if(Oi(r)||_(r))return d(t,e=e.get(n)||null,r,o,null);Ci(t,r)}return null}function m(o,a,s,l){for(var u=null,c=null,d=a,m=a=0,v=null;null!==d&&m<s.length;m++){d.index>m?(v=d,d=null):v=d.sibling;var g=p(o,d,s[m],l);if(null===g){null===d&&(d=v);break}e&&d&&null===g.alternate&&t(o,d),a=i(g,a,m),null===c?u=g:c.sibling=g,c=g,d=v}if(m===s.length)return n(o,d),u;if(null===d){for(;m<s.length;m++)null!==(d=f(o,s[m],l))&&(a=i(d,a,m),null===c?u=d:c.sibling=d,c=d);return u}for(d=r(o,d);m<s.length;m++)null!==(v=h(d,o,m,s[m],l))&&(e&&null!==v.alternate&&d.delete(null===v.key?m:v.key),a=i(v,a,m),null===c?u=v:c.sibling=v,c=v);return e&&d.forEach((function(e){return t(o,e)})),u}function v(o,s,l,u){var c=_(l);if("function"!==typeof c)throw Error(a(150));if(null==(l=c.call(l)))throw Error(a(151));for(var d=c=null,m=s,v=s=0,g=null,y=l.next();null!==m&&!y.done;v++,y=l.next()){m.index>v?(g=m,m=null):g=m.sibling;var b=p(o,m,y.value,u);if(null===b){null===m&&(m=g);break}e&&m&&null===b.alternate&&t(o,m),s=i(b,s,v),null===d?c=b:d.sibling=b,d=b,m=g}if(y.done)return n(o,m),c;if(null===m){for(;!y.done;v++,y=l.next())null!==(y=f(o,y.value,u))&&(s=i(y,s,v),null===d?c=y:d.sibling=y,d=y);return c}for(m=r(o,m);!y.done;v++,y=l.next())null!==(y=h(m,o,v,y.value,u))&&(e&&null!==y.alternate&&m.delete(null===y.key?v:y.key),s=i(y,s,v),null===d?c=y:d.sibling=y,d=y);return e&&m.forEach((function(e){return t(o,e)})),c}return function(e,r,i,l){var u="object"===typeof i&&null!==i&&i.type===S&&null===i.key;u&&(i=i.props.children);var c="object"===typeof i&&null!==i;if(c)switch(i.$$typeof){case x:e:{for(c=i.key,u=r;null!==u;){if(u.key===c){if(7===u.tag){if(i.type===S){n(e,u.sibling),(r=o(u,i.props.children)).return=e,e=r;break e}}else if(u.elementType===i.type){n(e,u.sibling),(r=o(u,i.props)).ref=Si(e,u,i),r.return=e,e=r;break e}n(e,u);break}t(e,u),u=u.sibling}i.type===S?((r=Gl(i.props.children,e.mode,l,i.key)).return=e,e=r):((l=Kl(i.type,i.key,i.props,null,e.mode,l)).ref=Si(e,r,i),l.return=e,e=l)}return s(e);case O:e:{for(u=i.key;null!==r;){if(r.key===u){if(4===r.tag&&r.stateNode.containerInfo===i.containerInfo&&r.stateNode.implementation===i.implementation){n(e,r.sibling),(r=o(r,i.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Zl(i,e.mode,l)).return=e,e=r}return s(e)}if("string"===typeof i||"number"===typeof i)return i=""+i,null!==r&&6===r.tag?(n(e,r.sibling),(r=o(r,i)).return=e,e=r):(n(e,r),(r=Yl(i,e.mode,l)).return=e,e=r),s(e);if(Oi(i))return m(e,r,i,l);if(_(i))return v(e,r,i,l);if(c&&Ci(e,i),"undefined"===typeof i&&!u)switch(e.tag){case 1:case 22:case 0:case 11:case 15:throw Error(a(152,K(e.type)||"Component"))}return n(e,r)}}var Di=ji(!0),Ai=ji(!1),Ei={},Mi=uo(Ei),Ti=uo(Ei),Li=uo(Ei);function Ni(e){if(e===Ei)throw Error(a(174));return e}function Pi(e,t){switch(fo(Li,t),fo(Ti,e),fo(Mi,Ei),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:he(null,"");break;default:t=he(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}co(Mi),fo(Mi,t)}function Ri(){co(Mi),co(Ti),co(Li)}function Hi(e){Ni(Li.current);var t=Ni(Mi.current),n=he(t,e.type);t!==n&&(fo(Ti,e),fo(Mi,n))}function Fi(e){Ti.current===e&&(co(Mi),co(Ti))}var Vi=uo(0);function zi(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(64&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Bi=null,Ii=null,_i=!1;function $i(e,t){var n=ql(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function qi(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);default:return!1}}function Wi(e){if(_i){var t=Ii;if(t){var n=t;if(!qi(e,t)){if(!(t=Gr(n.nextSibling))||!qi(e,t))return e.flags=-1025&e.flags|2,_i=!1,void(Bi=e);$i(Bi,n)}Bi=e,Ii=Gr(t.firstChild)}else e.flags=-1025&e.flags|2,_i=!1,Bi=e}}function Ui(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Bi=e}function Ki(e){if(e!==Bi)return!1;if(!_i)return Ui(e),_i=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!qr(t,e.memoizedProps))for(t=Ii;t;)$i(e,t),t=Gr(t.nextSibling);if(Ui(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){Ii=Gr(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}Ii=null}}else Ii=Bi?Gr(e.stateNode.nextSibling):null;return!0}function Gi(){Ii=Bi=null,_i=!1}var Ji=[];function Yi(){for(var e=0;e<Ji.length;e++)Ji[e]._workInProgressVersionPrimary=null;Ji.length=0}var Zi=k.ReactCurrentDispatcher,Xi=k.ReactCurrentBatchConfig,Qi=0,ea=null,ta=null,na=null,ra=!1,oa=!1;function ia(){throw Error(a(321))}function aa(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!cr(e[n],t[n]))return!1;return!0}function sa(e,t,n,r,o,i){if(Qi=i,ea=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Zi.current=null===e||null===e.memoizedState?Na:Pa,e=n(r,o),oa){i=0;do{if(oa=!1,!(25>i))throw Error(a(301));i+=1,na=ta=null,t.updateQueue=null,Zi.current=Ra,e=n(r,o)}while(oa)}if(Zi.current=La,t=null!==ta&&null!==ta.next,Qi=0,na=ta=ea=null,ra=!1,t)throw Error(a(300));return e}function la(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===na?ea.memoizedState=na=e:na=na.next=e,na}function ua(){if(null===ta){var e=ea.alternate;e=null!==e?e.memoizedState:null}else e=ta.next;var t=null===na?ea.memoizedState:na.next;if(null!==t)na=t,ta=e;else{if(null===e)throw Error(a(310));e={memoizedState:(ta=e).memoizedState,baseState:ta.baseState,baseQueue:ta.baseQueue,queue:ta.queue,next:null},null===na?ea.memoizedState=na=e:na=na.next=e}return na}function ca(e,t){return"function"===typeof t?t(e):t}function da(e){var t=ua(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=ta,o=r.baseQueue,i=n.pending;if(null!==i){if(null!==o){var s=o.next;o.next=i.next,i.next=s}r.baseQueue=o=i,n.pending=null}if(null!==o){o=o.next,r=r.baseState;var l=s=i=null,u=o;do{var c=u.lane;if((Qi&c)===c)null!==l&&(l=l.next={lane:0,action:u.action,eagerReducer:u.eagerReducer,eagerState:u.eagerState,next:null}),r=u.eagerReducer===e?u.eagerState:e(r,u.action);else{var d={lane:c,action:u.action,eagerReducer:u.eagerReducer,eagerState:u.eagerState,next:null};null===l?(s=l=d,i=r):l=l.next=d,ea.lanes|=c,Is|=c}u=u.next}while(null!==u&&u!==o);null===l?i=r:l.next=s,cr(r,t.memoizedState)||(Fa=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=l,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function fa(e){var t=ua(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(null!==o){n.pending=null;var s=o=o.next;do{i=e(i,s.action),s=s.next}while(s!==o);cr(i,t.memoizedState)||(Fa=!0),t.memoizedState=i,null===t.baseQueue&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function pa(e,t,n){var r=t._getVersion;r=r(t._source);var o=t._workInProgressVersionPrimary;if(null!==o?e=o===r:(e=e.mutableReadLanes,(e=(Qi&e)===e)&&(t._workInProgressVersionPrimary=r,Ji.push(t))),e)return n(t._source);throw Ji.push(t),Error(a(350))}function ha(e,t,n,r){var o=Ns;if(null===o)throw Error(a(349));var i=t._getVersion,s=i(t._source),l=Zi.current,u=l.useState((function(){return pa(o,t,n)})),c=u[1],d=u[0];u=na;var f=e.memoizedState,p=f.refs,h=p.getSnapshot,m=f.source;f=f.subscribe;var v=ea;return e.memoizedState={refs:p,source:t,subscribe:r},l.useEffect((function(){p.getSnapshot=n,p.setSnapshot=c;var e=i(t._source);if(!cr(s,e)){e=n(t._source),cr(d,e)||(c(e),e=pl(v),o.mutableReadLanes|=e&o.pendingLanes),e=o.mutableReadLanes,o.entangledLanes|=e;for(var r=o.entanglements,a=e;0<a;){var l=31-qt(a),u=1<<l;r[l]|=e,a&=~u}}}),[n,t,r]),l.useEffect((function(){return r(t._source,(function(){var e=p.getSnapshot,n=p.setSnapshot;try{n(e(t._source));var r=pl(v);o.mutableReadLanes|=r&o.pendingLanes}catch(i){n((function(){throw i}))}}))}),[t,r]),cr(h,n)&&cr(m,t)&&cr(f,r)||((e={pending:null,dispatch:null,lastRenderedReducer:ca,lastRenderedState:d}).dispatch=c=Ta.bind(null,ea,e),u.queue=e,u.baseQueue=null,d=pa(o,t,n),u.memoizedState=u.baseState=d),d}function ma(e,t,n){return ha(ua(),e,t,n)}function va(e){var t=la();return"function"===typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:ca,lastRenderedState:e}).dispatch=Ta.bind(null,ea,e),[t.memoizedState,e]}function ga(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=ea.updateQueue)?(t={lastEffect:null},ea.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ya(e){return e={current:e},la().memoizedState=e}function ba(){return ua().memoizedState}function wa(e,t,n,r){var o=la();ea.flags|=e,o.memoizedState=ga(1|t,n,void 0,void 0===r?null:r)}function ka(e,t,n,r){var o=ua();r=void 0===r?null:r;var i=void 0;if(null!==ta){var a=ta.memoizedState;if(i=a.destroy,null!==r&&aa(r,a.deps))return void ga(t,n,i,r)}ea.flags|=e,o.memoizedState=ga(1|t,n,i,r)}function xa(e,t){return wa(516,4,e,t)}function Oa(e,t){return ka(516,4,e,t)}function Sa(e,t){return ka(4,2,e,t)}function Ca(e,t){return"function"===typeof t?(e=e(),t(e),function(){t(null)}):null!==t&&void 0!==t?(e=e(),t.current=e,function(){t.current=null}):void 0}function ja(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,ka(4,2,Ca.bind(null,t,e),n)}function Da(){}function Aa(e,t){var n=ua();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&aa(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ea(e,t){var n=ua();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&aa(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Ma(e,t){var n=Wo();Ko(98>n?98:n,(function(){e(!0)})),Ko(97<n?97:n,(function(){var n=Xi.transition;Xi.transition=1;try{e(!1),t()}finally{Xi.transition=n}}))}function Ta(e,t,n){var r=fl(),o=pl(e),i={lane:o,action:n,eagerReducer:null,eagerState:null,next:null},a=t.pending;if(null===a?i.next=i:(i.next=a.next,a.next=i),t.pending=i,a=e.alternate,e===ea||null!==a&&a===ea)oa=ra=!0;else{if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var s=t.lastRenderedState,l=a(s,n);if(i.eagerReducer=a,i.eagerState=l,cr(l,s))return}catch(u){}hl(e,o,r)}}var La={readContext:si,useCallback:ia,useContext:ia,useEffect:ia,useImperativeHandle:ia,useLayoutEffect:ia,useMemo:ia,useReducer:ia,useRef:ia,useState:ia,useDebugValue:ia,useDeferredValue:ia,useTransition:ia,useMutableSource:ia,useOpaqueIdentifier:ia,unstable_isNewReconciler:!1},Na={readContext:si,useCallback:function(e,t){return la().memoizedState=[e,void 0===t?null:t],e},useContext:si,useEffect:xa,useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,wa(4,2,Ca.bind(null,t,e),n)},useLayoutEffect:function(e,t){return wa(4,2,e,t)},useMemo:function(e,t){var n=la();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=la();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=Ta.bind(null,ea,e),[r.memoizedState,e]},useRef:ya,useState:va,useDebugValue:Da,useDeferredValue:function(e){var t=va(e),n=t[0],r=t[1];return xa((function(){var t=Xi.transition;Xi.transition=1;try{r(e)}finally{Xi.transition=t}}),[e]),n},useTransition:function(){var e=va(!1),t=e[0];return ya(e=Ma.bind(null,e[1])),[e,t]},useMutableSource:function(e,t,n){var r=la();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},ha(r,e,t,n)},useOpaqueIdentifier:function(){if(_i){var e=!1,t=function(e){return{$$typeof:R,toString:e,valueOf:e}}((function(){throw e||(e=!0,n("r:"+(Yr++).toString(36))),Error(a(355))})),n=va(t)[1];return 0===(2&ea.mode)&&(ea.flags|=516,ga(5,(function(){n("r:"+(Yr++).toString(36))}),void 0,null)),t}return va(t="r:"+(Yr++).toString(36)),t},unstable_isNewReconciler:!1},Pa={readContext:si,useCallback:Aa,useContext:si,useEffect:Oa,useImperativeHandle:ja,useLayoutEffect:Sa,useMemo:Ea,useReducer:da,useRef:ba,useState:function(){return da(ca)},useDebugValue:Da,useDeferredValue:function(e){var t=da(ca),n=t[0],r=t[1];return Oa((function(){var t=Xi.transition;Xi.transition=1;try{r(e)}finally{Xi.transition=t}}),[e]),n},useTransition:function(){var e=da(ca)[0];return[ba().current,e]},useMutableSource:ma,useOpaqueIdentifier:function(){return da(ca)[0]},unstable_isNewReconciler:!1},Ra={readContext:si,useCallback:Aa,useContext:si,useEffect:Oa,useImperativeHandle:ja,useLayoutEffect:Sa,useMemo:Ea,useReducer:fa,useRef:ba,useState:function(){return fa(ca)},useDebugValue:Da,useDeferredValue:function(e){var t=fa(ca),n=t[0],r=t[1];return Oa((function(){var t=Xi.transition;Xi.transition=1;try{r(e)}finally{Xi.transition=t}}),[e]),n},useTransition:function(){var e=fa(ca)[0];return[ba().current,e]},useMutableSource:ma,useOpaqueIdentifier:function(){return fa(ca)[0]},unstable_isNewReconciler:!1},Ha=k.ReactCurrentOwner,Fa=!1;function Va(e,t,n,r){t.child=null===e?Ai(t,null,n,r):Di(t,e.child,n,r)}function za(e,t,n,r,o){n=n.render;var i=t.ref;return ai(t,o),r=sa(e,t,n,r,i,o),null===e||Fa?(t.flags|=1,Va(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,is(e,t,o))}function Ba(e,t,n,r,o,i){if(null===e){var a=n.type;return"function"!==typeof a||Wl(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Kl(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Ia(e,t,a,r,o,i))}return a=e.child,0===(o&i)&&(o=a.memoizedProps,(n=null!==(n=n.compare)?n:fr)(o,r)&&e.ref===t.ref)?is(e,t,i):(t.flags|=1,(e=Ul(a,r)).ref=t.ref,e.return=t,t.child=e)}function Ia(e,t,n,r,o,i){if(null!==e&&fr(e.memoizedProps,r)&&e.ref===t.ref){if(Fa=!1,0===(i&o))return t.lanes=e.lanes,is(e,t,i);0!==(16384&e.flags)&&(Fa=!0)}return qa(e,t,n,r,i)}function _a(e,t,n){var r=t.pendingProps,o=r.children,i=null!==e?e.memoizedState:null;if("hidden"===r.mode||"unstable-defer-without-hiding"===r.mode)if(0===(4&t.mode))t.memoizedState={baseLanes:0},xl(t,n);else{if(0===(1073741824&n))return e=null!==i?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},xl(t,e),null;t.memoizedState={baseLanes:0},xl(t,null!==i?i.baseLanes:n)}else null!==i?(r=i.baseLanes|n,t.memoizedState=null):r=n,xl(t,r);return Va(e,t,o,n),t.child}function $a(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=128)}function qa(e,t,n,r,o){var i=yo(n)?vo:ho.current;return i=go(t,i),ai(t,o),n=sa(e,t,n,r,i,o),null===e||Fa?(t.flags|=1,Va(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,is(e,t,o))}function Wa(e,t,n,r,o){if(yo(n)){var i=!0;xo(t)}else i=!1;if(ai(t,o),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),wi(t,n,r),xi(t,n,r,o),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,u=n.contextType;"object"===typeof u&&null!==u?u=si(u):u=go(t,u=yo(n)?vo:ho.current);var c=n.getDerivedStateFromProps,d="function"===typeof c||"function"===typeof a.getSnapshotBeforeUpdate;d||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==r||l!==u)&&ki(t,a,r,u),li=!1;var f=t.memoizedState;a.state=f,hi(t,r,a,o),l=t.memoizedState,s!==r||f!==l||mo.current||li?("function"===typeof c&&(gi(t,n,c,r),l=t.memoizedState),(s=li||bi(t,n,s,r,f,l,u))?(d||"function"!==typeof a.UNSAFE_componentWillMount&&"function"!==typeof a.componentWillMount||("function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"===typeof a.componentDidMount&&(t.flags|=4)):("function"===typeof a.componentDidMount&&(t.flags|=4),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=u,r=s):("function"===typeof a.componentDidMount&&(t.flags|=4),r=!1)}else{a=t.stateNode,ci(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:Xo(t.type,s),a.props=u,d=t.pendingProps,f=a.context,"object"===typeof(l=n.contextType)&&null!==l?l=si(l):l=go(t,l=yo(n)?vo:ho.current);var p=n.getDerivedStateFromProps;(c="function"===typeof p||"function"===typeof a.getSnapshotBeforeUpdate)||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==d||f!==l)&&ki(t,a,r,l),li=!1,f=t.memoizedState,a.state=f,hi(t,r,a,o);var h=t.memoizedState;s!==d||f!==h||mo.current||li?("function"===typeof p&&(gi(t,n,p,r),h=t.memoizedState),(u=li||bi(t,n,u,r,f,h,l))?(c||"function"!==typeof a.UNSAFE_componentWillUpdate&&"function"!==typeof a.componentWillUpdate||("function"===typeof a.componentWillUpdate&&a.componentWillUpdate(r,h,l),"function"===typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,h,l)),"function"===typeof a.componentDidUpdate&&(t.flags|=4),"function"===typeof a.getSnapshotBeforeUpdate&&(t.flags|=256)):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=256),t.memoizedProps=r,t.memoizedState=h),a.props=r,a.state=h,a.context=l,r=u):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=256),r=!1)}return Ua(e,t,n,r,i,o)}function Ua(e,t,n,r,o,i){$a(e,t);var a=0!==(64&t.flags);if(!r&&!a)return o&&Oo(t,n,!1),is(e,t,i);r=t.stateNode,Ha.current=t;var s=a&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=Di(t,e.child,null,i),t.child=Di(t,null,s,i)):Va(e,t,s,i),t.memoizedState=r.state,o&&Oo(t,n,!0),t.child}function Ka(e){var t=e.stateNode;t.pendingContext?wo(0,t.pendingContext,t.pendingContext!==t.context):t.context&&wo(0,t.context,!1),Pi(e,t.containerInfo)}var Ga,Ja,Ya,Za={dehydrated:null,retryLane:0};function Xa(e,t,n){var r,o=t.pendingProps,i=Vi.current,a=!1;return(r=0!==(64&t.flags))||(r=(null===e||null!==e.memoizedState)&&0!==(2&i)),r?(a=!0,t.flags&=-65):null!==e&&null===e.memoizedState||void 0===o.fallback||!0===o.unstable_avoidThisFallback||(i|=1),fo(Vi,1&i),null===e?(void 0!==o.fallback&&Wi(t),e=o.children,i=o.fallback,a?(e=Qa(t,e,i,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Za,e):"number"===typeof o.unstable_expectedLoadTime?(e=Qa(t,e,i,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Za,t.lanes=33554432,e):((n=Jl({mode:"visible",children:e},t.mode,n,null)).return=t,t.child=n)):(e.memoizedState,a?(o=ts(e,t,o.children,o.fallback,n),a=t.child,i=e.child.memoizedState,a.memoizedState=null===i?{baseLanes:n}:{baseLanes:i.baseLanes|n},a.childLanes=e.childLanes&~n,t.memoizedState=Za,o):(n=es(e,t,o.children,n),t.memoizedState=null,n))}function Qa(e,t,n,r){var o=e.mode,i=e.child;return t={mode:"hidden",children:t},0===(2&o)&&null!==i?(i.childLanes=0,i.pendingProps=t):i=Jl(t,o,0,null),n=Gl(n,o,r,null),i.return=e,n.return=e,i.sibling=n,e.child=i,n}function es(e,t,n,r){var o=e.child;return e=o.sibling,n=Ul(o,{mode:"visible",children:n}),0===(2&t.mode)&&(n.lanes=r),n.return=t,n.sibling=null,null!==e&&(e.nextEffect=null,e.flags=8,t.firstEffect=t.lastEffect=e),t.child=n}function ts(e,t,n,r,o){var i=t.mode,a=e.child;e=a.sibling;var s={mode:"hidden",children:n};return 0===(2&i)&&t.child!==a?((n=t.child).childLanes=0,n.pendingProps=s,null!==(a=n.lastEffect)?(t.firstEffect=n.firstEffect,t.lastEffect=a,a.nextEffect=null):t.firstEffect=t.lastEffect=null):n=Ul(a,s),null!==e?r=Ul(e,r):(r=Gl(r,i,o,null)).flags|=2,r.return=t,n.return=t,n.sibling=r,t.child=n,r}function ns(e,t){e.lanes|=t;var n=e.alternate;null!==n&&(n.lanes|=t),ii(e.return,t)}function rs(e,t,n,r,o,i){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o,lastEffect:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=o,a.lastEffect=i)}function os(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Va(e,t,r.children,n),0!==(2&(r=Vi.current)))r=1&r|2,t.flags|=64;else{if(null!==e&&0!==(64&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&ns(e,n);else if(19===e.tag)ns(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(fo(Vi,r),0===(2&t.mode))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===zi(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),rs(t,!1,o,n,i,t.lastEffect);break;case"backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===zi(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}rs(t,!0,n,null,i,t.lastEffect);break;case"together":rs(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function is(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Is|=t.lanes,0!==(n&t.childLanes)){if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=Ul(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Ul(e,e.pendingProps)).return=t;n.sibling=null}return t.child}return null}function as(e,t){if(!_i)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ss(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:case 17:return yo(t.type)&&bo(),null;case 3:return Ri(),co(mo),co(ho),Yi(),(r=t.stateNode).pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(Ki(t)?t.flags|=4:r.hydrate||(t.flags|=256)),null;case 5:Fi(t);var i=Ni(Li.current);if(n=t.type,null!==e&&null!=t.stateNode)Ja(e,t,n,r),e.ref!==t.ref&&(t.flags|=128);else{if(!r){if(null===t.stateNode)throw Error(a(166));return null}if(e=Ni(Mi.current),Ki(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[Xr]=t,r[Qr]=s,n){case"dialog":Mr("cancel",r),Mr("close",r);break;case"iframe":case"object":case"embed":Mr("load",r);break;case"video":case"audio":for(e=0;e<jr.length;e++)Mr(jr[e],r);break;case"source":Mr("error",r);break;case"img":case"image":case"link":Mr("error",r),Mr("load",r);break;case"details":Mr("toggle",r);break;case"input":ee(r,s),Mr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Mr("invalid",r);break;case"textarea":le(r,s),Mr("invalid",r)}for(var u in Se(n,s),e=null,s)s.hasOwnProperty(u)&&(i=s[u],"children"===u?"string"===typeof i?r.textContent!==i&&(e=["children",i]):"number"===typeof i&&r.textContent!==""+i&&(e=["children",""+i]):l.hasOwnProperty(u)&&null!=i&&"onScroll"===u&&Mr("scroll",r));switch(n){case"input":Y(r),re(r,s,!0);break;case"textarea":Y(r),ce(r);break;case"select":case"option":break;default:"function"===typeof s.onClick&&(r.onclick=Br)}r=e,t.updateQueue=r,null!==r&&(t.flags|=4)}else{switch(u=9===i.nodeType?i:i.ownerDocument,e===de&&(e=pe(n)),e===de?"script"===n?((e=u.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"===typeof r.is?e=u.createElement(n,{is:r.is}):(e=u.createElement(n),"select"===n&&(u=e,r.multiple?u.multiple=!0:r.size&&(u.size=r.size))):e=u.createElementNS(e,n),e[Xr]=t,e[Qr]=r,Ga(e,t),t.stateNode=e,u=Ce(n,r),n){case"dialog":Mr("cancel",e),Mr("close",e),i=r;break;case"iframe":case"object":case"embed":Mr("load",e),i=r;break;case"video":case"audio":for(i=0;i<jr.length;i++)Mr(jr[i],e);i=r;break;case"source":Mr("error",e),i=r;break;case"img":case"image":case"link":Mr("error",e),Mr("load",e),i=r;break;case"details":Mr("toggle",e),i=r;break;case"input":ee(e,r),i=Q(e,r),Mr("invalid",e);break;case"option":i=ie(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=o({},r,{value:void 0}),Mr("invalid",e);break;case"textarea":le(e,r),i=se(e,r),Mr("invalid",e);break;default:i=r}Se(n,i);var c=i;for(s in c)if(c.hasOwnProperty(s)){var d=c[s];"style"===s?xe(e,d):"dangerouslySetInnerHTML"===s?null!=(d=d?d.__html:void 0)&&ge(e,d):"children"===s?"string"===typeof d?("textarea"!==n||""!==d)&&ye(e,d):"number"===typeof d&&ye(e,""+d):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(l.hasOwnProperty(s)?null!=d&&"onScroll"===s&&Mr("scroll",e):null!=d&&w(e,s,d,u))}switch(n){case"input":Y(e),re(e,r,!1);break;case"textarea":Y(e),ce(e);break;case"option":null!=r.value&&e.setAttribute("value",""+G(r.value));break;case"select":e.multiple=!!r.multiple,null!=(s=r.value)?ae(e,!!r.multiple,s,!1):null!=r.defaultValue&&ae(e,!!r.multiple,r.defaultValue,!0);break;default:"function"===typeof i.onClick&&(e.onclick=Br)}$r(n,r)&&(t.flags|=4)}null!==t.ref&&(t.flags|=128)}return null;case 6:if(e&&null!=t.stateNode)Ya(0,t,e.memoizedProps,r);else{if("string"!==typeof r&&null===t.stateNode)throw Error(a(166));n=Ni(Li.current),Ni(Mi.current),Ki(t)?(r=t.stateNode,n=t.memoizedProps,r[Xr]=t,r.nodeValue!==n&&(t.flags|=4)):((r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[Xr]=t,t.stateNode=r)}return null;case 13:return co(Vi),r=t.memoizedState,0!==(64&t.flags)?(t.lanes=n,t):(r=null!==r,n=!1,null===e?void 0!==t.memoizedProps.fallback&&Ki(t):n=null!==e.memoizedState,r&&!n&&0!==(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!==(1&Vi.current)?0===Vs&&(Vs=3):(0!==Vs&&3!==Vs||(Vs=4),null===Ns||0===(134217727&Is)&&0===(134217727&_s)||yl(Ns,Rs))),(r||n)&&(t.flags|=4),null);case 4:return Ri(),null===e&&Lr(t.stateNode.containerInfo),null;case 10:return oi(t),null;case 19:if(co(Vi),null===(r=t.memoizedState))return null;if(s=0!==(64&t.flags),null===(u=r.rendering))if(s)as(r,!1);else{if(0!==Vs||null!==e&&0!==(64&e.flags))for(e=t.child;null!==e;){if(null!==(u=zi(e))){for(t.flags|=64,as(r,!1),null!==(s=u.updateQueue)&&(t.updateQueue=s,t.flags|=4),null===r.lastEffect&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=n,n=t.child;null!==n;)e=r,(s=n).flags&=2,s.nextEffect=null,s.firstEffect=null,s.lastEffect=null,null===(u=s.alternate)?(s.childLanes=0,s.lanes=e,s.child=null,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=u.childLanes,s.lanes=u.lanes,s.child=u.child,s.memoizedProps=u.memoizedProps,s.memoizedState=u.memoizedState,s.updateQueue=u.updateQueue,s.type=u.type,e=u.dependencies,s.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return fo(Vi,1&Vi.current|2),t.child}e=e.sibling}null!==r.tail&&qo()>Us&&(t.flags|=64,s=!0,as(r,!1),t.lanes=33554432)}else{if(!s)if(null!==(e=zi(u))){if(t.flags|=64,s=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),as(r,!0),null===r.tail&&"hidden"===r.tailMode&&!u.alternate&&!_i)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*qo()-r.renderingStartTime>Us&&1073741824!==n&&(t.flags|=64,s=!0,as(r,!1),t.lanes=33554432);r.isBackwards?(u.sibling=t.child,t.child=u):(null!==(n=r.last)?n.sibling=u:t.child=u,r.last=u)}return null!==r.tail?(n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=qo(),n.sibling=null,t=Vi.current,fo(Vi,s?1&t|2:1&t),n):null;case 23:case 24:return Ol(),null!==e&&null!==e.memoizedState!==(null!==t.memoizedState)&&"unstable-defer-without-hiding"!==r.mode&&(t.flags|=4),null}throw Error(a(156,t.tag))}function ls(e){switch(e.tag){case 1:yo(e.type)&&bo();var t=e.flags;return 4096&t?(e.flags=-4097&t|64,e):null;case 3:if(Ri(),co(mo),co(ho),Yi(),0!==(64&(t=e.flags)))throw Error(a(285));return e.flags=-4097&t|64,e;case 5:return Fi(e),null;case 13:return co(Vi),4096&(t=e.flags)?(e.flags=-4097&t|64,e):null;case 19:return co(Vi),null;case 4:return Ri(),null;case 10:return oi(e),null;case 23:case 24:return Ol(),null;default:return null}}function us(e,t){try{var n="",r=t;do{n+=U(r),r=r.return}while(r);var o=n}catch(i){o="\nError generating stack: "+i.message+"\n"+i.stack}return{value:e,source:t,stack:o}}function cs(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}Ga=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ja=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Ni(Mi.current);var a,s=null;switch(n){case"input":i=Q(e,i),r=Q(e,r),s=[];break;case"option":i=ie(e,i),r=ie(e,r),s=[];break;case"select":i=o({},i,{value:void 0}),r=o({},r,{value:void 0}),s=[];break;case"textarea":i=se(e,i),r=se(e,r),s=[];break;default:"function"!==typeof i.onClick&&"function"===typeof r.onClick&&(e.onclick=Br)}for(d in Se(n,r),n=null,i)if(!r.hasOwnProperty(d)&&i.hasOwnProperty(d)&&null!=i[d])if("style"===d){var u=i[d];for(a in u)u.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==d&&"children"!==d&&"suppressContentEditableWarning"!==d&&"suppressHydrationWarning"!==d&&"autoFocus"!==d&&(l.hasOwnProperty(d)?s||(s=[]):(s=s||[]).push(d,null));for(d in r){var c=r[d];if(u=null!=i?i[d]:void 0,r.hasOwnProperty(d)&&c!==u&&(null!=c||null!=u))if("style"===d)if(u){for(a in u)!u.hasOwnProperty(a)||c&&c.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in c)c.hasOwnProperty(a)&&u[a]!==c[a]&&(n||(n={}),n[a]=c[a])}else n||(s||(s=[]),s.push(d,n)),n=c;else"dangerouslySetInnerHTML"===d?(c=c?c.__html:void 0,u=u?u.__html:void 0,null!=c&&u!==c&&(s=s||[]).push(d,c)):"children"===d?"string"!==typeof c&&"number"!==typeof c||(s=s||[]).push(d,""+c):"suppressContentEditableWarning"!==d&&"suppressHydrationWarning"!==d&&(l.hasOwnProperty(d)?(null!=c&&"onScroll"===d&&Mr("scroll",e),s||u===c||(s=[])):"object"===typeof c&&null!==c&&c.$$typeof===R?c.toString():(s=s||[]).push(d,c))}n&&(s=s||[]).push("style",n);var d=s;(t.updateQueue=d)&&(t.flags|=4)}},Ya=function(e,t,n,r){n!==r&&(t.flags|=4)};var ds="function"===typeof WeakMap?WeakMap:Map;function fs(e,t,n){(n=di(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ys||(Ys=!0,Zs=r),cs(0,t)},n}function ps(e,t,n){(n=di(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"===typeof r){var o=t.value;n.payload=function(){return cs(0,t),r(o)}}var i=e.stateNode;return null!==i&&"function"===typeof i.componentDidCatch&&(n.callback=function(){"function"!==typeof r&&(null===Xs?Xs=new Set([this]):Xs.add(this),cs(0,t));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}var hs="function"===typeof WeakSet?WeakSet:Set;function ms(e){var t=e.ref;if(null!==t)if("function"===typeof t)try{t(null)}catch(n){Bl(e,n)}else t.current=null}function vs(e,t){switch(t.tag){case 0:case 11:case 15:case 22:case 5:case 6:case 4:case 17:return;case 1:if(256&t.flags&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Xo(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:return void(256&t.flags&&Kr(t.stateNode.containerInfo))}throw Error(a(163))}function gs(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{if(3===(3&e.tag)){var r=e.create;e.destroy=r()}e=e.next}while(e!==t)}if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{var o=e;r=o.next,0!==(4&(o=o.tag))&&0!==(1&o)&&(Fl(n,e),Hl(n,e)),e=r}while(e!==t)}return;case 1:return e=n.stateNode,4&n.flags&&(null===t?e.componentDidMount():(r=n.elementType===n.type?t.memoizedProps:Xo(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),void(null!==(t=n.updateQueue)&&mi(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:case 1:e=n.child.stateNode}mi(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.flags&&$r(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:case 19:case 17:case 20:case 21:case 23:case 24:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&xt(n)))))}throw Error(a(163))}function ys(e,t){for(var n=e;;){if(5===n.tag){var r=n.stateNode;if(t)"function"===typeof(r=r.style).setProperty?r.setProperty("display","none","important"):r.display="none";else{r=n.stateNode;var o=n.memoizedProps.style;o=void 0!==o&&null!==o&&o.hasOwnProperty("display")?o.display:null,r.style.display=ke("display",o)}}else if(6===n.tag)n.stateNode.nodeValue=t?"":n.memoizedProps;else if((23!==n.tag&&24!==n.tag||null===n.memoizedState||n===e)&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function bs(e,t){if(Co&&"function"===typeof Co.onCommitFiberUnmount)try{Co.onCommitFiberUnmount(So,t)}catch(i){}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var n=e=e.next;do{var r=n,o=r.destroy;if(r=r.tag,void 0!==o)if(0!==(4&r))Fl(t,n);else{r=t;try{o()}catch(i){Bl(r,i)}}n=n.next}while(n!==e)}break;case 1:if(ms(t),"function"===typeof(e=t.stateNode).componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(i){Bl(t,i)}break;case 5:ms(t);break;case 4:Cs(e,t)}}function ws(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function ks(e){return 5===e.tag||3===e.tag||4===e.tag}function xs(e){e:{for(var t=e.return;null!==t;){if(ks(t))break e;t=t.return}throw Error(a(160))}var n=t;switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(a(161))}16&n.flags&&(ye(t,""),n.flags&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||ks(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.flags)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.flags)){n=n.stateNode;break e}}r?Os(e,n,t):Ss(e,n,t)}function Os(e,t,n){var r=e.tag,o=5===r||6===r;if(o)e=o?e.stateNode:e.stateNode.instance,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=Br));else if(4!==r&&null!==(e=e.child))for(Os(e,t,n),e=e.sibling;null!==e;)Os(e,t,n),e=e.sibling}function Ss(e,t,n){var r=e.tag,o=5===r||6===r;if(o)e=o?e.stateNode:e.stateNode.instance,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(Ss(e,t,n),e=e.sibling;null!==e;)Ss(e,t,n),e=e.sibling}function Cs(e,t){for(var n,r,o=t,i=!1;;){if(!i){i=o.return;e:for(;;){if(null===i)throw Error(a(160));switch(n=i.stateNode,i.tag){case 5:r=!1;break e;case 3:case 4:n=n.containerInfo,r=!0;break e}i=i.return}i=!0}if(5===o.tag||6===o.tag){e:for(var s=e,l=o,u=l;;)if(bs(s,u),null!==u.child&&4!==u.tag)u.child.return=u,u=u.child;else{if(u===l)break e;for(;null===u.sibling;){if(null===u.return||u.return===l)break e;u=u.return}u.sibling.return=u.return,u=u.sibling}r?(s=n,l=o.stateNode,8===s.nodeType?s.parentNode.removeChild(l):s.removeChild(l)):n.removeChild(o.stateNode)}else if(4===o.tag){if(null!==o.child){n=o.stateNode.containerInfo,r=!0,o.child.return=o,o=o.child;continue}}else if(bs(e,o),null!==o.child){o.child.return=o,o=o.child;continue}if(o===t)break;for(;null===o.sibling;){if(null===o.return||o.return===t)return;4===(o=o.return).tag&&(i=!1)}o.sibling.return=o.return,o=o.sibling}}function js(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var n=t.updateQueue;if(null!==(n=null!==n?n.lastEffect:null)){var r=n=n.next;do{3===(3&r.tag)&&(e=r.destroy,r.destroy=void 0,void 0!==e&&e()),r=r.next}while(r!==n)}return;case 1:case 12:case 17:return;case 5:if(null!=(n=t.stateNode)){r=t.memoizedProps;var o=null!==e?e.memoizedProps:r;e=t.type;var i=t.updateQueue;if(t.updateQueue=null,null!==i){for(n[Qr]=r,"input"===e&&"radio"===r.type&&null!=r.name&&te(n,r),Ce(e,o),t=Ce(e,r),o=0;o<i.length;o+=2){var s=i[o],l=i[o+1];"style"===s?xe(n,l):"dangerouslySetInnerHTML"===s?ge(n,l):"children"===s?ye(n,l):w(n,s,l,t)}switch(e){case"input":ne(n,r);break;case"textarea":ue(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(i=r.value)?ae(n,!!r.multiple,i,!1):e!==!!r.multiple&&(null!=r.defaultValue?ae(n,!!r.multiple,r.defaultValue,!0):ae(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(null===t.stateNode)throw Error(a(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((n=t.stateNode).hydrate&&(n.hydrate=!1,xt(n.containerInfo)));case 13:return null!==t.memoizedState&&(Ws=qo(),ys(t.child,!0)),void Ds(t);case 19:return void Ds(t);case 23:case 24:return void ys(t,null!==t.memoizedState)}throw Error(a(163))}function Ds(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new hs),t.forEach((function(t){var r=_l.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function As(e,t){return null!==e&&(null===(e=e.memoizedState)||null!==e.dehydrated)&&(null!==(t=t.memoizedState)&&null===t.dehydrated)}var Es=Math.ceil,Ms=k.ReactCurrentDispatcher,Ts=k.ReactCurrentOwner,Ls=0,Ns=null,Ps=null,Rs=0,Hs=0,Fs=uo(0),Vs=0,zs=null,Bs=0,Is=0,_s=0,$s=0,qs=null,Ws=0,Us=1/0;function Ks(){Us=qo()+500}var Gs,Js=null,Ys=!1,Zs=null,Xs=null,Qs=!1,el=null,tl=90,nl=[],rl=[],ol=null,il=0,al=null,sl=-1,ll=0,ul=0,cl=null,dl=!1;function fl(){return 0!==(48&Ls)?qo():-1!==sl?sl:sl=qo()}function pl(e){if(0===(2&(e=e.mode)))return 1;if(0===(4&e))return 99===Wo()?1:2;if(0===ll&&(ll=Bs),0!==Zo.transition){0!==ul&&(ul=null!==qs?qs.pendingLanes:0),e=ll;var t=4186112&~ul;return 0===(t&=-t)&&(0===(t=(e=4186112&~e)&-e)&&(t=8192)),t}return e=Wo(),0!==(4&Ls)&&98===e?e=Bt(12,ll):e=Bt(e=function(e){switch(e){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}(e),ll),e}function hl(e,t,n){if(50<il)throw il=0,al=null,Error(a(185));if(null===(e=ml(e,t)))return null;$t(e,t,n),e===Ns&&(_s|=t,4===Vs&&yl(e,Rs));var r=Wo();1===t?0!==(8&Ls)&&0===(48&Ls)?bl(e):(vl(e,n),0===Ls&&(Ks(),Jo())):(0===(4&Ls)||98!==r&&99!==r||(null===ol?ol=new Set([e]):ol.add(e)),vl(e,n)),qs=e}function ml(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}function vl(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,o=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var l=31-qt(s),u=1<<l,c=i[l];if(-1===c){if(0===(u&r)||0!==(u&o)){c=t,Ft(u);var d=Ht;i[l]=10<=d?c+250:6<=d?c+5e3:-1}}else c<=t&&(e.expiredLanes|=u);s&=~u}if(r=Vt(e,e===Ns?Rs:0),t=Ht,0===r)null!==n&&(n!==Vo&&Ao(n),e.callbackNode=null,e.callbackPriority=0);else{if(null!==n){if(e.callbackPriority===t)return;n!==Vo&&Ao(n)}15===t?(n=bl.bind(null,e),null===Bo?(Bo=[n],Io=Do(No,Yo)):Bo.push(n),n=Vo):14===t?n=Go(99,bl.bind(null,e)):(n=function(e){switch(e){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(a(358,e))}}(t),n=Go(n,gl.bind(null,e))),e.callbackPriority=t,e.callbackNode=n}}function gl(e){if(sl=-1,ul=ll=0,0!==(48&Ls))throw Error(a(327));var t=e.callbackNode;if(Rl()&&e.callbackNode!==t)return null;var n=Vt(e,e===Ns?Rs:0);if(0===n)return null;var r=n,o=Ls;Ls|=16;var i=jl();for(Ns===e&&Rs===r||(Ks(),Sl(e,r));;)try{El();break}catch(l){Cl(e,l)}if(ri(),Ms.current=i,Ls=o,null!==Ps?r=0:(Ns=null,Rs=0,r=Vs),0!==(Bs&_s))Sl(e,0);else if(0!==r){if(2===r&&(Ls|=64,e.hydrate&&(e.hydrate=!1,Kr(e.containerInfo)),0!==(n=zt(e))&&(r=Dl(e,n))),1===r)throw t=zs,Sl(e,0),yl(e,n),vl(e,qo()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(a(345));case 2:case 5:Ll(e);break;case 3:if(yl(e,n),(62914560&n)===n&&10<(r=Ws+500-qo())){if(0!==Vt(e,0))break;if(((o=e.suspendedLanes)&n)!==n){fl(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=Wr(Ll.bind(null,e),r);break}Ll(e);break;case 4:if(yl(e,n),(4186112&n)===n)break;for(r=e.eventTimes,o=-1;0<n;){var s=31-qt(n);i=1<<s,(s=r[s])>o&&(o=s),n&=~i}if(n=o,10<(n=(120>(n=qo()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Es(n/1960))-n)){e.timeoutHandle=Wr(Ll.bind(null,e),n);break}Ll(e);break;default:throw Error(a(329))}}return vl(e,qo()),e.callbackNode===t?gl.bind(null,e):null}function yl(e,t){for(t&=~$s,t&=~_s,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-qt(t),r=1<<n;e[n]=-1,t&=~r}}function bl(e){if(0!==(48&Ls))throw Error(a(327));if(Rl(),e===Ns&&0!==(e.expiredLanes&Rs)){var t=Rs,n=Dl(e,t);0!==(Bs&_s)&&(n=Dl(e,t=Vt(e,t)))}else n=Dl(e,t=Vt(e,0));if(0!==e.tag&&2===n&&(Ls|=64,e.hydrate&&(e.hydrate=!1,Kr(e.containerInfo)),0!==(t=zt(e))&&(n=Dl(e,t))),1===n)throw n=zs,Sl(e,0),yl(e,t),vl(e,qo()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ll(e),vl(e,qo()),null}function wl(e,t){var n=Ls;Ls|=1;try{return e(t)}finally{0===(Ls=n)&&(Ks(),Jo())}}function kl(e,t){var n=Ls;Ls&=-2,Ls|=8;try{return e(t)}finally{0===(Ls=n)&&(Ks(),Jo())}}function xl(e,t){fo(Fs,Hs),Hs|=t,Bs|=t}function Ol(){Hs=Fs.current,co(Fs)}function Sl(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,Ur(n)),null!==Ps)for(n=Ps.return;null!==n;){var r=n;switch(r.tag){case 1:null!==(r=r.type.childContextTypes)&&void 0!==r&&bo();break;case 3:Ri(),co(mo),co(ho),Yi();break;case 5:Fi(r);break;case 4:Ri();break;case 13:case 19:co(Vi);break;case 10:oi(r);break;case 23:case 24:Ol()}n=n.return}Ns=e,Ps=Ul(e.current,null),Rs=Hs=Bs=t,Vs=0,zs=null,$s=_s=Is=0}function Cl(e,t){for(;;){var n=Ps;try{if(ri(),Zi.current=La,ra){for(var r=ea.memoizedState;null!==r;){var o=r.queue;null!==o&&(o.pending=null),r=r.next}ra=!1}if(Qi=0,na=ta=ea=null,oa=!1,Ts.current=null,null===n||null===n.return){Vs=1,zs=t,Ps=null;break}e:{var i=e,a=n.return,s=n,l=t;if(t=Rs,s.flags|=2048,s.firstEffect=s.lastEffect=null,null!==l&&"object"===typeof l&&"function"===typeof l.then){var u=l;if(0===(2&s.mode)){var c=s.alternate;c?(s.updateQueue=c.updateQueue,s.memoizedState=c.memoizedState,s.lanes=c.lanes):(s.updateQueue=null,s.memoizedState=null)}var d=0!==(1&Vi.current),f=a;do{var p;if(p=13===f.tag){var h=f.memoizedState;if(null!==h)p=null!==h.dehydrated;else{var m=f.memoizedProps;p=void 0!==m.fallback&&(!0!==m.unstable_avoidThisFallback||!d)}}if(p){var v=f.updateQueue;if(null===v){var g=new Set;g.add(u),f.updateQueue=g}else v.add(u);if(0===(2&f.mode)){if(f.flags|=64,s.flags|=16384,s.flags&=-2981,1===s.tag)if(null===s.alternate)s.tag=17;else{var y=di(-1,1);y.tag=2,fi(s,y)}s.lanes|=1;break e}l=void 0,s=t;var b=i.pingCache;if(null===b?(b=i.pingCache=new ds,l=new Set,b.set(u,l)):void 0===(l=b.get(u))&&(l=new Set,b.set(u,l)),!l.has(s)){l.add(s);var w=Il.bind(null,i,u,s);u.then(w,w)}f.flags|=4096,f.lanes=t;break e}f=f.return}while(null!==f);l=Error((K(s.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.")}5!==Vs&&(Vs=2),l=us(l,s),f=a;do{switch(f.tag){case 3:i=l,f.flags|=4096,t&=-t,f.lanes|=t,pi(f,fs(0,i,t));break e;case 1:i=l;var k=f.type,x=f.stateNode;if(0===(64&f.flags)&&("function"===typeof k.getDerivedStateFromError||null!==x&&"function"===typeof x.componentDidCatch&&(null===Xs||!Xs.has(x)))){f.flags|=4096,t&=-t,f.lanes|=t,pi(f,ps(f,i,t));break e}}f=f.return}while(null!==f)}Tl(n)}catch(O){t=O,Ps===n&&null!==n&&(Ps=n=n.return);continue}break}}function jl(){var e=Ms.current;return Ms.current=La,null===e?La:e}function Dl(e,t){var n=Ls;Ls|=16;var r=jl();for(Ns===e&&Rs===t||Sl(e,t);;)try{Al();break}catch(o){Cl(e,o)}if(ri(),Ls=n,Ms.current=r,null!==Ps)throw Error(a(261));return Ns=null,Rs=0,Vs}function Al(){for(;null!==Ps;)Ml(Ps)}function El(){for(;null!==Ps&&!Eo();)Ml(Ps)}function Ml(e){var t=Gs(e.alternate,e,Hs);e.memoizedProps=e.pendingProps,null===t?Tl(e):Ps=t,Ts.current=null}function Tl(e){var t=e;do{var n=t.alternate;if(e=t.return,0===(2048&t.flags)){if(null!==(n=ss(n,t,Hs)))return void(Ps=n);if(24!==(n=t).tag&&23!==n.tag||null===n.memoizedState||0!==(1073741824&Hs)||0===(4&n.mode)){for(var r=0,o=n.child;null!==o;)r|=o.lanes|o.childLanes,o=o.sibling;n.childLanes=r}null!==e&&0===(2048&e.flags)&&(null===e.firstEffect&&(e.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1<t.flags&&(null!==e.lastEffect?e.lastEffect.nextEffect=t:e.firstEffect=t,e.lastEffect=t))}else{if(null!==(n=ls(t)))return n.flags&=2047,void(Ps=n);null!==e&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}if(null!==(t=t.sibling))return void(Ps=t);Ps=t=e}while(null!==t);0===Vs&&(Vs=5)}function Ll(e){var t=Wo();return Ko(99,Nl.bind(null,e,t)),null}function Nl(e,t){do{Rl()}while(null!==el);if(0!==(48&Ls))throw Error(a(327));var n=e.finishedWork;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(a(177));e.callbackNode=null;var r=n.lanes|n.childLanes,o=r,i=e.pendingLanes&~o;e.pendingLanes=o,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=o,e.mutableReadLanes&=o,e.entangledLanes&=o,o=e.entanglements;for(var s=e.eventTimes,l=e.expirationTimes;0<i;){var u=31-qt(i),c=1<<u;o[u]=0,s[u]=-1,l[u]=-1,i&=~c}if(null!==ol&&0===(24&r)&&ol.has(e)&&ol.delete(e),e===Ns&&(Ps=Ns=null,Rs=0),1<n.flags?null!==n.lastEffect?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,null!==r){if(o=Ls,Ls|=32,Ts.current=null,Ir=Jt,gr(s=vr())){if("selectionStart"in s)l={start:s.selectionStart,end:s.selectionEnd};else e:if(l=(l=s.ownerDocument)&&l.defaultView||window,(c=l.getSelection&&l.getSelection())&&0!==c.rangeCount){l=c.anchorNode,i=c.anchorOffset,u=c.focusNode,c=c.focusOffset;try{l.nodeType,u.nodeType}catch(j){l=null;break e}var d=0,f=-1,p=-1,h=0,m=0,v=s,g=null;t:for(;;){for(var y;v!==l||0!==i&&3!==v.nodeType||(f=d+i),v!==u||0!==c&&3!==v.nodeType||(p=d+c),3===v.nodeType&&(d+=v.nodeValue.length),null!==(y=v.firstChild);)g=v,v=y;for(;;){if(v===s)break t;if(g===l&&++h===i&&(f=d),g===u&&++m===c&&(p=d),null!==(y=v.nextSibling))break;g=(v=g).parentNode}v=y}l=-1===f||-1===p?null:{start:f,end:p}}else l=null;l=l||{start:0,end:0}}else l=null;_r={focusedElem:s,selectionRange:l},Jt=!1,cl=null,dl=!1,Js=r;do{try{Pl()}catch(j){if(null===Js)throw Error(a(330));Bl(Js,j),Js=Js.nextEffect}}while(null!==Js);cl=null,Js=r;do{try{for(s=e;null!==Js;){var b=Js.flags;if(16&b&&ye(Js.stateNode,""),128&b){var w=Js.alternate;if(null!==w){var k=w.ref;null!==k&&("function"===typeof k?k(null):k.current=null)}}switch(1038&b){case 2:xs(Js),Js.flags&=-3;break;case 6:xs(Js),Js.flags&=-3,js(Js.alternate,Js);break;case 1024:Js.flags&=-1025;break;case 1028:Js.flags&=-1025,js(Js.alternate,Js);break;case 4:js(Js.alternate,Js);break;case 8:Cs(s,l=Js);var x=l.alternate;ws(l),null!==x&&ws(x)}Js=Js.nextEffect}}catch(j){if(null===Js)throw Error(a(330));Bl(Js,j),Js=Js.nextEffect}}while(null!==Js);if(k=_r,w=vr(),b=k.focusedElem,s=k.selectionRange,w!==b&&b&&b.ownerDocument&&mr(b.ownerDocument.documentElement,b)){null!==s&&gr(b)&&(w=s.start,void 0===(k=s.end)&&(k=w),"selectionStart"in b?(b.selectionStart=w,b.selectionEnd=Math.min(k,b.value.length)):(k=(w=b.ownerDocument||document)&&w.defaultView||window).getSelection&&(k=k.getSelection(),l=b.textContent.length,x=Math.min(s.start,l),s=void 0===s.end?x:Math.min(s.end,l),!k.extend&&x>s&&(l=s,s=x,x=l),l=hr(b,x),i=hr(b,s),l&&i&&(1!==k.rangeCount||k.anchorNode!==l.node||k.anchorOffset!==l.offset||k.focusNode!==i.node||k.focusOffset!==i.offset)&&((w=w.createRange()).setStart(l.node,l.offset),k.removeAllRanges(),x>s?(k.addRange(w),k.extend(i.node,i.offset)):(w.setEnd(i.node,i.offset),k.addRange(w))))),w=[];for(k=b;k=k.parentNode;)1===k.nodeType&&w.push({element:k,left:k.scrollLeft,top:k.scrollTop});for("function"===typeof b.focus&&b.focus(),b=0;b<w.length;b++)(k=w[b]).element.scrollLeft=k.left,k.element.scrollTop=k.top}Jt=!!Ir,_r=Ir=null,e.current=n,Js=r;do{try{for(b=e;null!==Js;){var O=Js.flags;if(36&O&&gs(b,Js.alternate,Js),128&O){w=void 0;var S=Js.ref;if(null!==S){var C=Js.stateNode;Js.tag,w=C,"function"===typeof S?S(w):S.current=w}}Js=Js.nextEffect}}catch(j){if(null===Js)throw Error(a(330));Bl(Js,j),Js=Js.nextEffect}}while(null!==Js);Js=null,zo(),Ls=o}else e.current=n;if(Qs)Qs=!1,el=e,tl=t;else for(Js=r;null!==Js;)t=Js.nextEffect,Js.nextEffect=null,8&Js.flags&&((O=Js).sibling=null,O.stateNode=null),Js=t;if(0===(r=e.pendingLanes)&&(Xs=null),1===r?e===al?il++:(il=0,al=e):il=0,n=n.stateNode,Co&&"function"===typeof Co.onCommitFiberRoot)try{Co.onCommitFiberRoot(So,n,void 0,64===(64&n.current.flags))}catch(j){}if(vl(e,qo()),Ys)throw Ys=!1,e=Zs,Zs=null,e;return 0!==(8&Ls)||Jo(),null}function Pl(){for(;null!==Js;){var e=Js.alternate;dl||null===cl||(0!==(8&Js.flags)?et(Js,cl)&&(dl=!0):13===Js.tag&&As(e,Js)&&et(Js,cl)&&(dl=!0));var t=Js.flags;0!==(256&t)&&vs(e,Js),0===(512&t)||Qs||(Qs=!0,Go(97,(function(){return Rl(),null}))),Js=Js.nextEffect}}function Rl(){if(90!==tl){var e=97<tl?97:tl;return tl=90,Ko(e,Vl)}return!1}function Hl(e,t){nl.push(t,e),Qs||(Qs=!0,Go(97,(function(){return Rl(),null})))}function Fl(e,t){rl.push(t,e),Qs||(Qs=!0,Go(97,(function(){return Rl(),null})))}function Vl(){if(null===el)return!1;var e=el;if(el=null,0!==(48&Ls))throw Error(a(331));var t=Ls;Ls|=32;var n=rl;rl=[];for(var r=0;r<n.length;r+=2){var o=n[r],i=n[r+1],s=o.destroy;if(o.destroy=void 0,"function"===typeof s)try{s()}catch(u){if(null===i)throw Error(a(330));Bl(i,u)}}for(n=nl,nl=[],r=0;r<n.length;r+=2){o=n[r],i=n[r+1];try{var l=o.create;o.destroy=l()}catch(u){if(null===i)throw Error(a(330));Bl(i,u)}}for(l=e.current.firstEffect;null!==l;)e=l.nextEffect,l.nextEffect=null,8&l.flags&&(l.sibling=null,l.stateNode=null),l=e;return Ls=t,Jo(),!0}function zl(e,t,n){fi(e,t=fs(0,t=us(n,t),1)),t=fl(),null!==(e=ml(e,1))&&($t(e,1,t),vl(e,t))}function Bl(e,t){if(3===e.tag)zl(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){zl(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"===typeof n.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===Xs||!Xs.has(r))){var o=ps(n,e=us(t,e),1);if(fi(n,o),o=fl(),null!==(n=ml(n,1)))$t(n,1,o),vl(n,o);else if("function"===typeof r.componentDidCatch&&(null===Xs||!Xs.has(r)))try{r.componentDidCatch(t,e)}catch(i){}break}}n=n.return}}function Il(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=fl(),e.pingedLanes|=e.suspendedLanes&n,Ns===e&&(Rs&n)===n&&(4===Vs||3===Vs&&(62914560&Rs)===Rs&&500>qo()-Ws?Sl(e,0):$s|=n),vl(e,t)}function _l(e,t){var n=e.stateNode;null!==n&&n.delete(t),0===(t=0)&&(0===(2&(t=e.mode))?t=1:0===(4&t)?t=99===Wo()?1:2:(0===ll&&(ll=Bs),0===(t=It(62914560&~ll))&&(t=4194304))),n=fl(),null!==(e=ml(e,t))&&($t(e,t,n),vl(e,n))}function $l(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.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function ql(e,t,n,r){return new $l(e,t,n,r)}function Wl(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Ul(e,t){var n=e.alternate;return null===n?((n=ql(e.tag,t,e.key,e.mode)).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.nextEffect=null,n.firstEffect=null,n.lastEffect=null),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=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Kl(e,t,n,r,o,i){var s=2;if(r=e,"function"===typeof e)Wl(e)&&(s=1);else if("string"===typeof e)s=5;else e:switch(e){case S:return Gl(n.children,o,i,t);case H:s=8,o|=16;break;case C:s=8,o|=1;break;case j:return(e=ql(12,n,t,8|o)).elementType=j,e.type=j,e.lanes=i,e;case M:return(e=ql(13,n,t,o)).type=M,e.elementType=M,e.lanes=i,e;case T:return(e=ql(19,n,t,o)).elementType=T,e.lanes=i,e;case F:return Jl(n,o,i,t);case V:return(e=ql(24,n,t,o)).elementType=V,e.lanes=i,e;default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case D:s=10;break e;case A:s=9;break e;case E:s=11;break e;case L:s=14;break e;case N:s=16,r=null;break e;case P:s=22;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=ql(s,n,t,o)).elementType=e,t.type=r,t.lanes=i,t}function Gl(e,t,n,r){return(e=ql(7,e,r,t)).lanes=n,e}function Jl(e,t,n,r){return(e=ql(23,e,r,t)).elementType=F,e.lanes=n,e}function Yl(e,t,n){return(e=ql(6,e,null,t)).lanes=n,e}function Zl(e,t,n){return(t=ql(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Xl(e,t,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=_t(0),this.expirationTimes=_t(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=_t(0),this.mutableSourceEagerHydrationData=null}function Ql(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:O,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function eu(e,t,n,r){var o=t.current,i=fl(),s=pl(o);e:if(n){t:{if(Ye(n=n._reactInternals)!==n||1!==n.tag)throw Error(a(170));var l=n;do{switch(l.tag){case 3:l=l.stateNode.context;break t;case 1:if(yo(l.type)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break t}}l=l.return}while(null!==l);throw Error(a(171))}if(1===n.tag){var u=n.type;if(yo(u)){n=ko(n,u,l);break e}}n=l}else n=po;return null===t.context?t.context=n:t.pendingContext=n,(t=di(i,s)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),fi(o,t),hl(o,s,i),s}function tu(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function nu(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function ru(e,t){nu(e,t),(e=e.alternate)&&nu(e,t)}function ou(e,t,n){var r=null!=n&&null!=n.hydrationOptions&&n.hydrationOptions.mutableSources||null;if(n=new Xl(e,t,null!=n&&!0===n.hydrate),t=ql(3,null,null,2===t?7:1===t?3:0),n.current=t,t.stateNode=n,ui(t),e[eo]=n.current,Lr(8===e.nodeType?e.parentNode:e),r)for(e=0;e<r.length;e++){var o=(t=r[e])._getVersion;o=o(t._source),null==n.mutableSourceEagerHydrationData?n.mutableSourceEagerHydrationData=[t,o]:n.mutableSourceEagerHydrationData.push(t,o)}this._internalRoot=n}function iu(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function au(e,t,n,r,o){var i=n._reactRootContainer;if(i){var a=i._internalRoot;if("function"===typeof o){var s=o;o=function(){var e=tu(a);s.call(e)}}eu(t,a,e,o)}else{if(i=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new ou(e,0,t?{hydrate:!0}:void 0)}(n,r),a=i._internalRoot,"function"===typeof o){var l=o;o=function(){var e=tu(a);l.call(e)}}kl((function(){eu(t,a,e,o)}))}return tu(a)}function su(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!iu(t))throw Error(a(200));return Ql(e,t,null,n)}Gs=function(e,t,n){var r=t.lanes;if(null!==e)if(e.memoizedProps!==t.pendingProps||mo.current)Fa=!0;else{if(0===(n&r)){switch(Fa=!1,t.tag){case 3:Ka(t),Gi();break;case 5:Hi(t);break;case 1:yo(t.type)&&xo(t);break;case 4:Pi(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var o=t.type._context;fo(Qo,o._currentValue),o._currentValue=r;break;case 13:if(null!==t.memoizedState)return 0!==(n&t.child.childLanes)?Xa(e,t,n):(fo(Vi,1&Vi.current),null!==(t=is(e,t,n))?t.sibling:null);fo(Vi,1&Vi.current);break;case 19:if(r=0!==(n&t.childLanes),0!==(64&e.flags)){if(r)return os(e,t,n);t.flags|=64}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null,o.lastEffect=null),fo(Vi,Vi.current),r)break;return null;case 23:case 24:return t.lanes=0,_a(e,t,n)}return is(e,t,n)}Fa=0!==(16384&e.flags)}else Fa=!1;switch(t.lanes=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,o=go(t,ho.current),ai(t,n),o=sa(null,t,r,e,o,n),t.flags|=1,"object"===typeof o&&null!==o&&"function"===typeof o.render&&void 0===o.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,yo(r)){var i=!0;xo(t)}else i=!1;t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,ui(t);var s=r.getDerivedStateFromProps;"function"===typeof s&&gi(t,r,s,e),o.updater=yi,t.stateNode=o,o._reactInternals=t,xi(t,r,e,n),t=Ua(null,t,r,!0,i,n)}else t.tag=0,Va(null,t,o,n),t=t.child;return t;case 16:o=t.elementType;e:{switch(null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,o=(i=o._init)(o._payload),t.type=o,i=t.tag=function(e){if("function"===typeof e)return Wl(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===E)return 11;if(e===L)return 14}return 2}(o),e=Xo(o,e),i){case 0:t=qa(null,t,o,e,n);break e;case 1:t=Wa(null,t,o,e,n);break e;case 11:t=za(null,t,o,e,n);break e;case 14:t=Ba(null,t,o,Xo(o.type,e),r,n);break e}throw Error(a(306,o,""))}return t;case 0:return r=t.type,o=t.pendingProps,qa(e,t,r,o=t.elementType===r?o:Xo(r,o),n);case 1:return r=t.type,o=t.pendingProps,Wa(e,t,r,o=t.elementType===r?o:Xo(r,o),n);case 3:if(Ka(t),r=t.updateQueue,null===e||null===r)throw Error(a(282));if(r=t.pendingProps,o=null!==(o=t.memoizedState)?o.element:null,ci(e,t),hi(t,r,null,n),(r=t.memoizedState.element)===o)Gi(),t=is(e,t,n);else{if((i=(o=t.stateNode).hydrate)&&(Ii=Gr(t.stateNode.containerInfo.firstChild),Bi=t,i=_i=!0),i){if(null!=(e=o.mutableSourceEagerHydrationData))for(o=0;o<e.length;o+=2)(i=e[o])._workInProgressVersionPrimary=e[o+1],Ji.push(i);for(n=Ai(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|1024,n=n.sibling}else Va(e,t,r,n),Gi();t=t.child}return t;case 5:return Hi(t),null===e&&Wi(t),r=t.type,o=t.pendingProps,i=null!==e?e.memoizedProps:null,s=o.children,qr(r,o)?s=null:null!==i&&qr(r,i)&&(t.flags|=16),$a(e,t),Va(e,t,s,n),t.child;case 6:return null===e&&Wi(t),null;case 13:return Xa(e,t,n);case 4:return Pi(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Di(t,null,r,n):Va(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,za(e,t,r,o=t.elementType===r?o:Xo(r,o),n);case 7:return Va(e,t,t.pendingProps,n),t.child;case 8:case 12:return Va(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,o=t.pendingProps,s=t.memoizedProps,i=o.value;var l=t.type._context;if(fo(Qo,l._currentValue),l._currentValue=i,null!==s)if(l=s.value,0===(i=cr(l,i)?0:0|("function"===typeof r._calculateChangedBits?r._calculateChangedBits(l,i):1073741823))){if(s.children===o.children&&!mo.current){t=is(e,t,n);break e}}else for(null!==(l=t.child)&&(l.return=t);null!==l;){var u=l.dependencies;if(null!==u){s=l.child;for(var c=u.firstContext;null!==c;){if(c.context===r&&0!==(c.observedBits&i)){1===l.tag&&((c=di(-1,n&-n)).tag=2,fi(l,c)),l.lanes|=n,null!==(c=l.alternate)&&(c.lanes|=n),ii(l.return,n),u.lanes|=n;break}c=c.next}}else s=10===l.tag&&l.type===t.type?null:l.child;if(null!==s)s.return=l;else for(s=l;null!==s;){if(s===t){s=null;break}if(null!==(l=s.sibling)){l.return=s.return,s=l;break}s=s.return}l=s}Va(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=(i=t.pendingProps).children,ai(t,n),r=r(o=si(o,i.unstable_observedBits)),t.flags|=1,Va(e,t,r,n),t.child;case 14:return i=Xo(o=t.type,t.pendingProps),Ba(e,t,o,i=Xo(o.type,i),r,n);case 15:return Ia(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Xo(r,o),null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,yo(r)?(e=!0,xo(t)):e=!1,ai(t,n),wi(t,r,o),xi(t,r,o,n),Ua(null,t,r,!0,e,n);case 19:return os(e,t,n);case 23:case 24:return _a(e,t,n)}throw Error(a(156,t.tag))},ou.prototype.render=function(e){eu(e,this._internalRoot,null,null)},ou.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;eu(null,e,null,(function(){t[eo]=null}))},tt=function(e){13===e.tag&&(hl(e,4,fl()),ru(e,4))},nt=function(e){13===e.tag&&(hl(e,67108864,fl()),ru(e,67108864))},rt=function(e){if(13===e.tag){var t=fl(),n=pl(e);hl(e,n,t),ru(e,n)}},ot=function(e,t){return t()},De=function(e,t,n){switch(t){case"input":if(ne(e,n),t=n.name,"radio"===n.type&&null!=t){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 r=n[t];if(r!==e&&r.form===e.form){var o=io(r);if(!o)throw Error(a(90));Z(r),ne(r,o)}}}break;case"textarea":ue(e,n);break;case"select":null!=(t=n.value)&&ae(e,!!n.multiple,t,!1)}},Ne=wl,Pe=function(e,t,n,r,o){var i=Ls;Ls|=4;try{return Ko(98,e.bind(null,t,n,r,o))}finally{0===(Ls=i)&&(Ks(),Jo())}},Re=function(){0===(49&Ls)&&(function(){if(null!==ol){var e=ol;ol=null,e.forEach((function(e){e.expiredLanes|=24&e.pendingLanes,vl(e,qo())}))}Jo()}(),Rl())},He=function(e,t){var n=Ls;Ls|=2;try{return e(t)}finally{0===(Ls=n)&&(Ks(),Jo())}};var lu={Events:[ro,oo,io,Te,Le,Rl,{current:!1}]},uu={findFiberByHostInstance:no,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},cu={bundleType:uu.bundleType,version:uu.version,rendererPackageName:uu.rendererPackageName,rendererConfig:uu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:k.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Qe(e))?null:e.stateNode},findFiberByHostInstance:uu.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var du=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!du.isDisabled&&du.supportsFiber)try{So=du.inject(cu),Co=du}catch(ve){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=lu,t.createPortal=su,t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"===typeof e.render)throw Error(a(188));throw Error(a(268,Object.keys(e)))}return e=null===(e=Qe(t))?null:e.stateNode},t.flushSync=function(e,t){var n=Ls;if(0!==(48&n))return e(t);Ls|=1;try{if(e)return Ko(99,e.bind(null,t))}finally{Ls=n,Jo()}},t.hydrate=function(e,t,n){if(!iu(t))throw Error(a(200));return au(null,e,t,!0,n)},t.render=function(e,t,n){if(!iu(t))throw Error(a(200));return au(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!iu(e))throw Error(a(40));return!!e._reactRootContainer&&(kl((function(){au(null,null,e,!1,(function(){e._reactRootContainer=null,e[eo]=null}))})),!0)},t.unstable_batchedUpdates=wl,t.unstable_createPortal=function(e,t){return su(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!iu(n))throw Error(a(200));if(null==e||void 0===e._reactInternals)throw Error(a(38));return au(e,t,n,!1,r)},t.version="17.0.2"},function(e,t,n){"use strict";e.exports=n(80)},function(e,t,n){"use strict";var r,o,i,a;if("object"===typeof performance&&"function"===typeof performance.now){var s=performance;t.unstable_now=function(){return s.now()}}else{var l=Date,u=l.now();t.unstable_now=function(){return l.now()-u}}if("undefined"===typeof window||"function"!==typeof MessageChannel){var c=null,d=null,f=function e(){if(null!==c)try{var n=t.unstable_now();c(!0,n),c=null}catch(r){throw setTimeout(e,0),r}};r=function(e){null!==c?setTimeout(r,0,e):(c=e,setTimeout(f,0))},o=function(e,t){d=setTimeout(e,t)},i=function(){clearTimeout(d)},t.unstable_shouldYield=function(){return!1},a=t.unstable_forceFrameRate=function(){}}else{var p=window.setTimeout,h=window.clearTimeout;if("undefined"!==typeof console){var m=window.cancelAnimationFrame;"function"!==typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),"function"!==typeof m&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var v=!1,g=null,y=-1,b=5,w=0;t.unstable_shouldYield=function(){return t.unstable_now()>=w},a=function(){},t.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"):b=0<e?Math.floor(1e3/e):5};var k=new MessageChannel,x=k.port2;k.port1.onmessage=function(){if(null!==g){var e=t.unstable_now();w=e+b;try{g(!0,e)?x.postMessage(null):(v=!1,g=null)}catch(n){throw x.postMessage(null),n}}else v=!1},r=function(e){g=e,v||(v=!0,x.postMessage(null))},o=function(e,n){y=p((function(){e(t.unstable_now())}),n)},i=function(){h(y),y=-1}}function O(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,o=e[r];if(!(void 0!==o&&0<j(o,t)))break e;e[r]=t,e[n]=o,n=r}}function S(e){return void 0===(e=e[0])?null:e}function C(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length;r<o;){var i=2*(r+1)-1,a=e[i],s=i+1,l=e[s];if(void 0!==a&&0>j(a,n))void 0!==l&&0>j(l,a)?(e[r]=l,e[s]=n,r=s):(e[r]=a,e[i]=n,r=i);else{if(!(void 0!==l&&0>j(l,n)))break e;e[r]=l,e[s]=n,r=s}}}return t}return null}function j(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var D=[],A=[],E=1,M=null,T=3,L=!1,N=!1,P=!1;function R(e){for(var t=S(A);null!==t;){if(null===t.callback)C(A);else{if(!(t.startTime<=e))break;C(A),t.sortIndex=t.expirationTime,O(D,t)}t=S(A)}}function H(e){if(P=!1,R(e),!N)if(null!==S(D))N=!0,r(F);else{var t=S(A);null!==t&&o(H,t.startTime-e)}}function F(e,n){N=!1,P&&(P=!1,i()),L=!0;var r=T;try{for(R(n),M=S(D);null!==M&&(!(M.expirationTime>n)||e&&!t.unstable_shouldYield());){var a=M.callback;if("function"===typeof a){M.callback=null,T=M.priorityLevel;var s=a(M.expirationTime<=n);n=t.unstable_now(),"function"===typeof s?M.callback=s:M===S(D)&&C(D),R(n)}else C(D);M=S(D)}if(null!==M)var l=!0;else{var u=S(A);null!==u&&o(H,u.startTime-n),l=!1}return l}finally{M=null,T=r,L=!1}}var V=a;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){N||L||(N=!0,r(F))},t.unstable_getCurrentPriorityLevel=function(){return T},t.unstable_getFirstCallbackNode=function(){return S(D)},t.unstable_next=function(e){switch(T){case 1:case 2:case 3:var t=3;break;default:t=T}var n=T;T=t;try{return e()}finally{T=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=V,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=T;T=e;try{return t()}finally{T=n}},t.unstable_scheduleCallback=function(e,n,a){var s=t.unstable_now();switch("object"===typeof a&&null!==a?a="number"===typeof(a=a.delay)&&0<a?s+a:s:a=s,e){case 1:var l=-1;break;case 2:l=250;break;case 5:l=1073741823;break;case 4:l=1e4;break;default:l=5e3}return e={id:E++,callback:n,priorityLevel:e,startTime:a,expirationTime:l=a+l,sortIndex:-1},a>s?(e.sortIndex=a,O(A,e),null===S(D)&&e===S(A)&&(P?i():P=!0,o(H,a-s))):(e.sortIndex=l,O(D,e),N||L||(N=!0,r(F))),e},t.unstable_wrapCallback=function(e){var t=T;return function(){var n=T;T=t;try{return e.apply(this,arguments)}finally{T=n}}}},,,function(e,t,n){"use strict";n(20);var r=n(1),o=60103;if(t.Fragment=60107,"function"===typeof Symbol&&Symbol.for){var i=Symbol.for;o=i("react.element"),t.Fragment=i("react.fragment")}var a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s=Object.prototype.hasOwnProperty,l={key:!0,ref:!0,__self:!0,__source:!0};function u(e,t,n){var r,i={},u=null,c=null;for(r in void 0!==n&&(u=""+n),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(c=t.ref),t)s.call(t,r)&&!l.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:u,ref:c,props:i,_owner:a.current}}t.jsx=u,t.jsxs=u},function(e,t,n){var r=n(85);e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,n(t,r)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";e.exports=n(87)},function(e,t,n){"use strict";var r="function"===typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,l=r?Symbol.for("react.profiler"):60114,u=r?Symbol.for("react.provider"):60109,c=r?Symbol.for("react.context"):60110,d=r?Symbol.for("react.async_mode"):60111,f=r?Symbol.for("react.concurrent_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,h=r?Symbol.for("react.suspense"):60113,m=r?Symbol.for("react.suspense_list"):60120,v=r?Symbol.for("react.memo"):60115,g=r?Symbol.for("react.lazy"):60116,y=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,w=r?Symbol.for("react.responder"):60118,k=r?Symbol.for("react.scope"):60119;function x(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case d:case f:case a:case l:case s:case h:return e;default:switch(e=e&&e.$$typeof){case c:case p:case g:case v:case u:return e;default:return t}}case i:return t}}}function O(e){return x(e)===f}t.AsyncMode=d,t.ConcurrentMode=f,t.ContextConsumer=c,t.ContextProvider=u,t.Element=o,t.ForwardRef=p,t.Fragment=a,t.Lazy=g,t.Memo=v,t.Portal=i,t.Profiler=l,t.StrictMode=s,t.Suspense=h,t.isAsyncMode=function(e){return O(e)||x(e)===d},t.isConcurrentMode=O,t.isContextConsumer=function(e){return x(e)===c},t.isContextProvider=function(e){return x(e)===u},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return x(e)===p},t.isFragment=function(e){return x(e)===a},t.isLazy=function(e){return x(e)===g},t.isMemo=function(e){return x(e)===v},t.isPortal=function(e){return x(e)===i},t.isProfiler=function(e){return x(e)===l},t.isStrictMode=function(e){return x(e)===s},t.isSuspense=function(e){return x(e)===h},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===a||e===f||e===l||e===s||e===h||e===m||"object"===typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===v||e.$$typeof===u||e.$$typeof===c||e.$$typeof===p||e.$$typeof===b||e.$$typeof===w||e.$$typeof===k||e.$$typeof===y)},t.typeOf=x},function(e,t,n){"use strict";var r=n(89);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bodyOpenClassName=t.portalClassName=void 0;var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(1),a=h(i),s=h(n(23)),l=h(n(48)),u=h(n(91)),c=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(52)),d=n(49),f=h(d),p=n(98);function h(e){return e&&e.__esModule?e:{default:e}}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}var g=t.portalClassName="ReactModalPortal",y=t.bodyOpenClassName="ReactModal__Body--open",b=d.canUseDOM&&void 0!==s.default.createPortal,w=function(e){return document.createElement(e)},k=function(){return b?s.default.createPortal:s.default.unstable_renderSubtreeIntoContainer};function x(e){return e()}var O=function(e){function t(){var e,n,o;m(this,t);for(var i=arguments.length,l=Array(i),c=0;c<i;c++)l[c]=arguments[c];return n=o=v(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(l))),o.removePortal=function(){!b&&s.default.unmountComponentAtNode(o.node);var e=x(o.props.parentSelector);e&&e.contains(o.node)?e.removeChild(o.node):console.warn('React-Modal: "parentSelector" prop did not returned any DOM element. Make sure that the parent element is unmounted to avoid any memory leaks.')},o.portalRef=function(e){o.portal=e},o.renderPortal=function(e){var n=k()(o,a.default.createElement(u.default,r({defaultStyles:t.defaultStyles},e)),o.node);o.portalRef(n)},v(o,n)}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"componentDidMount",value:function(){d.canUseDOM&&(b||(this.node=w("div")),this.node.className=this.props.portalClassName,x(this.props.parentSelector).appendChild(this.node),!b&&this.renderPortal(this.props))}},{key:"getSnapshotBeforeUpdate",value:function(e){return{prevParent:x(e.parentSelector),nextParent:x(this.props.parentSelector)}}},{key:"componentDidUpdate",value:function(e,t,n){if(d.canUseDOM){var r=this.props,o=r.isOpen,i=r.portalClassName;e.portalClassName!==i&&(this.node.className=i);var a=n.prevParent,s=n.nextParent;s!==a&&(a.removeChild(this.node),s.appendChild(this.node)),(e.isOpen||o)&&!b&&this.renderPortal(this.props)}}},{key:"componentWillUnmount",value:function(){if(d.canUseDOM&&this.node&&this.portal){var e=this.portal.state,t=Date.now(),n=e.isOpen&&this.props.closeTimeoutMS&&(e.closesAt||t+this.props.closeTimeoutMS);n?(e.beforeClose||this.portal.closeWithTimeout(),setTimeout(this.removePortal,n-t)):this.removePortal()}}},{key:"render",value:function(){return d.canUseDOM&&b?(!this.node&&b&&(this.node=w("div")),k()(a.default.createElement(u.default,r({ref:this.portalRef,defaultStyles:t.defaultStyles},this.props)),this.node)):null}}],[{key:"setAppElement",value:function(e){c.setElement(e)}}]),t}(i.Component);O.propTypes={isOpen:l.default.bool.isRequired,style:l.default.shape({content:l.default.object,overlay:l.default.object}),portalClassName:l.default.string,bodyOpenClassName:l.default.string,htmlOpenClassName:l.default.string,className:l.default.oneOfType([l.default.string,l.default.shape({base:l.default.string.isRequired,afterOpen:l.default.string.isRequired,beforeClose:l.default.string.isRequired})]),overlayClassName:l.default.oneOfType([l.default.string,l.default.shape({base:l.default.string.isRequired,afterOpen:l.default.string.isRequired,beforeClose:l.default.string.isRequired})]),appElement:l.default.oneOfType([l.default.instanceOf(f.default),l.default.instanceOf(d.SafeHTMLCollection),l.default.instanceOf(d.SafeNodeList),l.default.arrayOf(l.default.instanceOf(f.default))]),onAfterOpen:l.default.func,onRequestClose:l.default.func,closeTimeoutMS:l.default.number,ariaHideApp:l.default.bool,shouldFocusAfterRender:l.default.bool,shouldCloseOnOverlayClick:l.default.bool,shouldReturnFocusAfterClose:l.default.bool,preventScroll:l.default.bool,parentSelector:l.default.func,aria:l.default.object,data:l.default.object,role:l.default.string,contentLabel:l.default.string,shouldCloseOnEsc:l.default.bool,overlayRef:l.default.func,contentRef:l.default.func,id:l.default.string,overlayElement:l.default.func,contentElement:l.default.func},O.defaultProps={isOpen:!1,portalClassName:g,bodyOpenClassName:y,role:"dialog",ariaHideApp:!0,closeTimeoutMS:0,shouldFocusAfterRender:!0,shouldCloseOnEsc:!0,shouldCloseOnOverlayClick:!0,shouldReturnFocusAfterClose:!0,preventScroll:!1,parentSelector:function(){return document.body},overlayElement:function(e,t){return a.default.createElement("div",e,t)},contentElement:function(e,t){return a.default.createElement("div",e,t)}},O.defaultStyles={overlay:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(255, 255, 255, 0.75)"},content:{position:"absolute",top:"40px",left:"40px",right:"40px",bottom:"40px",border:"1px solid #ccc",background:"#fff",overflow:"auto",WebkitOverflowScrolling:"touch",borderRadius:"4px",outline:"none",padding:"20px"}},(0,p.polyfill)(O),t.default=O},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(1),s=v(n(48)),l=m(n(92)),u=v(n(93)),c=m(n(52)),d=m(n(96)),f=n(49),p=v(f),h=v(n(53));function m(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function v(e){return e&&e.__esModule?e:{default:e}}n(97);var g={overlay:"ReactModal__Overlay",content:"ReactModal__Content"},y=0,b=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.setOverlayRef=function(e){n.overlay=e,n.props.overlayRef&&n.props.overlayRef(e)},n.setContentRef=function(e){n.content=e,n.props.contentRef&&n.props.contentRef(e)},n.afterClose=function(){var e=n.props,t=e.appElement,r=e.ariaHideApp,o=e.htmlOpenClassName,i=e.bodyOpenClassName;i&&d.remove(document.body,i),o&&d.remove(document.getElementsByTagName("html")[0],o),r&&y>0&&0===(y-=1)&&c.show(t),n.props.shouldFocusAfterRender&&(n.props.shouldReturnFocusAfterClose?(l.returnFocus(n.props.preventScroll),l.teardownScopedFocus()):l.popWithoutFocus()),n.props.onAfterClose&&n.props.onAfterClose(),h.default.deregister(n)},n.open=function(){n.beforeOpen(),n.state.afterOpen&&n.state.beforeClose?(clearTimeout(n.closeTimer),n.setState({beforeClose:!1})):(n.props.shouldFocusAfterRender&&(l.setupScopedFocus(n.node),l.markForFocusLater()),n.setState({isOpen:!0},(function(){n.openAnimationFrame=requestAnimationFrame((function(){n.setState({afterOpen:!0}),n.props.isOpen&&n.props.onAfterOpen&&n.props.onAfterOpen({overlayEl:n.overlay,contentEl:n.content})}))})))},n.close=function(){n.props.closeTimeoutMS>0?n.closeWithTimeout():n.closeWithoutTimeout()},n.focusContent=function(){return n.content&&!n.contentHasFocus()&&n.content.focus({preventScroll:!0})},n.closeWithTimeout=function(){var e=Date.now()+n.props.closeTimeoutMS;n.setState({beforeClose:!0,closesAt:e},(function(){n.closeTimer=setTimeout(n.closeWithoutTimeout,n.state.closesAt-Date.now())}))},n.closeWithoutTimeout=function(){n.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},n.afterClose)},n.handleKeyDown=function(e){9===e.keyCode&&(0,u.default)(n.content,e),n.props.shouldCloseOnEsc&&27===e.keyCode&&(e.stopPropagation(),n.requestClose(e))},n.handleOverlayOnClick=function(e){null===n.shouldClose&&(n.shouldClose=!0),n.shouldClose&&n.props.shouldCloseOnOverlayClick&&(n.ownerHandlesClose()?n.requestClose(e):n.focusContent()),n.shouldClose=null},n.handleContentOnMouseUp=function(){n.shouldClose=!1},n.handleOverlayOnMouseDown=function(e){n.props.shouldCloseOnOverlayClick||e.target!=n.overlay||e.preventDefault()},n.handleContentOnClick=function(){n.shouldClose=!1},n.handleContentOnMouseDown=function(){n.shouldClose=!1},n.requestClose=function(e){return n.ownerHandlesClose()&&n.props.onRequestClose(e)},n.ownerHandlesClose=function(){return n.props.onRequestClose},n.shouldBeClosed=function(){return!n.state.isOpen&&!n.state.beforeClose},n.contentHasFocus=function(){return document.activeElement===n.content||n.content.contains(document.activeElement)},n.buildClassName=function(e,t){var r="object"===("undefined"===typeof t?"undefined":o(t))?t:{base:g[e],afterOpen:g[e]+"--after-open",beforeClose:g[e]+"--before-close"},i=r.base;return n.state.afterOpen&&(i=i+" "+r.afterOpen),n.state.beforeClose&&(i=i+" "+r.beforeClose),"string"===typeof t&&t?i+" "+t:i},n.attributesFromObject=function(e,t){return Object.keys(t).reduce((function(n,r){return n[e+"-"+r]=t[r],n}),{})},n.state={afterOpen:!1,beforeClose:!1},n.shouldClose=null,n.moveFromContentToOverlay=null,n}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(e,t){this.props.isOpen&&!e.isOpen?this.open():!this.props.isOpen&&e.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!t.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer),cancelAnimationFrame(this.openAnimationFrame)}},{key:"beforeOpen",value:function(){var e=this.props,t=e.appElement,n=e.ariaHideApp,r=e.htmlOpenClassName,o=e.bodyOpenClassName;o&&d.add(document.body,o),r&&d.add(document.getElementsByTagName("html")[0],r),n&&(y+=1,c.hide(t)),h.default.register(this)}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.className,o=e.overlayClassName,i=e.defaultStyles,a=e.children,s=n?{}:i.content,l=o?{}:i.overlay;if(this.shouldBeClosed())return null;var u={ref:this.setOverlayRef,className:this.buildClassName("overlay",o),style:r({},l,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},c=r({id:t,ref:this.setContentRef,style:r({},s,this.props.style.content),className:this.buildClassName("content",n),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",r({modal:!0},this.props.aria)),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),d=this.props.contentElement(c,a);return this.props.overlayElement(u,d)}}]),t}(a.Component);b.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},b.propTypes={isOpen:s.default.bool.isRequired,defaultStyles:s.default.shape({content:s.default.object,overlay:s.default.object}),style:s.default.shape({content:s.default.object,overlay:s.default.object}),className:s.default.oneOfType([s.default.string,s.default.object]),overlayClassName:s.default.oneOfType([s.default.string,s.default.object]),bodyOpenClassName:s.default.string,htmlOpenClassName:s.default.string,ariaHideApp:s.default.bool,appElement:s.default.oneOfType([s.default.instanceOf(p.default),s.default.instanceOf(f.SafeHTMLCollection),s.default.instanceOf(f.SafeNodeList),s.default.arrayOf(s.default.instanceOf(p.default))]),onAfterOpen:s.default.func,onAfterClose:s.default.func,onRequestClose:s.default.func,closeTimeoutMS:s.default.number,shouldFocusAfterRender:s.default.bool,shouldCloseOnOverlayClick:s.default.bool,shouldReturnFocusAfterClose:s.default.bool,preventScroll:s.default.bool,role:s.default.string,contentLabel:s.default.string,aria:s.default.object,data:s.default.object,children:s.default.node,shouldCloseOnEsc:s.default.bool,overlayRef:s.default.func,contentRef:s.default.func,id:s.default.string,overlayElement:s.default.func,contentElement:s.default.func,testId:s.default.string},t.default=b,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){a=[]},t.log=function(){0},t.handleBlur=u,t.handleFocus=c,t.markForFocusLater=function(){a.push(document.activeElement)},t.returnFocus=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=null;try{return void(0!==a.length&&(t=a.pop()).focus({preventScroll:e}))}catch(n){console.warn(["You tried to return focus to",t,"but it is not in the DOM anymore"].join(" "))}},t.popWithoutFocus=function(){a.length>0&&a.pop()},t.setupScopedFocus=function(e){s=e,window.addEventListener?(window.addEventListener("blur",u,!1),document.addEventListener("focus",c,!0)):(window.attachEvent("onBlur",u),document.attachEvent("onFocus",c))},t.teardownScopedFocus=function(){s=null,window.addEventListener?(window.removeEventListener("blur",u),document.removeEventListener("focus",c)):(window.detachEvent("onBlur",u),document.detachEvent("onFocus",c))};var r,o=n(51),i=(r=o)&&r.__esModule?r:{default:r};var a=[],s=null,l=!1;function u(){l=!0}function c(){if(l){if(l=!1,!s)return;setTimeout((function(){s.contains(document.activeElement)||((0,i.default)(s)[0]||s).focus()}),0)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,i.default)(e);if(!n.length)return void t.preventDefault();var r=void 0,o=t.shiftKey,s=n[0],l=n[n.length-1],u=a();if(e===u){if(!o)return;r=l}l!==u||o||(r=s);s===u&&o&&(r=l);if(r)return t.preventDefault(),void r.focus();var c=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent);if(null==c||"Chrome"==c[1]||null!=/\biPod\b|\biPad\b/g.exec(navigator.userAgent))return;var d=n.indexOf(u);d>-1&&(d+=o?-1:1);if("undefined"===typeof(r=n[d]))return t.preventDefault(),void(r=o?l:s).focus();t.preventDefault(),r.focus()};var r,o=n(51),i=(r=o)&&r.__esModule?r:{default:r};function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return e.activeElement.shadowRoot?a(e.activeElement.shadowRoot):e.activeElement}e.exports=t.default},function(e,t,n){"use strict";var r=function(){};e.exports=r},function(e,t,n){var r;!function(){"use strict";var o=!("undefined"===typeof window||!window.document||!window.document.createElement),i={canUseDOM:o,canUseWorkers:"undefined"!==typeof Worker,canUseEventListeners:o&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:o&&!!window.screen};void 0===(r=function(){return i}.call(t,n,t,e))||(e.exports=r)}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){var e=document.getElementsByTagName("html")[0];for(var t in r)i(e,r[t]);var n=document.body;for(var a in o)i(n,o[a]);r={},o={}},t.log=function(){0};var r={},o={};function i(e,t){e.classList.remove(t)}t.add=function(e,t){return n=e.classList,i="html"==e.nodeName.toLowerCase()?r:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]||(e[t]=0),e[t]+=1}(i,e),n.add(e)}));var n,i},t.remove=function(e,t){return n=e.classList,i="html"==e.nodeName.toLowerCase()?r:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]&&(e[t]-=1)}(i,e),0===i[e]&&n.remove(e)}));var n,i}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){for(var e=[a,s],t=0;t<e.length;t++){var n=e[t];n&&(n.parentNode&&n.parentNode.removeChild(n))}a=s=null,l=[]},t.log=function(){console.log("bodyTrap ----------"),console.log(l.length);for(var e=[a,s],t=0;t<e.length;t++){var n=e[t]||{};console.log(n.nodeName,n.className,n.id)}console.log("edn bodyTrap ----------")};var r,o=n(53),i=(r=o)&&r.__esModule?r:{default:r};var a=void 0,s=void 0,l=[];function u(){0!==l.length&&l[l.length-1].focusContent()}i.default.subscribe((function(e,t){a||s||((a=document.createElement("div")).setAttribute("data-react-modal-body-trap",""),a.style.position="absolute",a.style.opacity="0",a.setAttribute("tabindex","0"),a.addEventListener("focus",u),(s=a.cloneNode()).addEventListener("focus",u)),(l=t).length>0?(document.body.firstChild!==a&&document.body.insertBefore(a,document.body.firstChild),document.body.lastChild!==s&&document.body.appendChild(s)):(a.parentElement&&a.parentElement.removeChild(a),s.parentElement&&s.parentElement.removeChild(s))}))},function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!==e&&void 0!==e&&this.setState(e)}function o(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!==n&&void 0!==n?n:null}.bind(this))}function i(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function a(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!==typeof e.getDerivedStateFromProps&&"function"!==typeof t.getSnapshotBeforeUpdate)return e;var n=null,a=null,s=null;if("function"===typeof t.componentWillMount?n="componentWillMount":"function"===typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"===typeof t.componentWillReceiveProps?a="componentWillReceiveProps":"function"===typeof t.UNSAFE_componentWillReceiveProps&&(a="UNSAFE_componentWillReceiveProps"),"function"===typeof t.componentWillUpdate?s="componentWillUpdate":"function"===typeof t.UNSAFE_componentWillUpdate&&(s="UNSAFE_componentWillUpdate"),null!==n||null!==a||null!==s){var l=e.displayName||e.name,u="function"===typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+l+" uses "+u+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==a?"\n "+a:"")+(null!==s?"\n "+s:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"===typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=o),"function"===typeof t.getSnapshotBeforeUpdate){if("function"!==typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=i;var c=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;c.call(this,e,t,r)}}return e}n.r(t),n.d(t,"polyfill",(function(){return a})),r.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0},function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};Object.defineProperty(t,"__esModule",{value:!0}),t.getAllAccents=t.getDefaultAccentColor=void 0;var o={orange:"#FF5722",yellow:"#FFA000",green:"#1B5E20",green2:"#008837",gray:"#757575",blue:"#0560ff",teal:"#009688",lightblue:"#2196F3",indigo:"#880E4F",purple:"#9C27B0",pink:"#FF1744",red:"#B71C1C"};t.getDefaultAccentColor=function(){return o.green2},t.getAllAccents=function(){return Object.entries(o).map((function(e){var t=r(e,2);return{label:t[0],code:t[1]}}))}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.useTheme=void 0;var o=r(n(54)),i=n(113),a=new o.default;t.useTheme=function(e,t){void 0===t&&(t=!0);var n=e.theme,r=e.accent,o=e.scale,s=void 0===o?1:o,l=a.construct({theme:n,accent:r,scale:s});return t&&(0,i.injectCss)(a.transform("css",l)),l}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getColors=void 0;var r=n(102),o=n(103),i={dark:r.getDarkScheme,light:o.getLightScheme};t.getColors=function(e,t){return i[e](t)}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getDarkScheme=void 0;var i=o(n(26)),a=n(55);t.getDarkScheme=function(e){return r(r({primary:e,placeholder:(0,i.default)("#ffffff").setAlpha(.6).toRgbString(),background:"#1b1b1b",bgTransparent:"#1f1f1f99",accent:"#000",bgSecondary:"#2b2b2b",bgSecondaryText:"#A1A1A1",bgSecondaryHover:"#3d3d3d",border:"#353535",hover:"#2f2f2f",fontSecondary:"#000",fontTertiary:"#A1A1A1",text:"#d3d3d3",overlay:"rgba(53, 53, 53, 0.5)",secondary:"black",icon:"#dbdbdb",disabled:"#5b5b5b",checked:"#6b6b6b"},(0,a.getStaticColors)(e)),{red:"#f44336",orange:"#FF9800",yellow:"#FFD600",green:"#4CAF50",blue:"#2196F3",purple:"#9568ED",gray:"#9E9E9E"})}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getLightScheme=void 0;var i=o(n(26)),a=n(55);t.getLightScheme=function(e){return r(r({primary:e,background:"white",bgTransparent:"#ffffff99",accent:"white",bgSecondary:"#f7f7f7",bgSecondaryText:"#5E5E5E",bgSecondaryHover:"#dbdbdb",border:"#e5e5e5",hover:"#f0f0f0",fontSecondary:"white",fontTertiary:"#656565",text:"#202124",overlay:"rgba(0, 0, 0, 0.1)",secondary:"white",icon:"#3b3b3b",disabled:"#9b9b9b",placeholder:(0,i.default)("#000000").setAlpha(.6).toRgbString(),checked:"#505050"},(0,a.getStaticColors)(e)),{red:"#f44336",orange:"#FF9800",yellow:"#f0c800",green:"#4CAF50",blue:"#2196F3",purple:"#9568ED",gray:"#9E9E9E"})}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.variants=void 0;var o=n(105),i=n(106),a=n(107),s=n(108);t.variants={buttons:o.buttonVariants,forms:i.inputVariants,text:a.textVariants,variants:r(r({},(0,s.createFlexVariants)("row")),(0,s.createFlexVariants)("column"))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.buttonVariants=void 0;t.buttonVariants={default:{bg:"transparent",fontFamily:"body",fontWeight:"body",fontSize:"body",borderRadius:"default",cursor:"pointer",p:2,py:"7.5px",transition:"filter 200ms ease-in, box-shadow 200ms ease-out",":hover:not(:disabled)":{filter:"brightness(90%)"},":active":{filter:"brightness(98%)"},outline:"none",":focus-visible:not(:active)":{filter:"brightness(90%)",bg:"bgSecondary"},":disabled":{opacity:.5,cursor:"not-allowed"}},primary:{variant:"buttons.default",color:"static",bg:"primary"},secondary:{variant:"buttons.default",color:"text",bg:"border"},tertiary:{variant:"buttons.default",color:"text",bg:"transparent",border:"2px solid",borderColor:"border",":hover":{borderColor:"primary"}},list:{variant:"buttons.tertiary",border:"0px solid",borderBottom:"1px solid",borderBottomColor:"border",borderRadius:0,textAlign:"left",py:2,px:0,cursor:"pointer",":hover":{borderBottomColor:"primary"}},anchor:{variant:"buttons.default",color:"primary",fontSize:"subBody",p:0,m:0,px:0,py:0,":hover":{textDecoration:"underline"}},tool:{variant:"buttons.default",color:"text",backgroundColor:"bgSecondary",borderRadius:"default",":hover":{backgroundColor:"hover"}},icon:{variant:"buttons.default",color:"text",borderRadius:"none",":hover":{backgroundColor:"hover",filter:"brightness(90%)"}},dialog:{variant:"buttons.primary",color:"primary",fontWeight:"bold",bg:"transparent",":hover":{bg:"bgSecondary"},":focus:not(:active), :focus-within:not(:active), :focus-visible:not(:active)":{bg:"hover",filter:"brightness(90%)"},":disabled":{opacity:.7,cursor:"not-allowed"}},statusitem:{variant:"buttons.icon",p:0,py:1,px:1},menuitem:{variant:"buttons.default",py:"8px",px:3,borderRadius:0,color:"text",cursor:"pointer",":hover:not(:disabled),:focus:not(:disabled)":{backgroundColor:"hover",boxShadow:"none"},":active:not(:disabled)":{backgroundColor:"border"}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.inputVariants=void 0;t.inputVariants={input:{borderRadius:"default",border:"none",boxShadow:"0px 0px 0px 1px var(--border) inset",fontFamily:"body",fontWeight:"body",fontSize:"input",color:"text",outline:"none",":focus":{boxShadow:"0px 0px 0px 1.5px var(--primary) inset"},":hover:not(:focus)":{boxShadow:"0px 0px 0px 1px var(--dimPrimary) inset"}},error:{variant:"forms.input",boxShadow:"0px 0px 0px 1px var(--error) inset",outline:"none",":focus":{boxShadow:"0px 0px 0px 1.5px var(--error) inset"},":hover:not(:focus)":{boxShadow:"0px 0px 0px 1px var(--error) inset"}},clean:{variant:"forms.input",outline:"none",boxShadow:"none",":focus":{boxShadow:"none"},":hover:not(:focus)":{boxShadow:"none"}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.textVariants=void 0;t.textVariants={default:{color:"text",fontFamily:"body"},heading:{variant:"text.default",fontFamily:"heading",fontWeight:"bold",fontSize:"heading"},title:{variant:"text.heading",fontSize:"title",fontWeight:"bold"},subtitle:{variant:"text.heading",fontSize:"subtitle",fontWeight:"bold"},body:{variant:"text.default",fontSize:"body"},subBody:{variant:"text.default",fontSize:"subBody",color:"fontTertiary"},error:{variant:"text.default",fontSize:"subBody",color:"error"}}},function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};function o(e){return{justifyContent:"center",alignItems:"center",flexDirection:e}}function i(e){return{flex:"1 1 auto",flexDirection:e}}function a(e){return{variant:"variants.".concat(e,"Center"),flex:"1 1 auto",flexDirection:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.createFlexVariants=void 0,t.createFlexVariants=function(e){var t={Center:o(e),Fill:i(e),CenterFill:a(e)};return Object.fromEntries(Object.entries(t).map((function(t){var n=r(t,2),o=n[0],i=n[1];return["".concat(e).concat(o),i]})))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFontConfig=void 0;var r=n(110),o=['"Open Sans"','"Noto Sans"',"Frutiger","Calibri","Myriad","Arial","Ubuntu","Helvetica","-apple-system","BlinkMacSystemFont","sans-serif"],i=["Hack","Consolas",'"Andale Mono"','"Lucida Console"','"Liberation Mono"','"Courier New"',"Courier","monospace"];t.getFontConfig=function(e){return{fontSizes:(0,r.getFontSizes)(e),fontWeights:{normal:400,body:400,heading:600,bold:600},fonts:{body:o.join(","),monospace:i.join(","),heading:o.join(",")}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFontSizes=void 0,t.getFontSizes=function(e){return{heading:"1.5rem",subheading:"1.2rem",input:"0.875rem",title:"0.95rem",subtitle:"0.85rem",body:"0.8rem",menu:"0.8rem",subBody:"0.750rem",code:"0.9rem"}}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.TransformerFactory=void 0;var o={css:r(n(112)).default},i=function(){function e(){}return e.prototype.construct=function(e,t){return o[e](t)},e}();t.TransformerFactory=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=":root {";for(var n in e.colors)t+="--".concat(n,": ").concat(e.colors[n],";");return t+"}"}},function(e,t,n){"use strict";var r=this&&this.__values||function(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.changeSvgTheme=t.injectCss=t.injectCssSrc=t.removeCss=void 0,t.removeCss=function(e){var t=document.getElementById(e);t&&t.remove()},t.injectCssSrc=function(e,t){var n=document.head,r=document.createElement("link");r.id=e,r.type="text/css",r.rel="stylesheet",r.href=t,n.appendChild(r)},t.injectCss=function(e){var t=document.getElementById("variables"),n=document.getElementsByTagName("head")[0];t&&n.removeChild(t);var o=document.createElement("style");o.type="text/css",o.id="variables","styleSheet"in o?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e)),n.insertBefore(o,function(){var e,t;try{for(var n=r(document.getElementsByTagName("style")),o=n.next();!o.done;o=n.next()){var i=o.value;if(i.innerHTML.includes("#root"))return i}}catch(a){e={error:a}}finally{try{o&&!o.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}return null}())},t.changeSvgTheme=function(e){for(var t=document.querySelectorAll('*[fill="#0560ff"]'),n=0;n<t.length;++n)t[n].setAttribute("fill",e)}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){}]]);\ No newline at end of filediff --git a/apps/mobile/web.bundle/static/js/3.e9f97eed.chunk.js.LICENSE.txt b/apps/mobile/web.bundle/static/js/3.7fb602fe.chunk.js.LICENSE.txtsimilarity index 88%rename from apps/mobile/web.bundle/static/js/3.e9f97eed.chunk.js.LICENSE.txtrename to apps/mobile/web.bundle/static/js/3.7fb602fe.chunk.js.LICENSE.txtindex ef6df036b..cdb2d5d48 100644--- a/apps/mobile/web.bundle/static/js/3.e9f97eed.chunk.js.LICENSE.txt+++ b/apps/mobile/web.bundle/static/js/3.7fb602fe.chunk.js.LICENSE.txt@@ -42,15 +42,6 @@ object-assign* LICENSE file in the root directory of this source tree.*/-/** @license React v16.14.0- * react.production.min.js- *- * Copyright (c) Facebook, Inc. and its affiliates.- *- * This source code is licensed under the MIT license found in the- * LICENSE file in the root directory of this source tree.- */-/** @license React v17.0.2* react-dom.production.min.js*diff --git a/apps/mobile/web.bundle/static/js/3.e9f97eed.chunk.js b/apps/mobile/web.bundle/static/js/3.e9f97eed.chunk.jsdeleted file mode 100644index 8d4ebd93f..000000000--- a/apps/mobile/web.bundle/static/js/3.e9f97eed.chunk.js+++ /dev/null@@ -1,2 +0,0 @@-/*! For license information please see 3.e9f97eed.chunk.js.LICENSE.txt */-(this.webpackJsonptiptap=this.webpackJsonptiptap||[]).push([[3],[function(e,t,n){"use strict";e.exports=n(85)},function(e,t,n){"use strict";e.exports=n(79)},function(e,t,n){"use strict";n.r(t),n.d(t,"AllSelection",(function(){return w})),n.d(t,"EditorState",(function(){return A})),n.d(t,"NodeSelection",(function(){return y})),n.d(t,"Plugin",(function(){return T})),n.d(t,"PluginKey",(function(){return P})),n.d(t,"Selection",(function(){return f})),n.d(t,"SelectionRange",(function(){return p})),n.d(t,"TextSelection",(function(){return v})),n.d(t,"Transaction",(function(){return S}));var r=n(13),o=n(12),i=n(10),a=n(11),s=n(4),l=n(5),u=n(3),c=n(8),d=Object.create(null),f=function(){function e(t,n,r){Object(s.a)(this,e),this.$anchor=t,this.$head=n,this.ranges=r||[new p(t.min(n),t.max(n))]}return Object(l.a)(e,[{key:"anchor",get:function(){return this.$anchor.pos}},{key:"head",get:function(){return this.$head.pos}},{key:"from",get:function(){return this.$from.pos}},{key:"to",get:function(){return this.$to.pos}},{key:"$from",get:function(){return this.ranges[0].$from}},{key:"$to",get:function(){return this.ranges[0].$to}},{key:"empty",get:function(){for(var e=this.ranges,t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}},{key:"content",value:function(){return this.$from.doc.slice(this.from,this.to,!0)}},{key:"replace",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.Slice.empty,n=t.content.lastChild,r=null,o=0;o<t.openEnd;o++)r=n,n=n.lastChild;for(var i=e.steps.length,a=this.ranges,s=0;s<a.length;s++){var l=a[s],c=l.$from,d=l.$to,f=e.mapping.slice(i);e.replaceRange(f.map(c.pos),f.map(d.pos),s?u.Slice.empty:t),0==s&&O(e,i,(n?n.isInline:r&&r.isTextblock)?-1:1)}}},{key:"replaceWith",value:function(e,t){for(var n=e.steps.length,r=this.ranges,o=0;o<r.length;o++){var i=r[o],a=i.$from,s=i.$to,l=e.mapping.slice(n),u=l.map(a.pos),c=l.map(s.pos);o?e.deleteRange(u,c):(e.replaceRangeWith(u,c,t),O(e,n,t.isInline?-1:1))}}},{key:"getBookmark",value:function(){return v.between(this.$anchor,this.$head).getBookmark()}}],[{key:"findFrom",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=e.parent.inlineContent?new v(e):x(e.node(0),e.parent,e.pos,e.index(),t,n);if(r)return r;for(var o=e.depth-1;o>=0;o--){var i=t<0?x(e.node(0),e.node(o),e.before(o+1),e.index(o),t,n):x(e.node(0),e.node(o),e.after(o+1),e.index(o)+1,t,n);if(i)return i}return null}},{key:"near",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this.findFrom(e,t)||this.findFrom(e,-t)||new w(e.node(0))}},{key:"atStart",value:function(e){return x(e,e,0,0,1)||new w(e)}},{key:"atEnd",value:function(e){return x(e,e,e.content.size,e.childCount,-1)||new w(e)}},{key:"fromJSON",value:function(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");var n=d[t.type];if(!n)throw new RangeError("No selection type ".concat(t.type," defined"));return n.fromJSON(e,t)}},{key:"jsonID",value:function(e,t){if(e in d)throw new RangeError("Duplicate use of selection JSON ID "+e);return d[e]=t,t.prototype.jsonID=e,t}}]),e}();f.prototype.visible=!0;var p=Object(l.a)((function e(t,n){Object(s.a)(this,e),this.$from=t,this.$to=n})),h=!1;function m(e){h||e.parent.inlineContent||(h=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}var v=function(e){Object(i.a)(n,e);var t=Object(a.a)(n);function n(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return Object(s.a)(this,n),m(e),m(r),t.call(this,e,r)}return Object(l.a)(n,[{key:"$cursor",get:function(){return this.$anchor.pos==this.$head.pos?this.$head:null}},{key:"map",value:function(e,t){var r=e.resolve(t.map(this.head));if(!r.parent.inlineContent)return f.near(r);var o=e.resolve(t.map(this.anchor));return new n(o.parent.inlineContent?o:r,r)}},{key:"replace",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.Slice.empty;if(Object(r.a)(Object(o.a)(n.prototype),"replace",this).call(this,e,t),t==u.Slice.empty){var i=this.$from.marksAcross(this.$to);i&&e.ensureMarks(i)}}},{key:"eq",value:function(e){return e instanceof n&&e.anchor==this.anchor&&e.head==this.head}},{key:"getBookmark",value:function(){return new g(this.anchor,this.head)}},{key:"toJSON",value:function(){return{type:"text",anchor:this.anchor,head:this.head}}}],[{key:"fromJSON",value:function(e,t){if("number"!=typeof t.anchor||"number"!=typeof t.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new n(e.resolve(t.anchor),e.resolve(t.head))}},{key:"create",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))}},{key:"between",value:function(e,t,r){var o=e.pos-t.pos;if(r&&!o||(r=o>=0?1:-1),!t.parent.inlineContent){var i=f.findFrom(t,r,!0)||f.findFrom(t,-r,!0);if(!i)return f.near(t,r);t=i.$head}return e.parent.inlineContent||(0==o||(e=(f.findFrom(e,-r,!0)||f.findFrom(e,r,!0)).$anchor).pos<t.pos!=o<0)&&(e=t),new n(e,t)}}]),n}(f);f.jsonID("text",v);var g=function(){function e(t,n){Object(s.a)(this,e),this.anchor=t,this.head=n}return Object(l.a)(e,[{key:"map",value:function(t){return new e(t.map(this.anchor),t.map(this.head))}},{key:"resolve",value:function(e){return v.between(e.resolve(this.anchor),e.resolve(this.head))}}]),e}(),y=function(e){Object(i.a)(n,e);var t=Object(a.a)(n);function n(e){var r;Object(s.a)(this,n);var o=e.nodeAfter,i=e.node(0).resolve(e.pos+o.nodeSize);return(r=t.call(this,e,i)).node=o,r}return Object(l.a)(n,[{key:"map",value:function(e,t){var r=t.mapResult(this.anchor),o=r.deleted,i=r.pos,a=e.resolve(i);return o?f.near(a):new n(a)}},{key:"content",value:function(){return new u.Slice(u.Fragment.from(this.node),0,0)}},{key:"eq",value:function(e){return e instanceof n&&e.anchor==this.anchor}},{key:"toJSON",value:function(){return{type:"node",anchor:this.anchor}}},{key:"getBookmark",value:function(){return new b(this.anchor)}}],[{key:"fromJSON",value:function(e,t){if("number"!=typeof t.anchor)throw new RangeError("Invalid input for NodeSelection.fromJSON");return new n(e.resolve(t.anchor))}},{key:"create",value:function(e,t){return new n(e.resolve(t))}},{key:"isSelectable",value:function(e){return!e.isText&&!1!==e.type.spec.selectable}}]),n}(f);y.prototype.visible=!1,f.jsonID("node",y);var b=function(){function e(t){Object(s.a)(this,e),this.anchor=t}return Object(l.a)(e,[{key:"map",value:function(t){var n=t.mapResult(this.anchor),r=n.deleted,o=n.pos;return r?new g(o,o):new e(o)}},{key:"resolve",value:function(e){var t=e.resolve(this.anchor),n=t.nodeAfter;return n&&y.isSelectable(n)?new y(t):f.near(t)}}]),e}(),w=function(e){Object(i.a)(n,e);var t=Object(a.a)(n);function n(e){return Object(s.a)(this,n),t.call(this,e.resolve(0),e.resolve(e.content.size))}return Object(l.a)(n,[{key:"replace",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.Slice.empty;if(t==u.Slice.empty){e.delete(0,e.doc.content.size);var i=f.atStart(e.doc);i.eq(e.selection)||e.setSelection(i)}else Object(r.a)(Object(o.a)(n.prototype),"replace",this).call(this,e,t)}},{key:"toJSON",value:function(){return{type:"all"}}},{key:"map",value:function(e){return new n(e)}},{key:"eq",value:function(e){return e instanceof n}},{key:"getBookmark",value:function(){return k}}],[{key:"fromJSON",value:function(e){return new n(e)}}]),n}(f);f.jsonID("all",w);var k={map:function(){return this},resolve:function(e){return new w(e)}};function x(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(t.inlineContent)return v.create(e,n);for(var a=r-(o>0?0:1);o>0?a<t.childCount:a>=0;a+=o){var s=t.child(a);if(s.isAtom){if(!i&&y.isSelectable(s))return y.create(e,n-(o<0?s.nodeSize:0))}else{var l=x(e,s,n+o,o<0?s.childCount:0,o,i);if(l)return l}n+=s.nodeSize*o}return null}function O(e,t,n){var r=e.steps.length-1;if(!(r<t)){var o,i=e.steps[r];if(i instanceof c.c||i instanceof c.b)e.mapping.maps[r].forEach((function(e,t,n,r){null==o&&(o=r)})),e.setSelection(f.near(e.doc.resolve(o),n))}}var S=function(e){Object(i.a)(n,e);var t=Object(a.a)(n);function n(e){var r;return Object(s.a)(this,n),(r=t.call(this,e.doc)).curSelectionFor=0,r.updated=0,r.meta=Object.create(null),r.time=Date.now(),r.curSelection=e.selection,r.storedMarks=e.storedMarks,r}return Object(l.a)(n,[{key:"selection",get:function(){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}},{key:"setSelection",value:function(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=-3&(1|this.updated),this.storedMarks=null,this}},{key:"selectionSet",get:function(){return(1&this.updated)>0}},{key:"setStoredMarks",value:function(e){return this.storedMarks=e,this.updated|=2,this}},{key:"ensureMarks",value:function(e){return u.Mark.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}},{key:"addStoredMark",value:function(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}},{key:"removeStoredMark",value:function(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}},{key:"storedMarksSet",get:function(){return(2&this.updated)>0}},{key:"addStep",value:function(e,t){Object(r.a)(Object(o.a)(n.prototype),"addStep",this).call(this,e,t),this.updated=-3&this.updated,this.storedMarks=null}},{key:"setTime",value:function(e){return this.time=e,this}},{key:"replaceSelection",value:function(e){return this.selection.replace(this,e),this}},{key:"replaceSelectionWith",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.selection;return t&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||u.Mark.none))),n.replaceWith(this,e),this}},{key:"deleteSelection",value:function(){return this.selection.replace(this),this}},{key:"insertText",value:function(e,t,n){var r=this.doc.type.schema;if(null==t)return e?this.replaceSelectionWith(r.text(e),!0):this.deleteSelection();if(null==n&&(n=t),n=null==n?t:n,!e)return this.deleteRange(t,n);var o=this.storedMarks;if(!o){var i=this.doc.resolve(t);o=n==t?i.marks():i.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,r.text(e,o)),this.selection.empty||this.setSelection(f.near(this.selection.$to)),this}},{key:"setMeta",value:function(e,t){return this.meta["string"==typeof e?e:e.key]=t,this}},{key:"getMeta",value:function(e){return this.meta["string"==typeof e?e:e.key]}},{key:"isGeneric",get:function(){for(var e in this.meta)return!1;return!0}},{key:"scrollIntoView",value:function(){return this.updated|=4,this}},{key:"scrolledIntoView",get:function(){return(4&this.updated)>0}}]),n}(c.e);function C(e,t){return t&&e?e.bind(t):e}var j=Object(l.a)((function e(t,n,r){Object(s.a)(this,e),this.name=t,this.init=C(n.init,r),this.apply=C(n.apply,r)})),D=[new j("doc",{init:function(e){return e.doc||e.schema.topNodeType.createAndFill()},apply:function(e){return e.doc}}),new j("selection",{init:function(e,t){return e.selection||f.atStart(t.doc)},apply:function(e){return e.selection}}),new j("storedMarks",{init:function(e){return e.storedMarks||null},apply:function(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new j("scrollToSelection",{init:function(){return 0},apply:function(e,t){return e.scrolledIntoView?t+1:t}})],E=Object(l.a)((function e(t,n){var r=this;Object(s.a)(this,e),this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=D.slice(),n&&n.forEach((function(e){if(r.pluginsByKey[e.key])throw new RangeError("Adding different instances of a keyed plugin ("+e.key+")");r.plugins.push(e),r.pluginsByKey[e.key]=e,e.spec.state&&r.fields.push(new j(e.key,e.spec.state,e))}))})),A=function(){function e(t){Object(s.a)(this,e),this.config=t}return Object(l.a)(e,[{key:"schema",get:function(){return this.config.schema}},{key:"plugins",get:function(){return this.config.plugins}},{key:"apply",value:function(e){return this.applyTransaction(e).state}},{key:"filterTransaction",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=0;n<this.config.plugins.length;n++)if(n!=t){var r=this.config.plugins[n];if(r.spec.filterTransaction&&!r.spec.filterTransaction.call(r,e,this))return!1}return!0}},{key:"applyTransaction",value:function(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};for(var t=[e],n=this.applyInner(e),r=null;;){for(var o=!1,i=0;i<this.config.plugins.length;i++){var a=this.config.plugins[i];if(a.spec.appendTransaction){var s=r?r[i].n:0,l=r?r[i].state:this,u=s<t.length&&a.spec.appendTransaction.call(a,s?t.slice(s):t,l,n);if(u&&n.filterTransaction(u,i)){if(u.setMeta("appendedTransaction",e),!r){r=[];for(var c=0;c<this.config.plugins.length;c++)r.push(c<i?{state:n,n:t.length}:{state:this,n:0})}t.push(u),n=n.applyInner(u),o=!0}r&&(r[i]={state:n,n:t.length})}}if(!o)return{state:n,transactions:t}}}},{key:"applyInner",value:function(t){if(!t.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");for(var n=new e(this.config),r=this.config.fields,o=0;o<r.length;o++){var i=r[o];n[i.name]=i.apply(t,this[i.name],this,n)}return n}},{key:"tr",get:function(){return new S(this)}},{key:"reconfigure",value:function(t){for(var n=new E(this.schema,t.plugins),r=n.fields,o=new e(n),i=0;i<r.length;i++){var a=r[i].name;o[a]=this.hasOwnProperty(a)?this[a]:r[i].init(t,o)}return o}},{key:"toJSON",value:function(e){var t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map((function(e){return e.toJSON()}))),e&&"object"==typeof e)for(var n in e){if("doc"==n||"selection"==n)throw new RangeError("The JSON fields `doc` and `selection` are reserved");var r=e[n],o=r.spec.state;o&&o.toJSON&&(t[n]=o.toJSON.call(r,this[r.key]))}return t}}],[{key:"create",value:function(t){for(var n=new E(t.doc?t.doc.type.schema:t.schema,t.plugins),r=new e(n),o=0;o<n.fields.length;o++)r[n.fields[o].name]=n.fields[o].init(t,r);return r}},{key:"fromJSON",value:function(t,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");var o=new E(t.schema,t.plugins),i=new e(o);return o.fields.forEach((function(e){if("doc"==e.name)i.doc=u.Node.fromJSON(t.schema,n.doc);else if("selection"==e.name)i.selection=f.fromJSON(i.doc,n.selection);else if("storedMarks"==e.name)n.storedMarks&&(i.storedMarks=n.storedMarks.map(t.schema.markFromJSON));else{if(r)for(var o in r){var a=r[o],s=a.spec.state;if(a.key==e.name&&s&&s.fromJSON&&Object.prototype.hasOwnProperty.call(n,o))return void(i[e.name]=s.fromJSON.call(a,t,n[o],i))}i[e.name]=e.init(t,i)}})),i}}]),e}();function M(e,t,n){for(var r in e){var o=e[r];o instanceof Function?o=o.bind(t):"handleDOMEvents"==r&&(o=M(o,t,{})),n[r]=o}return n}var T=function(){function e(t){Object(s.a)(this,e),this.spec=t,this.props={},t.props&&M(t.props,this,this.props),this.key=t.key?t.key.key:N("plugin")}return Object(l.a)(e,[{key:"getState",value:function(e){return e[this.key]}}]),e}(),L=Object.create(null);function N(e){return e in L?e+"$"+ ++L[e]:(L[e]=0,e+"$")}var P=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"key";Object(s.a)(this,e),this.key=N(t)}return Object(l.a)(e,[{key:"get",value:function(e){return e.config.pluginsByKey[this.key]}},{key:"getState",value:function(e){return e[this.key]}}]),e}()},function(e,t,n){"use strict";n.r(t),n.d(t,"ContentMatch",(function(){return _})),n.d(t,"DOMParser",(function(){return oe})),n.d(t,"DOMSerializer",(function(){return he})),n.d(t,"Fragment",(function(){return h})),n.d(t,"Mark",(function(){return y})),n.d(t,"MarkType",(function(){return te})),n.d(t,"Node",(function(){return V})),n.d(t,"NodeRange",(function(){return H})),n.d(t,"NodeType",(function(){return Q})),n.d(t,"ReplaceError",(function(){return b})),n.d(t,"ResolvedPos",(function(){return L})),n.d(t,"Schema",(function(){return ne})),n.d(t,"Slice",(function(){return w}));var r=n(13),o=n(12),i=n(10),a=n(11),s=n(49),l=n(4),u=n(5);function c(e){this.content=e}c.prototype={constructor:c,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-1==t?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,o=r.find(e),i=r.content.slice();return-1==o?i.push(n||e,t):(i[o+1]=t,n&&(i[o]=n)),new c(i)},remove:function(e){var t=this.find(e);if(-1==t)return this;var n=this.content.slice();return n.splice(t,2),new c(n)},addToStart:function(e,t){return new c([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new c(n)},addBefore:function(e,t,n){var r=this.remove(t),o=r.content.slice(),i=r.find(e);return o.splice(-1==i?o.length:i,0,t,n),new c(o)},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=c.from(e)).size?new c(e.content.concat(this.subtract(e).content)):this},append:function(e){return(e=c.from(e)).size?new c(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=c.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},get size(){return this.content.length>>1}},c.from=function(e){if(e instanceof c)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new c(t)};var d=c;function f(e,t,n){for(var r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;var o=e.child(r),i=t.child(r);if(o!=i){if(!o.sameMarkup(i))return n;if(o.isText&&o.text!=i.text){for(var a=0;o.text[a]==i.text[a];a++)n++;return n}if(o.content.size||i.content.size){var s=f(o.content,i.content,n+1);if(null!=s)return s}n+=o.nodeSize}else n+=o.nodeSize}}function p(e,t,n,r){for(var o=e.childCount,i=t.childCount;;){if(0==o||0==i)return o==i?null:{a:n,b:r};var a=e.child(--o),s=t.child(--i),l=a.nodeSize;if(a!=s){if(!a.sameMarkup(s))return{a:n,b:r};if(a.isText&&a.text!=s.text){for(var u=0,c=Math.min(a.text.length,s.text.length);u<c&&a.text[a.text.length-u-1]==s.text[s.text.length-u-1];)u++,n--,r--;return{a:n,b:r}}if(a.content.size||s.content.size){var d=p(a.content,s.content,n-1,r-1);if(d)return d}n-=l,r-=l}else n-=l,r-=l}}var h=function(){function e(t,n){if(Object(l.a)(this,e),this.content=t,this.size=n||0,null==n)for(var r=0;r<t.length;r++)this.size+=t[r].nodeSize}return Object(u.a)(e,[{key:"nodesBetween",value:function(e,t,n){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4?arguments[4]:void 0,i=0,a=0;a<t;i++){var s=this.content[i],l=a+s.nodeSize;if(l>e&&!1!==n(s,r+a,o||null,i)&&s.content.size){var u=a+1;s.nodesBetween(Math.max(0,e-u),Math.min(s.content.size,t-u),n,r+u)}a=l}}},{key:"descendants",value:function(e){this.nodesBetween(0,this.size,e)}},{key:"textBetween",value:function(e,t,n,r){var o="",i=!0;return this.nodesBetween(e,t,(function(a,s){a.isText?(o+=a.text.slice(Math.max(e,s)-s,t-s),i=!n):a.isLeaf?(r?o+="function"===typeof r?r(a):r:a.type.spec.leafText&&(o+=a.type.spec.leafText(a)),i=!n):!i&&a.isBlock&&(o+=n,i=!0)}),0),o}},{key:"append",value:function(t){if(!t.size)return this;if(!this.size)return t;var n=this.lastChild,r=t.firstChild,o=this.content.slice(),i=0;for(n.isText&&n.sameMarkup(r)&&(o[o.length-1]=n.withText(n.text+r.text),i=1);i<t.content.length;i++)o.push(t.content[i]);return new e(o,this.size+t.size)}},{key:"cut",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.size;if(0==t&&n==this.size)return this;var r=[],o=0;if(n>t)for(var i=0,a=0;a<n;i++){var s=this.content[i],l=a+s.nodeSize;l>t&&((a<t||l>n)&&(s=s.isText?s.cut(Math.max(0,t-a),Math.min(s.text.length,n-a)):s.cut(Math.max(0,t-a-1),Math.min(s.content.size,n-a-1))),r.push(s),o+=s.nodeSize),a=l}return new e(r,o)}},{key:"cutByIndex",value:function(t,n){return t==n?e.empty:0==t&&n==this.content.length?this:new e(this.content.slice(t,n))}},{key:"replaceChild",value:function(t,n){var r=this.content[t];if(r==n)return this;var o=this.content.slice(),i=this.size+n.nodeSize-r.nodeSize;return o[t]=n,new e(o,i)}},{key:"addToStart",value:function(t){return new e([t].concat(this.content),this.size+t.nodeSize)}},{key:"addToEnd",value:function(t){return new e(this.content.concat(t),this.size+t.nodeSize)}},{key:"eq",value:function(e){if(this.content.length!=e.content.length)return!1;for(var t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}},{key:"firstChild",get:function(){return this.content.length?this.content[0]:null}},{key:"lastChild",get:function(){return this.content.length?this.content[this.content.length-1]:null}},{key:"childCount",get:function(){return this.content.length}},{key:"child",value:function(e){var t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}},{key:"maybeChild",value:function(e){return this.content[e]||null}},{key:"forEach",value:function(e){for(var t=0,n=0;t<this.content.length;t++){var r=this.content[t];e(r,n,t),n+=r.nodeSize}}},{key:"findDiffStart",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return f(this,e,t)}},{key:"findDiffEnd",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.size,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.size;return p(this,e,t,n)}},{key:"findIndex",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;if(0==e)return v(0,e);if(e==this.size)return v(this.content.length,e);if(e>this.size||e<0)throw new RangeError("Position ".concat(e," outside of fragment (").concat(this,")"));for(var n=0,r=0;;n++){var o=this.child(n),i=r+o.nodeSize;if(i>=e)return i==e||t>0?v(n+1,i):v(n,r);r=i}}},{key:"toString",value:function(){return"<"+this.toStringInner()+">"}},{key:"toStringInner",value:function(){return this.content.join(", ")}},{key:"toJSON",value:function(){return this.content.length?this.content.map((function(e){return e.toJSON()})):null}}],[{key:"fromJSON",value:function(t,n){if(!n)return e.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new e(n.map(t.nodeFromJSON))}},{key:"fromArray",value:function(t){if(!t.length)return e.empty;for(var n,r=0,o=0;o<t.length;o++){var i=t[o];r+=i.nodeSize,o&&i.isText&&t[o-1].sameMarkup(i)?(n||(n=t.slice(0,o)),n[n.length-1]=i.withText(n[n.length-1].text+i.text)):n&&n.push(i)}return new e(n||t,r)}},{key:"from",value:function(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 new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}]),e}();h.empty=new h([],0);var m={index:0,offset:0};function v(e,t){return m.index=e,m.offset=t,m}function g(e,t){if(e===t)return!0;if(!e||"object"!=typeof e||!t||"object"!=typeof t)return!1;var n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(var r=0;r<e.length;r++)if(!g(e[r],t[r]))return!1}else{for(var o in e)if(!(o in t)||!g(e[o],t[o]))return!1;for(var i in t)if(!(i in e))return!1}return!0}var y=function(){function e(t,n){Object(l.a)(this,e),this.type=t,this.attrs=n}return Object(u.a)(e,[{key:"addToSet",value:function(e){for(var t,n=!1,r=0;r<e.length;r++){var o=e[r];if(this.eq(o))return e;if(this.type.excludes(o.type))t||(t=e.slice(0,r));else{if(o.type.excludes(this.type))return e;!n&&o.type.rank>this.type.rank&&(t||(t=e.slice(0,r)),t.push(this),n=!0),t&&t.push(o)}}return t||(t=e.slice()),n||t.push(this),t}},{key:"removeFromSet",value:function(e){for(var t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}},{key:"isInSet",value:function(e){for(var t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}},{key:"eq",value:function(e){return this==e||this.type==e.type&&g(this.attrs,e.attrs)}},{key:"toJSON",value:function(){var e={type:this.type.name};for(var t in this.attrs){e.attrs=this.attrs;break}return e}}],[{key:"fromJSON",value:function(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");var n=e.marks[t.type];if(!n)throw new RangeError("There is no mark type ".concat(t.type," in this schema"));return n.create(t.attrs)}},{key:"sameSet",value:function(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0}},{key:"setFrom",value:function(t){if(!t||Array.isArray(t)&&0==t.length)return e.none;if(t instanceof e)return[t];var n=t.slice();return n.sort((function(e,t){return e.type.rank-t.type.rank})),n}}]),e}();y.none=[];var b=function(e){Object(i.a)(n,e);var t=Object(a.a)(n);function n(){return Object(l.a)(this,n),t.apply(this,arguments)}return Object(u.a)(n)}(Object(s.a)(Error)),w=function(){function e(t,n,r){Object(l.a)(this,e),this.content=t,this.openStart=n,this.openEnd=r}return Object(u.a)(e,[{key:"size",get:function(){return this.content.size-this.openStart-this.openEnd}},{key:"insertAt",value:function(t,n){var r=x(this.content,t+this.openStart,n);return r&&new e(r,this.openStart,this.openEnd)}},{key:"removeBetween",value:function(t,n){return new e(k(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}},{key:"eq",value:function(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}},{key:"toString",value:function(){return this.content+"("+this.openStart+","+this.openEnd+")"}},{key:"toJSON",value:function(){if(!this.content.size)return null;var e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}}],[{key:"fromJSON",value:function(t,n){if(!n)return e.empty;var r=n.openStart||0,o=n.openEnd||0;if("number"!=typeof r||"number"!=typeof o)throw new RangeError("Invalid input for Slice.fromJSON");return new e(h.fromJSON(t,n.content),r,o)}},{key:"maxOpen",value:function(t){for(var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=0,o=0,i=t.firstChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.firstChild)r++;for(var a=t.lastChild;a&&!a.isLeaf&&(n||!a.type.spec.isolating);a=a.lastChild)o++;return new e(t,r,o)}}]),e}();function k(e,t,n){var r=e.findIndex(t),o=r.index,i=r.offset,a=e.maybeChild(o),s=e.findIndex(n),l=s.index,u=s.offset;if(i==t||a.isText){if(u!=n&&!e.child(l).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(o!=l)throw new RangeError("Removing non-flat range");return e.replaceChild(o,a.copy(k(a.content,t-i-1,n-i-1)))}function x(e,t,n,r){var o=e.findIndex(t),i=o.index,a=o.offset,s=e.maybeChild(i);if(a==t||s.isText)return r&&!r.canReplace(i,i,n)?null:e.cut(0,t).append(n).append(e.cut(t));var l=x(s.content,t-a-1,n);return l&&e.replaceChild(i,s.copy(l))}function O(e,t,n){if(n.openStart>e.depth)throw new b("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new b("Inconsistent open depths");return S(e,t,n,0)}function S(e,t,n,r){var o=e.index(r),i=e.node(r);if(o==t.index(r)&&r<e.depth-n.openStart){var a=S(e,t,n,r+1);return i.copy(i.content.replaceChild(o,a))}if(n.content.size){if(n.openStart||n.openEnd||e.depth!=r||t.depth!=r){var s=function(e,t){for(var n=t.depth-e.openStart,r=t.node(n).copy(e.content),o=n-1;o>=0;o--)r=t.node(o).copy(h.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}(n,e);return A(i,M(e,s.start,s.end,t,r))}var l=e.parent,u=l.content;return A(l,u.cut(0,e.parentOffset).append(n.content).append(u.cut(t.parentOffset)))}return A(i,T(e,t,r))}function C(e,t){if(!t.type.compatibleContent(e.type))throw new b("Cannot join "+t.type.name+" onto "+e.type.name)}function j(e,t,n){var r=e.node(n);return C(r,t.node(n)),r}function D(e,t){var 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 E(e,t,n,r){var o=(t||e).node(n),i=0,a=t?t.index(n):o.childCount;e&&(i=e.index(n),e.depth>n?i++:e.textOffset&&(D(e.nodeAfter,r),i++));for(var s=i;s<a;s++)D(o.child(s),r);t&&t.depth==n&&t.textOffset&&D(t.nodeBefore,r)}function A(e,t){if(!e.type.validContent(t))throw new b("Invalid content for node "+e.type.name);return e.copy(t)}function M(e,t,n,r,o){var i=e.depth>o&&j(e,t,o+1),a=r.depth>o&&j(n,r,o+1),s=[];return E(null,e,o,s),i&&a&&t.index(o)==n.index(o)?(C(i,a),D(A(i,M(e,t,n,r,o+1)),s)):(i&&D(A(i,T(e,t,o+1)),s),E(t,n,o,s),a&&D(A(a,T(n,r,o+1)),s)),E(r,null,o,s),new h(s)}function T(e,t,n){var r=[];(E(null,e,n,r),e.depth>n)&&D(A(j(e,t,n+1),T(e,t,n+1)),r);return E(t,null,n,r),new h(r)}w.empty=new w(h.empty,0,0);var L=function(){function e(t,n,r){Object(l.a)(this,e),this.pos=t,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}return Object(u.a)(e,[{key:"resolveDepth",value:function(e){return null==e?this.depth:e<0?this.depth+e:e}},{key:"parent",get:function(){return this.node(this.depth)}},{key:"doc",get:function(){return this.node(0)}},{key:"node",value:function(e){return this.path[3*this.resolveDepth(e)]}},{key:"index",value:function(e){return this.path[3*this.resolveDepth(e)+1]}},{key:"indexAfter",value:function(e){return e=this.resolveDepth(e),this.index(e)+(e!=this.depth||this.textOffset?1:0)}},{key:"start",value:function(e){return 0==(e=this.resolveDepth(e))?0:this.path[3*e-1]+1}},{key:"end",value:function(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}},{key:"before",value:function(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]}},{key:"after",value:function(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]+this.path[3*e].nodeSize}},{key:"textOffset",get:function(){return this.pos-this.path[this.path.length-1]}},{key:"nodeAfter",get:function(){var e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;var n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r}},{key:"nodeBefore",get:function(){var e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):0==e?null:this.parent.child(e-1)}},{key:"posAtIndex",value:function(e,t){t=this.resolveDepth(t);for(var n=this.path[3*t],r=0==t?0:this.path[3*t-1]+1,o=0;o<e;o++)r+=n.child(o).nodeSize;return r}},{key:"marks",value:function(){var e=this.parent,t=this.index();if(0==e.content.size)return y.none;if(this.textOffset)return e.child(t).marks;var n=e.maybeChild(t-1),r=e.maybeChild(t);if(!n){var o=n;n=r,r=o}for(var i=n.marks,a=0;a<i.length;a++)!1!==i[a].type.spec.inclusive||r&&i[a].isInSet(r.marks)||(i=i[a--].removeFromSet(i));return i}},{key:"marksAcross",value:function(e){var t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;for(var n=t.marks,r=e.parent.maybeChild(e.index()),o=0;o<n.length;o++)!1!==n[o].type.spec.inclusive||r&&n[o].isInSet(r.marks)||(n=n[o--].removeFromSet(n));return n}},{key:"sharedDepth",value:function(e){for(var t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}},{key:"blockRange",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this,t=arguments.length>1?arguments[1]:void 0;if(e.pos<this.pos)return e.blockRange(this);for(var 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 H(this,e,n);return null}},{key:"sameParent",value:function(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}},{key:"max",value:function(e){return e.pos>this.pos?e:this}},{key:"min",value:function(e){return e.pos<this.pos?e:this}},{key:"toString",value:function(){for(var e="",t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}}],[{key:"resolve",value:function(t,n){if(!(n>=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");for(var r=[],o=0,i=n,a=t;;){var s=a.content.findIndex(i),l=s.index,u=s.offset,c=i-u;if(r.push(a,l,o+u),!c)break;if((a=a.child(l)).isText)break;i=c-1,o+=u+1}return new e(n,r,i)}},{key:"resolveCached",value:function(t,n){for(var r=0;r<N.length;r++){var o=N[r];if(o.pos==n&&o.doc==t)return o}var i=N[P]=e.resolve(t,n);return P=(P+1)%R,i}}]),e}(),N=[],P=0,R=12,H=function(){function e(t,n,r){Object(l.a)(this,e),this.$from=t,this.$to=n,this.depth=r}return Object(u.a)(e,[{key:"start",get:function(){return this.$from.before(this.depth+1)}},{key:"end",get:function(){return this.$to.after(this.depth+1)}},{key:"parent",get:function(){return this.$from.node(this.depth)}},{key:"startIndex",get:function(){return this.$from.index(this.depth)}},{key:"endIndex",get:function(){return this.$to.indexAfter(this.depth)}}]),e}(),F=Object.create(null),V=function(){function e(t,n,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:y.none;Object(l.a)(this,e),this.type=t,this.attrs=n,this.marks=o,this.content=r||h.empty}return Object(u.a)(e,[{key:"nodeSize",get:function(){return this.isLeaf?1:2+this.content.size}},{key:"childCount",get:function(){return this.content.childCount}},{key:"child",value:function(e){return this.content.child(e)}},{key:"maybeChild",value:function(e){return this.content.maybeChild(e)}},{key:"forEach",value:function(e){this.content.forEach(e)}},{key:"nodesBetween",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;this.content.nodesBetween(e,t,n,r,this)}},{key:"descendants",value:function(e){this.nodesBetween(0,this.content.size,e)}},{key:"textContent",get:function(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}},{key:"textBetween",value:function(e,t,n,r){return this.content.textBetween(e,t,n,r)}},{key:"firstChild",get:function(){return this.content.firstChild}},{key:"lastChild",get:function(){return this.content.lastChild}},{key:"eq",value:function(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}},{key:"sameMarkup",value:function(e){return this.hasMarkup(e.type,e.attrs,e.marks)}},{key:"hasMarkup",value:function(e,t,n){return this.type==e&&g(this.attrs,t||e.defaultAttrs||F)&&y.sameSet(this.marks,n||y.none)}},{key:"copy",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t==this.content?this:new e(this.type,this.attrs,t,this.marks)}},{key:"mark",value:function(t){return t==this.marks?this:new e(this.type,this.attrs,this.content,t)}},{key:"cut",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.content.size;return 0==e&&t==this.content.size?this:this.copy(this.content.cut(e,t))}},{key:"slice",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.content.size,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e==t)return w.empty;var r=this.resolve(e),o=this.resolve(t),i=n?0:r.sharedDepth(t),a=r.start(i),s=r.node(i),l=s.content.cut(r.pos-a,o.pos-a);return new w(l,r.depth-i,o.depth-i)}},{key:"replace",value:function(e,t,n){return O(this.resolve(e),this.resolve(t),n)}},{key:"nodeAt",value:function(e){for(var t=this;;){var n=t.content.findIndex(e),r=n.index,o=n.offset;if(!(t=t.maybeChild(r)))return null;if(o==e||t.isText)return t;e-=o+1}}},{key:"childAfter",value:function(e){var t=this.content.findIndex(e),n=t.index,r=t.offset;return{node:this.content.maybeChild(n),index:n,offset:r}}},{key:"childBefore",value:function(e){if(0==e)return{node:null,index:0,offset:0};var t=this.content.findIndex(e),n=t.index,r=t.offset;if(r<e)return{node:this.content.child(n),index:n,offset:r};var o=this.content.child(n-1);return{node:o,index:n-1,offset:r-o.nodeSize}}},{key:"resolve",value:function(e){return L.resolveCached(this,e)}},{key:"resolveNoCache",value:function(e){return L.resolve(this,e)}},{key:"rangeHasMark",value:function(e,t,n){var r=!1;return t>e&&this.nodesBetween(e,t,(function(e){return n.isInSet(e.marks)&&(r=!0),!r})),r}},{key:"isBlock",get:function(){return this.type.isBlock}},{key:"isTextblock",get:function(){return this.type.isTextblock}},{key:"inlineContent",get:function(){return this.type.inlineContent}},{key:"isInline",get:function(){return this.type.isInline}},{key:"isText",get:function(){return this.type.isText}},{key:"isLeaf",get:function(){return this.type.isLeaf}},{key:"isAtom",get:function(){return this.type.isAtom}},{key:"toString",value:function(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);var e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),B(this.marks,e)}},{key:"contentMatchAt",value:function(e){var t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}},{key:"canReplace",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h.empty,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:n.childCount,i=this.contentMatchAt(e).matchFragment(n,r,o),a=i&&i.matchFragment(this.content,t);if(!a||!a.validEnd)return!1;for(var s=r;s<o;s++)if(!this.type.allowsMarks(n.child(s).marks))return!1;return!0}},{key:"canReplaceWith",value:function(e,t,n,r){if(r&&!this.type.allowsMarks(r))return!1;var o=this.contentMatchAt(e).matchType(n),i=o&&o.matchFragment(this.content,t);return!!i&&i.validEnd}},{key:"canAppend",value:function(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}},{key:"check",value:function(){if(!this.type.validContent(this.content))throw new RangeError("Invalid content for node ".concat(this.type.name,": ").concat(this.content.toString().slice(0,50)));for(var e=y.none,t=0;t<this.marks.length;t++)e=this.marks[t].addToSet(e);if(!y.sameSet(e,this.marks))throw new RangeError("Invalid collection of marks for node ".concat(this.type.name,": ").concat(this.marks.map((function(e){return e.type.name}))));this.content.forEach((function(e){return e.check()}))}},{key:"toJSON",value:function(){var e={type:this.type.name};for(var 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((function(e){return e.toJSON()}))),e}}],[{key:"fromJSON",value:function(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");var n=null;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=t.marks.map(e.markFromJSON)}if("text"==t.type){if("string"!=typeof t.text)throw new RangeError("Invalid text node in JSON");return e.text(t.text,n)}var r=h.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,r,n)}}]),e}();V.prototype.text=void 0;var z=function(e){Object(i.a)(n,e);var t=Object(a.a)(n);function n(e,r,o,i){var a;if(Object(l.a)(this,n),a=t.call(this,e,r,null,i),!o)throw new RangeError("Empty text nodes are not allowed");return a.text=o,a}return Object(u.a)(n,[{key:"toString",value:function(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):B(this.marks,JSON.stringify(this.text))}},{key:"textContent",get:function(){return this.text}},{key:"textBetween",value:function(e,t){return this.text.slice(e,t)}},{key:"nodeSize",get:function(){return this.text.length}},{key:"mark",value:function(e){return e==this.marks?this:new n(this.type,this.attrs,this.text,e)}},{key:"withText",value:function(e){return e==this.text?this:new n(this.type,this.attrs,e,this.marks)}},{key:"cut",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.text.length;return 0==e&&t==this.text.length?this:this.withText(this.text.slice(e,t))}},{key:"eq",value:function(e){return this.sameMarkup(e)&&this.text==e.text}},{key:"toJSON",value:function(){var e=Object(r.a)(Object(o.a)(n.prototype),"toJSON",this).call(this);return e.text=this.text,e}}]),n}(V);function B(e,t){for(var n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}var _=function(){function e(t){Object(l.a)(this,e),this.validEnd=t,this.next=[],this.wrapCache=[]}return Object(u.a)(e,[{key:"matchType",value:function(e){for(var t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}},{key:"matchFragment",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.childCount,r=this,o=t;r&&o<n;o++)r=r.matchType(e.child(o).type);return r}},{key:"inlineContent",get:function(){return this.next.length&&this.next[0].type.isInline}},{key:"defaultType",get:function(){for(var e=0;e<this.next.length;e++){var t=this.next[e].type;if(!t.isText&&!t.hasRequiredAttrs())return t}return null}},{key:"compatible",value:function(e){for(var t=0;t<this.next.length;t++)for(var n=0;n<e.next.length;n++)if(this.next[t].type==e.next[n].type)return!0;return!1}},{key:"fillBefore",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=[this];function o(i,a){var s=i.matchFragment(e,n);if(s&&(!t||s.validEnd))return h.from(a.map((function(e){return e.createAndFill()})));for(var l=0;l<i.next.length;l++){var u=i.next[l],c=u.type,d=u.next;if(!c.isText&&!c.hasRequiredAttrs()&&-1==r.indexOf(d)){r.push(d);var f=o(d,a.concat(c));if(f)return f}}return null}return o(this,[])}},{key:"findWrapping",value:function(e){for(var t=0;t<this.wrapCache.length;t+=2)if(this.wrapCache[t]==e)return this.wrapCache[t+1];var n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}},{key:"computeWrapping",value:function(e){for(var t=Object.create(null),n=[{match:this,type:null,via:null}];n.length;){var r=n.shift(),o=r.match;if(o.matchType(e)){for(var i=[],a=r;a.type;a=a.via)i.push(a.type);return i.reverse()}for(var s=0;s<o.next.length;s++){var l=o.next[s],u=l.type,c=l.next;u.isLeaf||u.hasRequiredAttrs()||u.name in t||r.type&&!c.validEnd||(n.push({match:u.contentMatch,type:u,via:r}),t[u.name]=!0)}}return null}},{key:"edgeCount",get:function(){return this.next.length}},{key:"edge",value:function(e){if(e>=this.next.length)throw new RangeError("There's no ".concat(e,"th edge in this content match"));return this.next[e]}},{key:"toString",value:function(){var e=[];return function t(n){e.push(n);for(var r=0;r<n.next.length;r++)-1==e.indexOf(n.next[r].next)&&t(n.next[r].next)}(this),e.map((function(t,n){for(var r=n+(t.validEnd?"*":" ")+" ",o=0;o<t.next.length;o++)r+=(o?", ":"")+t.next[o].type.name+"->"+e.indexOf(t.next[o].next);return r})).join("\n")}}],[{key:"parse",value:function(t,n){var r=new I(t,n);if(null==r.next)return e.empty;var o=$(r);r.next&&r.err("Unexpected trailing text");var i=function(e){var t=Object.create(null);return n(J(e,0));function n(r){var o=[];r.forEach((function(t){e[t].forEach((function(t){var n=t.term,r=t.to;if(n){for(var i,a=0;a<o.length;a++)o[a][0]==n&&(i=o[a][1]);J(e,r).forEach((function(e){i||o.push([n,i=[]]),-1==i.indexOf(e)&&i.push(e)}))}}))}));for(var i=t[r.join(",")]=new _(r.indexOf(e.length-1)>-1),a=0;a<o.length;a++){var s=o[a][1].sort(G);i.next.push({type:o[a][0],next:t[s.join(",")]||n(s)})}return i}}(function(e){var t=[[]];return o(i(e,0),n()),t;function n(){return t.push([])-1}function r(e,n,r){var o={term:r,to:n};return t[e].push(o),o}function o(e,t){e.forEach((function(e){return e.to=t}))}function i(e,t){if("choice"==e.type)return e.exprs.reduce((function(e,n){return e.concat(i(n,t))}),[]);if("seq"!=e.type){if("star"==e.type){var a=n();return r(t,a),o(i(e.expr,a),a),[r(a)]}if("plus"==e.type){var s=n();return o(i(e.expr,t),s),o(i(e.expr,s),s),[r(s)]}if("opt"==e.type)return[r(t)].concat(i(e.expr,t));if("range"==e.type){for(var l=t,u=0;u<e.min;u++){var c=n();o(i(e.expr,l),c),l=c}if(-1==e.max)o(i(e.expr,l),l);else for(var d=e.min;d<e.max;d++){var f=n();r(l,f),o(i(e.expr,l),f),l=f}return[r(l)]}if("name"==e.type)return[r(t,void 0,e.value)];throw new Error("Unknown expr type")}for(var p=0;;p++){var h=i(e.exprs[p],t);if(p==e.exprs.length-1)return h;o(h,t=n())}}}(o));return function(e,t){for(var n=0,r=[e];n<r.length;n++){for(var o=r[n],i=!o.validEnd,a=[],s=0;s<o.next.length;s++){var l=o.next[s],u=l.type,c=l.next;a.push(u.name),!i||u.isText||u.hasRequiredAttrs()||(i=!1),-1==r.indexOf(c)&&r.push(c)}i&&t.err("Only non-generatable nodes ("+a.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(i,r),i}}]),e}();_.empty=new _(!0);var I=function(){function e(t,n){Object(l.a)(this,e),this.string=t,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()}return Object(u.a)(e,[{key:"next",get:function(){return this.tokens[this.pos]}},{key:"eat",value:function(e){return this.next==e&&(this.pos++||!0)}},{key:"err",value:function(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}]),e}();function $(e){var t=[];do{t.push(q(e))}while(e.eat("|"));return 1==t.length?t[0]:{type:"choice",exprs:t}}function q(e){var t=[];do{t.push(W(e))}while(e.next&&")"!=e.next&&"|"!=e.next);return 1==t.length?t[0]:{type:"seq",exprs:t}}function W(e){for(var t=function(e){if(e.eat("(")){var t=$(e);return e.eat(")")||e.err("Missing closing paren"),t}if(!/\W/.test(e.next)){var n=function(e,t){var n=e.nodeTypes,r=n[t];if(r)return[r];var o=[];for(var i in n){var a=n[i];a.groups.indexOf(t)>-1&&o.push(a)}0==o.length&&e.err("No node type or group '"+t+"' found");return o}(e,e.next).map((function(t){return null==e.inline?e.inline=t.isInline:e.inline!=t.isInline&&e.err("Mixing inline and block content"),{type:"name",value:t}}));return e.pos++,1==n.length?n[0]:{type:"choice",exprs:n}}e.err("Unexpected token '"+e.next+"'")}(e);;)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("{"))break;t=K(e,t)}return t}function U(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");var t=Number(e.next);return e.pos++,t}function K(e,t){var n=U(e),r=n;return e.eat(",")&&(r="}"!=e.next?U(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function G(e,t){return t-e}function J(e,t){var n=[];return function t(r){var o=e[r];if(1==o.length&&!o[0].term)return t(o[0].to);n.push(r);for(var i=0;i<o.length;i++){var a=o[i],s=a.term,l=a.to;s||-1!=n.indexOf(l)||t(l)}}(t),n.sort(G)}function Y(e){var t=Object.create(null);for(var n in e){var r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function Z(e,t){var n=Object.create(null);for(var r in e){var o=t&&t[r];if(void 0===o){var i=e[r];if(!i.hasDefault)throw new RangeError("No value supplied for attribute "+r);o=i.default}n[r]=o}return n}function X(e){var t=Object.create(null);if(e)for(var n in e)t[n]=new ee(e[n]);return t}var Q=function(){function e(t,n,r){Object(l.a)(this,e),this.name=t,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=X(r.attrs),this.defaultAttrs=Y(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||"text"==t),this.isText="text"==t}return Object(u.a)(e,[{key:"isInline",get:function(){return!this.isBlock}},{key:"isTextblock",get:function(){return this.isBlock&&this.inlineContent}},{key:"isLeaf",get:function(){return this.contentMatch==_.empty}},{key:"isAtom",get:function(){return this.isLeaf||!!this.spec.atom}},{key:"whitespace",get:function(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}},{key:"hasRequiredAttrs",value:function(){for(var e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}},{key:"compatibleContent",value:function(e){return this==e||this.contentMatch.compatible(e.contentMatch)}},{key:"computeAttrs",value:function(e){return!e&&this.defaultAttrs?this.defaultAttrs:Z(this.attrs,e)}},{key:"create",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new V(this,this.computeAttrs(e),h.from(t),y.setFrom(n))}},{key:"createChecked",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;if(t=h.from(t),!this.validContent(t))throw new RangeError("Invalid content for node "+this.name);return new V(this,this.computeAttrs(e),t,y.setFrom(n))}},{key:"createAndFill",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;if(e=this.computeAttrs(e),(t=h.from(t)).size){var r=this.contentMatch.fillBefore(t);if(!r)return null;t=r.append(t)}var o=this.contentMatch.matchFragment(t),i=o&&o.fillBefore(h.empty,!0);return i?new V(this,e,t.append(i),y.setFrom(n)):null}},{key:"validContent",value:function(e){var t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(var n=0;n<e.childCount;n++)if(!this.allowsMarks(e.child(n).marks))return!1;return!0}},{key:"allowsMarkType",value:function(e){return null==this.markSet||this.markSet.indexOf(e)>-1}},{key:"allowsMarks",value:function(e){if(null==this.markSet)return!0;for(var t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}},{key:"allowedMarks",value:function(e){if(null==this.markSet)return e;for(var t,n=0;n<e.length;n++)this.allowsMarkType(e[n].type)?t&&t.push(e[n]):t||(t=e.slice(0,n));return t?t.length?t:y.none:e}}],[{key:"compile",value:function(t,n){var r=Object.create(null);t.forEach((function(t,o){return r[t]=new e(t,n,o)}));var o=n.spec.topNode||"doc";if(!r[o])throw new RangeError("Schema is missing its top node type ('"+o+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(var i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}}]),e}(),ee=function(){function e(t){Object(l.a)(this,e),this.hasDefault=Object.prototype.hasOwnProperty.call(t,"default"),this.default=t.default}return Object(u.a)(e,[{key:"isRequired",get:function(){return!this.hasDefault}}]),e}(),te=function(){function e(t,n,r,o){Object(l.a)(this,e),this.name=t,this.rank=n,this.schema=r,this.spec=o,this.attrs=X(o.attrs),this.excluded=null;var i=Y(this.attrs);this.instance=i?new y(this,i):null}return Object(u.a)(e,[{key:"create",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return!e&&this.instance?this.instance:new y(this,Z(this.attrs,e))}},{key:"removeFromSet",value:function(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}},{key:"isInSet",value:function(e){for(var t=0;t<e.length;t++)if(e[t].type==this)return e[t]}},{key:"excludes",value:function(e){return this.excluded.indexOf(e)>-1}}],[{key:"compile",value:function(t,n){var r=Object.create(null),o=0;return t.forEach((function(t,i){return r[t]=new e(t,o++,n,i)})),r}}]),e}(),ne=function(){function e(t){Object(l.a)(this,e),this.cached=Object.create(null),this.spec={nodes:d.from(t.nodes),marks:d.from(t.marks||{}),topNode:t.topNode},this.nodes=Q.compile(this.spec.nodes,this),this.marks=te.compile(this.spec.marks,this);var n=Object.create(null);for(var r in this.nodes){if(r in this.marks)throw new RangeError(r+" can not be both a node and a mark");var o=this.nodes[r],i=o.spec.content||"",a=o.spec.marks;o.contentMatch=n[i]||(n[i]=_.parse(i,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.markSet="_"==a?null:a?re(this,a.split(" ")):""!=a&&o.inlineContent?null:[]}for(var s in this.marks){var u=this.marks[s],c=u.spec.excludes;u.excluded=null==c?[u]:""==c?[]:re(this,c.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}return Object(u.a)(e,[{key:"node",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;if("string"==typeof e)e=this.nodeType(e);else{if(!(e instanceof Q))throw new RangeError("Invalid node type: "+e);if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}return e.createChecked(t,n,r)}},{key:"text",value:function(e,t){var n=this.nodes.text;return new z(n,n.defaultAttrs,e,y.setFrom(t))}},{key:"mark",value:function(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)}},{key:"nodeFromJSON",value:function(e){return V.fromJSON(this,e)}},{key:"markFromJSON",value:function(e){return y.fromJSON(this,e)}},{key:"nodeType",value:function(e){var t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}]),e}();function re(e,t){for(var n=[],r=0;r<t.length;r++){var o=t[r],i=e.marks[o],a=i;if(i)n.push(i);else for(var s in e.marks){var l=e.marks[s];("_"==o||l.spec.group&&l.spec.group.split(" ").indexOf(o)>-1)&&n.push(a=l)}if(!a)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}var oe=function(){function e(t,n){var r=this;Object(l.a)(this,e),this.schema=t,this.rules=n,this.tags=[],this.styles=[],n.forEach((function(e){e.tag?r.tags.push(e):e.style&&r.styles.push(e)})),this.normalizeLists=!this.tags.some((function(e){if(!/^(ul|ol)\b/.test(e.tag)||!e.node)return!1;var n=t.nodes[e.node];return n.contentMatch.matchType(n)}))}return Object(u.a)(e,[{key:"parse",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new ce(this,t,!1);return n.addAll(e,t.from,t.to),n.finish()}},{key:"parseSlice",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new ce(this,t,!0);return n.addAll(e,t.from,t.to),w.maxOpen(n.finish())}},{key:"matchTag",value:function(e,t,n){for(var r=n?this.tags.indexOf(n)+1:0;r<this.tags.length;r++){var o=this.tags[r];if(de(e,o.tag)&&(void 0===o.namespace||e.namespaceURI==o.namespace)&&(!o.context||t.matchesContext(o.context))){if(o.getAttrs){var i=o.getAttrs(e);if(!1===i)continue;o.attrs=i||void 0}return o}}}},{key:"matchStyle",value:function(e,t,n,r){for(var o=r?this.styles.indexOf(r)+1:0;o<this.styles.length;o++){var i=this.styles[o],a=i.style;if(!(0!=a.indexOf(e)||i.context&&!n.matchesContext(i.context)||a.length>e.length&&(61!=a.charCodeAt(e.length)||a.slice(e.length+1)!=t))){if(i.getAttrs){var s=i.getAttrs(t);if(!1===s)continue;i.attrs=s||void 0}return i}}}}],[{key:"schemaRules",value:function(e){var t=[];function n(e){for(var n=null==e.priority?50:e.priority,r=0;r<t.length;r++){var o=t[r];if((null==o.priority?50:o.priority)<n)break}t.splice(r,0,e)}var r=function(t){var r=e.marks[t].spec.parseDOM;r&&r.forEach((function(e){n(e=fe(e)),e.mark=t}))};for(var o in e.marks)r(o);var i=function(t){var r=e.nodes[t].spec.parseDOM;r&&r.forEach((function(e){n(e=fe(e)),e.node=t}))};for(var a in e.nodes)i(a);return t}},{key:"fromSchema",value:function(t){return t.cached.domParser||(t.cached.domParser=new e(t,e.schemaRules(t)))}}]),e}(),ie={address:!0,article:!0,aside:!0,blockquote:!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},ae={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},se={ol:!0,ul:!0};function le(e,t,n){return null!=t?(t?1:0)|("full"===t?2:0):e&&"pre"==e.whitespace?3:-5&n}var ue=function(){function e(t,n,r,o,i,a,s){Object(l.a)(this,e),this.type=t,this.attrs=n,this.marks=r,this.pendingMarks=o,this.solid=i,this.options=s,this.content=[],this.activeMarks=y.none,this.stashMarks=[],this.match=a||(4&s?null:t.contentMatch)}return Object(u.a)(e,[{key:"findWrapping",value:function(e){if(!this.match){if(!this.type)return[];var t=this.type.contentMatch.fillBefore(h.from(e));if(!t){var n,r=this.type.contentMatch;return(n=r.findWrapping(e.type))?(this.match=r,n):null}this.match=this.type.contentMatch.matchFragment(t)}return this.match.findWrapping(e.type)}},{key:"finish",value:function(e){if(!(1&this.options)){var t,n=this.content[this.content.length-1];if(n&&n.isText&&(t=/[ \t\r\n\u000c]+$/.exec(n.text))){var r=n;n.text.length==t[0].length?this.content.pop():this.content[this.content.length-1]=r.withText(r.text.slice(0,r.text.length-t[0].length))}}var o=h.from(this.content);return!e&&this.match&&(o=o.append(this.match.fillBefore(h.empty,!0))),this.type?this.type.create(this.attrs,o,this.marks):o}},{key:"popFromStashMark",value:function(e){for(var t=this.stashMarks.length-1;t>=0;t--)if(e.eq(this.stashMarks[t]))return this.stashMarks.splice(t,1)[0]}},{key:"applyPending",value:function(e){for(var t=0,n=this.pendingMarks;t<n.length;t++){var r=n[t];(this.type?this.type.allowsMarkType(r.type):pe(r.type,e))&&!r.isInSet(this.activeMarks)&&(this.activeMarks=r.addToSet(this.activeMarks),this.pendingMarks=r.removeFromSet(this.pendingMarks))}}},{key:"inlineContext",value:function(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!ie.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}]),e}(),ce=function(){function e(t,n,r){Object(l.a)(this,e),this.parser=t,this.options=n,this.isOpen=r,this.open=0;var o,i=n.topNode,a=le(null,n.preserveWhitespace,0)|(r?4:0);o=i?new ue(i.type,i.attrs,y.none,y.none,!0,n.topMatch||i.type.contentMatch,a):new ue(r?null:t.schema.topNodeType,null,y.none,y.none,!0,null,a),this.nodes=[o],this.find=n.findPositions,this.needsBlock=!1}return Object(u.a)(e,[{key:"top",get:function(){return this.nodes[this.open]}},{key:"addDOM",value:function(e){if(3==e.nodeType)this.addTextNode(e);else if(1==e.nodeType){var t=e.getAttribute("style"),n=t?this.readStyles(function(e){var t,n=/\s*([\w-]+)\s*:\s*([^;]+)/g,r=[];for(;t=n.exec(e);)r.push(t[1],t[2].trim());return r}(t)):null,r=this.top;if(null!=n)for(var o=0;o<n.length;o++)this.addPendingMark(n[o]);if(this.addElement(e),null!=n)for(var i=0;i<n.length;i++)this.removePendingMark(n[i],r)}}},{key:"addTextNode",value:function(e){var t=e.nodeValue,n=this.top;if(2&n.options||n.inlineContext(e)||/[^ \t\r\n\u000c]/.test(t)){if(1&n.options)t=2&n.options?t.replace(/\r\n?/g,"\n"):t.replace(/\r?\n|\r/g," ");else if(t=t.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(t)&&this.open==this.nodes.length-1){var r=n.content[n.content.length-1],o=e.previousSibling;(!r||o&&"BR"==o.nodeName||r.isText&&/[ \t\r\n\u000c]$/.test(r.text))&&(t=t.slice(1))}t&&this.insertNode(this.parser.schema.text(t)),this.findInText(e)}else this.findInside(e)}},{key:"addElement",value:function(e,t){var n,r=e.nodeName.toLowerCase();se.hasOwnProperty(r)&&this.parser.normalizeLists&&function(e){for(var t=e.firstChild,n=null;t;t=t.nextSibling){var r=1==t.nodeType?t.nodeName.toLowerCase():null;r&&se.hasOwnProperty(r)&&n?(n.appendChild(t),t=n):"li"==r?n=t:r&&(n=null)}}(e);var o=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(n=this.parser.matchTag(e,this,t));if(o?o.ignore:ae.hasOwnProperty(r))this.findInside(e),this.ignoreFallback(e);else if(!o||o.skip||o.closeParent){o&&o.closeParent?this.open=Math.max(0,this.open-1):o&&o.skip.nodeType&&(e=o.skip);var i,a=this.top,s=this.needsBlock;if(ie.hasOwnProperty(r))i=!0,a.type||(this.needsBlock=!0);else if(!e.firstChild)return void this.leafFallback(e);this.addAll(e),i&&this.sync(a),this.needsBlock=s}else this.addElementByRule(e,o,!1===o.consuming?n:void 0)}},{key:"leafFallback",value:function(e){"BR"==e.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode("\n"))}},{key:"ignoreFallback",value:function(e){"BR"!=e.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"))}},{key:"readStyles",value:function(e){var t=y.none;e:for(var n=0;n<e.length;n+=2)for(var r=void 0;;){var o=this.parser.matchStyle(e[n],e[n+1],this,r);if(!o)continue e;if(o.ignore)return null;if(t=this.parser.schema.marks[o.mark].create(o.attrs).addToSet(t),!1!==o.consuming)break;r=o}return t}},{key:"addElementByRule",value:function(e,t,n){var r,o,i,a=this;t.node?(o=this.parser.schema.nodes[t.node]).isLeaf?this.insertNode(o.create(t.attrs))||this.leafFallback(e):r=this.enter(o,t.attrs||null,t.preserveWhitespace):(i=this.parser.schema.marks[t.mark].create(t.attrs),this.addPendingMark(i));var s=this.top;if(o&&o.isLeaf)this.findInside(e);else if(n)this.addElement(e,n);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach((function(e){return a.insertNode(e)}));else{var l=e;"string"==typeof t.contentElement?l=e.querySelector(t.contentElement):"function"==typeof t.contentElement?l=t.contentElement(e):t.contentElement&&(l=t.contentElement),this.findAround(e,l,!0),this.addAll(l)}r&&this.sync(s)&&this.open--,i&&this.removePendingMark(i,s)}},{key:"addAll",value:function(e,t,n){for(var r=t||0,o=t?e.childNodes[t]:e.firstChild,i=null==n?null:e.childNodes[n];o!=i;o=o.nextSibling,++r)this.findAtPoint(e,r),this.addDOM(o);this.findAtPoint(e,r)}},{key:"findPlace",value:function(e){for(var t,n,r=this.open;r>=0;r--){var o=this.nodes[r],i=o.findWrapping(e);if(i&&(!t||t.length>i.length)&&(t=i,n=o,!i.length))break;if(o.solid)break}if(!t)return!1;this.sync(n);for(var a=0;a<t.length;a++)this.enterInner(t[a],null,!1);return!0}},{key:"insertNode",value:function(e){if(e.isInline&&this.needsBlock&&!this.top.type){var t=this.textblockFromContext();t&&this.enterInner(t)}if(this.findPlace(e)){this.closeExtra();var n=this.top;n.applyPending(e.type),n.match&&(n.match=n.match.matchType(e.type));for(var r=n.activeMarks,o=0;o<e.marks.length;o++)n.type&&!n.type.allowsMarkType(e.marks[o].type)||(r=e.marks[o].addToSet(r));return n.content.push(e.mark(r)),!0}return!1}},{key:"enter",value:function(e,t,n){var r=this.findPlace(e.create(t));return r&&this.enterInner(e,t,!0,n),r}},{key:"enterInner",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3?arguments[3]:void 0;this.closeExtra();var o=this.top;o.applyPending(e),o.match=o.match&&o.match.matchType(e);var i=le(e,r,o.options);4&o.options&&0==o.content.length&&(i|=4),this.nodes.push(new ue(e,t,o.activeMarks,o.pendingMarks,n,null,i)),this.open++}},{key:"closeExtra",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],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}}},{key:"finish",value:function(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}},{key:"sync",value:function(e){for(var t=this.open;t>=0;t--)if(this.nodes[t]==e)return this.open=t,!0;return!1}},{key:"currentPos",get:function(){this.closeExtra();for(var e=0,t=this.open;t>=0;t--){for(var n=this.nodes[t].content,r=n.length-1;r>=0;r--)e+=n[r].nodeSize;t&&e++}return e}},{key:"findAtPoint",value:function(e,t){if(this.find)for(var n=0;n<this.find.length;n++)this.find[n].node==e&&this.find[n].offset==t&&(this.find[n].pos=this.currentPos)}},{key:"findInside",value:function(e){if(this.find)for(var t=0;t<this.find.length;t++)null==this.find[t].pos&&1==e.nodeType&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}},{key:"findAround",value:function(e,t,n){if(e!=t&&this.find)for(var r=0;r<this.find.length;r++){if(null==this.find[r].pos&&1==e.nodeType&&e.contains(this.find[r].node))t.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}}},{key:"findInText",value:function(e){if(this.find)for(var 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))}},{key:"matchesContext",value:function(e){var t=this;if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);var n=e.split("/"),r=this.options.context,o=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(o?0:1);return function e(a,s){for(;a>=0;a--){var l=n[a];if(""==l){if(a==n.length-1||0==a)continue;for(;s>=i;s--)if(e(a-1,s))return!0;return!1}var u=s>0||0==s&&o?t.nodes[s].type:r&&s>=i?r.node(s-i).type:null;if(!u||u.name!=l&&-1==u.groups.indexOf(l))return!1;s--}return!0}(n.length-1,this.open)}},{key:"textblockFromContext",value:function(){var e=this.options.context;if(e)for(var t=e.depth;t>=0;t--){var n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(var r in this.parser.schema.nodes){var o=this.parser.schema.nodes[r];if(o.isTextblock&&o.defaultAttrs)return o}}},{key:"addPendingMark",value:function(e){var t=function(e,t){for(var n=0;n<t.length;n++)if(e.eq(t[n]))return t[n]}(e,this.top.pendingMarks);t&&this.top.stashMarks.push(t),this.top.pendingMarks=e.addToSet(this.top.pendingMarks)}},{key:"removePendingMark",value:function(e,t){for(var n=this.open;n>=0;n--){var r=this.nodes[n];if(r.pendingMarks.lastIndexOf(e)>-1)r.pendingMarks=e.removeFromSet(r.pendingMarks);else{r.activeMarks=e.removeFromSet(r.activeMarks);var o=r.popFromStashMark(e);o&&r.type&&r.type.allowsMarkType(o.type)&&(r.activeMarks=o.addToSet(r.activeMarks))}if(r==t)break}}}]),e}();function de(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function fe(e){var t={};for(var n in e)t[n]=e[n];return t}function pe(e,t){var n=t.schema.nodes,r=function(r){var o=n[r];if(!o.allowsMarkType(e))return"continue";var i=[];return function e(n){i.push(n);for(var r=0;r<n.edgeCount;r++){var o=n.edge(r),a=o.type,s=o.next;if(a==t)return!0;if(i.indexOf(s)<0&&e(s))return!0}}(o.contentMatch)?{v:!0}:void 0};for(var o in n){var i=r(o);if("continue"!==i&&"object"===typeof i)return i.v}}var he=function(){function e(t,n){Object(l.a)(this,e),this.nodes=t,this.marks=n}return Object(u.a)(e,[{key:"serializeFragment",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;r||(r=ve(n).createDocumentFragment());var o=r,i=[];return e.forEach((function(e){if(i.length||e.marks.length){for(var r=0,a=0;r<i.length&&a<e.marks.length;){var s=e.marks[a];if(t.marks[s.type.name]){if(!s.eq(i[r][0])||!1===s.type.spec.spanning)break;r++,a++}else a++}for(;r<i.length;)o=i.pop()[1];for(;a<e.marks.length;){var l=e.marks[a++],u=t.serializeMark(l,e.isInline,n);u&&(i.push([l,o]),o.appendChild(u.dom),o=u.contentDOM||u.dom)}}o.appendChild(t.serializeNodeInner(e,n))})),r}},{key:"serializeNodeInner",value:function(t,n){var r=e.renderSpec(ve(n),this.nodes[t.type.name](t)),o=r.dom,i=r.contentDOM;if(i){if(t.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(t.content,n,i)}return o}},{key:"serializeNode",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.serializeNodeInner(e,t),r=e.marks.length-1;r>=0;r--){var o=this.serializeMark(e.marks[r],e.isInline,t);o&&((o.contentDOM||o.dom).appendChild(n),n=o.dom)}return n}},{key:"serializeMark",value:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=this.marks[t.type.name];return o&&e.renderSpec(ve(r),o(t,n))}}],[{key:"renderSpec",value:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if("string"==typeof n)return{dom:t.createTextNode(n)};if(null!=n.nodeType)return{dom:n};if(n.dom&&null!=n.dom.nodeType)return n;var o,i=n[0],a=i.indexOf(" ");a>0&&(r=i.slice(0,a),i=i.slice(a+1));var s=r?t.createElementNS(r,i):t.createElement(i),l=n[1],u=1;if(l&&"object"==typeof l&&null==l.nodeType&&!Array.isArray(l))for(var c in u=2,l)if(null!=l[c]){var d=c.indexOf(" ");d>0?s.setAttributeNS(c.slice(0,d),c.slice(d+1),l[c]):s.setAttribute(c,l[c])}for(var f=u;f<n.length;f++){var p=n[f];if(0===p){if(f<n.length-1||f>u)throw new RangeError("Content hole must be the only child of its parent node");return{dom:s,contentDOM:s}}var h=e.renderSpec(t,p,r),m=h.dom,v=h.contentDOM;if(s.appendChild(m),v){if(o)throw new RangeError("Multiple content holes");o=v}}return{dom:s,contentDOM:o}}},{key:"fromSchema",value:function(t){return t.cached.domSerializer||(t.cached.domSerializer=new e(this.nodesFromSchema(t),this.marksFromSchema(t)))}},{key:"nodesFromSchema",value:function(e){var t=me(e.nodes);return t.text||(t.text=function(e){return e.text}),t}},{key:"marksFromSchema",value:function(e){return me(e.marks)}}]),e}();function me(e){var t={};for(var n in e){var r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function ve(e){return e.document||window.document}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}n.d(t,"a",(function(){return o}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(36);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(l){s=!0,o=l}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||Object(r.a)(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(18);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return p})),n.d(t,"b",(function(){return k})),n.d(t,"c",(function(){return w})),n.d(t,"d",(function(){return f})),n.d(t,"e",(function(){return Y})),n.d(t,"f",(function(){return N})),n.d(t,"g",(function(){return T})),n.d(t,"h",(function(){return F})),n.d(t,"i",(function(){return C})),n.d(t,"j",(function(){return R})),n.d(t,"k",(function(){return S})),n.d(t,"l",(function(){return V}));var r=n(49),o=n(10),i=n(11),a=n(4),s=n(5),l=n(3),u=Math.pow(2,16);function c(e){return 65535&e}var d=function(){function e(t,n,r){Object(a.a)(this,e),this.pos=t,this.delInfo=n,this.recover=r}return Object(s.a)(e,[{key:"deleted",get:function(){return(8&this.delInfo)>0}},{key:"deletedBefore",get:function(){return(5&this.delInfo)>0}},{key:"deletedAfter",get:function(){return(6&this.delInfo)>0}},{key:"deletedAcross",get:function(){return(4&this.delInfo)>0}}]),e}(),f=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(Object(a.a)(this,e),this.ranges=t,this.inverted=n,!t.length&&e.empty)return e.empty}return Object(s.a)(e,[{key:"recover",value:function(e){var t=0,n=c(e);if(!this.inverted)for(var r=0;r<n;r++)t+=this.ranges[3*r+2]-this.ranges[3*r+1];return this.ranges[3*n]+t+function(e){return(e-(65535&e))/u}(e)}},{key:"mapResult",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this._map(e,t,!1)}},{key:"map",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this._map(e,t,!0)}},{key:"_map",value:function(e,t,n){for(var r=0,o=this.inverted?2:1,i=this.inverted?1:2,a=0;a<this.ranges.length;a+=3){var s=this.ranges[a]-(this.inverted?r:0);if(s>e)break;var l=this.ranges[a+o],c=this.ranges[a+i],f=s+l;if(e<=f){var p=s+r+((l?e==s?-1:e==f?1:t:t)<0?0:c);if(n)return p;var h=e==(t<0?s:f)?null:a/3+(e-s)*u,m=e==s?2:e==f?1:4;return(t<0?e!=s:e!=f)&&(m|=8),new d(p,m,h)}r+=c-l}return n?e+r:new d(e+r,0,null)}},{key:"touches",value:function(e,t){for(var n=0,r=c(t),o=this.inverted?2:1,i=this.inverted?1:2,a=0;a<this.ranges.length;a+=3){var s=this.ranges[a]-(this.inverted?n:0);if(s>e)break;var l=this.ranges[a+o];if(e<=s+l&&a==3*r)return!0;n+=this.ranges[a+i]-l}return!1}},{key:"forEach",value:function(e){for(var t=this.inverted?2:1,n=this.inverted?1:2,r=0,o=0;r<this.ranges.length;r+=3){var i=this.ranges[r],a=i-(this.inverted?o:0),s=i+(this.inverted?0:o),l=this.ranges[r+t],u=this.ranges[r+n];e(a,a+l,s,s+u),o+=u-l}}},{key:"invert",value:function(){return new e(this.ranges,!this.inverted)}},{key:"toString",value:function(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}}],[{key:"offset",value:function(t){return 0==t?e.empty:new e(t<0?[0,-t,0]:[0,0,t])}}]),e}();f.empty=new f([]);var p=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.length;Object(a.a)(this,e),this.maps=t,this.mirror=n,this.from=r,this.to=o}return Object(s.a)(e,[{key:"slice",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.maps.length;return new e(this.maps,this.mirror,t,n)}},{key:"copy",value:function(){return new e(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}},{key:"appendMap",value:function(e,t){this.to=this.maps.push(e),null!=t&&this.setMirror(this.maps.length-1,t)}},{key:"appendMapping",value:function(e){for(var t=0,n=this.maps.length;t<e.maps.length;t++){var r=e.getMirror(t);this.appendMap(e.maps[t],null!=r&&r<t?n+r:void 0)}}},{key:"getMirror",value:function(e){if(this.mirror)for(var t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}},{key:"setMirror",value:function(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}},{key:"appendMappingInverted",value:function(e){for(var t=e.maps.length-1,n=this.maps.length+e.maps.length;t>=0;t--){var r=e.getMirror(t);this.appendMap(e.maps[t].invert(),null!=r&&r>t?n-r-1:void 0)}}},{key:"invert",value:function(){var t=new e;return t.appendMappingInverted(this),t}},{key:"map",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(this.mirror)return this._map(e,t,!0);for(var n=this.from;n<this.to;n++)e=this.maps[n].map(e,t);return e}},{key:"mapResult",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this._map(e,t,!1)}},{key:"_map",value:function(e,t,n){for(var r=0,o=this.from;o<this.to;o++){var i=this.maps[o].mapResult(e,t);if(null!=i.recover){var a=this.getMirror(o);if(null!=a&&a>o&&a<this.to){o=a,e=this.maps[a].recover(i.recover);continue}}r|=i.delInfo,e=i.pos}return n?e:new d(e,r,null)}}]),e}(),h=Object.create(null),m=function(){function e(){Object(a.a)(this,e)}return Object(s.a)(e,[{key:"getMap",value:function(){return f.empty}},{key:"merge",value:function(e){return null}}],[{key:"fromJSON",value:function(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");var n=h[t.stepType];if(!n)throw new RangeError("No step type ".concat(t.stepType," defined"));return n.fromJSON(e,t)}},{key:"jsonID",value:function(e,t){if(e in h)throw new RangeError("Duplicate use of step JSON ID "+e);return h[e]=t,t.prototype.jsonID=e,t}}]),e}(),v=function(){function e(t,n){Object(a.a)(this,e),this.doc=t,this.failed=n}return Object(s.a)(e,null,[{key:"ok",value:function(t){return new e(t,null)}},{key:"fail",value:function(t){return new e(null,t)}},{key:"fromReplace",value:function(t,n,r,o){try{return e.ok(t.replace(n,r,o))}catch(i){if(i instanceof l.ReplaceError)return e.fail(i.message);throw i}}}]),e}();function g(e,t,n){for(var r=[],o=0;o<e.childCount;o++){var i=e.child(o);i.content.size&&(i=i.copy(g(i.content,t,i))),i.isInline&&(i=t(i,n,o)),r.push(i)}return l.Fragment.fromArray(r)}var y=function(e){Object(o.a)(n,e);var t=Object(i.a)(n);function n(e,r,o){var i;return Object(a.a)(this,n),(i=t.call(this)).from=e,i.to=r,i.mark=o,i}return Object(s.a)(n,[{key:"apply",value:function(e){var t=this,n=e.slice(this.from,this.to),r=e.resolve(this.from),o=r.node(r.sharedDepth(this.to)),i=new l.Slice(g(n.content,(function(e,n){return e.isAtom&&n.type.allowsMarkType(t.mark.type)?e.mark(t.mark.addToSet(e.marks)):e}),o),n.openStart,n.openEnd);return v.fromReplace(e,this.from,this.to,i)}},{key:"invert",value:function(){return new b(this.from,this.to,this.mark)}},{key:"map",value:function(e){var t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new n(t.pos,r.pos,this.mark)}},{key:"merge",value:function(e){return e instanceof n&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new n(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}},{key:"toJSON",value:function(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}}],[{key:"fromJSON",value:function(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new n(t.from,t.to,e.markFromJSON(t.mark))}}]),n}(m);m.jsonID("addMark",y);var b=function(e){Object(o.a)(n,e);var t=Object(i.a)(n);function n(e,r,o){var i;return Object(a.a)(this,n),(i=t.call(this)).from=e,i.to=r,i.mark=o,i}return Object(s.a)(n,[{key:"apply",value:function(e){var t=this,n=e.slice(this.from,this.to),r=new l.Slice(g(n.content,(function(e){return e.mark(t.mark.removeFromSet(e.marks))}),e),n.openStart,n.openEnd);return v.fromReplace(e,this.from,this.to,r)}},{key:"invert",value:function(){return new y(this.from,this.to,this.mark)}},{key:"map",value:function(e){var t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new n(t.pos,r.pos,this.mark)}},{key:"merge",value:function(e){return e instanceof n&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new n(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}},{key:"toJSON",value:function(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}}],[{key:"fromJSON",value:function(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new n(t.from,t.to,e.markFromJSON(t.mark))}}]),n}(m);m.jsonID("removeMark",b);var w=function(e){Object(o.a)(n,e);var t=Object(i.a)(n);function n(e,r,o){var i,s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return Object(a.a)(this,n),(i=t.call(this)).from=e,i.to=r,i.slice=o,i.structure=s,i}return Object(s.a)(n,[{key:"apply",value:function(e){return this.structure&&x(e,this.from,this.to)?v.fail("Structure replace would overwrite content"):v.fromReplace(e,this.from,this.to,this.slice)}},{key:"getMap",value:function(){return new f([this.from,this.to-this.from,this.slice.size])}},{key:"invert",value:function(e){return new n(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}},{key:"map",value:function(e){var t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deletedAcross&&r.deletedAcross?null:new n(t.pos,Math.max(t.pos,r.pos),this.slice)}},{key:"merge",value:function(e){if(!(e instanceof n)||e.structure||this.structure)return null;if(this.from+this.slice.size!=e.from||this.slice.openEnd||e.slice.openStart){if(e.to!=this.from||this.slice.openStart||e.slice.openEnd)return null;var t=this.slice.size+e.slice.size==0?l.Slice.empty:new l.Slice(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new n(e.from,this.to,t,this.structure)}var r=this.slice.size+e.slice.size==0?l.Slice.empty:new l.Slice(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new n(this.from,this.to+(e.to-e.from),r,this.structure)}},{key:"toJSON",value:function(){var e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}}],[{key:"fromJSON",value:function(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new n(t.from,t.to,l.Slice.fromJSON(e,t.slice),!!t.structure)}}]),n}(m);m.jsonID("replace",w);var k=function(e){Object(o.a)(n,e);var t=Object(i.a)(n);function n(e,r,o,i,s,l){var u,c=arguments.length>6&&void 0!==arguments[6]&&arguments[6];return Object(a.a)(this,n),(u=t.call(this)).from=e,u.to=r,u.gapFrom=o,u.gapTo=i,u.slice=s,u.insert=l,u.structure=c,u}return Object(s.a)(n,[{key:"apply",value:function(e){if(this.structure&&(x(e,this.from,this.gapFrom)||x(e,this.gapTo,this.to)))return v.fail("Structure gap-replace would overwrite content");var t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return v.fail("Gap is not a flat range");var n=this.slice.insertAt(this.insert,t.content);return n?v.fromReplace(e,this.from,this.to,n):v.fail("Content does not fit in gap")}},{key:"getMap",value:function(){return new f([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}},{key:"invert",value:function(e){var t=this.gapTo-this.gapFrom;return new n(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}},{key:"map",value:function(e){var t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),o=e.map(this.gapFrom,-1),i=e.map(this.gapTo,1);return t.deletedAcross&&r.deletedAcross||o<t.pos||i>r.pos?null:new n(t.pos,r.pos,o,i,this.slice,this.insert,this.structure)}},{key:"toJSON",value:function(){var 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}}],[{key:"fromJSON",value:function(e,t){if("number"!=typeof t.from||"number"!=typeof t.to||"number"!=typeof t.gapFrom||"number"!=typeof t.gapTo||"number"!=typeof t.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new n(t.from,t.to,t.gapFrom,t.gapTo,l.Slice.fromJSON(e,t.slice),t.insert,!!t.structure)}}]),n}(m);function x(e,t,n){for(var r=e.resolve(t),o=n-t,i=r.depth;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0)for(var a=r.node(i).maybeChild(r.indexAfter(i));o>0;){if(!a||a.isLeaf)return!0;a=a.firstChild,o--}return!1}function O(e,t,n){return(0==t||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function S(e){for(var t=e.parent.content.cutByIndex(e.startIndex,e.endIndex),n=e.depth;;--n){var r=e.$from.node(n),o=e.$from.index(n),i=e.$to.indexAfter(n);if(n<e.depth&&r.canReplace(o,i,t))return n;if(0==n||r.type.spec.isolating||!O(r,o,i))break}return null}function C(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e,o=D(e,t),i=o&&E(r,t);return i?o.map(j).concat({type:t,attrs:n}).concat(i.map(j)):null}function j(e){return{type:e,attrs:null}}function D(e,t){var n=e.parent,r=e.startIndex,o=e.endIndex,i=n.contentMatchAt(r).findWrapping(t);if(!i)return null;var a=i.length?i[0]:t;return n.canReplaceWith(r,o,a)?i:null}function E(e,t){var n=e.parent,r=e.startIndex,o=e.endIndex,i=n.child(r),a=t.contentMatch.findWrapping(i.type);if(!a)return null;for(var s=(a.length?a[a.length-1]:t).contentMatch,l=r;s&&l<o;l++)s=s.matchType(n.child(l).type);return s&&s.validEnd?a:null}function A(e,t,n,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");var i=e.steps.length;e.doc.nodesBetween(t,n,(function(t,n){if(t.isTextblock&&!t.hasMarkup(r,o)&&function(e,t,n){var r=e.resolve(t),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}(e.doc,e.mapping.slice(i).map(n),r)){e.clearIncompatible(e.mapping.slice(i).map(n,1),r);var a=e.mapping.slice(i),s=a.map(n,1),u=a.map(n+t.nodeSize,1);return e.step(new k(s,u,s+1,u-1,new l.Slice(l.Fragment.from(r.create(o,null,t.marks)),0,0),1,!0)),!1}}))}function M(e,t,n,r,o){var i=e.doc.nodeAt(t);if(!i)throw new RangeError("No node at given position");n||(n=i.type);var a=n.create(r,null,o||i.marks);if(i.isLeaf)return e.replaceWith(t,t+i.nodeSize,a);if(!n.validContent(i.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new k(t,t+i.nodeSize,t+1,t+i.nodeSize-1,new l.Slice(l.Fragment.from(a),0,0),1,!0))}function T(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3?arguments[3]:void 0,o=e.resolve(t),i=o.depth-n,a=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!a.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(var s=o.depth-1,l=n-2;s>i;s--,l--){var u=o.node(s),c=o.index(s);if(u.type.spec.isolating)return!1;var d=u.content.cutByIndex(c,u.childCount),f=r&&r[l]||u;if(f!=u&&(d=d.replaceChild(0,f.type.create(f.attrs))),!u.canReplace(c+1,u.childCount)||!f.type.validContent(d))return!1}var p=o.indexAfter(i),h=r&&r[0];return o.node(i).canReplaceWith(p,p,h?h.type:o.node(i+1).type)}function L(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3?arguments[3]:void 0,o=e.doc.resolve(t),i=l.Fragment.empty,a=l.Fragment.empty,s=o.depth,u=o.depth-n,c=n-1;s>u;s--,c--){i=l.Fragment.from(o.node(s).copy(i));var d=r&&r[c];a=l.Fragment.from(d?d.type.create(d.attrs,a):o.node(s).copy(a))}e.step(new w(t,t,new l.Slice(i.append(a),n,n),!0))}function N(e,t){var n=e.resolve(t),r=n.index();return P(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function P(e,t){return!(!e||!t||e.isLeaf||!e.canAppend(t))}function R(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,r=e.resolve(t),o=r.depth;;o--){var i=void 0,a=void 0,s=r.index(o);if(o==r.depth?(i=r.nodeBefore,a=r.nodeAfter):n>0?(i=r.node(o+1),s++,a=r.node(o).maybeChild(s)):(i=r.node(o).maybeChild(s-1),a=r.node(o+1)),i&&!i.isTextblock&&P(i,a)&&r.node(o).canReplace(s,s+1))return t;if(0==o)break;t=n<0?r.before(o):r.after(o)}}function H(e,t,n){var r=new w(t-n,t+n,l.Slice.empty,!0);e.step(r)}function F(e,t,n){var r=e.resolve(t);if(!n.content.size)return t;for(var o=n.content,i=0;i<n.openStart;i++)o=o.firstChild.content;for(var a=1;a<=(0==n.openStart&&n.size?2:1);a++)for(var s=r.depth;s>=0;s--){var l=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,u=r.index(s)+(l>0?1:0),c=r.node(s),d=!1;if(1==a)d=c.canReplace(u,u,o);else{var f=c.contentMatchAt(u).findWrapping(o.firstChild.type);d=f&&c.canReplaceWith(u,u,f[0])}if(d)return 0==l?r.pos:l<0?r.before(s+1):r.after(s+1)}return null}function V(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:l.Slice.empty;if(t==n&&!r.size)return null;var o=e.resolve(t),i=e.resolve(n);return z(o,i,r)?new w(t,n,r):new B(o,i,r).fit()}function z(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}m.jsonID("replaceAround",k);var B=function(){function e(t,n,r){Object(a.a)(this,e),this.$from=t,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=l.Fragment.empty;for(var o=0;o<=t.depth;o++){var i=t.node(o);this.frontier.push({type:i.type,match:i.contentMatchAt(t.indexAfter(o))})}for(var s=t.depth;s>0;s--)this.placed=l.Fragment.from(t.node(s).copy(this.placed))}return Object(s.a)(e,[{key:"depth",get:function(){return this.frontier.length-1}},{key:"fit",value:function(){for(;this.unplaced.size;){var e=this.findFittable();e?this.placeNodes(e):this.openMore()||this.dropNode()}var t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,o=this.close(t<0?this.$to:r.doc.resolve(t));if(!o)return null;for(var i=this.placed,a=r.depth,s=o.depth;a&&s&&1==i.childCount;)i=i.firstChild.content,a--,s--;var u=new l.Slice(i,a,s);return t>-1?new k(r.pos,t,this.$to.pos,this.$to.end(),u,n):u.size||r.pos!=this.$to.pos?new w(r.pos,o.pos,u):null}},{key:"findFittable",value:function(){for(var e=1;e<=2;e++)for(var t=this.unplaced.openStart;t>=0;t--)for(var n=null,r=(t?(n=$(this.unplaced.content,t-1).firstChild).content:this.unplaced.content).firstChild,o=this.depth;o>=0;o--){var i=this.frontier[o],a=i.type,s=i.match,u=void 0,c=null;if(1==e&&(r?s.matchType(r.type)||(c=s.fillBefore(l.Fragment.from(r),!1)):n&&a.compatibleContent(n.type)))return{sliceDepth:t,frontierDepth:o,parent:n,inject:c};if(2==e&&r&&(u=s.findWrapping(r.type)))return{sliceDepth:t,frontierDepth:o,parent:n,wrap:u};if(n&&s.matchType(n.type))break}}},{key:"openMore",value:function(){var e=this.unplaced,t=e.content,n=e.openStart,r=e.openEnd,o=$(t,n);return!(!o.childCount||o.firstChild.isLeaf)&&(this.unplaced=new l.Slice(t,n+1,Math.max(r,o.size+n>=t.size-r?n+1:0)),!0)}},{key:"dropNode",value:function(){var e=this.unplaced,t=e.content,n=e.openStart,r=e.openEnd,o=$(t,n);if(o.childCount<=1&&n>0){var i=t.size-n<=n+o.size;this.unplaced=new l.Slice(_(t,n-1,1),n-1,i?n-1:r)}else this.unplaced=new l.Slice(_(t,n,1),n,r)}},{key:"placeNodes",value:function(e){for(var t=e.sliceDepth,n=e.frontierDepth,r=e.parent,o=e.inject,i=e.wrap;this.depth>n;)this.closeFrontierNode();if(i)for(var a=0;a<i.length;a++)this.openFrontierNode(i[a]);var s=this.unplaced,u=r?r.content:s.content,c=s.openStart-t,d=0,f=[],p=this.frontier[n],h=p.match,m=p.type;if(o){for(a=0;a<o.childCount;a++)f.push(o.child(a));h=h.matchFragment(o)}for(var v=u.size+t-(s.content.size-s.openEnd);d<u.childCount;){var g=u.child(d),y=h.matchType(g.type);if(!y)break;(++d>1||0==c||g.content.size)&&(h=y,f.push(q(g.mark(m.allowedMarks(g.marks)),1==d?c:0,d==u.childCount?v:-1)))}var b=d==u.childCount;b||(v=-1),this.placed=I(this.placed,n,l.Fragment.from(f)),this.frontier[n].match=h,b&&v<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(var w=0,k=u;w<v;w++){var x=k.lastChild;this.frontier.push({type:x.type,match:x.contentMatchAt(x.childCount)}),k=x.content}this.unplaced=b?0==t?l.Slice.empty:new l.Slice(_(s.content,t-1,1),t-1,v<0?s.openEnd:t-1):new l.Slice(_(s.content,t,d),s.openStart,s.openEnd)}},{key:"mustMoveInline",value:function(){if(!this.$to.parent.isTextblock)return-1;var e,t=this.frontier[this.depth];if(!t.type.isTextblock||!W(this.$to,this.$to.depth,t.type,t.match,!1)||this.$to.depth==this.depth&&(e=this.findCloseLevel(this.$to))&&e.depth==this.depth)return-1;for(var n=this.$to.depth,r=this.$to.after(n);n>1&&r==this.$to.end(--n);)++r;return r}},{key:"findCloseLevel",value:function(e){e:for(var t=Math.min(this.depth,e.depth);t>=0;t--){var n=this.frontier[t],r=n.match,o=n.type,i=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),a=W(e,t,o,r,i);if(a){for(var s=t-1;s>=0;s--){var l=this.frontier[s],u=l.match,c=W(e,s,l.type,u,!0);if(!c||c.childCount)continue e}return{depth:t,fit:a,move:i?e.doc.resolve(e.after(t+1)):e}}}}},{key:"close",value:function(e){var t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=I(this.placed,t.depth,t.fit)),e=t.move;for(var n=t.depth+1;n<=e.depth;n++){var r=e.node(n),o=r.type.contentMatch.fillBefore(r.content,!0,e.index(n));this.openFrontierNode(r.type,r.attrs,o)}return e}},{key:"openFrontierNode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2?arguments[2]:void 0,r=this.frontier[this.depth];r.match=r.match.matchType(e),this.placed=I(this.placed,this.depth,l.Fragment.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})}},{key:"closeFrontierNode",value:function(){var e=this.frontier.pop().match.fillBefore(l.Fragment.empty,!0);e.childCount&&(this.placed=I(this.placed,this.frontier.length,e))}}]),e}();function _(e,t,n){return 0==t?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(_(e.firstChild.content,t-1,n)))}function I(e,t,n){return 0==t?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(I(e.lastChild.content,t-1,n)))}function $(e,t){for(var n=0;n<t;n++)e=e.firstChild.content;return e}function q(e,t,n){if(t<=0)return e;var r=e.content;return t>1&&(r=r.replaceChild(0,q(r.firstChild,t-1,1==r.childCount?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(l.Fragment.empty,!0)))),e.copy(r)}function W(e,t,n,r,o){var i=e.node(t),a=o?e.indexAfter(t):e.index(t);if(a==i.childCount&&!n.compatibleContent(i.type))return null;var s=r.fillBefore(i.content,!0,a);return s&&!function(e,t,n){for(var r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}(n,i.content,a)?s:null}function U(e){return e.spec.defining||e.spec.definingForContent}function K(e,t,n,r,o){if(t<n){var i=e.firstChild;e=e.replaceChild(0,i.copy(K(i.content,t+1,n,r,i)))}if(t>r){var a=o.contentMatchAt(0),s=a.fillBefore(e).append(e);e=s.append(a.matchFragment(s).fillBefore(l.Fragment.empty,!0))}return e}function G(e,t){for(var n=[],r=Math.min(e.depth,t.depth);r>=0;r--){var o=e.start(r);if(o<e.pos-(e.depth-r)||t.end(r)>t.pos+(t.depth-r)||e.node(r).type.spec.isolating||t.node(r).type.spec.isolating)break;(o==t.start(r)||r==e.depth&&r==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&r&&t.start(r-1)==o-1)&&n.push(r)}return n}var J=Error;((J=function e(t){var n=Error.call(this,t);return n.__proto__=e.prototype,n}).prototype=Object.create(Error.prototype)).constructor=J,J.prototype.name="TransformError";var Y=function(){function e(t){Object(a.a)(this,e),this.doc=t,this.steps=[],this.docs=[],this.mapping=new p}return Object(s.a)(e,[{key:"before",get:function(){return this.docs.length?this.docs[0]:this.doc}},{key:"step",value:function(e){var t=this.maybeStep(e);if(t.failed)throw new J(t.failed);return this}},{key:"maybeStep",value:function(e){var t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}},{key:"docChanged",get:function(){return this.steps.length>0}},{key:"addStep",value:function(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}},{key:"replace",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.Slice.empty,r=V(this.doc,e,t,n);return r&&this.step(r),this}},{key:"replaceWith",value:function(e,t,n){return this.replace(e,t,new l.Slice(l.Fragment.from(n),0,0))}},{key:"delete",value:function(e,t){return this.replace(e,t,l.Slice.empty)}},{key:"insert",value:function(e,t){return this.replaceWith(e,e,t)}},{key:"replaceRange",value:function(e,t,n){return function(e,t,n,r){if(!r.size)return e.deleteRange(t,n);var o=e.doc.resolve(t),i=e.doc.resolve(n);if(z(o,i,r))return e.step(new w(t,n,r));var a=G(o,e.doc.resolve(n));0==a[a.length-1]&&a.pop();var s=-(o.depth+1);a.unshift(s);for(var u=o.depth,c=o.pos-1;u>0;u--,c--){var d=o.node(u).type.spec;if(d.defining||d.definingAsContext||d.isolating)break;a.indexOf(u)>-1?s=u:o.before(u)==c&&a.splice(1,0,-u)}for(var f=a.indexOf(s),p=[],h=r.openStart,m=r.content,v=0;;v++){var g=m.firstChild;if(p.push(g),v==r.openStart)break;m=g.content}for(var y=h-1;y>=0;y--){var b=p[y].type,k=U(b);if(k&&o.node(f).type!=b)h=y;else if(k||!b.isTextblock)break}for(var x=r.openStart;x>=0;x--){var O=(x+h+1)%(r.openStart+1),S=p[O];if(S)for(var C=0;C<a.length;C++){var j=a[(C+f)%a.length],D=!0;j<0&&(D=!1,j=-j);var E=o.node(j-1),A=o.index(j-1);if(E.canReplaceWith(A,A,S.type,S.marks))return e.replace(o.before(j),D?i.after(j):n,new l.Slice(K(r.content,0,r.openStart,O),O,r.openEnd))}}for(var M=e.steps.length,T=a.length-1;T>=0&&(e.replace(t,n,r),!(e.steps.length>M));T--){var L=a[T];L<0||(t=o.before(L),n=i.after(L))}}(this,e,t,n),this}},{key:"replaceRangeWith",value:function(e,t,n){return function(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){var o=function(e,t,n){var r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(0==r.parentOffset)for(var o=r.depth-1;o>=0;o--){var i=r.index(o);if(r.node(o).canReplaceWith(i,i,n))return r.before(o+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(var a=r.depth-1;a>=0;a--){var s=r.indexAfter(a);if(r.node(a).canReplaceWith(s,s,n))return r.after(a+1);if(s<r.node(a).childCount)return null}return null}(e.doc,t,r.type);null!=o&&(t=n=o)}e.replaceRange(t,n,new l.Slice(l.Fragment.from(r),0,0))}(this,e,t,n),this}},{key:"deleteRange",value:function(e,t){return function(e,t,n){for(var r=e.doc.resolve(t),o=e.doc.resolve(n),i=G(r,o),a=0;a<i.length;a++){var s=i[a],l=a==i.length-1;if(l&&0==s||r.node(s).type.contentMatch.validEnd)return e.delete(r.start(s),o.end(s));if(s>0&&(l||r.node(s-1).canReplace(r.index(s-1),o.indexAfter(s-1))))return e.delete(r.before(s),o.after(s))}for(var u=1;u<=r.depth&&u<=o.depth;u++)if(t-r.start(u)==r.depth-u&&n>r.end(u)&&o.end(u)-n!=o.depth-u)return e.delete(r.before(u),n);e.delete(t,n)}(this,e,t),this}},{key:"lift",value:function(e,t){return function(e,t,n){for(var r=t.$from,o=t.$to,i=t.depth,a=r.before(i+1),s=o.after(i+1),u=a,c=s,d=l.Fragment.empty,f=0,p=i,h=!1;p>n;p--)h||r.index(p)>0?(h=!0,d=l.Fragment.from(r.node(p).copy(d)),f++):u--;for(var m=l.Fragment.empty,v=0,g=i,y=!1;g>n;g--)y||o.after(g+1)<o.end(g)?(y=!0,m=l.Fragment.from(o.node(g).copy(m)),v++):c++;e.step(new k(u,c,a,s,new l.Slice(d.append(m),f,v),d.size-f,!0))}(this,e,t),this}},{key:"join",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return H(this,e,t),this}},{key:"wrap",value:function(e,t){return function(e,t,n){for(var r=l.Fragment.empty,o=n.length-1;o>=0;o--){if(r.size){var i=n[o].type.contentMatch.matchFragment(r);if(!i||!i.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=l.Fragment.from(n[o].type.create(n[o].attrs,r))}var a=t.start,s=t.end;e.step(new k(a,s,a,s,new l.Slice(r,0,0),n.length,!0))}(this,e,t),this}},{key:"setBlockType",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return A(this,e,t,n,r),this}},{key:"setNodeMarkup",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];return M(this,e,t,n,r),this}},{key:"split",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2?arguments[2]:void 0;return L(this,e,t,n),this}},{key:"addMark",value:function(e,t,n){return function(e,t,n,r){var o,i,a=[],s=[];e.doc.nodesBetween(t,n,(function(e,l,u){if(e.isInline){var c=e.marks;if(!r.isInSet(c)&&u.type.allowsMarkType(r.type)){for(var d=Math.max(l,t),f=Math.min(l+e.nodeSize,n),p=r.addToSet(c),h=0;h<c.length;h++)c[h].isInSet(p)||(o&&o.to==d&&o.mark.eq(c[h])?o.to=f:a.push(o=new b(d,f,c[h])));i&&i.to==d?i.to=f:s.push(i=new y(d,f,r))}}})),a.forEach((function(t){return e.step(t)})),s.forEach((function(t){return e.step(t)}))}(this,e,t,n),this}},{key:"removeMark",value:function(e,t,n){return function(e,t,n,r){var o=[],i=0;e.doc.nodesBetween(t,n,(function(e,a){if(e.isInline){i++;var s=null;if(r instanceof l.MarkType)for(var u,c=e.marks;u=r.isInSet(c);)(s||(s=[])).push(u),c=u.removeFromSet(c);else r?r.isInSet(e.marks)&&(s=[r]):s=e.marks;if(s&&s.length)for(var d=Math.min(a+e.nodeSize,n),f=0;f<s.length;f++){for(var p=s[f],h=void 0,m=0;m<o.length;m++){var v=o[m];v.step==i-1&&p.eq(o[m].style)&&(h=v)}h?(h.to=d,h.step=i):o.push({style:p,from:Math.max(a,t),to:d,step:i})}}})),o.forEach((function(t){return e.step(new b(t.from,t.to,t.style))}))}(this,e,t,n),this}},{key:"clearIncompatible",value:function(e,t,n){return function(e,t,n){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n.contentMatch,o=e.doc.nodeAt(t),i=[],a=t+1,s=0;s<o.childCount;s++){var u=o.child(s),c=a+u.nodeSize,d=r.matchType(u.type);if(d){r=d;for(var f=0;f<u.marks.length;f++)n.allowsMarkType(u.marks[f].type)||e.step(new b(a,c,u.marks[f]))}else i.push(new w(a,c,l.Slice.empty));a=c}if(!r.validEnd){var p=r.fillBefore(l.Fragment.empty,!0);e.replace(a,a,new l.Slice(p,0,0))}for(var h=i.length-1;h>=0;h--)e.step(i[h])}(this,e,t,n),this}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(39);var o=n(36);function i(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Object(o.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(31);function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Object(r.a)(e,t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(12),o=n(44),i=n(45),a=n(17);function s(e,t){if(t&&("object"===Object(i.a)(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Object(a.a)(e)}function l(e){var t=Object(o.a)();return function(){var n,o=Object(r.a)(e);if(t){var i=Object(r.a)(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return s(this,n)}}},function(e,t,n){"use strict";function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(12);function o(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Object(r.a)(e)););return e}function i(){return i="undefined"!==typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=o(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},i.apply(this,arguments)}},function(e,t,n){"use strict";e.exports=n(102)},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(36);function o(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Object(r.a)(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){l=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(l)throw a}}}}},,function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(o){return!1}}()?Object.assign:function(e,t){for(var n,s,l=a(e),u=1;u<arguments.length;u++){for(var c in n=Object(arguments[u]))o.call(n,c)&&(l[c]=n[c]);if(r){s=r(n);for(var d=0;d<s.length;d++)i.call(n,s[d])&&(l[s[d]]=n[s[d]])}}return l}},function(e,t,n){"use strict";n.r(t),n.d(t,"get",(function(){return u})),n.d(t,"createParser",(function(){return c})),n.d(t,"createStyleFunction",(function(){return p})),n.d(t,"compose",(function(){return m})),n.d(t,"system",(function(){return h})),n.d(t,"margin",(function(){return _})),n.d(t,"padding",(function(){return I})),n.d(t,"space",(function(){return $})),n.d(t,"color",(function(){return b})),n.d(t,"layout",(function(){return v})),n.d(t,"typography",(function(){return k})),n.d(t,"flexbox",(function(){return O})),n.d(t,"border",(function(){return A})),n.d(t,"background",(function(){return L})),n.d(t,"position",(function(){return R})),n.d(t,"grid",(function(){return j})),n.d(t,"shadow",(function(){return q})),n.d(t,"boxShadow",(function(){return W})),n.d(t,"textShadow",(function(){return W})),n.d(t,"variant",(function(){return K})),n.d(t,"buttonStyle",(function(){return G})),n.d(t,"textStyle",(function(){return J})),n.d(t,"colorStyle",(function(){return Y})),n.d(t,"borders",(function(){return M})),n.d(t,"width",(function(){return Z})),n.d(t,"height",(function(){return X})),n.d(t,"minWidth",(function(){return Q})),n.d(t,"minHeight",(function(){return ee})),n.d(t,"maxWidth",(function(){return te})),n.d(t,"maxHeight",(function(){return ne})),n.d(t,"size",(function(){return re})),n.d(t,"verticalAlign",(function(){return oe})),n.d(t,"display",(function(){return ie})),n.d(t,"overflow",(function(){return ae})),n.d(t,"overflowX",(function(){return se})),n.d(t,"overflowY",(function(){return le})),n.d(t,"opacity",(function(){return ue})),n.d(t,"fontSize",(function(){return ce})),n.d(t,"fontFamily",(function(){return de})),n.d(t,"fontWeight",(function(){return fe})),n.d(t,"lineHeight",(function(){return pe})),n.d(t,"textAlign",(function(){return he})),n.d(t,"fontStyle",(function(){return me})),n.d(t,"letterSpacing",(function(){return ve})),n.d(t,"alignItems",(function(){return ge})),n.d(t,"alignContent",(function(){return ye})),n.d(t,"justifyItems",(function(){return be})),n.d(t,"justifyContent",(function(){return we})),n.d(t,"flexWrap",(function(){return ke})),n.d(t,"flexDirection",(function(){return xe})),n.d(t,"flex",(function(){return Oe})),n.d(t,"flexGrow",(function(){return Se})),n.d(t,"flexShrink",(function(){return Ce})),n.d(t,"flexBasis",(function(){return je})),n.d(t,"justifySelf",(function(){return De})),n.d(t,"alignSelf",(function(){return Ee})),n.d(t,"order",(function(){return Ae})),n.d(t,"gridGap",(function(){return Me})),n.d(t,"gridColumnGap",(function(){return Te})),n.d(t,"gridRowGap",(function(){return Le})),n.d(t,"gridColumn",(function(){return Ne})),n.d(t,"gridRow",(function(){return Pe})),n.d(t,"gridAutoFlow",(function(){return Re})),n.d(t,"gridAutoColumns",(function(){return He})),n.d(t,"gridAutoRows",(function(){return Fe})),n.d(t,"gridTemplateColumns",(function(){return Ve})),n.d(t,"gridTemplateRows",(function(){return ze})),n.d(t,"gridTemplateAreas",(function(){return Be})),n.d(t,"gridArea",(function(){return _e})),n.d(t,"borderWidth",(function(){return Ie})),n.d(t,"borderStyle",(function(){return $e})),n.d(t,"borderColor",(function(){return qe})),n.d(t,"borderTop",(function(){return We})),n.d(t,"borderRight",(function(){return Ue})),n.d(t,"borderBottom",(function(){return Ke})),n.d(t,"borderLeft",(function(){return Ge})),n.d(t,"borderRadius",(function(){return Je})),n.d(t,"backgroundImage",(function(){return Ye})),n.d(t,"backgroundSize",(function(){return Ze})),n.d(t,"backgroundPosition",(function(){return Xe})),n.d(t,"backgroundRepeat",(function(){return Qe})),n.d(t,"zIndex",(function(){return et})),n.d(t,"top",(function(){return tt})),n.d(t,"right",(function(){return nt})),n.d(t,"bottom",(function(){return rt})),n.d(t,"left",(function(){return ot})),n.d(t,"style",(function(){return it}));var r=n(19),o=n.n(r),i=function(e,t){var n=o()({},e,t);for(var r in e){var i;e[r]&&"object"===typeof t[r]&&o()(n,((i={})[r]=o()(e[r],t[r]),i))}return n},a={breakpoints:[40,52,64].map((function(e){return e+"em"}))},s=function(e){return"@media screen and (min-width: "+e+")"},l=function(e,t){return u(t,e,e)},u=function(e,t,n,r,o){for(t=t&&t.split?t.split("."):[t],r=0;r<t.length;r++)e=e?e[t[r]]:o;return e===o?n:e},c=function e(t){var n={},r=function(e){var r={},l=!1,c=e.theme&&e.theme.disableStyledSystemCache;for(var p in e)if(t[p]){var h=t[p],m=e[p],v=u(e.theme,h.scale,h.defaults);if("object"!==typeof m)o()(r,h(m,v,e));else{if(n.breakpoints=!c&&n.breakpoints||u(e.theme,"breakpoints",a.breakpoints),Array.isArray(m)){n.media=!c&&n.media||[null].concat(n.breakpoints.map(s)),r=i(r,d(n.media,h,v,m,e));continue}null!==m&&(r=i(r,f(n.breakpoints,h,v,m,e)),l=!0)}}return l&&(r=function(e){var t={};return Object.keys(e).sort((function(e,t){return e.localeCompare(t,void 0,{numeric:!0,sensitivity:"base"})})).forEach((function(n){t[n]=e[n]})),t}(r)),r};r.config=t,r.propNames=Object.keys(t),r.cache=n;var l=Object.keys(t).filter((function(e){return"config"!==e}));return l.length>1&&l.forEach((function(n){var o;r[n]=e(((o={})[n]=t[n],o))})),r},d=function(e,t,n,r,i){var a={};return r.slice(0,e.length).forEach((function(r,s){var l,u=e[s],c=t(r,n,i);u?o()(a,((l={})[u]=o()({},a[u],c),l)):o()(a,c)})),a},f=function(e,t,n,r,i){var a={};for(var l in r){var u=e[l],c=t(r[l],n,i);if(u){var d,f=s(u);o()(a,((d={})[f]=o()({},a[f],c),d))}else o()(a,c)}return a},p=function(e){var t=e.properties,n=e.property,r=e.scale,o=e.transform,i=void 0===o?l:o,a=e.defaultScale;t=t||[n];var s=function(e,n,r){var o={},a=i(e,n,r);if(null!==a)return t.forEach((function(e){o[e]=a})),o};return s.scale=r,s.defaults=a,s},h=function(e){void 0===e&&(e={});var t={};return Object.keys(e).forEach((function(n){var r=e[n];t[n]=!0!==r?"function"!==typeof r?p(r):r:p({property:n,scale:n})})),c(t)},m=function(){for(var e={},t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];n.forEach((function(t){t&&t.config&&o()(e,t.config)}));var i=c(e);return i},v=h({width:{property:"width",scale:"sizes",transform:function(e,t){return u(t,e,!function(e){return"number"===typeof e&&!isNaN(e)}(e)||e>1?e:100*e+"%")}},height:{property:"height",scale:"sizes"},minWidth:{property:"minWidth",scale:"sizes"},minHeight:{property:"minHeight",scale:"sizes"},maxWidth:{property:"maxWidth",scale:"sizes"},maxHeight:{property:"maxHeight",scale:"sizes"},size:{properties:["width","height"],scale:"sizes"},overflow:!0,overflowX:!0,overflowY:!0,display:!0,verticalAlign:!0}),g=v,y={color:{property:"color",scale:"colors"},backgroundColor:{property:"backgroundColor",scale:"colors"},opacity:!0};y.bg=y.backgroundColor;var b=h(y),w=b,k=h({fontFamily:{property:"fontFamily",scale:"fonts"},fontSize:{property:"fontSize",scale:"fontSizes",defaultScale:[12,14,16,20,24,32,48,64,72]},fontWeight:{property:"fontWeight",scale:"fontWeights"},lineHeight:{property:"lineHeight",scale:"lineHeights"},letterSpacing:{property:"letterSpacing",scale:"letterSpacings"},textAlign:!0,fontStyle:!0}),x=k,O=h({alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:!0,flex:!0,flexGrow:!0,flexShrink:!0,flexBasis:!0,justifySelf:!0,alignSelf:!0,order:!0}),S=O,C={space:[0,4,8,16,32,64,128,256,512]},j=h({gridGap:{property:"gridGap",scale:"space",defaultScale:C.space},gridColumnGap:{property:"gridColumnGap",scale:"space",defaultScale:C.space},gridRowGap:{property:"gridRowGap",scale:"space",defaultScale:C.space},gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridAutoRows:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0}),D=j,E={border:{property:"border",scale:"borders"},borderWidth:{property:"borderWidth",scale:"borderWidths"},borderStyle:{property:"borderStyle",scale:"borderStyles"},borderColor:{property:"borderColor",scale:"colors"},borderRadius:{property:"borderRadius",scale:"radii"},borderTop:{property:"borderTop",scale:"borders"},borderTopLeftRadius:{property:"borderTopLeftRadius",scale:"radii"},borderTopRightRadius:{property:"borderTopRightRadius",scale:"radii"},borderRight:{property:"borderRight",scale:"borders"},borderBottom:{property:"borderBottom",scale:"borders"},borderBottomLeftRadius:{property:"borderBottomLeftRadius",scale:"radii"},borderBottomRightRadius:{property:"borderBottomRightRadius",scale:"radii"},borderLeft:{property:"borderLeft",scale:"borders"},borderX:{properties:["borderLeft","borderRight"],scale:"borders"},borderY:{properties:["borderTop","borderBottom"],scale:"borders"},borderTopWidth:{property:"borderTopWidth",scale:"borderWidths"},borderTopColor:{property:"borderTopColor",scale:"colors"},borderTopStyle:{property:"borderTopStyle",scale:"borderStyles"}};E.borderTopLeftRadius={property:"borderTopLeftRadius",scale:"radii"},E.borderTopRightRadius={property:"borderTopRightRadius",scale:"radii"},E.borderBottomWidth={property:"borderBottomWidth",scale:"borderWidths"},E.borderBottomColor={property:"borderBottomColor",scale:"colors"},E.borderBottomStyle={property:"borderBottomStyle",scale:"borderStyles"},E.borderBottomLeftRadius={property:"borderBottomLeftRadius",scale:"radii"},E.borderBottomRightRadius={property:"borderBottomRightRadius",scale:"radii"},E.borderLeftWidth={property:"borderLeftWidth",scale:"borderWidths"},E.borderLeftColor={property:"borderLeftColor",scale:"colors"},E.borderLeftStyle={property:"borderLeftStyle",scale:"borderStyles"},E.borderRightWidth={property:"borderRightWidth",scale:"borderWidths"},E.borderRightColor={property:"borderRightColor",scale:"colors"},E.borderRightStyle={property:"borderRightStyle",scale:"borderStyles"};var A=h(E),M=A,T={background:!0,backgroundImage:!0,backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0};T.bgImage=T.backgroundImage,T.bgSize=T.backgroundSize,T.bgPosition=T.backgroundPosition,T.bgRepeat=T.backgroundRepeat;var L=h(T),N=L,P={space:[0,4,8,16,32,64,128,256,512]},R=h({position:!0,zIndex:{property:"zIndex",scale:"zIndices"},top:{property:"top",scale:"space",defaultScale:P.space},right:{property:"right",scale:"space",defaultScale:P.space},bottom:{property:"bottom",scale:"space",defaultScale:P.space},left:{property:"left",scale:"space",defaultScale:P.space}}),H=R,F={space:[0,4,8,16,32,64,128,256,512]},V=function(e){return"number"===typeof e&&!isNaN(e)},z=function(e,t){if(!V(e))return u(t,e,e);var n=e<0,r=Math.abs(e),o=u(t,r,r);return V(o)?o*(n?-1:1):n?"-"+o:o},B={};B.margin={margin:{property:"margin",scale:"space",transform:z,defaultScale:F.space},marginTop:{property:"marginTop",scale:"space",transform:z,defaultScale:F.space},marginRight:{property:"marginRight",scale:"space",transform:z,defaultScale:F.space},marginBottom:{property:"marginBottom",scale:"space",transform:z,defaultScale:F.space},marginLeft:{property:"marginLeft",scale:"space",transform:z,defaultScale:F.space},marginX:{properties:["marginLeft","marginRight"],scale:"space",transform:z,defaultScale:F.space},marginY:{properties:["marginTop","marginBottom"],scale:"space",transform:z,defaultScale:F.space}},B.margin.m=B.margin.margin,B.margin.mt=B.margin.marginTop,B.margin.mr=B.margin.marginRight,B.margin.mb=B.margin.marginBottom,B.margin.ml=B.margin.marginLeft,B.margin.mx=B.margin.marginX,B.margin.my=B.margin.marginY,B.padding={padding:{property:"padding",scale:"space",defaultScale:F.space},paddingTop:{property:"paddingTop",scale:"space",defaultScale:F.space},paddingRight:{property:"paddingRight",scale:"space",defaultScale:F.space},paddingBottom:{property:"paddingBottom",scale:"space",defaultScale:F.space},paddingLeft:{property:"paddingLeft",scale:"space",defaultScale:F.space},paddingX:{properties:["paddingLeft","paddingRight"],scale:"space",defaultScale:F.space},paddingY:{properties:["paddingTop","paddingBottom"],scale:"space",defaultScale:F.space}},B.padding.p=B.padding.padding,B.padding.pt=B.padding.paddingTop,B.padding.pr=B.padding.paddingRight,B.padding.pb=B.padding.paddingBottom,B.padding.pl=B.padding.paddingLeft,B.padding.px=B.padding.paddingX,B.padding.py=B.padding.paddingY;var _=h(B.margin),I=h(B.padding),$=m(_,I),q=h({boxShadow:{property:"boxShadow",scale:"shadows"},textShadow:{property:"textShadow",scale:"shadows"}}),W=q,U=n(42),K=function(e){var t,n,r=e.scale,o=e.prop,i=void 0===o?"variant":o,a=e.variants,s=void 0===a?{}:a,l=e.key;n=Object.keys(s).length?function(e,t,n){return Object(U.default)(u(t,e,null))(n.theme)}:function(e,t){return u(t,e,null)},n.scale=r||l,n.defaults=s;var d=((t={})[i]=n,t);return c(d)},G=K({key:"buttons"}),J=K({key:"textStyles",prop:"textStyle"}),Y=K({key:"colorStyles",prop:"colors"}),Z=g.width,X=g.height,Q=g.minWidth,ee=g.minHeight,te=g.maxWidth,ne=g.maxHeight,re=g.size,oe=g.verticalAlign,ie=g.display,ae=g.overflow,se=g.overflowX,le=g.overflowY,ue=w.opacity,ce=x.fontSize,de=x.fontFamily,fe=x.fontWeight,pe=x.lineHeight,he=x.textAlign,me=x.fontStyle,ve=x.letterSpacing,ge=S.alignItems,ye=S.alignContent,be=S.justifyItems,we=S.justifyContent,ke=S.flexWrap,xe=S.flexDirection,Oe=S.flex,Se=S.flexGrow,Ce=S.flexShrink,je=S.flexBasis,De=S.justifySelf,Ee=S.alignSelf,Ae=S.order,Me=D.gridGap,Te=D.gridColumnGap,Le=D.gridRowGap,Ne=D.gridColumn,Pe=D.gridRow,Re=D.gridAutoFlow,He=D.gridAutoColumns,Fe=D.gridAutoRows,Ve=D.gridTemplateColumns,ze=D.gridTemplateRows,Be=D.gridTemplateAreas,_e=D.gridArea,Ie=M.borderWidth,$e=M.borderStyle,qe=M.borderColor,We=M.borderTop,Ue=M.borderRight,Ke=M.borderBottom,Ge=M.borderLeft,Je=M.borderRadius,Ye=N.backgroundImage,Ze=N.backgroundSize,Xe=N.backgroundPosition,Qe=N.backgroundRepeat,et=H.zIndex,tt=H.top,nt=H.right,rt=H.bottom,ot=H.left,it=function(e){var t=e.prop,n=e.cssProperty,r=e.alias,o=e.key,i=e.transformValue,a=e.scale,s=e.properties,l={};return l[t]=p({properties:s,property:n||t,scale:o,defaultScale:a,transform:i}),r&&(l[r]=l[t]),c(l)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Flex=t.Box=void 0;l(n(14));var r=l(n(58)),o=n(20),i=function(e){if(e&&e.__esModule)return e;var t=s();if(t&&t.has(e))return t.get(e);var n={};if(null!=e){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}}n.default=e,t&&t.set(e,n);return n}(n(42)),a=l(n(43));function s(){if("function"!==typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function l(e){return e&&e.__esModule?e:{default:e}}var u=(0,r.default)("div",{shouldForwardProp:a.default})({boxSizing:"border-box",margin:0,minWidth:0},(function(e){return(0,i.default)(e.__css)(e.theme)}),(function(e){var t=e.theme,n=e.variant,r=e.tx,o=void 0===r?"variants":r;return(0,i.default)((0,i.get)(t,o+"."+n,(0,i.get)(t,n)))(t)}),(function(e){return(0,i.default)(e.sx)(e.theme)}),(function(e){return e.css}),(0,o.compose)(o.space,o.layout,o.typography,o.color,o.flexbox));t.Box=u;var c=(0,r.default)(u)({display:"flex"});t.Flex=c},,function(e,t,n){"use strict";e.exports=n(90)},,function(e,t,n){"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(80)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o=n(3),i=function(e,t){return function(n){Array.isArray(e)||(e=[e]);for(var r=0,o=e.length;r<o;r++){var i=x(e[r])(n.selection);if(i){var a=p(i.pos,t)(n);if(a!==n)return a}}return n}},a=function(e){return function(t){if(c(t.selection)){var n=t.selection,i=n.$from,a=n.$to;if(e instanceof o.Fragment&&i.parent.canReplace(i.index(),i.indexAfter(),e)||i.parent.canReplaceWith(i.index(),i.indexAfter(),e.type))return f(t.replaceWith(i.pos,a.pos,e).setSelection(new r.NodeSelection(t.doc.resolve(i.pos))))}return t}},s=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return function(n){var o=r.Selection.findFrom(n.doc.resolve(e),t,!0);return o?n.setSelection(o):n}},l=function(e){return e.type&&e.type.spec.selectable},u=function(e,t,n){return function(e){return l(e)&&e.type.isLeaf}(e)?n.setSelection(new r.NodeSelection(n.doc.resolve(t))):s(t)(n)},c=function(e){return e instanceof r.NodeSelection},d=function(e,t){return Array.isArray(e)&&e.indexOf(t.type)>-1||t.type===e},f=function(e){return Object.assign(Object.create(e),e).setTime(Date.now())},p=function(e,t){return function(n){var r=n.doc.nodeAt(e),o=n.doc.resolve(e);if(h(o,t)){var i=(n=n.replaceWith(e,e+r.nodeSize,t)).selection.$from.pos-1;return n=s(Math.max(i,0),-1)(n),n=s(n.selection.$from.start())(n),f(n)}return n}},h=function(e,t){var n=e.node(e.depth);return n&&n.type.validContent(t instanceof o.Fragment?t:o.Fragment.from(t))},m=function(e){return function(t){var n=t.doc.nodeAt(e);return f(t.delete(e,e+n.nodeSize))}},v=function(e,t){var n=e.index();return t instanceof o.Fragment?e.parent.canReplace(n,n,t):t instanceof o.Node&&e.parent.canReplaceWith(n,n,t.type)},g=function(e){return!e||"paragraph"===e.type.name&&2===e.nodeSize},y=function(e){return function(t){var n=t.$from;return b(n,e)}},b=function(e,t){for(var n=e.depth;n>0;n--){var r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}},w=function(e,t){return function(n){var r=y(e)(n);if(r)return S(r.pos,t)}},k=function(e){return function(t){return!!y(e)(t)}},x=function(e){return function(t){return y((function(t){return d(e,t)}))(t)}},O=function(e){var t=e.$from.nodeBefore,n=r.Selection.findFrom(e.$from,-1);if(n&&t){var o=x(t.type)(n);return o?o.pos:n.$from.pos}},S=function(e,t){var n=t(e),r=n.node.childNodes[n.offset];return n.node.nodeType===Node.TEXT_NODE?n.node.parentNode:r&&r.nodeType!==Node.TEXT_NODE?r:n.node},C=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!e)throw new Error('Invalid "node" parameter');var n=[];return e.descendants((function(e,r){if(n.push({node:e,pos:r}),!t)return!1})),n},j=function(e,t,n){if(!e)throw new Error('Invalid "node" parameter');if(!t)throw new Error('Invalid "predicate" parameter');return C(e,n).filter((function(e){return t(e.node)}))},D=function(e,t,n){return j(e,(function(e){return e.type===t}),n)};t.isNodeSelection=c,t.canInsert=v,t.findParentNode=y,t.findParentNodeClosestToPos=b,t.findParentDomRef=w,t.hasParentNode=k,t.findParentNodeOfType=x,t.findParentNodeOfTypeClosestToPos=function(e,t){return b(e,(function(e){return d(t,e)}))},t.hasParentNodeOfType=function(e){return function(t){return k((function(t){return d(e,t)}))(t)}},t.findParentDomRefOfType=function(e,t){return function(n){return w((function(t){return d(e,t)}),t)(n)}},t.findSelectedNodeOfType=function(e){return function(t){if(c(t)){var n=t.node,r=t.$from;if(d(e,n))return{node:n,pos:r.pos,depth:r.depth}}}},t.findPositionOfNodeBefore=O,t.findDomRefAtPos=S,t.flatten=C,t.findChildren=j,t.findTextNodes=function(e,t){return j(e,(function(e){return e.isText}),t)},t.findInlineNodes=function(e,t){return j(e,(function(e){return e.isInline}),t)},t.findBlockNodes=function(e,t){return j(e,(function(e){return e.isBlock}),t)},t.findChildrenByAttr=function(e,t,n){return j(e,(function(e){return!!t(e.attrs)}),n)},t.findChildrenByType=D,t.findChildrenByMark=function(e,t,n){return j(e,(function(e){return t.isInSet(e.marks)}),n)},t.contains=function(e,t){return!!D(e,t).length},t.removeParentNodeOfType=function(e){return function(t){var n=x(e)(t.selection);return n?m(n.pos)(t):t}},t.replaceParentNodeOfType=i,t.removeSelectedNode=function(e){if(c(e.selection)){var t=e.selection.$from.pos,n=e.selection.$to.pos;return f(e.delete(t,n))}return e},t.replaceSelectedNode=a,t.setTextSelection=s,t.safeInsert=function(e,t,n){return function(r){var o="number"===typeof t,s=r.selection.$from,d=o?r.doc.resolve(t):c(r.selection)?r.doc.resolve(s.pos+1):s,p=d.parent;if(c(r.selection)&&n&&r!==(r=a(e)(r)))return r;if(g(p)&&r!==(r=i(p.type,e)(r))){var h=l(e)?d.before(d.depth):d.pos;return u(e,h,r)}if(v(d,e)){r.insert(d.pos,e);var m=o?d.pos:l(e)?r.selection.$anchor.pos-1:r.selection.$anchor.pos;return f(u(e,m,r))}for(var y=d.depth;y>0;y--){var b=d.after(y),w=r.doc.resolve(b);if(v(w,e))return r.insert(b,e),f(u(e,b,r))}return r}},t.setParentNodeMarkup=function(e,t,n,r){return function(o){var i=x(e)(o.selection);return i?f(o.setNodeMarkup(i.pos,t,Object.assign({},i.node.attrs,n),r)):o}},t.selectParentNodeOfType=function(e){return function(t){if(!c(t.selection)){var n=x(e)(t.selection);if(n)return f(t.setSelection(r.NodeSelection.create(t.doc,n.pos)))}return t}},t.removeNodeBefore=function(e){var t=O(e.selection);return"number"===typeof t?m(t)(e):e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)},o={animationIterationCount: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,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},i=n(37),a=/[A-Z]|^ms/g,s=/_EMO_([^_]+?)_([^]*?)_EMO_/g,l=function(e){return 45===e.charCodeAt(1)},u=function(e){return null!=e&&"boolean"!==typeof e},c=Object(i.a)((function(e){return l(e)?e:e.replace(a,"-$&").toLowerCase()})),d=function(e,t){switch(e){case"animation":case"animationName":if("string"===typeof t)return t.replace(s,(function(e,t,n){return p={name:t,styles:n,next:p},t}))}return 1===o[e]||l(e)||"number"!==typeof t||0===t?t:t+"px"};function f(e,t,n,r){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return p={name:n.name,styles:n.styles,next:p},n.name;if(void 0!==n.styles){var o=n.next;if(void 0!==o)for(;void 0!==o;)p={name:o.name,styles:o.styles,next:p},o=o.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=f(e,t,n[o],!1);else for(var i in n){var a=n[i];if("object"!==typeof a)null!=t&&void 0!==t[a]?r+=i+"{"+t[a]+"}":u(a)&&(r+=c(i)+":"+d(i,a)+";");else if(!Array.isArray(a)||"string"!==typeof a[0]||null!=t&&void 0!==t[a[0]]){var s=f(e,t,a,!1);switch(i){case"animation":case"animationName":r+=c(i)+":"+s+";";break;default:r+=i+"{"+s+"}"}}else for(var l=0;l<a.length;l++)u(a[l])&&(r+=c(i)+":"+d(i,a[l])+";")}return r}(e,t,n);case"function":if(void 0!==e){var i=p,a=n(e);return p=i,f(e,t,a,r)}}if(null==t)return n;var s=t[n];return void 0===s||r?n:s}var p,h=/label:\s*([^\s;\n{]+)\s*;/g;var m=function(e,t,n){if(1===e.length&&"object"===typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var o=!0,i="";p=void 0;var a=e[0];null==a||void 0===a.raw?(o=!1,i+=f(n,t,a,!1)):i+=a[0];for(var s=1;s<e.length;s++)i+=f(n,t,e[s],46===i.charCodeAt(i.length-1)),o&&(i+=a[s]);h.lastIndex=0;for(var l,u="";null!==(l=h.exec(i));)u+="-"+l[1];return{name:r(i)+u,styles:i,next:p}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o}));function r(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]):r+=n+" "})),r}var o=function(e,t,n){var r=e.key+"-"+t.name;if(!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles),void 0===e.inserted[t.name]){var o=t;do{e.insert("."+r,o,e.sheet,!0);o=o.next}while(void 0!==o)}}},function(e,t,n){var r;!function(o){var i=/^\s+/,a=/\s+$/,s=0,l=o.round,u=o.min,c=o.max,d=o.random;function f(e,t){if(t=t||{},(e=e||"")instanceof f)return e;if(!(this instanceof f))return new f(e,t);var n=function(e){var t={r:0,g:0,b:0},n=1,r=null,s=null,l=null,d=!1,f=!1;"string"==typeof e&&(e=function(e){e=e.replace(i,"").replace(a,"").toLowerCase();var t,n=!1;if(M[e])e=M[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};if(t=B.rgb.exec(e))return{r:t[1],g:t[2],b:t[3]};if(t=B.rgba.exec(e))return{r:t[1],g:t[2],b:t[3],a:t[4]};if(t=B.hsl.exec(e))return{h:t[1],s:t[2],l:t[3]};if(t=B.hsla.exec(e))return{h:t[1],s:t[2],l:t[3],a:t[4]};if(t=B.hsv.exec(e))return{h:t[1],s:t[2],v:t[3]};if(t=B.hsva.exec(e))return{h:t[1],s:t[2],v:t[3],a:t[4]};if(t=B.hex8.exec(e))return{r:R(t[1]),g:R(t[2]),b:R(t[3]),a:z(t[4]),format:n?"name":"hex8"};if(t=B.hex6.exec(e))return{r:R(t[1]),g:R(t[2]),b:R(t[3]),format:n?"name":"hex"};if(t=B.hex4.exec(e))return{r:R(t[1]+""+t[1]),g:R(t[2]+""+t[2]),b:R(t[3]+""+t[3]),a:z(t[4]+""+t[4]),format:n?"name":"hex8"};if(t=B.hex3.exec(e))return{r:R(t[1]+""+t[1]),g:R(t[2]+""+t[2]),b:R(t[3]+""+t[3]),format:n?"name":"hex"};return!1}(e));"object"==typeof e&&(_(e.r)&&_(e.g)&&_(e.b)?(p=e.r,h=e.g,m=e.b,t={r:255*N(p,255),g:255*N(h,255),b:255*N(m,255)},d=!0,f="%"===String(e.r).substr(-1)?"prgb":"rgb"):_(e.h)&&_(e.s)&&_(e.v)?(r=F(e.s),s=F(e.v),t=function(e,t,n){e=6*N(e,360),t=N(t,100),n=N(n,100);var r=o.floor(e),i=e-r,a=n*(1-t),s=n*(1-i*t),l=n*(1-(1-i)*t),u=r%6;return{r:255*[n,s,a,a,l,n][u],g:255*[l,n,n,s,a,a][u],b:255*[a,a,l,n,n,s][u]}}(e.h,r,s),d=!0,f="hsv"):_(e.h)&&_(e.s)&&_(e.l)&&(r=F(e.s),l=F(e.l),t=function(e,t,n){var r,o,i;function a(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=N(e,360),t=N(t,100),n=N(n,100),0===t)r=o=i=n;else{var s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;r=a(l,s,e+1/3),o=a(l,s,e),i=a(l,s,e-1/3)}return{r:255*r,g:255*o,b:255*i}}(e.h,r,l),d=!0,f="hsl"),e.hasOwnProperty("a")&&(n=e.a));var p,h,m;return n=L(n),{ok:d,format:e.format||f,r:u(255,c(t.r,0)),g:u(255,c(t.g,0)),b:u(255,c(t.b,0)),a:n}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=l(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=l(this._r)),this._g<1&&(this._g=l(this._g)),this._b<1&&(this._b=l(this._b)),this._ok=n.ok,this._tc_id=s++}function p(e,t,n){e=N(e,255),t=N(t,255),n=N(n,255);var r,o,i=c(e,t,n),a=u(e,t,n),s=(i+a)/2;if(i==a)r=o=0;else{var l=i-a;switch(o=s>.5?l/(2-i-a):l/(i+a),i){case e:r=(t-n)/l+(t<n?6:0);break;case t:r=(n-e)/l+2;break;case n:r=(e-t)/l+4}r/=6}return{h:r,s:o,l:s}}function h(e,t,n){e=N(e,255),t=N(t,255),n=N(n,255);var r,o,i=c(e,t,n),a=u(e,t,n),s=i,l=i-a;if(o=0===i?0:l/i,i==a)r=0;else{switch(i){case e:r=(t-n)/l+(t<n?6:0);break;case t:r=(n-e)/l+2;break;case n:r=(e-t)/l+4}r/=6}return{h:r,s:o,v:s}}function m(e,t,n,r){var o=[H(l(e).toString(16)),H(l(t).toString(16)),H(l(n).toString(16))];return r&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function v(e,t,n,r){return[H(V(r)),H(l(e).toString(16)),H(l(t).toString(16)),H(l(n).toString(16))].join("")}function g(e,t){t=0===t?0:t||10;var n=f(e).toHsl();return n.s-=t/100,n.s=P(n.s),f(n)}function y(e,t){t=0===t?0:t||10;var n=f(e).toHsl();return n.s+=t/100,n.s=P(n.s),f(n)}function b(e){return f(e).desaturate(100)}function w(e,t){t=0===t?0:t||10;var n=f(e).toHsl();return n.l+=t/100,n.l=P(n.l),f(n)}function k(e,t){t=0===t?0:t||10;var n=f(e).toRgb();return n.r=c(0,u(255,n.r-l(-t/100*255))),n.g=c(0,u(255,n.g-l(-t/100*255))),n.b=c(0,u(255,n.b-l(-t/100*255))),f(n)}function x(e,t){t=0===t?0:t||10;var n=f(e).toHsl();return n.l-=t/100,n.l=P(n.l),f(n)}function O(e,t){var n=f(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,f(n)}function S(e){var t=f(e).toHsl();return t.h=(t.h+180)%360,f(t)}function C(e){var t=f(e).toHsl(),n=t.h;return[f(e),f({h:(n+120)%360,s:t.s,l:t.l}),f({h:(n+240)%360,s:t.s,l:t.l})]}function j(e){var t=f(e).toHsl(),n=t.h;return[f(e),f({h:(n+90)%360,s:t.s,l:t.l}),f({h:(n+180)%360,s:t.s,l:t.l}),f({h:(n+270)%360,s:t.s,l:t.l})]}function D(e){var t=f(e).toHsl(),n=t.h;return[f(e),f({h:(n+72)%360,s:t.s,l:t.l}),f({h:(n+216)%360,s:t.s,l:t.l})]}function E(e,t,n){t=t||6,n=n||30;var r=f(e).toHsl(),o=360/n,i=[f(e)];for(r.h=(r.h-(o*t>>1)+720)%360;--t;)r.h=(r.h+o)%360,i.push(f(r));return i}function A(e,t){t=t||6;for(var n=f(e).toHsv(),r=n.h,o=n.s,i=n.v,a=[],s=1/t;t--;)a.push(f({h:r,s:o,v:i})),i=(i+s)%1;return a}f.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:o.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:o.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:o.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=L(e),this._roundA=l(100*this._a)/100,this},toHsv:function(){var e=h(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=h(this._r,this._g,this._b),t=l(360*e.h),n=l(100*e.s),r=l(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=p(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=p(this._r,this._g,this._b),t=l(360*e.h),n=l(100*e.s),r=l(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return m(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,o){var i=[H(l(e).toString(16)),H(l(t).toString(16)),H(l(n).toString(16)),H(V(r))];if(o&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1))return i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0);return i.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:l(this._r),g:l(this._g),b:l(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+l(this._r)+", "+l(this._g)+", "+l(this._b)+")":"rgba("+l(this._r)+", "+l(this._g)+", "+l(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:l(100*N(this._r,255))+"%",g:l(100*N(this._g,255))+"%",b:l(100*N(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+l(100*N(this._r,255))+"%, "+l(100*N(this._g,255))+"%, "+l(100*N(this._b,255))+"%)":"rgba("+l(100*N(this._r,255))+"%, "+l(100*N(this._g,255))+"%, "+l(100*N(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(T[m(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+v(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var o=f(e);n="#"+v(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return f(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(w,arguments)},brighten:function(){return this._applyModification(k,arguments)},darken:function(){return this._applyModification(x,arguments)},desaturate:function(){return this._applyModification(g,arguments)},saturate:function(){return this._applyModification(y,arguments)},greyscale:function(){return this._applyModification(b,arguments)},spin:function(){return this._applyModification(O,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(E,arguments)},complement:function(){return this._applyCombination(S,arguments)},monochromatic:function(){return this._applyCombination(A,arguments)},splitcomplement:function(){return this._applyCombination(D,arguments)},triad:function(){return this._applyCombination(C,arguments)},tetrad:function(){return this._applyCombination(j,arguments)}},f.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:F(e[r]));e=n}return f(e,t)},f.equals=function(e,t){return!(!e||!t)&&f(e).toRgbString()==f(t).toRgbString()},f.random=function(){return f.fromRatio({r:d(),g:d(),b:d()})},f.mix=function(e,t,n){n=0===n?0:n||50;var r=f(e).toRgb(),o=f(t).toRgb(),i=n/100;return f({r:(o.r-r.r)*i+r.r,g:(o.g-r.g)*i+r.g,b:(o.b-r.b)*i+r.b,a:(o.a-r.a)*i+r.a})},f.readability=function(e,t){var n=f(e),r=f(t);return(o.max(n.getLuminance(),r.getLuminance())+.05)/(o.min(n.getLuminance(),r.getLuminance())+.05)},f.isReadable=function(e,t,n){var r,o,i=f.readability(e,t);switch(o=!1,(r=function(e){var t,n;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==n&&"large"!==n&&(n="small");return{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":o=i>=4.5;break;case"AAlarge":o=i>=3;break;case"AAAsmall":o=i>=7}return o},f.mostReadable=function(e,t,n){var r,o,i,a,s=null,l=0;o=(n=n||{}).includeFallbackColors,i=n.level,a=n.size;for(var u=0;u<t.length;u++)(r=f.readability(e,t[u]))>l&&(l=r,s=f(t[u]));return f.isReadable(e,s,{level:i,size:a})||!o?s:(n.includeFallbackColors=!1,f.mostReadable(e,["#fff","#000"],n))};var M=f.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},T=f.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(M);function L(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function N(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"===typeof e&&-1!=e.indexOf("%")}(e);return e=u(t,c(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),o.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function P(e){return u(1,c(0,e))}function R(e){return parseInt(e,16)}function H(e){return 1==e.length?"0"+e:""+e}function F(e){return e<=1&&(e=100*e+"%"),e}function V(e){return o.round(255*parseFloat(e)).toString(16)}function z(e){return R(e)/255}var B=function(){var e="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",t="[\\s|\\(]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")\\s*\\)?",n="[\\s|\\(]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")\\s*\\)?";return{CSS_UNIT:new RegExp(e),rgb:new RegExp("rgb"+t),rgba:new RegExp("rgba"+n),hsl:new RegExp("hsl"+t),hsla:new RegExp("hsla"+n),hsv:new RegExp("hsv"+t),hsva:new RegExp("hsva"+n),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function _(e){return!!B.CSS_UNIT.exec(e)}e.exports?e.exports=f:void 0===(r=function(){return f}.call(t,n,t,e))||(e.exports=r)}(Math)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Flex=t.Box=void 0;l(n(23));var r=l(n(58)),o=n(20),i=function(e){if(e&&e.__esModule)return e;var t=s();if(t&&t.has(e))return t.get(e);var n={};if(null!=e){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}}n.default=e,t&&t.set(e,n);return n}(n(42)),a=l(n(43));function s(){if("function"!==typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function l(e){return e&&e.__esModule?e:{default:e}}var u=(0,r.default)("div",{shouldForwardProp:a.default})({boxSizing:"border-box",margin:0,minWidth:0},(function(e){return(0,i.default)(e.__css)(e.theme)}),(function(e){var t=e.theme,n=e.variant,r=e.tx,o=void 0===r?"variants":r;return(0,i.default)((0,i.get)(t,o+"."+n,(0,i.get)(t,n)))(t)}),(function(e){return(0,i.default)(e.sx)(e.theme)}),(function(e){return e.css}),(0,o.compose)(o.space,o.layout,o.typography,o.color,o.flexbox));t.Box=u;var c=(0,r.default)(u)({display:"flex"});t.Flex=c},function(e,t,n){"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return m})),n.d(t,"b",(function(){return v}));var r=n(31);var o=n(1);var i=function(){function e(e){this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.before=null}var t=e.prototype;return t.insert=function(e){if(this.ctr%(this.isSpeedy?65e3:1)===0){var t,n=function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t}(this);t=0===this.tags.length?this.before:this.tags[this.tags.length-1].nextSibling,this.container.insertBefore(n,t),this.tags.push(n)}var r=this.tags[this.tags.length-1];if(this.isSpeedy){var o=function(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]}(r);try{var i=105===e.charCodeAt(1)&&64===e.charCodeAt(0);o.insertRule(e,i?0:o.cssRules.length)}catch(a){0}}else r.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}();var a=function(e){function t(e,r,l,u,f){for(var p,h,m,v,w,x=0,O=0,S=0,C=0,j=0,L=0,P=m=p=0,H=0,F=0,V=0,z=0,B=l.length,_=B-1,I="",$="",q="",W="";H<B;){if(h=l.charCodeAt(H),H===_&&0!==O+C+S+x&&(0!==O&&(h=47===O?10:47),C=S=x=0,B++,_++),0===O+C+S+x){if(H===_&&(0<F&&(I=I.replace(d,"")),0<I.trim().length)){switch(h){case 32:case 9:case 59:case 13:case 10:break;default:I+=l.charAt(H)}h=59}switch(h){case 123:for(p=(I=I.trim()).charCodeAt(0),m=1,z=++H;H<B;){switch(h=l.charCodeAt(H)){case 123:m++;break;case 125:m--;break;case 47:switch(h=l.charCodeAt(H+1)){case 42:case 47:e:{for(P=H+1;P<_;++P)switch(l.charCodeAt(P)){case 47:if(42===h&&42===l.charCodeAt(P-1)&&H+2!==P){H=P+1;break e}break;case 10:if(47===h){H=P+1;break e}}H=P}}break;case 91:h++;case 40:h++;case 34:case 39:for(;H++<_&&l.charCodeAt(H)!==h;);}if(0===m)break;H++}if(m=l.substring(z,H),0===p&&(p=(I=I.replace(c,"").trim()).charCodeAt(0)),64===p){switch(0<F&&(I=I.replace(d,"")),h=I.charCodeAt(1)){case 100:case 109:case 115:case 45:F=r;break;default:F=T}if(z=(m=t(r,F,m,h,f+1)).length,0<N&&(w=s(3,m,F=n(T,I,V),r,E,D,z,h,f,u),I=F.join(""),void 0!==w&&0===(z=(m=w.trim()).length)&&(h=0,m="")),0<z)switch(h){case 115:I=I.replace(k,a);case 100:case 109:case 45:m=I+"{"+m+"}";break;case 107:m=(I=I.replace(g,"$1 $2"))+"{"+m+"}",m=1===M||2===M&&i("@"+m,3)?"@-webkit-"+m+"@"+m:"@"+m;break;default:m=I+m,112===u&&($+=m,m="")}else m=""}else m=t(r,n(r,I,V),m,u,f+1);q+=m,m=V=F=P=p=0,I="",h=l.charCodeAt(++H);break;case 125:case 59:if(1<(z=(I=(0<F?I.replace(d,""):I).trim()).length))switch(0===P&&(p=I.charCodeAt(0),45===p||96<p&&123>p)&&(z=(I=I.replace(" ",":")).length),0<N&&void 0!==(w=s(1,I,r,e,E,D,$.length,u,f,u))&&0===(z=(I=w.trim()).length)&&(I="\0\0"),p=I.charCodeAt(0),h=I.charCodeAt(1),p){case 0:break;case 64:if(105===h||99===h){W+=I+l.charAt(H);break}default:58!==I.charCodeAt(z-1)&&($+=o(I,p,h,I.charCodeAt(2)))}V=F=P=p=0,I="",h=l.charCodeAt(++H)}}switch(h){case 13:case 10:47===O?O=0:0===1+p&&107!==u&&0<I.length&&(F=1,I+="\0"),0<N*R&&s(0,I,r,e,E,D,$.length,u,f,u),D=1,E++;break;case 59:case 125:if(0===O+C+S+x){D++;break}default:switch(D++,v=l.charAt(H),h){case 9:case 32:if(0===C+x+O)switch(j){case 44:case 58:case 9:case 32:v="";break;default:32!==h&&(v=" ")}break;case 0:v="\\0";break;case 12:v="\\f";break;case 11:v="\\v";break;case 38:0===C+O+x&&(F=V=1,v="\f"+v);break;case 108:if(0===C+O+x+A&&0<P)switch(H-P){case 2:112===j&&58===l.charCodeAt(H-3)&&(A=j);case 8:111===L&&(A=L)}break;case 58:0===C+O+x&&(P=H);break;case 44:0===O+S+C+x&&(F=1,v+="\r");break;case 34:case 39:0===O&&(C=C===h?0:0===C?h:C);break;case 91:0===C+O+S&&x++;break;case 93:0===C+O+S&&x--;break;case 41:0===C+O+x&&S--;break;case 40:if(0===C+O+x){if(0===p)if(2*j+3*L===533);else p=1;S++}break;case 64:0===O+S+C+x+P+m&&(m=1);break;case 42:case 47:if(!(0<C+x+S))switch(O){case 0:switch(2*h+3*l.charCodeAt(H+1)){case 235:O=47;break;case 220:z=H,O=42}break;case 42:47===h&&42===j&&z+2!==H&&(33===l.charCodeAt(z+2)&&($+=l.substring(z,H+1)),v="",O=0)}}0===O&&(I+=v)}L=j,j=h,H++}if(0<(z=$.length)){if(F=r,0<N&&(void 0!==(w=s(2,$,F,e,E,D,z,u,f,u))&&0===($=w).length))return W+$+q;if($=F.join(",")+"{"+$+"}",0!==M*A){switch(2!==M||i($,2)||(A=0),A){case 111:$=$.replace(b,":-moz-$1")+$;break;case 112:$=$.replace(y,"::-webkit-input-$1")+$.replace(y,"::-moz-$1")+$.replace(y,":-ms-input-$1")+$}A=0}}return W+$+q}function n(e,t,n){var o=t.trim().split(m);t=o;var i=o.length,a=e.length;switch(a){case 0:case 1:var s=0;for(e=0===a?"":e[0]+" ";s<i;++s)t[s]=r(e,t[s],n).trim();break;default:var l=s=0;for(t=[];s<i;++s)for(var u=0;u<a;++u)t[l++]=r(e[u]+" ",o[s],n).trim()}return t}function r(e,t,n){var r=t.charCodeAt(0);switch(33>r&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(v,"$1"+e.trim());case 58:return e.trim()+t.replace(v,"$1"+e.trim());default:if(0<1*n&&0<t.indexOf("\f"))return t.replace(v,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function o(e,t,n,r){var a=e+";",s=2*t+3*n+4*r;if(944===s){e=a.indexOf(":",9)+1;var l=a.substring(e,a.length-1).trim();return l=a.substring(0,e).trim()+l+";",1===M||2===M&&i(l,1)?"-webkit-"+l+l:l}if(0===M||2===M&&!i(a,1))return a;switch(s){case 1015:return 97===a.charCodeAt(10)?"-webkit-"+a+a:a;case 951:return 116===a.charCodeAt(3)?"-webkit-"+a+a:a;case 963:return 110===a.charCodeAt(5)?"-webkit-"+a+a:a;case 1009:if(100!==a.charCodeAt(4))break;case 969:case 942:return"-webkit-"+a+a;case 978:return"-webkit-"+a+"-moz-"+a+a;case 1019:case 983:return"-webkit-"+a+"-moz-"+a+"-ms-"+a+a;case 883:if(45===a.charCodeAt(8))return"-webkit-"+a+a;if(0<a.indexOf("image-set(",11))return a.replace(j,"$1-webkit-$2")+a;break;case 932:if(45===a.charCodeAt(4))switch(a.charCodeAt(5)){case 103:return"-webkit-box-"+a.replace("-grow","")+"-webkit-"+a+"-ms-"+a.replace("grow","positive")+a;case 115:return"-webkit-"+a+"-ms-"+a.replace("shrink","negative")+a;case 98:return"-webkit-"+a+"-ms-"+a.replace("basis","preferred-size")+a}return"-webkit-"+a+"-ms-"+a+a;case 964:return"-webkit-"+a+"-ms-flex-"+a+a;case 1023:if(99!==a.charCodeAt(8))break;return"-webkit-box-pack"+(l=a.substring(a.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+a+"-ms-flex-pack"+l+a;case 1005:return p.test(a)?a.replace(f,":-webkit-")+a.replace(f,":-moz-")+a:a;case 1e3:switch(t=(l=a.substring(13).trim()).indexOf("-")+1,l.charCodeAt(0)+l.charCodeAt(t)){case 226:l=a.replace(w,"tb");break;case 232:l=a.replace(w,"tb-rl");break;case 220:l=a.replace(w,"lr");break;default:return a}return"-webkit-"+a+"-ms-"+l+a;case 1017:if(-1===a.indexOf("sticky",9))break;case 975:switch(t=(a=e).length-10,s=(l=(33===a.charCodeAt(t)?a.substring(0,t):a).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|l.charCodeAt(7))){case 203:if(111>l.charCodeAt(8))break;case 115:a=a.replace(l,"-webkit-"+l)+";"+a;break;case 207:case 102:a=a.replace(l,"-webkit-"+(102<s?"inline-":"")+"box")+";"+a.replace(l,"-webkit-"+l)+";"+a.replace(l,"-ms-"+l+"box")+";"+a}return a+";";case 938:if(45===a.charCodeAt(5))switch(a.charCodeAt(6)){case 105:return l=a.replace("-items",""),"-webkit-"+a+"-webkit-box-"+l+"-ms-flex-"+l+a;case 115:return"-webkit-"+a+"-ms-flex-item-"+a.replace(O,"")+a;default:return"-webkit-"+a+"-ms-flex-line-pack"+a.replace("align-content","").replace(O,"")+a}break;case 973:case 989:if(45!==a.charCodeAt(3)||122===a.charCodeAt(4))break;case 931:case 953:if(!0===C.test(e))return 115===(l=e.substring(e.indexOf(":")+1)).charCodeAt(0)?o(e.replace("stretch","fill-available"),t,n,r).replace(":fill-available",":stretch"):a.replace(l,"-webkit-"+l)+a.replace(l,"-moz-"+l.replace("fill-",""))+a;break;case 962:if(a="-webkit-"+a+(102===a.charCodeAt(5)?"-ms-"+a:"")+a,211===n+r&&105===a.charCodeAt(13)&&0<a.indexOf("transform",10))return a.substring(0,a.indexOf(";",27)+1).replace(h,"$1-webkit-$2")+a}return a}function i(e,t){var n=e.indexOf(1===t?":":"{"),r=e.substring(0,3!==t?n:10);return n=e.substring(n+1,e.length-1),P(2!==t?r:r.replace(S,"$1"),n,t)}function a(e,t){var n=o(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return n!==t+";"?n.replace(x," or ($1)").substring(4):"("+t+")"}function s(e,t,n,r,o,i,a,s,l,c){for(var d,f=0,p=t;f<N;++f)switch(d=L[f].call(u,e,p,n,r,o,i,a,s,l,c)){case void 0:case!1:case!0:case null:break;default:p=d}if(p!==t)return p}function l(e){return void 0!==(e=e.prefix)&&(P=null,e?"function"!==typeof e?M=1:(M=2,P=e):M=0),l}function u(e,n){var r=e;if(33>r.charCodeAt(0)&&(r=r.trim()),r=[r],0<N){var o=s(-1,n,r,r,E,D,0,0,0,0);void 0!==o&&"string"===typeof o&&(n=o)}var i=t(T,r,n,0,0);return 0<N&&(void 0!==(o=s(-2,i,r,r,E,D,i.length,0,0,0))&&(i=o)),"",A=0,D=E=1,i}var c=/^\0+/g,d=/[\0\r\f]/g,f=/: */g,p=/zoo|gra/,h=/([,: ])(transform)/g,m=/,\r+?/g,v=/([\t\r\n ])*\f?&/g,g=/@(k\w+)\s*(\S*)\s*/,y=/::(place)/g,b=/:(read-only)/g,w=/[svh]\w+-[tblr]{2}/,k=/\(\s*(.*)\s*\)/g,x=/([\s\S]*?);/g,O=/-self|flex-/g,S=/[^]*?(:[rp][el]a[\w-]+)[^]*/,C=/stretch|:\s*\w+\-(?:conte|avail)/,j=/([^-])(image-set\()/,D=1,E=1,A=0,M=1,T=[],L=[],N=0,P=null,R=0;return u.use=function e(t){switch(t){case void 0:case null:N=L.length=0;break;default:if("function"===typeof t)L[N++]=t;else if("object"===typeof t)for(var n=0,r=t.length;n<r;++n)e(t[n]);else R=0|!!t}return e},u.set=l,void 0!==e&&l(e),u},s=(n(46),"/*|*/");function l(e){e&&u.current.insert(e+"}")}var u={current:null},c=function(e,t,n,r,o,i,a,c,d,f){switch(e){case 1:switch(t.charCodeAt(0)){case 64:return u.current.insert(t+";"),"";case 108:if(98===t.charCodeAt(2))return""}break;case 2:if(0===c)return t+s;break;case 3:switch(c){case 102:case 112:return u.current.insert(n[0]+t),"";default:return t+(0===f?s:"")}case-2:t.split("/*|*/}").forEach(l)}},d=function(e){void 0===e&&(e={});var t,n=e.key||"css";void 0!==e.prefix&&(t={prefix:e.prefix});var r=new a(t);var o,s={};o=e.container||document.head;var l,d=document.querySelectorAll("style[data-emotion-"+n+"]");Array.prototype.forEach.call(d,(function(e){e.getAttribute("data-emotion-"+n).split(" ").forEach((function(e){s[e]=!0})),e.parentNode!==o&&o.appendChild(e)})),r.use(e.stylisPlugins)(c),l=function(e,t,n,o){var i=t.name;u.current=n,r(e,t.styles),o&&(f.inserted[i]=!0)};var f={key:n,sheet:new i({key:n,container:o,nonce:e.nonce,speedy:e.speedy}),nonce:e.nonce,inserted:s,registered:{},insert:l};return f},f=(n(86),n(28)),p=n(27),h=(Object.prototype.hasOwnProperty,Object(o.createContext)("undefined"!==typeof HTMLElement?d():null)),m=Object(o.createContext)({}),v=(h.Provider,function(e){var t=function(t,n){return Object(o.createElement)(h.Consumer,null,(function(r){return e(t,r,n)}))};return Object(o.forwardRef)(t)});o.Component;var g=function e(t){for(var n=t.length,r=0,o="";r<n;r++){var i=t[r];if(null!=i){var a=void 0;switch(typeof i){case"boolean":break;case"object":if(Array.isArray(i))a=e(i);else for(var s in a="",i)i[s]&&s&&(a&&(a+=" "),a+=s);break;default:a=i}a&&(o&&(o+=" "),o+=a)}}return o};function y(e,t,n){var r=[],o=Object(f.a)(e,r,n);return r.length<2?n:o+t(r)}var b=function(){return null};v((function(e,t){return Object(o.createElement)(m.Consumer,null,(function(n){var r=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o=Object(p.a)(n,t.registered);return Object(f.b)(t,o,!1),t.key+"-"+o.name},i={css:r,cx:function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return y(t.registered,r,g(n))},theme:n},a=e.children(i);var s=Object(o.createElement)(b,null);return Object(o.createElement)(o.Fragment,null,s,a)}))}))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}e.exports=n},,function(e,t,n){"use strict";n.d(t,"e",(function(){return CM})),n.d(t,"b",(function(){return mC})),n.d(t,"d",(function(){return gM})),n.d(t,"a",(function(){return Jd})),n.d(t,"c",(function(){return ZO}));var r={};n.r(r),n.d(r,"boolean",(function(){return YC})),n.d(r,"booleanish",(function(){return ZC})),n.d(r,"overloadedBoolean",(function(){return XC})),n.d(r,"number",(function(){return QC})),n.d(r,"spaceSeparated",(function(){return ej})),n.d(r,"commaSeparated",(function(){return tj})),n.d(r,"commaOrSpaceSeparated",(function(){return nj}));var o=n(9),i=n(6),a=n(17),s=n(10),l=n(11),u=n(18),c=n(4),d=n(5),f=n(7),p=n(2),h=n(13),m=n(12),v=n(3),g=n(8),y="undefined"!=typeof navigator?navigator:null,b="undefined"!=typeof document?document:null,w=y&&y.userAgent||"",k=/Edge\/(\d+)/.exec(w),x=/MSIE \d/.exec(w),O=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(w),S=!!(x||O||k),C=x?document.documentMode:O?+O[1]:k?+k[1]:0,j=!S&&/gecko\/(\d+)/i.test(w);j&&(/Firefox\/(\d+)/.exec(w)||[0,0])[1];var D=!S&&/Chrome\/(\d+)/.exec(w),E=!!D,A=D?+D[1]:0,M=!S&&!!y&&/Apple Computer/.test(y.vendor),T=M&&(/Mobile\/\w+/.test(w)||!!y&&y.maxTouchPoints>2),L=T||!!y&&/Mac/.test(y.platform),N=/Android \d/.test(w),P=!!b&&"webkitFontSmoothing"in b.documentElement.style,R=P?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,H=function(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t},F=function(e){var t=e.assignedSlot||e.parentNode;return t&&11==t.nodeType?t.host:t},V=null,z=function(e,t,n){var r=V||(V=document.createRange());return r.setEnd(e,null==n?e.nodeValue.length:n),r.setStart(e,t||0),r},B=function(e,t,n,r){return n&&(I(e,t,n,r,-1)||I(e,t,n,r,1))},_=/^(img|br|input|textarea|hr)$/i;function I(e,t,n,r,o){for(;;){if(e==n&&t==r)return!0;if(t==(o<0?0:$(e))){var i=e.parentNode;if(!i||1!=i.nodeType||W(e)||_.test(e.nodeName)||"false"==e.contentEditable)return!1;t=H(e)+(o<0?0:1),e=i}else{if(1!=e.nodeType)return!1;if("false"==(e=e.childNodes[t+(o<0?-1:0)]).contentEditable)return!1;t=o<0?$(e):0}}}function $(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function q(e,t,n){for(var r=0==t,o=t==$(e);r||o;){if(e==n)return!0;var i=H(e);if(!(e=e.parentNode))return!1;r=r&&0==i,o=o&&i==$(e)}}function W(e){for(var t,n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}var U=function(e){var t=e.isCollapsed;return t&&E&&e.rangeCount&&!e.getRangeAt(0).collapsed&&(t=!1),t};function K(e,t){var n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function G(e){return{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function J(e,t){return"number"==typeof e?e:e[t]}function Y(e){var 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 Z(e,t,n){for(var r=e.someProp("scrollThreshold")||0,o=e.someProp("scrollMargin")||5,i=e.dom.ownerDocument,a=n||e.dom;a;a=F(a))if(1==a.nodeType){var s=a,l=s==i.body,u=l?G(i):Y(s),c=0,d=0;if(t.top<u.top+J(r,"top")?d=-(u.top-t.top+J(o,"top")):t.bottom>u.bottom-J(r,"bottom")&&(d=t.bottom-u.bottom+J(o,"bottom")),t.left<u.left+J(r,"left")?c=-(u.left-t.left+J(o,"left")):t.right>u.right-J(r,"right")&&(c=t.right-u.right+J(o,"right")),c||d)if(l)i.defaultView.scrollBy(c,d);else{var f=s.scrollLeft,p=s.scrollTop;d&&(s.scrollTop+=d),c&&(s.scrollLeft+=c);var h=s.scrollLeft-f,m=s.scrollTop-p;t={left:t.left-h,top:t.top-m,right:t.right-h,bottom:t.bottom-m}}if(l)break}}function X(e){for(var t=[],n=e.ownerDocument,r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=F(r));return t}function Q(e,t){for(var n=0;n<e.length;n++){var r=e[n],o=r.dom,i=r.top,a=r.left;o.scrollTop!=i+t&&(o.scrollTop=i+t),o.scrollLeft!=a&&(o.scrollLeft=a)}}var ee=null;function te(e,t){for(var n,r,o=2e8,i=0,a=t.top,s=t.top,l=e.firstChild,u=0;l;l=l.nextSibling,u++){var c=void 0;if(1==l.nodeType)c=l.getClientRects();else{if(3!=l.nodeType)continue;c=z(l).getClientRects()}for(var d=0;d<c.length;d++){var f=c[d];if(f.top<=a&&f.bottom>=s){a=Math.max(f.bottom,a),s=Math.min(f.top,s);var p=f.left>t.left?f.left-t.left:f.right<t.left?t.left-f.right:0;if(p<o){n=l,o=p,r=p&&3==n.nodeType?{left:f.right<t.left?f.right:f.left,top:t.top}:t,1==l.nodeType&&p&&(i=u+(t.left>=(f.left+f.right)/2?1:0));continue}}!n&&(t.left>=f.right&&t.top>=f.top||t.left>=f.left&&t.top>=f.bottom)&&(i=u+1)}}return n&&3==n.nodeType?function(e,t){for(var n=e.nodeValue.length,r=document.createRange(),o=0;o<n;o++){r.setEnd(e,o+1),r.setStart(e,o);var i=ie(r,1);if(i.top!=i.bottom&&ne(t,i))return{node:e,offset:o+(t.left>=(i.left+i.right)/2?1:0)}}return{node:e,offset:0}}(n,r):!n||o&&1==n.nodeType?{node:e,offset:i}:te(n,r)}function ne(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function re(e,t,n){var r=e.childNodes.length;if(r&&n.top<n.bottom)for(var o=Math.max(0,Math.min(r-1,Math.floor(r*(t.top-n.top)/(n.bottom-n.top))-2)),i=o;;){var a=e.childNodes[i];if(1==a.nodeType)for(var s=a.getClientRects(),l=0;l<s.length;l++){var u=s[l];if(ne(t,u))return re(a,t,u)}if((i=(i+1)%r)==o)break}return e}function oe(e,t){var n,r=e.dom.ownerDocument,o=0;if(r.caretPositionFromPoint)try{var i=r.caretPositionFromPoint(t.left,t.top);i&&(n=i.offsetNode,o=i.offset)}catch(h){}if(!n&&r.caretRangeFromPoint){var a=r.caretRangeFromPoint(t.left,t.top);a&&(n=a.startContainer,o=a.startOffset)}var s,l=(e.root.elementFromPoint?e.root:r).elementFromPoint(t.left,t.top+1);if(!l||!e.dom.contains(1!=l.nodeType?l.parentNode:l)){var u=e.dom.getBoundingClientRect();if(!ne(t,u))return null;if(!(l=re(e.dom,t,u)))return null}if(M)for(var c=l;n&&c;c=F(c))c.draggable&&(n=void 0);if(l=function(e,t){var n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left?n:e}(l,t),n){if(j&&1==n.nodeType&&(o=Math.min(o,n.childNodes.length))<n.childNodes.length){var d,f=n.childNodes[o];"IMG"==f.nodeName&&(d=f.getBoundingClientRect()).right<=t.left&&d.bottom>t.top&&o++}n==e.dom&&o==n.childNodes.length-1&&1==n.lastChild.nodeType&&t.top>n.lastChild.getBoundingClientRect().bottom?s=e.state.doc.content.size:0!=o&&1==n.nodeType&&"BR"==n.childNodes[o-1].nodeName||(s=function(e,t,n,r){for(var o=-1,i=t;i!=e.dom;){var a=e.docView.nearestDesc(i,!0);if(!a)return null;if(a.node.isBlock&&a.parent){var s=a.dom.getBoundingClientRect();if(s.left>r.left||s.top>r.top)o=a.posBefore;else{if(!(s.right<r.left||s.bottom<r.top))break;o=a.posAfter}}i=a.dom.parentNode}return o>-1?o:e.docView.posFromDOM(t,n,1)}(e,n,o,t))}null==s&&(s=function(e,t,n){var r=te(t,n),o=r.node,i=r.offset,a=-1;if(1==o.nodeType&&!o.firstChild){var s=o.getBoundingClientRect();a=s.left!=s.right&&n.left>(s.left+s.right)/2?1:-1}return e.docView.posFromDOM(o,i,a)}(e,l,t));var p=e.docView.nearestDesc(l,!0);return{pos:s,inside:p?p.posAtStart-p.border:-1}}function ie(e,t){var n=e.getClientRects();return n.length?n[t<0?0:n.length-1]:e.getBoundingClientRect()}var ae=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function se(e,t,n){var r=e.docView.domFromPos(t,n<0?-1:1),o=r.node,i=r.offset,a=P||j;if(3==o.nodeType){if(!a||!ae.test(o.nodeValue)&&(n<0?i:i!=o.nodeValue.length)){var s=i,l=i,u=n<0?1:-1;return n<0&&!i?(l++,u=-1):n>=0&&i==o.nodeValue.length?(s--,u=1):n<0?s--:l++,le(ie(z(o,s,l),u),u<0)}var c=ie(z(o,i,i),n);if(j&&i&&/\s/.test(o.nodeValue[i-1])&&i<o.nodeValue.length){var d=ie(z(o,i-1,i-1),-1);if(d.top==c.top){var f=ie(z(o,i,i+1),-1);if(f.top!=c.top)return le(f,f.left<d.left)}}return c}if(!e.state.doc.resolve(t).parent.inlineContent){if(i&&(n<0||i==$(o))){var p=o.childNodes[i-1];if(1==p.nodeType)return ue(p.getBoundingClientRect(),!1)}if(i<$(o)){var h=o.childNodes[i];if(1==h.nodeType)return ue(h.getBoundingClientRect(),!0)}return ue(o.getBoundingClientRect(),n>=0)}if(i&&(n<0||i==$(o))){var m=o.childNodes[i-1],v=3==m.nodeType?z(m,$(m)-(a?0:1)):1!=m.nodeType||"BR"==m.nodeName&&m.nextSibling?null:m;if(v)return le(ie(v,1),!1)}if(i<$(o)){for(var g=o.childNodes[i];g.pmViewDesc&&g.pmViewDesc.ignoreForCoords;)g=g.nextSibling;var y=g?3==g.nodeType?z(g,0,a?0:1):1==g.nodeType?g:null:null;if(y)return le(ie(y,-1),!0)}return le(ie(3==o.nodeType?z(o):o,-n),n>=0)}function le(e,t){if(0==e.width)return e;var n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function ue(e,t){if(0==e.height)return e;var n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function ce(e,t,n){var r=e.state,o=e.root.activeElement;r!=t&&e.updateState(t),o!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),o!=e.dom&&o&&o.focus()}}var de=/[\u0590-\u08ac]/;var fe=null,pe=null,he=!1;function me(e,t,n){return fe==t&&pe==n?he:(fe=t,pe=n,he="up"==n||"down"==n?function(e,t,n){var r=t.selection,o="up"==n?r.$from:r.$to;return ce(e,t,(function(){for(var t=e.docView.domFromPos(o.pos,"up"==n?-1:1).node;;){var r=e.docView.nearestDesc(t,!0);if(!r)break;if(r.node.isBlock){t=r.dom;break}t=r.dom.parentNode}for(var i=se(e,o.pos,1),a=t.firstChild;a;a=a.nextSibling){var s=void 0;if(1==a.nodeType)s=a.getClientRects();else{if(3!=a.nodeType)continue;s=z(a,0,a.nodeValue.length).getClientRects()}for(var l=0;l<s.length;l++){var u=s[l];if(u.bottom>u.top+1&&("up"==n?i.top-u.top>2*(u.bottom-i.top):u.bottom-i.bottom>2*(i.bottom-u.top)))return!1}}return!0}))}(e,t,n):function(e,t,n){var r=t.selection.$head;if(!r.parent.isTextblock)return!1;var o=r.parentOffset,i=!o,a=o==r.parent.content.size,s=e.domSelection();return de.test(r.parent.textContent)&&s.modify?ce(e,t,(function(){var t=s.getRangeAt(0),o=s.focusNode,i=s.focusOffset,a=s.caretBidiLevel;s.modify("move",n,"character");var l=!(r.depth?e.docView.domAfterPos(r.before()):e.dom).contains(1==s.focusNode.nodeType?s.focusNode:s.focusNode.parentNode)||o==s.focusNode&&i==s.focusOffset;return s.removeAllRanges(),s.addRange(t),null!=a&&(s.caretBidiLevel=a),l})):"left"==n||"backward"==n?i:a}(e,t,n))}var ve=function(){function e(t,n,r,o){Object(c.a)(this,e),this.parent=t,this.children=n,this.dom=r,this.contentDOM=o,this.dirty=0,r.pmViewDesc=this}return Object(d.a)(e,[{key:"matchesWidget",value:function(e){return!1}},{key:"matchesMark",value:function(e){return!1}},{key:"matchesNode",value:function(e,t,n){return!1}},{key:"matchesHack",value:function(e){return!1}},{key:"parseRule",value:function(){return null}},{key:"stopEvent",value:function(e){return!1}},{key:"size",get:function(){for(var e=0,t=0;t<this.children.length;t++)e+=this.children[t].size;return e}},{key:"border",get:function(){return 0}},{key:"destroy",value:function(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(var e=0;e<this.children.length;e++)this.children[e].destroy()}},{key:"posBeforeChild",value:function(e){for(var t=0,n=this.posAtStart;;t++){var r=this.children[t];if(r==e)return n;n+=r.size}}},{key:"posBefore",get:function(){return this.parent.posBeforeChild(this)}},{key:"posAtStart",get:function(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}},{key:"posAfter",get:function(){return this.posBefore+this.size}},{key:"posAtEnd",get:function(){return this.posAtStart+this.size-2*this.border}},{key:"localPosFromDOM",value:function(e,t,n){if(this.contentDOM&&this.contentDOM.contains(1==e.nodeType?e:e.parentNode)){if(n<0){var r,o;if(e==this.contentDOM)r=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;r=e.previousSibling}for(;r&&(!(o=r.pmViewDesc)||o.parent!=this);)r=r.previousSibling;return r?this.posBeforeChild(o)+o.size:this.posAtStart}var i,a;if(e==this.contentDOM)i=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.nextSibling}for(;i&&(!(a=i.pmViewDesc)||a.parent!=this);)i=i.nextSibling;return i?this.posBeforeChild(a):this.posAtEnd}var s;if(e==this.dom&&this.contentDOM)s=t>H(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))s=2&e.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==t)for(var l=e;;l=l.parentNode){if(l==this.dom){s=!1;break}if(l.previousSibling)break}if(null==s&&t==e.childNodes.length)for(var u=e;;u=u.parentNode){if(u==this.dom){s=!0;break}if(u.nextSibling)break}}return(null==s?n>0:s)?this.posAtEnd:this.posAtStart}},{key:"nearestDesc",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!0,r=e;r;r=r.parentNode){var o=this.getDesc(r),i=void 0;if(o&&(!t||o.node)){if(!n||!(i=o.nodeDOM)||(1==i.nodeType?i.contains(1==e.nodeType?e:e.parentNode):i==e))return o;n=!1}}}},{key:"getDesc",value:function(e){for(var t=e.pmViewDesc,n=t;n;n=n.parent)if(n==this)return t}},{key:"posFromDOM",value:function(e,t,n){for(var r=e;r;r=r.parentNode){var o=this.getDesc(r);if(o)return o.localPosFromDOM(e,t,n)}return-1}},{key:"descAt",value:function(e){for(var t=0,n=0;t<this.children.length;t++){var r=this.children[t],o=n+r.size;if(n==e&&o!=n){for(;!r.border&&r.children.length;)r=r.children[0];return r}if(e<o)return r.descAt(e-n-r.border);n=o}}},{key:"domFromPos",value:function(e,t){if(!this.contentDOM)return{node:this.dom,offset:0};for(var n,r=0,o=0,i=0;r<this.children.length;r++){var a=this.children[r],s=i+a.size;if(s>e||a instanceof Oe){o=e-i;break}i=s}if(o)return this.children[r].domFromPos(o-this.children[r].border,t);for(;r&&!(n=this.children[r-1]).size&&n instanceof ge&&n.side>=0;r--);if(t<=0){for(var l,u=!0;(l=r?this.children[r-1]:null)&&l.dom.parentNode!=this.contentDOM;r--,u=!1);return l&&t&&u&&!l.border&&!l.domAtom?l.domFromPos(l.size,t):{node:this.contentDOM,offset:l?H(l.dom)+1:0}}for(var c,d=!0;(c=r<this.children.length?this.children[r]:null)&&c.dom.parentNode!=this.contentDOM;r++,d=!1);return c&&d&&!c.border&&!c.domAtom?c.domFromPos(0,t):{node:this.contentDOM,offset:c?H(c.dom):this.contentDOM.childNodes.length}}},{key:"parseRange",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(0==this.children.length)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};for(var r=-1,o=-1,i=n,a=0;;a++){var s=this.children[a],l=i+s.size;if(-1==r&&e<=l){var u=i+s.border;if(e>=u&&t<=l-s.border&&s.node&&s.contentDOM&&this.contentDOM.contains(s.contentDOM))return s.parseRange(e,t,u);e=i;for(var c=a;c>0;c--){var d=this.children[c-1];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(1)){r=H(d.dom)+1;break}e-=d.size}-1==r&&(r=0)}if(r>-1&&(l>t||a==this.children.length-1)){t=l;for(var f=a+1;f<this.children.length;f++){var p=this.children[f];if(p.size&&p.dom.parentNode==this.contentDOM&&!p.emptyChildAt(-1)){o=H(p.dom);break}t+=p.size}-1==o&&(o=this.contentDOM.childNodes.length);break}i=l}return{node:this.contentDOM,from:e,to:t,fromOffset:r,toOffset:o}}},{key:"emptyChildAt",value:function(e){if(this.border||!this.contentDOM||!this.children.length)return!1;var t=this.children[e<0?0:this.children.length-1];return 0==t.size||t.emptyChildAt(e)}},{key:"domAfterPos",value:function(e){var t=this.domFromPos(e,0),n=t.node,r=t.offset;if(1!=n.nodeType||r==n.childNodes.length)throw new RangeError("No node after pos "+e);return n.childNodes[r]}},{key:"setSelection",value:function(e,t,n){for(var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=Math.min(e,t),i=Math.max(e,t),a=0,s=0;a<this.children.length;a++){var l=this.children[a],u=s+l.size;if(o>s&&i<u)return l.setSelection(e-s-l.border,t-s-l.border,n,r);s=u}var c=this.domFromPos(e,e?-1:1),d=t==e?c:this.domFromPos(t,t?-1:1),f=n.getSelection(),p=!1;if((j||M)&&e==t){var h=c,m=h.node,v=h.offset;if(3==m.nodeType){if((p=!(!v||"\n"!=m.nodeValue[v-1]))&&v==m.nodeValue.length)for(var g,y=m;y;y=y.parentNode){if(g=y.nextSibling){"BR"==g.nodeName&&(c=d={node:g.parentNode,offset:H(g)+1});break}var b=y.pmViewDesc;if(b&&b.node&&b.node.isBlock)break}}else{var w=m.childNodes[v-1];p=w&&("BR"==w.nodeName||"false"==w.contentEditable)}}if(j&&f.focusNode&&f.focusNode!=d.node&&1==f.focusNode.nodeType){var k=f.focusNode.childNodes[f.focusOffset];k&&"false"==k.contentEditable&&(r=!0)}if(r||p&&M||!B(c.node,c.offset,f.anchorNode,f.anchorOffset)||!B(d.node,d.offset,f.focusNode,f.focusOffset)){var x=!1;if((f.extend||e==t)&&!p){f.collapse(c.node,c.offset);try{e!=t&&f.extend(d.node,d.offset),x=!0}catch(C){if(!(C instanceof DOMException))throw C}}if(!x){if(e>t){var O=c;c=d,d=O}var S=document.createRange();S.setEnd(d.node,d.offset),S.setStart(c.node,c.offset),f.removeAllRanges(),f.addRange(S)}}}},{key:"ignoreMutation",value:function(e){return!this.contentDOM&&"selection"!=e.type}},{key:"contentLost",get:function(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}},{key:"markDirty",value:function(e,t){for(var n=0,r=0;r<this.children.length;r++){var o=this.children[r],i=n+o.size;if(n==i?e<=i&&t>=n:e<i&&t>n){var a=n+o.border,s=i-o.border;if(e>=a&&t<=s)return this.dirty=e==n||t==i?2:1,void(e!=a||t!=s||!o.contentLost&&o.dom.parentNode==this.contentDOM?o.markDirty(e-a,t-a):o.dirty=3);o.dirty=o.dom!=o.contentDOM||o.dom.parentNode!=this.contentDOM||o.children.length?3:2}n=i}this.dirty=2}},{key:"markParentsDirty",value:function(){for(var e=1,t=this.parent;t;t=t.parent,e++){var n=1==e?2:1;t.dirty<n&&(t.dirty=n)}}},{key:"domAtom",get:function(){return!1}},{key:"ignoreForCoords",get:function(){return!1}}]),e}(),ge=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e,r,o,i){var s;Object(c.a)(this,n);var l,u=r.type.toDOM;if("function"==typeof u&&(u=u(o,(function(){return l?l.parent?l.parent.posBeforeChild(l):void 0:i}))),!r.type.spec.raw){if(1!=u.nodeType){var d=document.createElement("span");d.appendChild(u),u=d}u.contentEditable="false",u.classList.add("ProseMirror-widget")}return(s=t.call(this,e,[],u,null)).widget=r,s.widget=r,l=Object(a.a)(s),s}return Object(d.a)(n,[{key:"matchesWidget",value:function(e){return 0==this.dirty&&e.type.eq(this.widget.type)}},{key:"parseRule",value:function(){return{ignore:!0}}},{key:"stopEvent",value:function(e){var t=this.widget.spec.stopEvent;return!!t&&t(e)}},{key:"ignoreMutation",value:function(e){return"selection"!=e.type||this.widget.spec.ignoreSelection}},{key:"destroy",value:function(){this.widget.type.destroy(this.dom),Object(h.a)(Object(m.a)(n.prototype),"destroy",this).call(this)}},{key:"domAtom",get:function(){return!0}},{key:"side",get:function(){return this.widget.type.side}}]),n}(ve),ye=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e,r,o,i){var a;return Object(c.a)(this,n),(a=t.call(this,e,[],r,null)).textDOM=o,a.text=i,a}return Object(d.a)(n,[{key:"size",get:function(){return this.text.length}},{key:"localPosFromDOM",value:function(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t}},{key:"domFromPos",value:function(e){return{node:this.textDOM,offset:e}}},{key:"ignoreMutation",value:function(e){return"characterData"===e.type&&e.target.nodeValue==e.oldValue}}]),n}(ve),be=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e,r,o,i){var a;return Object(c.a)(this,n),(a=t.call(this,e,[],o,i)).mark=r,a}return Object(d.a)(n,[{key:"parseRule",value:function(){return 3&this.dirty||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM||void 0}}},{key:"matchesMark",value:function(e){return 3!=this.dirty&&this.mark.eq(e)}},{key:"markDirty",value:function(e,t){if(Object(h.a)(Object(m.a)(n.prototype),"markDirty",this).call(this,e,t),0!=this.dirty){for(var r=this.parent;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=0}}},{key:"slice",value:function(e,t,r){var o=n.create(this.parent,this.mark,!0,r),i=this.children,a=this.size;t<a&&(i=He(i,t,a,r)),e>0&&(i=He(i,0,e,r));for(var s=0;s<i.length;s++)i[s].parent=o;return o.children=i,o}}],[{key:"create",value:function(e,t,r,o){var i=o.nodeViews[t.type.name],a=i&&i(t,o,r);return a&&a.dom||(a=v.DOMSerializer.renderSpec(document,t.type.spec.toDOM(t,r))),new n(e,t,a.dom,a.contentDOM||a.dom)}}]),n}(ve),we=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e,r,o,i,a,s,l,u,d){var f;return Object(c.a)(this,n),(f=t.call(this,e,[],a,s)).node=r,f.outerDeco=o,f.innerDeco=i,f.nodeDOM=l,s&&f.updateChildren(u,d),f}return Object(d.a)(n,[{key:"parseRule",value:function(){var e=this;if(this.node.type.spec.reparseInView)return null;var t={node:this.node.type.name,attrs:this.node.attrs};if("pre"==this.node.type.whitespace&&(t.preserveWhitespace="full"),this.contentDOM)if(this.contentLost){for(var n=this.children.length-1;n>=0;n--){var r=this.children[n];if(this.dom.contains(r.dom.parentNode)){t.contentElement=r.dom.parentNode;break}}t.contentElement||(t.getContent=function(){return v.Fragment.empty})}else t.contentElement=this.contentDOM;else t.getContent=function(){return e.node.content};return t}},{key:"matchesNode",value:function(e,t,n){return 0==this.dirty&&e.eq(this.node)&&Le(t,this.outerDeco)&&n.eq(this.innerDeco)}},{key:"size",get:function(){return this.node.nodeSize}},{key:"border",get:function(){return this.node.isLeaf?0:1}},{key:"updateChildren",value:function(e,t){var n=this,r=this.node.inlineContent,o=t,i=e.composing?this.localCompositionInfo(e,t):null,a=i&&i.pos>-1?i:null,s=i&&i.pos<0,l=new Pe(this,a&&a.node);!function(e,t,n,r){var o=t.locals(e),i=0;if(0==o.length){for(var a=0;a<e.childCount;a++){var s=e.child(a);r(s,o,t.forChild(i,s),a),i+=s.nodeSize}return}for(var l=0,u=[],c=null,d=0;;){if(l<o.length&&o[l].to==i){for(var f=o[l++],p=void 0;l<o.length&&o[l].to==i;)(p||(p=[f])).push(o[l++]);if(p){p.sort(Re);for(var h=0;h<p.length;h++)n(p[h],d,!!c)}else n(f,d,!!c)}var m=void 0,v=void 0;if(c)v=-1,m=c,c=null;else{if(!(d<e.childCount))break;v=d,m=e.child(d++)}for(var g=0;g<u.length;g++)u[g].to<=i&&u.splice(g--,1);for(;l<o.length&&o[l].from<=i&&o[l].to>i;)u.push(o[l++]);var y=i+m.nodeSize;if(m.isText){var b=y;l<o.length&&o[l].from<b&&(b=o[l].from);for(var w=0;w<u.length;w++)u[w].to<b&&(b=u[w].to);b<y&&(c=m.cut(b-i),m=m.cut(0,b-i),y=b,v=-1)}r(m,m.isInline&&!m.isLeaf?u.filter((function(e){return!e.inline})):u.slice(),t.forChild(i,m),v),i=y}}(this.node,this.innerDeco,(function(t,i,a){t.spec.marks?l.syncToMarks(t.spec.marks,r,e):t.type.side>=0&&!a&&l.syncToMarks(i==n.node.childCount?v.Mark.none:n.node.child(i).marks,r,e),l.placeWidget(t,e,o)}),(function(t,n,a,u){var c;l.syncToMarks(t.marks,r,e),l.findNodeMatch(t,n,a,u)||s&&e.state.selection.from>o&&e.state.selection.to<o+t.nodeSize&&(c=l.findIndexWithChild(i.node))>-1&&l.updateNodeAt(t,n,a,c,e)||l.updateNextNode(t,n,a,e,u)||l.addNode(t,n,a,e,o),o+=t.nodeSize})),l.syncToMarks([],r,e),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||2==this.dirty)&&(a&&this.protectLocalComposition(e,a),Ce(this.contentDOM,this.children,e),T&&function(e){if("UL"==e.nodeName||"OL"==e.nodeName){var t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}(this.dom))}},{key:"localCompositionInfo",value:function(e,t){var n=e.state.selection,r=n.from,o=n.to;if(!(e.state.selection instanceof p.TextSelection)||r<t||o>t+this.node.content.size)return null;var i=e.domSelection(),a=function(e,t){for(;;){if(3==e.nodeType)return e;if(1==e.nodeType&&t>0){if(e.childNodes.length>t&&3==e.childNodes[t].nodeType)return e.childNodes[t];t=$(e=e.childNodes[t-1])}else{if(!(1==e.nodeType&&t<e.childNodes.length))return null;e=e.childNodes[t],t=0}}}(i.focusNode,i.focusOffset);if(!a||!this.dom.contains(a.parentNode))return null;if(this.node.inlineContent){var s=a.nodeValue,l=function(e,t,n,r){for(var o=0,i=0;o<e.childCount&&i<=r;){var a=e.child(o++),s=i;if(i+=a.nodeSize,a.isText){for(var l=a.text;o<e.childCount;){var u=e.child(o++);if(i+=u.nodeSize,!u.isText)break;l+=u.text}if(i>=n){var c=s<r?l.lastIndexOf(t,r-s-1):-1;if(c>=0&&c+t.length+s>=n)return s+c;if(n==r&&l.length>=r+t.length-s&&l.slice(r-s,r-s+t.length)==t)return r}}}return-1}(this.node.content,s,r-t,o-t);return l<0?null:{node:a,pos:l,text:s}}return{node:a,pos:-1,text:""}}},{key:"protectLocalComposition",value:function(e,t){var n=t.node,r=t.pos,o=t.text;if(!this.getDesc(n)){for(var i=n;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&&(i.pmViewDesc=void 0)}var a=new ye(this,i,n,o);e.input.compositionNodes.push(a),this.children=He(this.children,r,r+o.length,e,a)}}},{key:"update",value:function(e,t,n,r){return!(3==this.dirty||!e.sameMarkup(this.node))&&(this.updateInner(e,t,n,r),!0)}},{key:"updateInner",value:function(e,t,n,r){this.updateOuterDeco(t),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=0}},{key:"updateOuterDeco",value:function(e){if(!Le(e,this.outerDeco)){var t=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=Ae(this.dom,this.nodeDOM,Ee(this.outerDeco,this.node,t),Ee(e,this.node,t)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}}},{key:"selectNode",value:function(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!0)}},{key:"deselectNode",value:function(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.dom.removeAttribute("draggable")}},{key:"domAtom",get:function(){return this.node.isAtom}}],[{key:"create",value:function(e,t,r,o,i,a){var s,l=i.nodeViews[t.type.name],u=l&&l(t,i,(function(){return s?s.parent?s.parent.posBeforeChild(s):void 0:a}),r,o),c=u&&u.dom,d=u&&u.contentDOM;if(t.isText)if(c){if(3!=c.nodeType)throw new RangeError("Text must be rendered as a DOM text node")}else c=document.createTextNode(t.text);else if(!c){var f=v.DOMSerializer.renderSpec(document,t.type.spec.toDOM(t));c=f.dom,d=f.contentDOM}d||t.isText||"BR"==c.nodeName||(c.hasAttribute("contenteditable")||(c.contentEditable="false"),t.type.spec.draggable&&(c.draggable=!0));var p=c;return c=Te(c,r,t),u?s=new Se(e,t,r,o,c,d||null,p,u,i,a+1):t.isText?new xe(e,t,r,o,c,p,i):new n(e,t,r,o,c,d||null,p,i,a+1)}}]),n}(ve);function ke(e,t,n,r,o){return Te(r,t,e),new we(void 0,e,t,n,r,r,r,o,0)}var xe=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e,r,o,i,a,s,l){return Object(c.a)(this,n),t.call(this,e,r,o,i,a,null,s,l,0)}return Object(d.a)(n,[{key:"parseRule",value:function(){for(var e=this.nodeDOM.parentNode;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}},{key:"update",value:function(e,t,n,r){return!(3==this.dirty||0!=this.dirty&&!this.inParent()||!e.sameMarkup(this.node))&&(this.updateOuterDeco(t),0==this.dirty&&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=0,!0)}},{key:"inParent",value:function(){for(var e=this.parent.contentDOM,t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}},{key:"domFromPos",value:function(e){return{node:this.nodeDOM,offset:e}}},{key:"localPosFromDOM",value:function(e,t,r){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):Object(h.a)(Object(m.a)(n.prototype),"localPosFromDOM",this).call(this,e,t,r)}},{key:"ignoreMutation",value:function(e){return"characterData"!=e.type&&"selection"!=e.type}},{key:"slice",value:function(e,t,r){var o=this.node.cut(e,t),i=document.createTextNode(o.text);return new n(this.parent,o,this.outerDeco,this.innerDeco,i,i,r)}},{key:"markDirty",value:function(e,t){Object(h.a)(Object(m.a)(n.prototype),"markDirty",this).call(this,e,t),this.dom==this.nodeDOM||0!=e&&t!=this.nodeDOM.nodeValue.length||(this.dirty=3)}},{key:"domAtom",get:function(){return!1}}]),n}(we),Oe=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(){return Object(c.a)(this,n),t.apply(this,arguments)}return Object(d.a)(n,[{key:"parseRule",value:function(){return{ignore:!0}}},{key:"matchesHack",value:function(e){return 0==this.dirty&&this.dom.nodeName==e}},{key:"domAtom",get:function(){return!0}},{key:"ignoreForCoords",get:function(){return"IMG"==this.dom.nodeName}}]),n}(ve),Se=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e,r,o,i,a,s,l,u,d,f){var p;return Object(c.a)(this,n),(p=t.call(this,e,r,o,i,a,s,l,d,f)).spec=u,p}return Object(d.a)(n,[{key:"update",value:function(e,t,r,o){if(3==this.dirty)return!1;if(this.spec.update){var i=this.spec.update(e,t,r);return i&&this.updateInner(e,t,r,o),i}return!(!this.contentDOM&&!e.isLeaf)&&Object(h.a)(Object(m.a)(n.prototype),"update",this).call(this,e,t,r,o)}},{key:"selectNode",value:function(){this.spec.selectNode?this.spec.selectNode():Object(h.a)(Object(m.a)(n.prototype),"selectNode",this).call(this)}},{key:"deselectNode",value:function(){this.spec.deselectNode?this.spec.deselectNode():Object(h.a)(Object(m.a)(n.prototype),"deselectNode",this).call(this)}},{key:"setSelection",value:function(e,t,r,o){this.spec.setSelection?this.spec.setSelection(e,t,r):Object(h.a)(Object(m.a)(n.prototype),"setSelection",this).call(this,e,t,r,o)}},{key:"destroy",value:function(){this.spec.destroy&&this.spec.destroy(),Object(h.a)(Object(m.a)(n.prototype),"destroy",this).call(this)}},{key:"stopEvent",value:function(e){return!!this.spec.stopEvent&&this.spec.stopEvent(e)}},{key:"ignoreMutation",value:function(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):Object(h.a)(Object(m.a)(n.prototype),"ignoreMutation",this).call(this,e)}}]),n}(we);function Ce(e,t,n){for(var r=e.firstChild,o=!1,i=0;i<t.length;i++){var a=t[i],s=a.dom;if(s.parentNode==e){for(;s!=r;)r=Ne(r),o=!0;r=r.nextSibling}else o=!0,e.insertBefore(s,r);if(a instanceof be){var l=r?r.previousSibling:e.lastChild;Ce(a.contentDOM,a.children,n),r=l?l.nextSibling:e.firstChild}}for(;r;)r=Ne(r),o=!0;o&&n.trackWrites==e&&(n.trackWrites=null)}var je=function(e){e&&(this.nodeName=e)};je.prototype=Object.create(null);var De=[new je];function Ee(e,t,n){if(0==e.length)return De;for(var r=n?De[0]:new je,o=[r],i=0;i<e.length;i++){var a=e[i].type.attrs;if(a)for(var s in a.nodeName&&o.push(r=new je(a.nodeName)),a){var l=a[s];null!=l&&(n&&1==o.length&&o.push(r=new je(t.isInline?"span":"div")),"class"==s?r.class=(r.class?r.class+" ":"")+l:"style"==s?r.style=(r.style?r.style+";":"")+l:"nodeName"!=s&&(r[s]=l))}}return o}function Ae(e,t,n,r){if(n==De&&r==De)return t;for(var o=t,i=0;i<r.length;i++){var a=r[i],s=n[i];if(i){var l=void 0;s&&s.nodeName==a.nodeName&&o!=e&&(l=o.parentNode)&&l.nodeName.toLowerCase()==a.nodeName||((l=document.createElement(a.nodeName)).pmIsDeco=!0,l.appendChild(o),s=De[0]),o=l}Me(o,s||De[0],a)}return o}function Me(e,t,n){for(var r in t)"class"==r||"style"==r||"nodeName"==r||r in n||e.removeAttribute(r);for(var o in n)"class"!=o&&"style"!=o&&"nodeName"!=o&&n[o]!=t[o]&&e.setAttribute(o,n[o]);if(t.class!=n.class){for(var i=t.class?t.class.split(" ").filter(Boolean):[],a=n.class?n.class.split(" ").filter(Boolean):[],s=0;s<i.length;s++)-1==a.indexOf(i[s])&&e.classList.remove(i[s]);for(var l=0;l<a.length;l++)-1==i.indexOf(a[l])&&e.classList.add(a[l]);0==e.classList.length&&e.removeAttribute("class")}if(t.style!=n.style){if(t.style)for(var u,c=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g;u=c.exec(t.style);)e.style.removeProperty(u[1]);n.style&&(e.style.cssText+=n.style)}}function Te(e,t,n){return Ae(e,e,De,Ee(t,n,1!=e.nodeType))}function Le(e,t){if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function Ne(e){var t=e.nextSibling;return e.parentNode.removeChild(e),t}var Pe=function(){function e(t,n){Object(c.a)(this,e),this.lock=n,this.index=0,this.stack=[],this.changed=!1,this.top=t,this.preMatch=function(e,t){var n=t,r=n.children.length,o=e.childCount,i=new Map,a=[];e:for(;o>0;){for(var s=void 0;;)if(r){var l=n.children[r-1];if(!(l instanceof be)){s=l,r--;break}n=l,r=l.children.length}else{if(n==t)break e;r=n.parent.children.indexOf(n),n=n.parent}var u=s.node;if(u){if(u!=e.child(o-1))break;--o,i.set(s,o),a.push(s)}}return{index:o,matched:i,matches:a.reverse()}}(t.node.content,t)}return Object(d.a)(e,[{key:"destroyBetween",value:function(e,t){if(e!=t){for(var n=e;n<t;n++)this.top.children[n].destroy();this.top.children.splice(e,t-e),this.changed=!0}}},{key:"destroyRest",value:function(){this.destroyBetween(this.index,this.top.children.length)}},{key:"syncToMarks",value:function(e,t,n){for(var r=0,o=this.stack.length>>1,i=Math.min(o,e.length);r<i&&(r==o-1?this.top:this.stack[r+1<<1]).matchesMark(e[r])&&!1!==e[r].type.spec.spanning;)r++;for(;r<o;)this.destroyRest(),this.top.dirty=0,this.index=this.stack.pop(),this.top=this.stack.pop(),o--;for(;o<e.length;){this.stack.push(this.top,this.index+1);for(var a=-1,s=this.index;s<Math.min(this.index+3,this.top.children.length);s++)if(this.top.children[s].matchesMark(e[o])){a=s;break}if(a>-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{var l=be.create(this.top,e[o],t,n);this.top.children.splice(this.index,0,l),this.top=l,this.changed=!0}this.index=0,o++}}},{key:"findNodeMatch",value:function(e,t,n,r){var o,i=-1;if(r>=this.preMatch.index&&(o=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&o.matchesNode(e,t,n))i=this.top.children.indexOf(o,this.index);else for(var a=this.index,s=Math.min(this.top.children.length,a+5);a<s;a++){var l=this.top.children[a];if(l.matchesNode(e,t,n)&&!this.preMatch.matched.has(l)){i=a;break}}return!(i<0)&&(this.destroyBetween(this.index,i),this.index++,!0)}},{key:"updateNodeAt",value:function(e,t,n,r,o){var i=this.top.children[r];return 3==i.dirty&&i.dom==i.contentDOM&&(i.dirty=2),!!i.update(e,t,n,o)&&(this.destroyBetween(this.index,r),this.index=r+1,!0)}},{key:"findIndexWithChild",value:function(e){for(;;){var t=e.parentNode;if(!t)return-1;if(t==this.top.contentDOM){var n=e.pmViewDesc;if(n)for(var r=this.index;r<this.top.children.length;r++)if(this.top.children[r]==n)return r;return-1}e=t}}},{key:"updateNextNode",value:function(e,t,n,r,o){for(var i=this.index;i<this.top.children.length;i++){var a=this.top.children[i];if(a instanceof we){var s=this.preMatch.matched.get(a);if(null!=s&&s!=o)return!1;var l=a.dom;if(!(this.lock&&(l==this.lock||1==l.nodeType&&l.contains(this.lock.parentNode))&&!(e.isText&&a.node&&a.node.isText&&a.nodeDOM.nodeValue==e.text&&3!=a.dirty&&Le(t,a.outerDeco)))&&a.update(e,t,n,r))return this.destroyBetween(this.index,i),a.dom!=l&&(this.changed=!0),this.index++,!0;break}}return!1}},{key:"addNode",value:function(e,t,n,r,o){this.top.children.splice(this.index++,0,we.create(this.top,e,t,n,r,o)),this.changed=!0}},{key:"placeWidget",value:function(e,t,n){var 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){var o=new ge(this.top,e,t,n);this.top.children.splice(this.index++,0,o),this.changed=!0}else this.index++}},{key:"addTextblockHacks",value:function(){for(var e=this.top.children[this.index-1],t=this.top;e instanceof be;)e=(t=e).children[t.children.length-1];e&&e instanceof xe&&!/\n$/.test(e.node.text)||((M||E)&&e&&"false"==e.dom.contentEditable&&this.addHackNode("IMG",t),this.addHackNode("BR",this.top))}},{key:"addHackNode",value:function(e,t){if(t==this.top&&this.index<t.children.length&&t.children[this.index].matchesHack(e))this.index++;else{var n=document.createElement(e);"IMG"==e&&(n.className="ProseMirror-separator",n.alt=""),"BR"==e&&(n.className="ProseMirror-trailingBreak");var r=new Oe(this.top,[],n,null);t!=this.top?t.children.push(r):t.children.splice(this.index++,0,r),this.changed=!0}}}]),e}();function Re(e,t){return e.type.side-t.type.side}function He(e,t,n,r,o){for(var i=[],a=0,s=0;a<e.length;a++){var l=e[a],u=s,c=s+=l.size;u>=n||c<=t?i.push(l):(u<t&&i.push(l.slice(0,t-u,r)),o&&(i.push(o),o=void 0),c>n&&i.push(l.slice(n-u,l.size,r)))}return i}function Fe(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=e.domSelection(),r=e.state.doc;if(!n.focusNode)return null;var o=e.docView.nearestDesc(n.focusNode),i=o&&0==o.size,a=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(a<0)return null;var s,l,u=r.resolve(a);if(U(n)){for(s=u;o&&!o.node;)o=o.parent;var c=o.node;if(o&&c.isAtom&&p.NodeSelection.isSelectable(c)&&o.parent&&(!c.isInline||!q(n.focusNode,n.focusOffset,o.dom))){var d=o.posBefore;l=new p.NodeSelection(a==d?u:r.resolve(d))}}else{var f=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(f<0)return null;s=r.resolve(f)}if(!l){var h="pointer"==t||e.state.selection.head<u.pos&&!i?1:-1;l=Ge(e,s,u,h)}return l}function Ve(e){return e.editable?e.hasFocus():Ye(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function ze(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.state.selection;if(Ue(e,n),Ve(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&E){var r=e.domSelection(),o=e.domObserver.currentSelection;if(r.anchorNode&&o.anchorNode&&B(r.anchorNode,r.anchorOffset,o.anchorNode,o.anchorOffset))return e.input.mouseDown.delayedSelectionSync=!0,void e.domObserver.setCurSelection()}if(e.domObserver.disconnectSelection(),e.cursorWrapper)We(e);else{var i,a,s=n.anchor,l=n.head;!Be||n instanceof p.TextSelection||(n.$from.parent.inlineContent||(i=_e(e,n.from)),n.empty||n.$from.parent.inlineContent||(a=_e(e,n.to))),e.docView.setSelection(s,l,e.root,t),Be&&(i&&$e(i),a&&$e(a)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&qe(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}var Be=M||E&&A<63;function _e(e,t){var n=e.docView.domFromPos(t,0),r=n.node,o=n.offset,i=o<r.childNodes.length?r.childNodes[o]:null,a=o?r.childNodes[o-1]:null;if(M&&i&&"false"==i.contentEditable)return Ie(i);if((!i||"false"==i.contentEditable)&&(!a||"false"==a.contentEditable)){if(i)return Ie(i);if(a)return Ie(a)}}function Ie(e){return e.contentEditable="true",M&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function $e(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function qe(e){var t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.input.hideSelectionGuard);var n=e.domSelection(),r=n.anchorNode,o=n.anchorOffset;t.addEventListener("selectionchange",e.input.hideSelectionGuard=function(){n.anchorNode==r&&n.anchorOffset==o||(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout((function(){Ve(e)&&!e.state.selection.visible||e.dom.classList.remove("ProseMirror-hideselection")}),20))})}function We(e){var t=e.domSelection(),n=document.createRange(),r=e.cursorWrapper.dom,o="IMG"==r.nodeName;o?n.setEnd(r.parentNode,H(r)+1):n.setEnd(r,0),n.collapse(!1),t.removeAllRanges(),t.addRange(n),!o&&!e.state.selection.visible&&S&&C<=11&&(r.disabled=!0,r.disabled=!1)}function Ue(e,t){if(t instanceof p.NodeSelection){var n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(Ke(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else Ke(e)}function Ke(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function Ge(e,t,n,r){return e.someProp("createSelectionBetween",(function(r){return r(e,t,n)}))||p.TextSelection.between(t,n,r)}function Je(e){return(!e.editable||e.root.activeElement==e.dom)&&Ye(e)}function Ye(e){var t=e.domSelection();if(!t.anchorNode)return!1;try{return e.dom.contains(3==t.anchorNode.nodeType?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(3==t.focusNode.nodeType?t.focusNode.parentNode:t.focusNode))}catch(n){return!1}}function Ze(e,t){var n=e.selection,r=n.$anchor,o=n.$head,i=t>0?r.max(o):r.min(o),a=i.parent.inlineContent?i.depth?e.doc.resolve(t>0?i.after():i.before()):null:i;return a&&p.Selection.findFrom(a,t)}function Xe(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function Qe(e,t,n){var r=e.state.selection;if(!(r instanceof p.TextSelection)){if(r instanceof p.NodeSelection&&r.node.isInline)return Xe(e,new p.TextSelection(t>0?r.$to:r.$from));var o=Ze(e.state,t);return!!o&&Xe(e,o)}if(!r.empty||n.indexOf("s")>-1)return!1;if(e.endOfTextblock(t>0?"right":"left")){var i=Ze(e.state,t);return!!(i&&i instanceof p.NodeSelection)&&Xe(e,i)}if(!(L&&n.indexOf("m")>-1)){var a,s=r.$head,l=s.textOffset?null:t<0?s.nodeBefore:s.nodeAfter;if(!l||l.isText)return!1;var u=t<0?s.pos-l.nodeSize:s.pos;return!!(l.isAtom||(a=e.docView.descAt(u))&&!a.contentDOM)&&(p.NodeSelection.isSelectable(l)?Xe(e,new p.NodeSelection(t<0?e.state.doc.resolve(s.pos-l.nodeSize):s)):!!P&&Xe(e,new p.TextSelection(e.state.doc.resolve(t<0?u:u+l.nodeSize))))}}function et(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function tt(e){var t=e.pmViewDesc;return t&&0==t.size&&(e.nextSibling||"BR"!=e.nodeName)}function nt(e){var t=e.domSelection(),n=t.focusNode,r=t.focusOffset;if(n){var o,i,a=!1;for(j&&1==n.nodeType&&r<et(n)&&tt(n.childNodes[r])&&(a=!0);;)if(r>0){if(1!=n.nodeType)break;var s=n.childNodes[r-1];if(tt(s))o=n,i=--r;else{if(3!=s.nodeType)break;r=(n=s).nodeValue.length}}else{if(ot(n))break;for(var l=n.previousSibling;l&&tt(l);)o=n.parentNode,i=H(l),l=l.previousSibling;if(l)r=et(n=l);else{if((n=n.parentNode)==e.dom)break;r=0}}a?it(e,t,n,r):o&&it(e,t,o,i)}}function rt(e){var t=e.domSelection(),n=t.focusNode,r=t.focusOffset;if(n){for(var o,i,a=et(n);;)if(r<a){if(1!=n.nodeType)break;if(!tt(n.childNodes[r]))break;o=n,i=++r}else{if(ot(n))break;for(var s=n.nextSibling;s&&tt(s);)o=s.parentNode,i=H(s)+1,s=s.nextSibling;if(s)r=0,a=et(n=s);else{if((n=n.parentNode)==e.dom)break;r=a=0}}o&&it(e,t,o,i)}}function ot(e){var t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function it(e,t,n,r){if(U(t)){var o=document.createRange();o.setEnd(n,r),o.setStart(n,r),t.removeAllRanges(),t.addRange(o)}else t.extend&&t.extend(n,r);e.domObserver.setCurSelection();var i=e.state;setTimeout((function(){e.state==i&&ze(e)}),50)}function at(e,t,n){var r=e.state.selection;if(r instanceof p.TextSelection&&!r.empty||n.indexOf("s")>-1)return!1;if(L&&n.indexOf("m")>-1)return!1;var o=r.$from,i=r.$to;if(!o.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){var a=Ze(e.state,t);if(a&&a instanceof p.NodeSelection)return Xe(e,a)}if(!o.parent.inlineContent){var s=t<0?o:i,l=r instanceof p.AllSelection?p.Selection.near(s,t):p.Selection.findFrom(s,t);return!!l&&Xe(e,l)}return!1}function st(e,t){if(!(e.state.selection instanceof p.TextSelection))return!0;var n=e.state.selection,r=n.$head,o=n.$anchor,i=n.empty;if(!r.sameParent(o))return!0;if(!i)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;var a=!r.textOffset&&(t<0?r.nodeBefore:r.nodeAfter);if(a&&!a.isText){var s=e.state.tr;return t<0?s.delete(r.pos-a.nodeSize,r.pos):s.delete(r.pos,r.pos+a.nodeSize),e.dispatch(s),!0}return!1}function lt(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function ut(e,t){var n=t.keyCode,r=function(e){var t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}(t);return 8==n||L&&72==n&&"c"==r?st(e,-1)||nt(e):46==n||L&&68==n&&"c"==r?st(e,1)||rt(e):13==n||27==n||(37==n||L&&66==n&&"c"==r?Qe(e,-1,r)||nt(e):39==n||L&&70==n&&"c"==r?Qe(e,1,r)||rt(e):38==n||L&&80==n&&"c"==r?at(e,-1,r)||nt(e):40==n||L&&78==n&&"c"==r?function(e){if(!M||e.state.selection.$head.parentOffset>0)return!1;var t=e.domSelection(),n=t.focusNode,r=t.focusOffset;if(n&&1==n.nodeType&&0==r&&n.firstChild&&"false"==n.firstChild.contentEditable){var o=n.firstChild;lt(e,o,"true"),setTimeout((function(){return lt(e,o,"false")}),20)}return!1}(e)||at(e,1,r)||rt(e):r==(L?"m":"c")&&(66==n||73==n||89==n||90==n))}function ct(e,t){for(var n=[],r=t.content,o=t.openStart,i=t.openEnd;o>1&&i>1&&1==r.childCount&&1==r.firstChild.childCount;){o--,i--;var a=r.firstChild;n.push(a.type.name,a.attrs!=a.type.defaultAttrs?a.attrs:null),r=a.content}var s=e.someProp("clipboardSerializer")||v.DOMSerializer.fromSchema(e.state.schema),l=wt(),u=l.createElement("div");u.appendChild(s.serializeFragment(r,{document:l}));for(var c,d=u.firstChild,f=0;d&&1==d.nodeType&&(c=yt[d.nodeName.toLowerCase()]);){for(var p=c.length-1;p>=0;p--){for(var h=l.createElement(c[p]);u.firstChild;)h.appendChild(u.firstChild);u.appendChild(h),f++}d=u.firstChild}return d&&1==d.nodeType&&d.setAttribute("data-pm-slice","".concat(o," ").concat(i).concat(f?" -".concat(f):""," ").concat(JSON.stringify(n))),{dom:u,text:e.someProp("clipboardTextSerializer",(function(e){return e(t)}))||t.content.textBetween(0,t.content.size,"\n\n")}}function dt(e,t,n,r,o){var i,a,s=o.parent.type.spec.code;if(!n&&!t)return null;var l=t&&(r||s||!n);if(l){if(e.someProp("transformPastedText",(function(e){t=e(t,s||r)})),s)return t?new v.Slice(v.Fragment.from(e.state.schema.text(t.replace(/\r\n?/g,"\n"))),0,0):v.Slice.empty;var u=e.someProp("clipboardTextParser",(function(e){return e(t,o,r)}));if(u)a=u;else{var c=o.marks(),d=e.state.schema,f=v.DOMSerializer.fromSchema(d);i=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach((function(e){var t=i.appendChild(document.createElement("p"));e&&t.appendChild(f.serializeNode(d.text(e,c)))}))}}else e.someProp("transformPastedHTML",(function(e){n=e(n)})),i=function(e){var t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));var n,r=wt().createElement("div"),o=/<([a-z][^>\s]+)/i.exec(e);(n=o&&yt[o[1].toLowerCase()])&&(e=n.map((function(e){return"<"+e+">"})).join("")+e+n.map((function(e){return"</"+e+">"})).reverse().join(""));if(r.innerHTML=e,n)for(var i=0;i<n.length;i++)r=r.querySelector(n[i])||r;return r}(n),P&&function(e){for(var t=e.querySelectorAll(E?"span:not([class]):not([style])":"span.Apple-converted-space"),n=0;n<t.length;n++){var r=t[n];1==r.childNodes.length&&"\xa0"==r.textContent&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),r)}}(i);var p=i&&i.querySelector("[data-pm-slice]"),h=p&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(p.getAttribute("data-pm-slice")||"");if(h&&h[3])for(var m=+h[3];m>0&&i.firstChild;m--)i=i.firstChild;if(!a){var g=e.someProp("clipboardParser")||e.someProp("domParser")||v.DOMParser.fromSchema(e.state.schema);a=g.parseSlice(i,{preserveWhitespace:!(!l&&!h),context:o,ruleFromNode:function(e){return"BR"!=e.nodeName||e.nextSibling||!e.parentNode||ft.test(e.parentNode.nodeName)?null:{ignore:!0}}})}if(h)a=function(e,t){if(!e.size)return e;var n,r=e.content.firstChild.type.schema;try{n=JSON.parse(t)}catch(u){return e}for(var o=e.content,i=e.openStart,a=e.openEnd,s=n.length-2;s>=0;s-=2){var l=r.nodes[n[s]];if(!l||l.hasRequiredAttrs())break;o=v.Fragment.from(l.create(n[s+1],o)),i++,a++}return new v.Slice(o,i,a)}(gt(a,+h[1],+h[2]),h[4]);else if(a=v.Slice.maxOpen(function(e,t){if(e.childCount<2)return e;for(var n=function(n){var r=t.node(n).contentMatchAt(t.index(n)),o=void 0,i=[];if(e.forEach((function(e){if(i){var t,n=r.findWrapping(e.type);if(!n)return i=null;if(t=i.length&&o.length&&ht(n,o,e,i[i.length-1],0))i[i.length-1]=t;else{i.length&&(i[i.length-1]=mt(i[i.length-1],o.length));var a=pt(e,n);i.push(a),r=r.matchType(a.type),o=n}}})),i)return{v:v.Fragment.from(i)}},r=t.depth;r>=0;r--){var o=n(r);if("object"===typeof o)return o.v}return e}(a.content,o),!0),a.openStart||a.openEnd){for(var y=0,b=0,w=a.content.firstChild;y<a.openStart&&!w.type.spec.isolating;y++,w=w.firstChild);for(var k=a.content.lastChild;b<a.openEnd&&!k.type.spec.isolating;b++,k=k.lastChild);a=gt(a,y,b)}return e.someProp("transformPasted",(function(e){a=e(a)})),a}var ft=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function pt(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=t.length-1;r>=n;r--)e=t[r].create(null,v.Fragment.from(e));return e}function ht(e,t,n,r,o){if(o<e.length&&o<t.length&&e[o]==t[o]){var i=ht(e,t,n,r.lastChild,o+1);if(i)return r.copy(r.content.replaceChild(r.childCount-1,i));if(r.contentMatchAt(r.childCount).matchType(o==e.length-1?n.type:e[o+1]))return r.copy(r.content.append(v.Fragment.from(pt(n,e,o+1))))}}function mt(e,t){if(0==t)return e;var n=e.content.replaceChild(e.childCount-1,mt(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(v.Fragment.empty,!0);return e.copy(n.append(r))}function vt(e,t,n,r,o,i){var a=t<0?e.firstChild:e.lastChild,s=a.content;return o<r-1&&(s=vt(s,t,n,r,o+1,i)),o>=n&&(s=t<0?a.contentMatchAt(0).fillBefore(s,e.childCount>1||i<=o).append(s):s.append(a.contentMatchAt(a.childCount).fillBefore(v.Fragment.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,a.copy(s))}function gt(e,t,n){return t<e.openStart&&(e=new v.Slice(vt(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new v.Slice(vt(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}var yt={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]},bt=null;function wt(){return bt||(bt=document.implementation.createHTMLDocument("title"))}var kt={},xt={},Ot=Object(d.a)((function e(){Object(c.a)(this,e),this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastAndroidDelete=0,this.composing=!1,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}));function St(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function Ct(e){e.someProp("handleDOMEvents",(function(t){for(var n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=function(t){return jt(e,t)})}))}function jt(e,t){return e.someProp("handleDOMEvents",(function(n){var r=n[t.type];return!!r&&(r(e,t)||t.defaultPrevented)}))}function Dt(e){return{left:e.clientX,top:e.clientY}}function Et(e,t,n,r,o){if(-1==r)return!1;for(var i=e.state.doc.resolve(r),a=function(r){if(e.someProp(t,(function(t){return r>i.depth?t(e,n,i.nodeAfter,i.before(r),o,!0):t(e,n,i.node(r),i.before(r),o,!1)})))return{v:!0}},s=i.depth+1;s>0;s--){var l=a(s);if("object"===typeof l)return l.v}return!1}function At(e,t,n){e.focused||e.focus();var r=e.state.tr.setSelection(t);"pointer"==n&&r.setMeta("pointer",!0),e.dispatch(r)}function Mt(e,t,n,r,o){return Et(e,"handleClickOn",t,n,r)||e.someProp("handleClick",(function(n){return n(e,t,r)}))||(o?function(e,t){if(-1==t)return!1;var n,r,o=e.state.selection;o instanceof p.NodeSelection&&(n=o.node);for(var i=e.state.doc.resolve(t),a=i.depth+1;a>0;a--){var s=a>i.depth?i.nodeAfter:i.node(a);if(p.NodeSelection.isSelectable(s)){r=n&&o.$from.depth>0&&a>=o.$from.depth&&i.before(o.$from.depth+1)==o.$from.pos?i.before(o.$from.depth):i.before(a);break}}return null!=r&&(At(e,p.NodeSelection.create(e.state.doc,r),"pointer"),!0)}(e,n):function(e,t){if(-1==t)return!1;var n=e.state.doc.resolve(t),r=n.nodeAfter;return!!(r&&r.isAtom&&p.NodeSelection.isSelectable(r))&&(At(e,new p.NodeSelection(n),"pointer"),!0)}(e,n))}function Tt(e,t,n,r){return Et(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",(function(n){return n(e,t,r)}))}function Lt(e,t,n,r){return Et(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",(function(n){return n(e,t,r)}))||function(e,t,n){if(0!=n.button)return!1;var r=e.state.doc;if(-1==t)return!!r.inlineContent&&(At(e,p.TextSelection.create(r,0,r.content.size),"pointer"),!0);for(var o=r.resolve(t),i=o.depth+1;i>0;i--){var a=i>o.depth?o.nodeAfter:o.node(i),s=o.before(i);if(a.inlineContent)At(e,p.TextSelection.create(r,s+1,s+1+a.content.size),"pointer");else{if(!p.NodeSelection.isSelectable(a))continue;At(e,p.NodeSelection.create(r,s),"pointer")}return!0}}(e,n,r)}function Nt(e){return Bt(e)}xt.keydown=function(e,t){var n=t;if(e.input.shiftKey=16==n.keyCode||n.shiftKey,!Ht(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!N||!E||13!=n.keyCode))if(229!=n.keyCode&&e.domObserver.forceFlush(),!T||13!=n.keyCode||n.ctrlKey||n.altKey||n.metaKey)e.someProp("handleKeyDown",(function(t){return t(e,n)}))||ut(e,n)?n.preventDefault():St(e,"key");else{var r=Date.now();e.input.lastIOSEnter=r,e.input.lastIOSEnterFallbackTimeout=setTimeout((function(){e.input.lastIOSEnter==r&&(e.someProp("handleKeyDown",(function(t){return t(e,K(13,"Enter"))})),e.input.lastIOSEnter=0)}),200)}},xt.keyup=function(e,t){16==t.keyCode&&(e.input.shiftKey=!1)},xt.keypress=function(e,t){var n=t;if(!(Ht(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||L&&n.metaKey))if(e.someProp("handleKeyPress",(function(t){return t(e,n)})))n.preventDefault();else{var r=e.state.selection;if(!(r instanceof p.TextSelection)||!r.$from.sameParent(r.$to)){var o=String.fromCharCode(n.charCode);e.someProp("handleTextInput",(function(t){return t(e,r.$from.pos,r.$to.pos,o)}))||e.dispatch(e.state.tr.insertText(o).scrollIntoView()),n.preventDefault()}}};var Pt=L?"metaKey":"ctrlKey";kt.mousedown=function(e,t){var n=t;e.input.shiftKey=n.shiftKey;var r=Nt(e),o=Date.now(),i="singleClick";o-e.input.lastClick.time<500&&function(e,t){var n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}(n,e.input.lastClick)&&!n[Pt]&&("singleClick"==e.input.lastClick.type?i="doubleClick":"doubleClick"==e.input.lastClick.type&&(i="tripleClick")),e.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:i};var a=e.posAtCoords(Dt(n));a&&("singleClick"==i?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new Rt(e,a,n,!!r)):("doubleClick"==i?Tt:Lt)(e,a.pos,a.inside,n)?n.preventDefault():St(e,"pointer"))};var Rt=function(){function e(t,n,r,o){var i,a,s=this;if(Object(c.a)(this,e),this.view=t,this.pos=n,this.event=r,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!r[Pt],this.allowDefault=r.shiftKey,n.inside>-1)i=t.state.doc.nodeAt(n.inside),a=n.inside;else{var l=t.state.doc.resolve(n.pos);i=l.parent,a=l.depth?l.before():0}var u=o?null:r.target,d=u?t.docView.nearestDesc(u,!0):null;this.target=d?d.dom:null;var f=t.state.selection;(0==r.button&&i.type.spec.draggable&&!1!==i.type.spec.selectable||f instanceof p.NodeSelection&&f.from<=a&&f.to>a)&&(this.mightDrag={node:i,pos:a,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!j||this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout((function(){s.view.input.mouseDown==s&&s.target.setAttribute("contentEditable","false")}),20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),St(t,"pointer")}return Object(d.a)(e,[{key:"done",value:function(){var e=this;this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout((function(){return ze(e.view)})),this.view.input.mouseDown=null}},{key:"up",value:function(e){if(this.done(),this.view.dom.contains(e.target)){var t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(Dt(e))),this.allowDefault||!t?St(this.view,"pointer"):Mt(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():0==e.button&&(this.flushed||M&&this.mightDrag&&!this.mightDrag.node.isAtom||E&&!(this.view.state.selection instanceof p.TextSelection)&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(At(this.view,p.Selection.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):St(this.view,"pointer")}}},{key:"move",value:function(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0),St(this.view,"pointer"),0==e.buttons&&this.done()}}]),e}();function Ht(e,t){return!!e.composing||!!(M&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500)&&(e.input.compositionEndedAt=-2e8,!0)}kt.touchdown=function(e){Nt(e),St(e,"pointer")},kt.contextmenu=function(e){return Nt(e)};var Ft=N?5e3:-1;function Vt(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout((function(){return Bt(e)}),t))}function zt(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=function(){var e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function Bt(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!(N&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),zt(e),t||e.docView&&e.docView.dirty){var n=Fe(e);return n&&!n.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(n)):e.updateState(e.state),!0}return!1}}xt.compositionstart=xt.compositionupdate=function(e){if(!e.composing){e.domObserver.flush();var t=e.state,n=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some((function(e){return!1===e.type.spec.inclusive}))))e.markCursor=e.state.storedMarks||n.marks(),Bt(e,!0),e.markCursor=null;else if(Bt(e),j&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length)for(var r=e.domSelection(),o=r.focusNode,i=r.focusOffset;o&&1==o.nodeType&&0!=i;){var a=i<0?o.lastChild:o.childNodes[i-1];if(!a)break;if(3==a.nodeType){r.collapse(a,a.nodeValue.length);break}o=a,i=-1}e.input.composing=!0}Vt(e,Ft)},xt.compositionend=function(e,t){e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,Vt(e,20))};var _t=S&&C<15||T&&R<604;function It(e,t,n,r){var o=dt(e,t,n,e.input.shiftKey,e.state.selection.$from);if(e.someProp("handlePaste",(function(t){return t(e,r,o||v.Slice.empty)})))return!0;if(!o)return!1;var i=function(e){return 0==e.openStart&&0==e.openEnd&&1==e.content.childCount?e.content.firstChild:null}(o),a=i?e.state.tr.replaceSelectionWith(i,e.input.shiftKey):e.state.tr.replaceSelection(o);return e.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}kt.copy=xt.cut=function(e,t){var n=t,r=e.state.selection,o="cut"==n.type;if(!r.empty){var i=_t?null:n.clipboardData,a=ct(e,r.content()),s=a.dom,l=a.text;i?(n.preventDefault(),i.clearData(),i.setData("text/html",s.innerHTML),i.setData("text/plain",l)):function(e,t){if(e.dom.parentNode){var n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";var r=getSelection(),o=document.createRange();o.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout((function(){n.parentNode&&n.parentNode.removeChild(n),e.focus()}),50)}}(e,s),o&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))}},xt.paste=function(e,t){var n=t;if(!e.composing||N){var r=_t?null:n.clipboardData;r&&It(e,r.getData("text/plain"),r.getData("text/html"),n)?n.preventDefault():function(e,t){if(e.dom.parentNode){var n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus(),setTimeout((function(){e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?It(e,r.value,null,t):It(e,r.textContent,r.innerHTML,t)}),50)}}(e,n)}};var $t=Object(d.a)((function e(t,n){Object(c.a)(this,e),this.slice=t,this.move=n})),qt=L?"altKey":"ctrlKey";for(var Wt in kt.dragstart=function(e,t){var n=t,r=e.input.mouseDown;if(r&&r.done(),n.dataTransfer){var o=e.state.selection,i=o.empty?null:e.posAtCoords(Dt(n));if(i&&i.pos>=o.from&&i.pos<=(o instanceof p.NodeSelection?o.to-1:o.to));else if(r&&r.mightDrag)e.dispatch(e.state.tr.setSelection(p.NodeSelection.create(e.state.doc,r.mightDrag.pos)));else if(n.target&&1==n.target.nodeType){var a=e.docView.nearestDesc(n.target,!0);a&&a.node.type.spec.draggable&&a!=e.docView&&e.dispatch(e.state.tr.setSelection(p.NodeSelection.create(e.state.doc,a.posBefore)))}var s=e.state.selection.content(),l=ct(e,s),u=l.dom,c=l.text;n.dataTransfer.clearData(),n.dataTransfer.setData(_t?"Text":"text/html",u.innerHTML),n.dataTransfer.effectAllowed="copyMove",_t||n.dataTransfer.setData("text/plain",c),e.dragging=new $t(s,!n[qt])}},kt.dragend=function(e){var t=e.dragging;window.setTimeout((function(){e.dragging==t&&(e.dragging=null)}),50)},xt.dragover=xt.dragenter=function(e,t){return t.preventDefault()},xt.drop=function(e,t){var n=t,r=e.dragging;if(e.dragging=null,n.dataTransfer){var o=e.posAtCoords(Dt(n));if(o){var i=e.state.doc.resolve(o.pos);if(i){var a=r&&r.slice;a?e.someProp("transformPasted",(function(e){a=e(a)})):a=dt(e,n.dataTransfer.getData(_t?"Text":"text/plain"),_t?null:n.dataTransfer.getData("text/html"),!1,i);var s=!(!r||n[qt]);if(e.someProp("handleDrop",(function(t){return t(e,n,a||v.Slice.empty,s)})))n.preventDefault();else if(a){n.preventDefault();var l=a?Object(g.h)(e.state.doc,i.pos,a):i.pos;null==l&&(l=i.pos);var u=e.state.tr;s&&u.deleteSelection();var c=u.mapping.map(l),d=0==a.openStart&&0==a.openEnd&&1==a.content.childCount,f=u.doc;if(d?u.replaceRangeWith(c,c,a.content.firstChild):u.replaceRange(c,c,a),!u.doc.eq(f)){var h=u.doc.resolve(c);if(d&&p.NodeSelection.isSelectable(a.content.firstChild)&&h.nodeAfter&&h.nodeAfter.sameMarkup(a.content.firstChild))u.setSelection(new p.NodeSelection(h));else{var m=u.mapping.map(l);u.mapping.maps[u.mapping.maps.length-1].forEach((function(e,t,n,r){return m=r})),u.setSelection(Ge(e,h,u.doc.resolve(m)))}e.focus(),e.dispatch(u.setMeta("uiEvent","drop"))}}}}}},kt.focus=function(e){e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout((function(){e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelection())&&ze(e)}),20))},kt.blur=function(e,t){var n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)},kt.beforeinput=function(e,t){if(E&&N&&"deleteContentBackward"==t.inputType){e.domObserver.flushSoon();var n=e.input.domChangeCount;setTimeout((function(){if(e.input.domChangeCount==n&&(e.dom.blur(),e.focus(),!e.someProp("handleKeyDown",(function(t){return t(e,K(8,"Backspace"))})))){var t=e.state.selection.$cursor;t&&t.pos>0&&e.dispatch(e.state.tr.delete(t.pos-1,t.pos).scrollIntoView())}}),50)}},xt)kt[Wt]=xt[Wt];function Ut(e,t){if(e==t)return!0;for(var n in e)if(e[n]!==t[n])return!1;for(var r in t)if(!(r in e))return!1;return!0}var Kt=function(){function e(t,n){Object(c.a)(this,e),this.toDOM=t,this.spec=n||Xt,this.side=this.spec.side||0}return Object(d.a)(e,[{key:"map",value:function(e,t,n,r){var o=e.mapResult(t.from+r,this.side<0?-1:1),i=o.pos;return o.deleted?null:new Yt(i-n,i-n,this)}},{key:"valid",value:function(){return!0}},{key:"eq",value:function(t){return this==t||t instanceof e&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&Ut(this.spec,t.spec))}},{key:"destroy",value:function(e){this.spec.destroy&&this.spec.destroy(e)}}]),e}(),Gt=function(){function e(t,n){Object(c.a)(this,e),this.attrs=t,this.spec=n||Xt}return Object(d.a)(e,[{key:"map",value:function(e,t,n,r){var o=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-n,i=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-n;return o>=i?null:new Yt(o,i,this)}},{key:"valid",value:function(e,t){return t.from<t.to}},{key:"eq",value:function(t){return this==t||t instanceof e&&Ut(this.attrs,t.attrs)&&Ut(this.spec,t.spec)}},{key:"destroy",value:function(){}}],[{key:"is",value:function(t){return t.type instanceof e}}]),e}(),Jt=function(){function e(t,n){Object(c.a)(this,e),this.attrs=t,this.spec=n||Xt}return Object(d.a)(e,[{key:"map",value:function(e,t,n,r){var o=e.mapResult(t.from+r,1);if(o.deleted)return null;var i=e.mapResult(t.to+r,-1);return i.deleted||i.pos<=o.pos?null:new Yt(o.pos-n,i.pos-n,this)}},{key:"valid",value:function(e,t){var n,r=e.content.findIndex(t.from),o=r.index,i=r.offset;return i==t.from&&!(n=e.child(o)).isText&&i+n.nodeSize==t.to}},{key:"eq",value:function(t){return this==t||t instanceof e&&Ut(this.attrs,t.attrs)&&Ut(this.spec,t.spec)}},{key:"destroy",value:function(){}}]),e}(),Yt=function(){function e(t,n,r){Object(c.a)(this,e),this.from=t,this.to=n,this.type=r}return Object(d.a)(e,[{key:"copy",value:function(t,n){return new e(t,n,this.type)}},{key:"eq",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}},{key:"map",value:function(e,t,n){return this.type.map(e,this,t,n)}},{key:"spec",get:function(){return this.type.spec}},{key:"inline",get:function(){return this.type instanceof Gt}}],[{key:"widget",value:function(t,n,r){return new e(t,t,new Kt(n,r))}},{key:"inline",value:function(t,n,r,o){return new e(t,n,new Gt(r,o))}},{key:"node",value:function(t,n,r,o){return new e(t,n,new Jt(r,o))}}]),e}(),Zt=[],Xt={},Qt=function(){function e(t,n){Object(c.a)(this,e),this.local=t.length?t:Zt,this.children=n.length?n:Zt}return Object(d.a)(e,[{key:"find",value:function(e,t,n){var r=[];return this.findInner(null==e?0:e,null==t?1e9:t,r,0,n),r}},{key:"findInner",value:function(e,t,n,r,o){for(var i=0;i<this.local.length;i++){var a=this.local[i];a.from<=t&&a.to>=e&&(!o||o(a.spec))&&n.push(a.copy(a.from+r,a.to+r))}for(var s=0;s<this.children.length;s+=3)if(this.children[s]<t&&this.children[s+1]>e){var l=this.children[s]+1;this.children[s+2].findInner(e-l,t-l,n,r+l,o)}}},{key:"map",value:function(e,t,n){return this==en||0==e.maps.length?this:this.mapInner(e,t,0,0,n||Xt)}},{key:"mapInner",value:function(t,n,r,o,i){for(var a,s=0;s<this.local.length;s++){var l=this.local[s].map(t,r,o);l&&l.type.valid(n,l)?(a||(a=[])).push(l):i.onRemove&&i.onRemove(this.local[s].spec)}return this.children.length?function(e,t,n,r,o,i,a){for(var s=e.slice(),l=function(e,t,n,r){for(var a=0;a<s.length;a+=3){var l=s[a+1],u=void 0;if(!(l<0||e>l+i)){var c=s[a]+i;t>=c?s[a+1]=e<=c?-2:-1:n>=o&&(u=r-n-(t-e))&&(s[a]+=u,s[a+1]+=u)}}},u=0;u<n.maps.length;u++)n.maps[u].forEach(l);for(var c=!1,d=0;d<s.length;d+=3)if(s[d+1]<0){if(-2==s[d+1]){c=!0,s[d+1]=-1;continue}var f=n.map(e[d]+i),p=f-o;if(p<0||p>=r.content.size){c=!0;continue}var h=n.map(e[d+1]+i,-1)-o,m=r.content.findIndex(p),v=m.index,g=m.offset,y=r.maybeChild(v);if(y&&g==p&&g+y.nodeSize==h){var b=s[d+2].mapInner(n,y,f+1,e[d]+i+1,a);b!=en?(s[d]=p,s[d+1]=h,s[d+2]=b):(s[d+1]=-2,c=!0)}else c=!0}if(c){var w=function(e,t,n,r,o,i,a){function s(e,t){for(var i=0;i<e.local.length;i++){var l=e.local[i].map(r,o,t);l?n.push(l):a.onRemove&&a.onRemove(e.local[i].spec)}for(var u=0;u<e.children.length;u+=3)s(e.children[u+2],e.children[u]+t+1)}for(var l=0;l<e.length;l+=3)-1==e[l+1]&&s(e[l+2],t[l]+i+1);return n}(s,e,t,n,o,i,a),k=an(w,r,0,a);t=k.local;for(var x=0;x<s.length;x+=3)s[x+1]<0&&(s.splice(x,3),x-=3);for(var O=0,S=0;O<k.children.length;O+=3){for(var C=k.children[O];S<s.length&&s[S]<C;)S+=3;s.splice(S,0,k.children[O],k.children[O+1],k.children[O+2])}}return new Qt(t.sort(sn),s)}(this.children,a||[],t,n,r,o,i):a?new e(a.sort(sn),Zt):en}},{key:"add",value:function(t,n){return n.length?this==en?e.create(t,n):this.addInner(t,n,0):this}},{key:"addInner",value:function(t,n,r){var o,i=this,a=0;t.forEach((function(e,t){var s,l=t+r;if(s=rn(n,e,l)){for(o||(o=i.children.slice());a<o.length&&o[a]<t;)a+=3;o[a]==t?o[a+2]=o[a+2].addInner(e,s,l+1):o.splice(a,0,t,t+e.nodeSize,an(s,e,l+1,Xt)),a+=3}}));for(var s=nn(a?on(n):n,-r),l=0;l<s.length;l++)s[l].type.valid(t,s[l])||s.splice(l--,1);return new e(s.length?this.local.concat(s).sort(sn):this.local,o||this.children)}},{key:"remove",value:function(e){return 0==e.length||this==en?this:this.removeInner(e,0)}},{key:"removeInner",value:function(t,n){for(var r=this.children,o=this.local,i=0;i<r.length;i+=3){for(var a,s=void 0,l=r[i]+n,u=r[i+1]+n,c=0;c<t.length;c++)(a=t[c])&&a.from>l&&a.to<u&&(t[c]=null,(s||(s=[])).push(a));if(s){r==this.children&&(r=this.children.slice());var d=r[i+2].removeInner(s,l+1);d!=en?r[i+2]=d:(r.splice(i,3),i-=3)}}if(o.length)for(var f,p=0;p<t.length;p++)if(f=t[p])for(var h=0;h<o.length;h++)o[h].eq(f,n)&&(o==this.local&&(o=this.local.slice()),o.splice(h--,1));return r==this.children&&o==this.local?this:o.length||r.length?new e(o,r):en}},{key:"forChild",value:function(t,n){if(this==en)return this;if(n.isLeaf)return e.empty;for(var r,o,i=0;i<this.children.length;i+=3)if(this.children[i]>=t){this.children[i]==t&&(r=this.children[i+2]);break}for(var a=t+1,s=a+n.content.size,l=0;l<this.local.length;l++){var u=this.local[l];if(u.from<s&&u.to>a&&u.type instanceof Gt){var c=Math.max(a,u.from)-a,d=Math.min(s,u.to)-a;c<d&&(o||(o=[])).push(u.copy(c,d))}}if(o){var f=new e(o.sort(sn),Zt);return r?new tn([f,r]):f}return r||en}},{key:"eq",value:function(t){if(this==t)return!0;if(!(t instanceof e)||this.local.length!=t.local.length||this.children.length!=t.children.length)return!1;for(var n=0;n<this.local.length;n++)if(!this.local[n].eq(t.local[n]))return!1;for(var r=0;r<this.children.length;r+=3)if(this.children[r]!=t.children[r]||this.children[r+1]!=t.children[r+1]||!this.children[r+2].eq(t.children[r+2]))return!1;return!0}},{key:"locals",value:function(e){return ln(this.localsInner(e))}},{key:"localsInner",value:function(e){if(this==en)return Zt;if(e.inlineContent||!this.local.some(Gt.is))return this.local;for(var t=[],n=0;n<this.local.length;n++)this.local[n].type instanceof Gt||t.push(this.local[n]);return t}}],[{key:"create",value:function(e,t){return t.length?an(t,e,0,Xt):en}}]),e}();Qt.empty=new Qt([],[]),Qt.removeOverlap=ln;var en=Qt.empty,tn=function(){function e(t){Object(c.a)(this,e),this.members=t}return Object(d.a)(e,[{key:"map",value:function(t,n){var r=this.members.map((function(e){return e.map(t,n,Xt)}));return e.from(r)}},{key:"forChild",value:function(t,n){if(n.isLeaf)return Qt.empty;for(var r=[],o=0;o<this.members.length;o++){var i=this.members[o].forChild(t,n);i!=en&&(i instanceof e?r=r.concat(i.members):r.push(i))}return e.from(r)}},{key:"eq",value:function(t){if(!(t instanceof e)||t.members.length!=this.members.length)return!1;for(var n=0;n<this.members.length;n++)if(!this.members[n].eq(t.members[n]))return!1;return!0}},{key:"locals",value:function(e){for(var t,n=!0,r=0;r<this.members.length;r++){var o=this.members[r].localsInner(e);if(o.length)if(t){n&&(t=t.slice(),n=!1);for(var i=0;i<o.length;i++)t.push(o[i])}else t=o}return t?ln(n?t:t.sort(sn)):Zt}}],[{key:"from",value:function(t){switch(t.length){case 0:return en;case 1:return t[0];default:return new e(t)}}}]),e}();function nn(e,t){if(!t||!e.length)return e;for(var n=[],r=0;r<e.length;r++){var o=e[r];n.push(new Yt(o.from+t,o.to+t,o.type))}return n}function rn(e,t,n){if(t.isLeaf)return null;for(var r,o=n+t.nodeSize,i=null,a=0;a<e.length;a++)(r=e[a])&&r.from>n&&r.to<o&&((i||(i=[])).push(r),e[a]=null);return i}function on(e){for(var t=[],n=0;n<e.length;n++)null!=e[n]&&t.push(e[n]);return t}function an(e,t,n,r){var o=[],i=!1;t.forEach((function(t,a){var s=rn(e,t,a+n);if(s){i=!0;var l=an(s,t,n+a+1,r);l!=en&&o.push(a,a+t.nodeSize,l)}}));for(var a=nn(i?on(e):e,-n).sort(sn),s=0;s<a.length;s++)a[s].type.valid(t,a[s])||(r.onRemove&&r.onRemove(a[s].spec),a.splice(s--,1));return a.length||o.length?new Qt(a,o):en}function sn(e,t){return e.from-t.from||e.to-t.to}function ln(e){for(var t=e,n=0;n<t.length-1;n++){var r=t[n];if(r.from!=r.to)for(var o=n+1;o<t.length;o++){var i=t[o];if(i.from!=r.from){i.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,i.from),un(t,o,r.copy(i.from,r.to)));break}i.to!=r.to&&(t==e&&(t=e.slice()),t[o]=i.copy(i.from,r.to),un(t,o+1,i.copy(r.to,i.to)))}}return t}function un(e,t,n){for(;t<e.length&&sn(n,e[t])>0;)t++;e.splice(t,0,n)}function cn(e){var t=[];return e.someProp("decorations",(function(n){var r=n(e.state);r&&r!=en&&t.push(r)})),e.cursorWrapper&&t.push(Qt.create(e.state.doc,[e.cursorWrapper.deco])),tn.from(t)}var dn={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},fn=S&&C<=11,pn=function(){function e(){Object(c.a)(this,e),this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}return Object(d.a)(e,[{key:"set",value:function(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}},{key:"clear",value:function(){this.anchorNode=this.focusNode=null}},{key:"eq",value:function(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}]),e}(),hn=function(){function e(t,n){var r=this;Object(c.a)(this,e),this.view=t,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new pn,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.observer=window.MutationObserver&&new window.MutationObserver((function(e){for(var t=0;t<e.length;t++)r.queue.push(e[t]);S&&C<=11&&e.some((function(e){return"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length}))?r.flushSoon():r.flush()})),fn&&(this.onCharData=function(e){r.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),r.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}return Object(d.a)(e,[{key:"flushSoon",value:function(){var e=this;this.flushingSoon<0&&(this.flushingSoon=window.setTimeout((function(){e.flushingSoon=-1,e.flush()}),20))}},{key:"forceFlush",value:function(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}},{key:"start",value:function(){this.observer&&this.observer.observe(this.view.dom,dn),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}},{key:"stop",value:function(){var e=this;if(this.observer){var t=this.observer.takeRecords();if(t.length){for(var n=0;n<t.length;n++)this.queue.push(t[n]);window.setTimeout((function(){return e.flush()}),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}},{key:"connectSelection",value:function(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}},{key:"disconnectSelection",value:function(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}},{key:"suppressSelectionUpdates",value:function(){var e=this;this.suppressingSelectionUpdates=!0,setTimeout((function(){return e.suppressingSelectionUpdates=!1}),50)}},{key:"onSelectionChange",value:function(){if(Je(this.view)){if(this.suppressingSelectionUpdates)return ze(this.view);if(S&&C<=11&&!this.view.state.selection.empty){var e=this.view.domSelection();if(e.focusNode&&B(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}},{key:"setCurSelection",value:function(){this.currentSelection.set(this.view.domSelection())}},{key:"ignoreSelectionChange",value:function(e){if(0==e.rangeCount)return!0;var t=e.getRangeAt(0).commonAncestorContainer,n=this.view.docView.nearestDesc(t);return n&&n.ignoreMutation({type:"selection",target:3==t.nodeType?t.parentNode:t})?(this.setCurSelection(),!0):void 0}},{key:"flush",value:function(){if(this.view.docView&&!(this.flushingSoon>-1)){var e=this.observer?this.observer.takeRecords():[];this.queue.length&&(e=this.queue.concat(e),this.queue.length=0);var t=this.view.domSelection(),n=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(t)&&Je(this.view)&&!this.ignoreSelectionChange(t),r=-1,o=-1,i=!1,a=[];if(this.view.editable)for(var s=0;s<e.length;s++){var l=this.registerMutation(e[s],a);l&&(r=r<0?l.from:Math.min(l.from,r),o=o<0?l.to:Math.max(l.to,o),l.typeOver&&(i=!0))}if(j&&a.length>1){var u=a.filter((function(e){return"BR"==e.nodeName}));if(2==u.length){var c=u[0],d=u[1];c.parentNode&&c.parentNode.parentNode==d.parentNode?d.remove():c.remove()}}(r>-1||n)&&(r>-1&&(this.view.docView.markDirty(r,o),function(e){if(mn)return;mn=!0,"normal"==getComputedStyle(e.dom).whiteSpace&&console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package.")}(this.view)),this.handleDOMChange(r,o,i,a),this.view.docView&&this.view.docView.dirty?this.view.updateState(this.view.state):this.currentSelection.eq(t)||ze(this.view),this.currentSelection.set(t))}}},{key:"registerMutation",value:function(e,t){if(t.indexOf(e.target)>-1)return null;var n=this.view.docView.nearestDesc(e.target);if("attributes"==e.type&&(n==this.view.docView||"contenteditable"==e.attributeName||"style"==e.attributeName&&!e.oldValue&&!e.target.getAttribute("style")))return null;if(!n||n.ignoreMutation(e))return null;if("childList"==e.type){for(var r=0;r<e.addedNodes.length;r++)t.push(e.addedNodes[r]);if(n.contentDOM&&n.contentDOM!=n.dom&&!n.contentDOM.contains(e.target))return{from:n.posBefore,to:n.posAfter};var o=e.previousSibling,i=e.nextSibling;if(S&&C<=11&&e.addedNodes.length)for(var a=0;a<e.addedNodes.length;a++){var s=e.addedNodes[a],l=s.previousSibling,u=s.nextSibling;(!l||Array.prototype.indexOf.call(e.addedNodes,l)<0)&&(o=l),(!u||Array.prototype.indexOf.call(e.addedNodes,u)<0)&&(i=u)}var c=o&&o.parentNode==e.target?H(o)+1:0,d=n.localPosFromDOM(e.target,c,-1),f=i&&i.parentNode==e.target?H(i):e.target.childNodes.length;return{from:d,to:n.localPosFromDOM(e.target,f,1)}}return"attributes"==e.type?{from:n.posAtStart-n.border,to:n.posAtEnd+n.border}:{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}}}]),e}(),mn=!1;function vn(e){var t=e.pmViewDesc;if(t)return t.parseRule();if("BR"==e.nodeName&&e.parentNode){if(M&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){var n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}if(e.parentNode.lastChild==e||M&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if("IMG"==e.nodeName&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}function gn(e,t,n,r,o){if(t<0){var i=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,a=Fe(e,i);if(a&&!e.state.selection.eq(a)){var s=e.state.tr.setSelection(a);"pointer"==i?s.setMeta("pointer",!0):"key"==i&&s.scrollIntoView(),e.dispatch(s)}}else{var l=e.state.doc.resolve(t),u=l.sharedDepth(n);t=l.before(u+1),n=e.state.doc.resolve(n).after(u+1);var c=e.state.selection,d=function(e,t,n){var r,o=e.docView.parseRange(t,n),i=o.node,a=o.fromOffset,s=o.toOffset,l=o.from,u=o.to,c=e.domSelection(),d=c.anchorNode;if(d&&e.dom.contains(1==d.nodeType?d:d.parentNode)&&(r=[{node:d,offset:c.anchorOffset}],U(c)||r.push({node:c.focusNode,offset:c.focusOffset})),E&&8===e.input.lastKeyCode)for(var f=s;f>a;f--){var p=i.childNodes[f-1],h=p.pmViewDesc;if("BR"==p.nodeName&&!h){s=f;break}if(!h||h.size)break}var m=e.state.doc,g=e.someProp("domParser")||v.DOMParser.fromSchema(e.state.schema),y=m.resolve(l),b=null,w=g.parse(i,{topNode:y.parent,topMatch:y.parent.contentMatchAt(y.index()),topOpen:!0,from:a,to:s,preserveWhitespace:"pre"!=y.parent.type.whitespace||"full",findPositions:r,ruleFromNode:vn,context:y});if(r&&null!=r[0].pos){var k=r[0].pos,x=r[1]&&r[1].pos;null==x&&(x=k),b={anchor:k+l,head:x+l}}return{doc:w,sel:b,from:l,to:u}}(e,t,n);if(E&&e.cursorWrapper&&d.sel&&d.sel.anchor==e.cursorWrapper.deco.from){var f=e.cursorWrapper.deco.type.toDOM.nextSibling,h=f&&f.nodeValue?f.nodeValue.length:1;d.sel={anchor:d.sel.anchor+h,head:d.sel.anchor+h}}var m,g,y=e.state.doc,b=y.slice(d.from,d.to);8===e.input.lastKeyCode&&Date.now()-100<e.input.lastKeyCodeTime?(m=e.state.selection.to,g="end"):(m=e.state.selection.from,g="start"),e.input.lastKeyCode=null;var w=function(e,t,n,r,o){var i=e.findDiffStart(t,n);if(null==i)return null;var a=e.findDiffEnd(t,n+e.size,n+t.size),s=a.a,l=a.b;if("end"==o){r-=s+Math.max(0,i-Math.min(s,l))-i}if(s<i&&e.size<t.size){l=(i-=r<=i&&r>=s?i-r:0)+(l-s),s=i}else if(l<i){s=(i-=r<=i&&r>=l?i-r:0)+(s-l),l=i}return{start:i,endA:s,endB:l}}(b.content,d.doc.content,d.from,m,g);if((T&&e.input.lastIOSEnter>Date.now()-225||N)&&o.some((function(e){return"DIV"==e.nodeName||"P"==e.nodeName}))&&(!w||w.endA>=w.endB)&&e.someProp("handleKeyDown",(function(t){return t(e,K(13,"Enter"))})))e.input.lastIOSEnter=0;else{if(!w){if(!(r&&c instanceof p.TextSelection&&!c.empty&&c.$head.sameParent(c.$anchor))||e.composing||d.sel&&d.sel.anchor!=d.sel.head){if(d.sel){var k=yn(e,e.state.doc,d.sel);k&&!k.eq(e.state.selection)&&e.dispatch(e.state.tr.setSelection(k))}return}w={start:c.from,endA:c.to,endB:c.to}}e.input.domChangeCount++,e.state.selection.from<e.state.selection.to&&w.start==w.endB&&e.state.selection instanceof p.TextSelection&&(w.start>e.state.selection.from&&w.start<=e.state.selection.from+2&&e.state.selection.from>=d.from?w.start=e.state.selection.from:w.endA<e.state.selection.to&&w.endA>=e.state.selection.to-2&&e.state.selection.to<=d.to&&(w.endB+=e.state.selection.to-w.endA,w.endA=e.state.selection.to)),S&&C<=11&&w.endB==w.start+1&&w.endA==w.start&&w.start>d.from&&" \xa0"==d.doc.textBetween(w.start-d.from-1,w.start-d.from+1)&&(w.start--,w.endA--,w.endB--);var x,O=d.doc.resolveNoCache(w.start-d.from),j=d.doc.resolveNoCache(w.endB-d.from),D=y.resolve(w.start),A=O.sameParent(j)&&O.parent.inlineContent&&D.end()>=w.endA;if((T&&e.input.lastIOSEnter>Date.now()-225&&(!A||o.some((function(e){return"DIV"==e.nodeName||"P"==e.nodeName})))||!A&&O.pos<d.doc.content.size&&(x=p.Selection.findFrom(d.doc.resolve(O.pos+1),1,!0))&&x.head==j.pos)&&e.someProp("handleKeyDown",(function(t){return t(e,K(13,"Enter"))})))e.input.lastIOSEnter=0;else if(e.state.selection.anchor>w.start&&function(e,t,n,r,o){if(!r.parent.isTextblock||n-t<=o.pos-r.pos||bn(r,!0,!1)<o.pos)return!1;var i=e.resolve(t);if(i.parentOffset<i.parent.content.size||!i.parent.isTextblock)return!1;var a=e.resolve(bn(i,!0,!0));return!(!a.parent.isTextblock||a.pos>n||bn(a,!0,!1)<n)&&r.parent.content.cut(r.parentOffset).eq(a.parent.content)}(y,w.start,w.endA,O,j)&&e.someProp("handleKeyDown",(function(t){return t(e,K(8,"Backspace"))})))N&&E&&e.domObserver.suppressSelectionUpdates();else{E&&N&&w.endB==w.start&&(e.input.lastAndroidDelete=Date.now()),N&&!A&&O.start()!=j.start()&&0==j.parentOffset&&O.depth==j.depth&&d.sel&&d.sel.anchor==d.sel.head&&d.sel.head==w.endA&&(w.endB-=2,j=d.doc.resolveNoCache(w.endB-d.from),setTimeout((function(){e.someProp("handleKeyDown",(function(t){return t(e,K(13,"Enter"))}))}),20));var M,L,P,R=w.start,H=w.endA;if(A)if(O.pos==j.pos)S&&C<=11&&0==O.parentOffset&&(e.domObserver.suppressSelectionUpdates(),setTimeout((function(){return ze(e)}),20)),M=e.state.tr.delete(R,H),L=y.resolve(w.start).marksAcross(y.resolve(w.endA));else if(w.endA==w.endB&&(P=function(e,t){for(var n,r,o,i=e.firstChild.marks,a=t.firstChild.marks,s=i,l=a,u=0;u<a.length;u++)s=a[u].removeFromSet(s);for(var c=0;c<i.length;c++)l=i[c].removeFromSet(l);if(1==s.length&&0==l.length)r=s[0],n="add",o=function(e){return e.mark(r.addToSet(e.marks))};else{if(0!=s.length||1!=l.length)return null;r=l[0],n="remove",o=function(e){return e.mark(r.removeFromSet(e.marks))}}for(var d=[],f=0;f<t.childCount;f++)d.push(o(t.child(f)));if(v.Fragment.from(d).eq(e))return{mark:r,type:n}}(O.parent.content.cut(O.parentOffset,j.parentOffset),D.parent.content.cut(D.parentOffset,w.endA-D.start()))))M=e.state.tr,"add"==P.type?M.addMark(R,H,P.mark):M.removeMark(R,H,P.mark);else if(O.parent.child(O.index()).isText&&O.index()==j.index()-(j.textOffset?0:1)){var F=O.parent.textBetween(O.parentOffset,j.parentOffset);if(e.someProp("handleTextInput",(function(t){return t(e,R,H,F)})))return;M=e.state.tr.insertText(F,R,H)}if(M||(M=e.state.tr.replace(R,H,d.doc.slice(w.start-d.from,w.endB-d.from))),d.sel){var V=yn(e,M.doc,d.sel);V&&!(E&&N&&e.composing&&V.empty&&(w.start!=w.endB||e.input.lastAndroidDelete<Date.now()-100)&&(V.head==R||V.head==M.mapping.map(H)-1)||S&&V.empty&&V.head==R)&&M.setSelection(V)}L&&M.ensureMarks(L),e.dispatch(M.scrollIntoView())}}}}function yn(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:Ge(e,t.resolve(n.anchor),t.resolve(n.head))}function bn(e,t,n){for(var r=e.depth,o=t?e.end():e.pos;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,o++,t=!1;if(n)for(var i=e.node(r).maybeChild(e.indexAfter(r));i&&!i.isLeaf;)i=i.firstChild,o++;return o}var wn=function(){function e(t,n){var r=this;Object(c.a)(this,e),this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new Ot,this.prevDirectPlugins=[],this.pluginViews=[],this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(Cn),this.dispatch=this.dispatch.bind(this),this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):"function"==typeof t?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=On(this),xn(this),this.nodeViews=Sn(this),this.docView=ke(this.state.doc,kn(this),cn(this),this.dom,this),this.domObserver=new hn(this,(function(e,t,n,o){return gn(r,e,t,n,o)})),this.domObserver.start(),function(e){var t=function(t){var n=kt[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=function(t){!function(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(var n=t.target;n!=e.dom;n=n.parentNode)if(!n||11==n.nodeType||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}(e,t)||jt(e,t)||!e.editable&&t.type in xt||n(e,t)})};for(var n in kt)t(n);M&&e.dom.addEventListener("input",(function(){return null})),Ct(e)}(this),this.updatePluginViews()}return Object(d.a)(e,[{key:"composing",get:function(){return this.input.composing}},{key:"props",get:function(){if(this._props.state!=this.state){var e=this._props;for(var t in this._props={},e)this._props[t]=e[t];this._props.state=this.state}return this._props}},{key:"update",value:function(e){e.handleDOMEvents!=this._props.handleDOMEvents&&Ct(this),this._props=e,e.plugins&&(e.plugins.forEach(Cn),this.directPlugins=e.plugins),this.updateStateInner(e.state,!0)}},{key:"setProps",value:function(e){var t={};for(var n in this._props)t[n]=this._props[n];for(var r in t.state=this.state,e)t[r]=e[r];this.update(t)}},{key:"updateState",value:function(e){this.updateStateInner(e,this.state.plugins!=e.plugins)}},{key:"updateStateInner",value:function(e,t){var n=this,r=this.state,o=!1,i=!1;if(e.storedMarks&&this.composing&&(zt(this),i=!0),this.state=e,t){var a=Sn(this);(function(e,t){var n=0,r=0;for(var o in e){if(e[o]!=t[o])return!0;n++}for(var i in t)r++;return n!=r})(a,this.nodeViews)&&(this.nodeViews=a,o=!0),Ct(this)}this.editable=On(this),xn(this);var s=cn(this),l=kn(this),u=t?"reset":e.scrollToSelection>r.scrollToSelection?"to selection":"preserve",c=o||!this.docView.matchesNode(e.doc,l,s);!c&&e.selection.eq(r.selection)||(i=!0);var d="preserve"==u&&i&&null==this.dom.style.overflowAnchor&&function(e){for(var t,n,r=e.dom.getBoundingClientRect(),o=Math.max(0,r.top),i=(r.left+r.right)/2,a=o+1;a<Math.min(innerHeight,r.bottom);a+=5){var s=e.root.elementFromPoint(i,a);if(s&&s!=e.dom&&e.dom.contains(s)){var l=s.getBoundingClientRect();if(l.top>=o-20){t=s,n=l.top;break}}}return{refDOM:t,refTop:n,stack:X(e.dom)}}(this);if(i){this.domObserver.stop();var f=c&&(S||E)&&!this.composing&&!r.selection.empty&&!e.selection.empty&&function(e,t){var n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}(r.selection,e.selection);if(c){var h=E?this.trackWrites=this.domSelection().focusNode:null;!o&&this.docView.update(e.doc,l,s,this)||(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=ke(e.doc,l,s,this.dom,this)),h&&!this.trackWrites&&(f=!0)}f||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelection())&&function(e){var t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelection();return B(t.node,t.offset,n.anchorNode,n.anchorOffset)}(this))?ze(this,f):(Ue(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}if(this.updatePluginViews(r),"reset"==u)this.dom.scrollTop=0;else if("to selection"==u){var m=this.domSelection().focusNode;if(this.someProp("handleScrollToSelection",(function(e){return e(n)})));else if(e.selection instanceof p.NodeSelection){var v=this.docView.domAfterPos(e.selection.from);1==v.nodeType&&Z(this,v.getBoundingClientRect(),m)}else Z(this,this.coordsAtPos(e.selection.head,1),m)}else d&&function(e){var t=e.refDOM,n=e.refTop,r=e.stack,o=t?t.getBoundingClientRect().top:0;Q(r,0==o?0:o-n)}(d)}},{key:"destroyPluginViews",value:function(){for(var e;e=this.pluginViews.pop();)e.destroy&&e.destroy()}},{key:"updatePluginViews",value:function(e){if(e&&e.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(var t=0;t<this.pluginViews.length;t++){var n=this.pluginViews[t];n.update&&n.update(this,e)}else{this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(var r=0;r<this.directPlugins.length;r++){var o=this.directPlugins[r];o.spec.view&&this.pluginViews.push(o.spec.view(this))}for(var i=0;i<this.state.plugins.length;i++){var a=this.state.plugins[i];a.spec.view&&this.pluginViews.push(a.spec.view(this))}}}},{key:"someProp",value:function(e,t){var n,r=this._props&&this._props[e];if(null!=r&&(n=t?t(r):r))return n;for(var o=0;o<this.directPlugins.length;o++){var i=this.directPlugins[o].props[e];if(null!=i&&(n=t?t(i):i))return n}var a=this.state.plugins;if(a)for(var s=0;s<a.length;s++){var l=a[s].props[e];if(null!=l&&(n=t?t(l):l))return n}}},{key:"hasFocus",value:function(){return this.root.activeElement==this.dom}},{key:"focus",value:function(){this.domObserver.stop(),this.editable&&function(e){if(e.setActive)return e.setActive();if(ee)return e.focus(ee);var t=X(e);e.focus(null==ee?{get preventScroll(){return ee={preventScroll:!0},!0}}:void 0),ee||(ee=!1,Q(t,0))}(this.dom),ze(this),this.domObserver.start()}},{key:"root",get:function(){var e=this,t=this._root;if(null==t)for(var n=function(t){if(9==t.nodeType||11==t.nodeType&&t.host)return t.getSelection||(Object.getPrototypeOf(t).getSelection=function(){return t.ownerDocument.getSelection()}),{v:e._root=t}},r=this.dom.parentNode;r;r=r.parentNode){var o=n(r);if("object"===typeof o)return o.v}return t||document}},{key:"posAtCoords",value:function(e){return oe(this,e)}},{key:"coordsAtPos",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return se(this,e,t)}},{key:"domAtPos",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.docView.domFromPos(e,t)}},{key:"nodeDOM",value:function(e){var t=this.docView.descAt(e);return t?t.nodeDOM:null}},{key:"posAtDOM",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,r=this.docView.posFromDOM(e,t,n);if(null==r)throw new RangeError("DOM position not inside the editor");return r}},{key:"endOfTextblock",value:function(e,t){return me(this,t||this.state,e)}},{key:"destroy",value:function(){this.docView&&(!function(e){for(var t in e.domObserver.stop(),e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],cn(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)}},{key:"isDestroyed",get:function(){return null==this.docView}},{key:"dispatchEvent",value:function(e){return function(e,t){jt(e,t)||!kt[t.type]||!e.editable&&t.type in xt||kt[t.type](e,t)}(this,e)}},{key:"dispatch",value:function(e){var t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))}},{key:"domSelection",value:function(){return this.root.getSelection()}}]),e}();function kn(e){var t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),t.translate="no",e.someProp("attributes",(function(n){if("function"==typeof n&&(n=n(e.state)),n)for(var r in n)"class"==r&&(t.class+=" "+n[r]),"style"==r?t.style=(t.style?t.style+";":"")+n[r]:t[r]||"contenteditable"==r||"nodeName"==r||(t[r]=String(n[r]))})),[Yt.node(0,e.state.doc.content.size,t)]}function xn(e){if(e.markCursor){var t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:Yt.widget(e.state.selection.head,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function On(e){return!e.someProp("editable",(function(t){return!1===t(e.state)}))}function Sn(e){var t=Object.create(null);function n(e){for(var n in e)Object.prototype.hasOwnProperty.call(t,n)||(t[n]=e[n])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function Cn(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}for(var jn={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",229:"q"},Dn={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"',229:"Q"},En="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent),An="undefined"!=typeof navigator&&/Apple Computer/.test(navigator.vendor),Mn="undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent),Tn="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),Ln="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Nn=En&&(Tn||+En[1]<57)||Mn&&Tn,Pn=0;Pn<10;Pn++)jn[48+Pn]=jn[96+Pn]=String(Pn);for(Pn=1;Pn<=24;Pn++)jn[Pn+111]="F"+Pn;for(Pn=65;Pn<=90;Pn++)jn[Pn]=String.fromCharCode(Pn+32),Dn[Pn]=String.fromCharCode(Pn);for(var Rn in jn)Dn.hasOwnProperty(Rn)||(Dn[Rn]=jn[Rn]);var Hn="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function Fn(e){var t,n,r,o,i=e.split(/-(?!$)/),a=i[i.length-1];"Space"==a&&(a=" ");for(var s=0;s<i.length-1;s++){var l=i[s];if(/^(cmd|meta|m)$/i.test(l))o=!0;else if(/^a(lt)?$/i.test(l))t=!0;else if(/^(c|ctrl|control)$/i.test(l))n=!0;else if(/^s(hift)?$/i.test(l))r=!0;else{if(!/^mod$/i.test(l))throw new Error("Unrecognized modifier name: "+l);Hn?o=!0:n=!0}}return t&&(a="Alt-"+a),n&&(a="Ctrl-"+a),o&&(a="Meta-"+a),r&&(a="Shift-"+a),a}function Vn(e,t,n){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),!1!==n&&t.shiftKey&&(e="Shift-"+e),e}function zn(e){return new p.Plugin({props:{handleKeyDown:Bn(e)}})}function Bn(e){var t=function(e){var t=Object.create(null);for(var n in e)t[Fn(n)]=e[n];return t}(e);return function(e,n){var r,o=function(e){var t=!(Nn&&(e.ctrlKey||e.altKey||e.metaKey)||(An||Ln)&&e.shiftKey&&e.key&&1==e.key.length)&&e.key||(e.shiftKey?Dn:jn)[e.keyCode]||e.key||"Unidentified";return"Esc"==t&&(t="Escape"),"Del"==t&&(t="Delete"),"Left"==t&&(t="ArrowLeft"),"Up"==t&&(t="ArrowUp"),"Right"==t&&(t="ArrowRight"),"Down"==t&&(t="ArrowDown"),t}(n),i=1==o.length&&" "!=o,a=t[Vn(o,n,!i)];if(a&&a(e.state,e.dispatch,e))return!0;if(i&&(n.shiftKey||n.altKey||n.metaKey||o.charCodeAt(0)>127)&&(r=jn[n.keyCode])&&r!=o){var s=t[Vn(r,n,!0)];if(s&&s(e.state,e.dispatch,e))return!0}else if(i&&n.shiftKey){var l=t[Vn(o,n,!0)];if(l&&l(e.state,e.dispatch,e))return!0}return!1}}var _n=function(e,t){return!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0)},In=function(e,t,n){var r=e.selection.$cursor;if(!r||(n?!n.endOfTextblock("backward",e):r.parentOffset>0))return!1;var o=Wn(r);if(!o){var i=r.blockRange(),a=i&&Object(g.k)(i);return null!=a&&(t&&t(e.tr.lift(i,a).scrollIntoView()),!0)}var s=o.nodeBefore;if(!s.type.spec.isolating&&nr(e,o,t))return!0;if(0==r.parent.content.size&&($n(s,"end")||p.NodeSelection.isSelectable(s))){var l=Object(g.l)(e.doc,r.before(),r.after(),v.Slice.empty);if(l&&l.slice.size<l.to-l.from){if(t){var u=e.tr.step(l);u.setSelection($n(s,"end")?p.Selection.findFrom(u.doc.resolve(u.mapping.map(o.pos,-1)),-1):p.NodeSelection.create(u.doc,o.pos-s.nodeSize)),t(u.scrollIntoView())}return!0}}return!(!s.isAtom||o.depth!=r.depth-1)&&(t&&t(e.tr.delete(o.pos-s.nodeSize,o.pos).scrollIntoView()),!0)};function $n(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=e;r;r="start"==t?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&1!=r.childCount)return!1}return!1}var qn=function(e,t,n){var r=e.selection,o=r.$head,i=o;if(!r.empty)return!1;if(o.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):o.parentOffset>0)return!1;i=Wn(o)}var a=i&&i.nodeBefore;return!(!a||!p.NodeSelection.isSelectable(a))&&(t&&t(e.tr.setSelection(p.NodeSelection.create(e.doc,i.pos-a.nodeSize)).scrollIntoView()),!0)};function Wn(e){if(!e.parent.type.spec.isolating)for(var 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}var Un=function(e,t,n){var r=e.selection.$cursor;if(!r||(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size))return!1;var o=Gn(r);if(!o)return!1;var i=o.nodeAfter;if(nr(e,o,t))return!0;if(0==r.parent.content.size&&($n(i,"start")||p.NodeSelection.isSelectable(i))){var a=Object(g.l)(e.doc,r.before(),r.after(),v.Slice.empty);if(a&&a.slice.size<a.to-a.from){if(t){var s=e.tr.step(a);s.setSelection($n(i,"start")?p.Selection.findFrom(s.doc.resolve(s.mapping.map(o.pos)),1):p.NodeSelection.create(s.doc,s.mapping.map(o.pos))),t(s.scrollIntoView())}return!0}}return!(!i.isAtom||o.depth!=r.depth-1)&&(t&&t(e.tr.delete(o.pos,o.pos+i.nodeSize).scrollIntoView()),!0)},Kn=function(e,t,n){var r=e.selection,o=r.$head,i=o;if(!r.empty)return!1;if(o.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):o.parentOffset<o.parent.content.size)return!1;i=Gn(o)}var a=i&&i.nodeAfter;return!(!a||!p.NodeSelection.isSelectable(a))&&(t&&t(e.tr.setSelection(p.NodeSelection.create(e.doc,i.pos)).scrollIntoView()),!0)};function Gn(e){if(!e.parent.type.spec.isolating)for(var t=e.depth-1;t>=0;t--){var 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 Jn=function(e,t){var n=e.selection,r=n.$from,o=n.$to,i=r.blockRange(o),a=i&&Object(g.k)(i);return null!=a&&(t&&t(e.tr.lift(i,a).scrollIntoView()),!0)},Yn=function(e,t){var n=e.selection,r=n.$head,o=n.$anchor;return!(!r.parent.type.spec.code||!r.sameParent(o))&&(t&&t(e.tr.insertText("\n").scrollIntoView()),!0)};function Zn(e){for(var t=0;t<e.edgeCount;t++){var n=e.edge(t).type;if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}var Xn=function(e,t){var n=e.selection,r=n.$head,o=n.$anchor;if(!r.parent.type.spec.code||!r.sameParent(o))return!1;var i=r.node(-1),a=r.indexAfter(-1),s=Zn(i.contentMatchAt(a));if(!s||!i.canReplaceWith(a,a,s))return!1;if(t){var l=r.after(),u=e.tr.replaceWith(l,l,s.createAndFill());u.setSelection(p.Selection.near(u.doc.resolve(l),1)),t(u.scrollIntoView())}return!0},Qn=function(e,t){var n=e.selection,r=n.$from,o=n.$to;if(n instanceof p.AllSelection||r.parent.inlineContent||o.parent.inlineContent)return!1;var i=Zn(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(t){var a=(!r.parentOffset&&o.index()<o.parent.childCount?r:o).pos,s=e.tr.insert(a,i.createAndFill());s.setSelection(p.TextSelection.create(s.doc,a+1)),t(s.scrollIntoView())}return!0},er=function(e,t){var n=e.selection.$cursor;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){var r=n.before();if(Object(g.g)(e.doc,r))return t&&t(e.tr.split(r).scrollIntoView()),!0}var o=n.blockRange(),i=o&&Object(g.k)(o);return null!=i&&(t&&t(e.tr.lift(o,i).scrollIntoView()),!0)},tr=function(e,t){var n=e.selection,r=n.$from,o=n.$to;if(e.selection instanceof p.NodeSelection&&e.selection.node.isBlock)return!(!r.parentOffset||!Object(g.g)(e.doc,r.pos))&&(t&&t(e.tr.split(r.pos).scrollIntoView()),!0);if(!r.parent.isBlock)return!1;if(t){var i=o.parentOffset==o.parent.content.size,a=e.tr;(e.selection instanceof p.TextSelection||e.selection instanceof p.AllSelection)&&a.deleteSelection();var s=0==r.depth?null:Zn(r.node(-1).contentMatchAt(r.indexAfter(-1))),l=i&&s?[{type:s}]:void 0,u=Object(g.g)(a.doc,a.mapping.map(r.pos),1,l);if(l||u||!Object(g.g)(a.doc,a.mapping.map(r.pos),1,s?[{type:s}]:void 0)||(s&&(l=[{type:s}]),u=!0),u&&(a.split(a.mapping.map(r.pos),1,l),!i&&!r.parentOffset&&r.parent.type!=s)){var c=a.mapping.map(r.before()),d=a.doc.resolve(c);s&&r.node(-1).canReplaceWith(d.index(),d.index()+1,s)&&a.setNodeMarkup(a.mapping.map(r.before()),s)}t(a.scrollIntoView())}return!0};function nr(e,t,n){var r,o,i=t.nodeBefore,a=t.nodeAfter;if(i.type.spec.isolating||a.type.spec.isolating)return!1;if(function(e,t,n){var r=t.nodeBefore,o=t.nodeAfter,i=t.index();return!!(r&&o&&r.type.compatibleContent(o.type))&&(!r.content.size&&t.parent.canReplace(i-1,i)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),!0):!(!t.parent.canReplace(i,i+1)||!o.isTextblock&&!Object(g.f)(e.doc,t.pos))&&(n&&n(e.tr.clearIncompatible(t.pos,r.type,r.contentMatchAt(r.childCount)).join(t.pos).scrollIntoView()),!0))}(e,t,n))return!0;var s=t.parent.canReplace(t.index(),t.index()+1);if(s&&(r=(o=i.contentMatchAt(i.childCount)).findWrapping(a.type))&&o.matchType(r[0]||a.type).validEnd){if(n){for(var l=t.pos+a.nodeSize,u=v.Fragment.empty,c=r.length-1;c>=0;c--)u=v.Fragment.from(r[c].create(null,u));u=v.Fragment.from(i.copy(u));var d=e.tr.step(new g.b(t.pos-1,l,t.pos,l,new v.Slice(u,1,0),r.length,!0)),f=l+2*r.length;Object(g.f)(d.doc,f)&&d.join(f),n(d.scrollIntoView())}return!0}var h=p.Selection.findFrom(t,1),m=h&&h.$from.blockRange(h.$to),y=m&&Object(g.k)(m);if(null!=y&&y>=t.depth)return n&&n(e.tr.lift(m,y).scrollIntoView()),!0;if(s&&$n(a,"start",!0)&&$n(i,"end")){for(var b=i,w=[];w.push(b),!b.isTextblock;)b=b.lastChild;for(var k=a,x=1;!k.isTextblock;k=k.firstChild)x++;if(b.canReplace(b.childCount,b.childCount,k.content)){if(n){for(var O=v.Fragment.empty,S=w.length-1;S>=0;S--)O=v.Fragment.from(w[S].copy(O));n(e.tr.step(new g.b(t.pos-w.length,t.pos+a.nodeSize,t.pos+x,t.pos+a.nodeSize-x,new v.Slice(O,w.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function rr(e){return function(t,n){for(var r=t.selection,o=e<0?r.$from:r.$to,i=o.depth;o.node(i).isInline;){if(!i)return!1;i--}return!!o.node(i).isTextblock&&(n&&n(t.tr.setSelection(p.TextSelection.create(t.doc,e<0?o.start(i):o.end(i)))),!0)}}var or=rr(-1),ir=rr(1);function ar(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return function(n,r){var o=n.selection,i=o.$from,a=o.$to,s=i.blockRange(a),l=s&&Object(g.i)(s,e,t);return!!l&&(r&&r(n.tr.wrap(s,l).scrollIntoView()),!0)}}function sr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return function(n,r){var o=n.selection,i=o.from,a=o.to,s=!1;return n.doc.nodesBetween(i,a,(function(r,o){if(s)return!1;if(r.isTextblock&&!r.hasMarkup(e,t))if(r.type==e)s=!0;else{var i=n.doc.resolve(o),a=i.index();s=i.parent.canReplaceWith(a,a+1,e)}})),!!s&&(r&&r(n.tr.setBlockType(i,a,e,t).scrollIntoView()),!0)}}function lr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e,n,r){for(var o=0;o<t.length;o++)if(t[o](e,n,r))return!0;return!1}}var ur=lr(_n,In,qn),cr=lr(_n,Un,Kn),dr={Enter:lr(Yn,Qn,er,tr),"Mod-Enter":Xn,Backspace:ur,"Mod-Backspace":ur,"Shift-Backspace":ur,Delete:cr,"Mod-Delete":cr,"Mod-a":function(e,t){return t&&t(e.tr.setSelection(new p.AllSelection(e.doc))),!0}},fr={"Ctrl-h":dr.Backspace,"Alt-Backspace":dr["Mod-Backspace"],"Ctrl-d":dr.Delete,"Ctrl-Alt-Backspace":dr["Mod-Delete"],"Alt-Delete":dr["Mod-Delete"],"Alt-d":dr["Mod-Delete"],"Ctrl-a":or,"Ctrl-e":ir};for(var pr in dr)fr[pr]=dr[pr];"undefined"!=typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!("undefined"==typeof os||!os.platform)&&os.platform();function hr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return function(n,r){var o=n.selection,i=o.$from,a=o.$to,s=i.blockRange(a),l=!1,u=s;if(!s)return!1;if(s.depth>=2&&i.node(s.depth-1).type.compatibleContent(e)&&0==s.startIndex){if(0==i.index(s.depth-1))return!1;var c=n.doc.resolve(s.start-2);u=new v.NodeRange(c,c,s.depth),s.endIndex<s.parent.childCount&&(s=new v.NodeRange(i,n.doc.resolve(a.end(s.depth)),s.depth)),l=!0}var d=Object(g.i)(u,e,t,s);return!!d&&(r&&r(mr(n.tr,s,d,l,e).scrollIntoView()),!0)}}function mr(e,t,n,r,o){for(var i=v.Fragment.empty,a=n.length-1;a>=0;a--)i=v.Fragment.from(n[a].type.create(n[a].attrs,i));e.step(new g.b(t.start-(r?2:0),t.end,t.start,t.end,new v.Slice(i,0,0),n.length,!0));for(var s=0,l=0;l<n.length;l++)n[l].type==o&&(s=l+1);for(var u=n.length-s,c=t.start+n.length-(r?2:0),d=t.parent,f=t.startIndex,p=t.endIndex,h=!0;f<p;f++,h=!1)!h&&Object(g.g)(e.doc,c,u)&&(e.split(c,u),c+=2*u),c+=d.child(f).nodeSize;return e}function vr(e){return function(t,n){var r=t.selection,o=r.$from,i=r.$to,a=o.blockRange(i,(function(t){return t.childCount>0&&t.firstChild.type==e}));return!!a&&(!n||(o.node(a.depth-1).type==e?function(e,t,n,r){var o=e.tr,i=r.end,a=r.$to.end(r.depth);i<a&&(o.step(new g.b(i-1,a,i,a,new v.Slice(v.Fragment.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new v.NodeRange(o.doc.resolve(r.$from.pos),o.doc.resolve(a),r.depth));return t(o.lift(r,Object(g.k)(r)).scrollIntoView()),!0}(t,n,e,a):function(e,t,n){for(var r=e.tr,o=n.parent,i=n.end,a=n.endIndex-1,s=n.startIndex;a>s;a--)i-=o.child(a).nodeSize,r.delete(i-1,i+1);var l=r.doc.resolve(n.start),u=l.nodeAfter;if(r.mapping.map(n.end)!=n.start+l.nodeAfter.nodeSize)return!1;var c=0==n.startIndex,d=n.endIndex==o.childCount,f=l.node(-1),p=l.index(-1);if(!f.canReplace(p+(c?0:1),p+1,u.content.append(d?v.Fragment.empty:v.Fragment.from(o))))return!1;var h=l.pos,m=h+u.nodeSize;return r.step(new g.b(h-(c?1:0),m+(d?1:0),h+1,m-1,new v.Slice((c?v.Fragment.empty:v.Fragment.from(o.copy(v.Fragment.empty))).append(d?v.Fragment.empty:v.Fragment.from(o.copy(v.Fragment.empty))),c?0:1,d?0:1),c?0:1)),t(r.scrollIntoView()),!0}(t,n,a)))}}function gr(e){var t=e.state,n=e.transaction,r=n.selection,o=n.doc,i=n.storedMarks;return Object(f.a)(Object(f.a)({},t),{},{apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),filterTransaction:t.filterTransaction,plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return i},get selection(){return r},get doc(){return o},get tr(){return r=n.selection,o=n.doc,i=n.storedMarks,n}})}var yr=function(){function e(t){Object(c.a)(this,e),this.editor=t.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=t.state}return Object(d.a)(e,[{key:"hasCustomState",get:function(){return!!this.customState}},{key:"state",get:function(){return this.customState||this.editor.state}},{key:"commands",get:function(){var e=this,t=this.rawCommands,n=this.editor,r=this.state,o=n.view,a=r.tr,s=this.buildProps(a);return Object.fromEntries(Object.entries(t).map((function(t){var n=Object(i.a)(t,2),r=n[0],l=n[1];return[r,function(){var t=l.apply(void 0,arguments)(s);return a.getMeta("preventDispatch")||e.hasCustomState||o.dispatch(a),t}]})))}},{key:"chain",get:function(){var e=this;return function(){return e.createChain()}}},{key:"can",get:function(){var e=this;return function(){return e.createCan()}}},{key:"createChain",value:function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=this.rawCommands,o=this.editor,a=this.state,s=o.view,l=[],u=!!e,c=e||a.tr,d=function(){return u||!n||c.getMeta("preventDispatch")||t.hasCustomState||s.dispatch(c),l.every((function(e){return!0===e}))},p=Object(f.a)(Object(f.a)({},Object.fromEntries(Object.entries(r).map((function(e){var r=Object(i.a)(e,2),o=r[0],a=r[1];return[o,function(){var e=t.buildProps(c,n),r=a.apply(void 0,arguments)(e);return l.push(r),p}]})))),{},{run:d});return p}},{key:"createCan",value:function(e){var t=this,n=this.rawCommands,r=this.state,o=void 0,a=e||r.tr,s=this.buildProps(a,o),l=Object.fromEntries(Object.entries(n).map((function(e){var t=Object(i.a)(e,2),n=t[0],r=t[1];return[n,function(){return r.apply(void 0,arguments)(Object(f.a)(Object(f.a)({},s),{},{dispatch:o}))}]})));return Object(f.a)(Object(f.a)({},l),{},{chain:function(){return t.createChain(a,o)}})}},{key:"buildProps",value:function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=this.rawCommands,o=this.editor,a=this.state,s=o.view;a.storedMarks&&e.setStoredMarks(a.storedMarks);var l={tr:e,editor:o,view:s,state:gr({state:a,transaction:e}),dispatch:n?function(){}:void 0,chain:function(){return t.createChain(e)},can:function(){return t.createCan(e)},get commands(){return Object.fromEntries(Object.entries(r).map((function(e){var t=Object(i.a)(e,2),n=t[0],r=t[1];return[n,function(){return r.apply(void 0,arguments)(l)}]})))}};return l}}]),e}(),br=function(){function e(){Object(c.a)(this,e),this.callbacks={}}return Object(d.a)(e,[{key:"on",value:function(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),this}},{key:"emit",value:function(e){for(var t=this,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];var i=this.callbacks[e];return i&&i.forEach((function(e){return e.apply(t,r)})),this}},{key:"off",value:function(e,t){var n=this.callbacks[e];return n&&(t?this.callbacks[e]=n.filter((function(e){return e!==t})):delete this.callbacks[e]),this}},{key:"removeAllListeners",value:function(){this.callbacks={}}}]),e}();function wr(e,t,n){return void 0===e.config[t]&&e.parent?wr(e.parent,t,n):"function"===typeof e.config[t]?e.config[t].bind(Object(f.a)(Object(f.a)({},n),{},{parent:e.parent?wr(e.parent,t,n):null})):e.config[t]}function kr(e){return{baseExtensions:e.filter((function(e){return"extension"===e.type})),nodeExtensions:e.filter((function(e){return"node"===e.type})),markExtensions:e.filter((function(e){return"mark"===e.type}))}}function xr(e){var t=[],n=kr(e),r=n.nodeExtensions,a=n.markExtensions,s=[].concat(Object(o.a)(r),Object(o.a)(a)),l={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return e.forEach((function(e){var n=wr(e,"addGlobalAttributes",{name:e.name,options:e.options,storage:e.storage});n&&n().forEach((function(e){e.types.forEach((function(n){Object.entries(e.attributes).forEach((function(e){var r=Object(i.a)(e,2),o=r[0],a=r[1];t.push({type:n,name:o,attribute:Object(f.a)(Object(f.a)({},l),a)})}))}))}))})),s.forEach((function(e){var n={name:e.name,options:e.options,storage:e.storage},r=wr(e,"addAttributes",n);if(r){var o=r();Object.entries(o).forEach((function(n){var r=Object(i.a)(n,2),o=r[0],a=r[1],s=Object(f.a)(Object(f.a)({},l),a);a.isRequired&&void 0===a.default&&delete s.default,t.push({type:e.name,name:o,attribute:s})}))}})),t}function Or(e,t){if("string"===typeof e){if(!t.nodes[e])throw Error("There is no node type named '".concat(e,"'. Maybe you forgot to add the extension?"));return t.nodes[e]}return e}function Sr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((function(e){return!!e})).reduce((function(e,t){var n=Object(f.a)({},e);return Object.entries(t).forEach((function(e){var t=Object(i.a)(e,2),r=t[0],o=t[1];n[r]?n[r]="class"===r?[n[r],o].join(" "):"style"===r?[n[r],o].join("; "):o:n[r]=o})),n}),{})}function Cr(e,t){return t.filter((function(e){return e.attribute.rendered})).map((function(t){return t.attribute.renderHTML?t.attribute.renderHTML(e.attrs)||{}:Object(u.a)({},t.name,e.attrs[t.name])})).reduce((function(e,t){return Sr(e,t)}),{})}function jr(e){return"function"===typeof e}function Dr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if(jr(e)){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return t?e.bind(t).apply(void 0,r):e.apply(void 0,r)}return e}function Er(e,t){return e.style?e:Object(f.a)(Object(f.a)({},e),{},{getAttrs:function(n){var r=e.getAttrs?e.getAttrs(n):e.attrs;if(!1===r)return!1;var o=t.reduce((function(e,t){var r=t.attribute.parseHTML?t.attribute.parseHTML(n):function(e){return"string"!==typeof e?e:e.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(e):"true"===e||"false"!==e&&e}(n.getAttribute(t.name));return null===r||void 0===r?e:Object(f.a)(Object(f.a)({},e),{},Object(u.a)({},t.name,r))}),{});return Object(f.a)(Object(f.a)({},r),o)}})}function Ar(e){return Object.fromEntries(Object.entries(e).filter((function(e){var t=Object(i.a)(e,2),n=t[0],r=t[1];return("attrs"!==n||!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 0===Object.keys(e).length&&e.constructor===Object}(r))&&(null!==r&&void 0!==r)})))}function Mr(e){var t,n=xr(e),r=kr(e),o=r.nodeExtensions,i=r.markExtensions,a=null===(t=o.find((function(e){return wr(e,"topNode")})))||void 0===t?void 0:t.name,s=Object.fromEntries(o.map((function(t){var r=n.filter((function(e){return e.type===t.name})),o={name:t.name,options:t.options,storage:t.storage},i=e.reduce((function(e,n){var r=wr(n,"extendNodeSchema",o);return Object(f.a)(Object(f.a)({},e),r?r(t):{})}),{}),a=Ar(Object(f.a)(Object(f.a)({},i),{},{content:Dr(wr(t,"content",o)),marks:Dr(wr(t,"marks",o)),group:Dr(wr(t,"group",o)),inline:Dr(wr(t,"inline",o)),atom:Dr(wr(t,"atom",o)),selectable:Dr(wr(t,"selectable",o)),draggable:Dr(wr(t,"draggable",o)),code:Dr(wr(t,"code",o)),defining:Dr(wr(t,"defining",o)),isolating:Dr(wr(t,"isolating",o)),attrs:Object.fromEntries(r.map((function(e){var t;return[e.name,{default:null===(t=null===e||void 0===e?void 0:e.attribute)||void 0===t?void 0:t.default}]})))})),s=Dr(wr(t,"parseHTML",o));s&&(a.parseDOM=s.map((function(e){return Er(e,r)})));var l=wr(t,"renderHTML",o);l&&(a.toDOM=function(e){return l({node:e,HTMLAttributes:Cr(e,r)})});var u=wr(t,"renderText",o);return u&&(a.toText=u),[t.name,a]}))),l=Object.fromEntries(i.map((function(t){var r=n.filter((function(e){return e.type===t.name})),o={name:t.name,options:t.options,storage:t.storage},i=e.reduce((function(e,n){var r=wr(n,"extendMarkSchema",o);return Object(f.a)(Object(f.a)({},e),r?r(t):{})}),{}),a=Ar(Object(f.a)(Object(f.a)({},i),{},{inclusive:Dr(wr(t,"inclusive",o)),excludes:Dr(wr(t,"excludes",o)),group:Dr(wr(t,"group",o)),spanning:Dr(wr(t,"spanning",o)),code:Dr(wr(t,"code",o)),attrs:Object.fromEntries(r.map((function(e){var t;return[e.name,{default:null===(t=null===e||void 0===e?void 0:e.attribute)||void 0===t?void 0:t.default}]})))})),s=Dr(wr(t,"parseHTML",o));s&&(a.parseDOM=s.map((function(e){return Er(e,r)})));var l=wr(t,"renderHTML",o);return l&&(a.toDOM=function(e){return l({mark:e,HTMLAttributes:Cr(e,r)})}),[t.name,a]})));return new v.Schema({topNode:a,nodes:s,marks:l})}function Tr(e,t){return t.nodes[e]||t.marks[e]||null}function Lr(e,t){return Array.isArray(t)?t.some((function(t){return("string"===typeof t?t:t.name)===e.name})):t}function Nr(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var Pr=Object(d.a)((function e(t){Object(c.a)(this,e),this.find=t.find,this.handler=t.handler}));function Rr(e){var t,n=e.editor,r=e.from,o=e.to,i=e.text,a=e.rules,s=e.plugin,l=n.view;if(l.composing)return!1;var u=l.state.doc.resolve(r);if(u.parent.type.spec.code||(null===(t=u.nodeBefore||u.nodeAfter)||void 0===t?void 0:t.marks.find((function(e){return e.type.spec.code}))))return!1;var c=!1,d=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n="";return e.parent.nodesBetween(Math.max(0,e.parentOffset-t),e.parentOffset,(function(t,r,o,i){var a,s,l;n+=(null===(s=(a=t.type.spec).toText)||void 0===s?void 0:s.call(a,{node:t,pos:r,parent:o,index:i}))||(null===(l=e.nodeBefore)||void 0===l?void 0:l.text)||"%leaf%"})),n}(u)+i;return a.forEach((function(e){if(!c){var t=function(e,t){if(Nr(t))return t.exec(e);var n=t(e);if(!n)return null;var r=[];return r.push(n.text),r.index=n.index,r.input=e,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r}(d,e.find);if(t){var a=l.state.tr,u=gr({state:l.state,transaction:a}),f={from:r-(t[0].length-i.length),to:o},p=new yr({editor:n,state:u}),h=p.commands,m=p.chain,v=p.can;null!==e.handler({state:u,range:f,match:t,commands:h,chain:m,can:v})&&a.steps.length&&(a.setMeta(s,{transform:a,from:r,to:o,text:i}),l.dispatch(a),c=!0)}}})),c}function Hr(e){var t=e.editor,n=e.rules,r=new p.Plugin({state:{init:function(){return null},apply:function(e,t){var n=e.getMeta(r);return n||(e.selectionSet||e.docChanged?null:t)}},props:{handleTextInput:function(e,o,i,a){return Rr({editor:t,from:o,to:i,text:a,rules:n,plugin:r})},handleDOMEvents:{compositionend:function(e){return setTimeout((function(){var o=e.state.selection.$cursor;o&&Rr({editor:t,from:o.pos,to:o.pos,text:"",rules:n,plugin:r})})),!1}},handleKeyDown:function(e,o){if("Enter"!==o.key)return!1;var i=e.state.selection.$cursor;return!!i&&Rr({editor:t,from:i.pos,to:i.pos,text:"\n",rules:n,plugin:r})}},isInputRules:!0});return r}var Fr=Object(d.a)((function e(t){Object(c.a)(this,e),this.find=t.find,this.handler=t.handler}));function Vr(e){var t=e.editor,n=e.state,r=e.from,i=e.to,a=e.rule,s=new yr({editor:t,state:n}),l=s.commands,u=s.chain,c=s.can,d=[];return n.doc.nodesBetween(r,i,(function(e,t){if(e.isTextblock&&!e.type.spec.code){var s=Math.max(r,t),f=Math.min(i,t+e.content.size);(function(e,t){if(Nr(t))return Object(o.a)(e.matchAll(t));var n=t(e);return n?n.map((function(t){var n=[];return n.push(t.text),n.index=t.index,n.input=e,n.data=t.data,t.replaceWith&&(t.text.includes(t.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),n.push(t.replaceWith)),n})):[]})(e.textBetween(s-t,f-t,void 0,"\ufffc"),a.find).forEach((function(e){if(void 0!==e.index){var t=s+e.index+1,r=t+e[0].length,o={from:n.tr.mapping.map(t),to:n.tr.mapping.map(r)},i=a.handler({state:n,range:o,match:e,commands:l,chain:u,can:c});d.push(i)}}))}})),d.every((function(e){return null!==e}))}var zr=function(){function e(t,n){var r=this;Object(c.a)(this,e),this.splittableMarks=[],this.editor=n,this.extensions=e.resolve(t),this.schema=Mr(this.extensions),this.extensions.forEach((function(e){var t;r.editor.extensionStorage[e.name]=e.storage;var n={name:e.name,options:e.options,storage:e.storage,editor:r.editor,type:Tr(e.name,r.schema)};"mark"===e.type&&((null===(t=Dr(wr(e,"keepOnSplit",n)))||void 0===t||t)&&r.splittableMarks.push(e.name));var o=wr(e,"onBeforeCreate",n);o&&r.editor.on("beforeCreate",o);var i=wr(e,"onCreate",n);i&&r.editor.on("create",i);var a=wr(e,"onUpdate",n);a&&r.editor.on("update",a);var s=wr(e,"onSelectionUpdate",n);s&&r.editor.on("selectionUpdate",s);var l=wr(e,"onTransaction",n);l&&r.editor.on("transaction",l);var u=wr(e,"onFocus",n);u&&r.editor.on("focus",u);var c=wr(e,"onBlur",n);c&&r.editor.on("blur",c);var d=wr(e,"onDestroy",n);d&&r.editor.on("destroy",d)}))}return Object(d.a)(e,[{key:"commands",get:function(){var e=this;return this.extensions.reduce((function(t,n){var r=wr(n,"addCommands",{name:n.name,options:n.options,storage:n.storage,editor:e.editor,type:Tr(n.name,e.schema)});return r?Object(f.a)(Object(f.a)({},t),r()):t}),{})}},{key:"plugins",get:function(){var t=this,n=this.editor,r=e.sort(Object(o.a)(this.extensions).reverse()),a=[],s=[],l=r.map((function(e){var r={name:e.name,options:e.options,storage:e.storage,editor:n,type:Tr(e.name,t.schema)},l=[],u=wr(e,"addKeyboardShortcuts",r);if(u){var c=zn(Object.fromEntries(Object.entries(u()).map((function(e){var t=Object(i.a)(e,2),r=t[0],o=t[1];return[r,function(){return o({editor:n})}]}))));l.push(c)}var d=wr(e,"addInputRules",r);Lr(e,n.options.enableInputRules)&&d&&a.push.apply(a,Object(o.a)(d()));var f=wr(e,"addPasteRules",r);Lr(e,n.options.enablePasteRules)&&f&&s.push.apply(s,Object(o.a)(f()));var p=wr(e,"addProseMirrorPlugins",r);if(p){var h=p();l.push.apply(l,Object(o.a)(h))}return l})).flat();return[Hr({editor:n,rules:a})].concat(Object(o.a)(function(e){var t=e.editor,n=e.rules,r=null,o=!1,i=!1;return n.map((function(e){return new p.Plugin({view:function(e){var t=function(t){var n;r=(null===(n=e.dom.parentElement)||void 0===n?void 0:n.contains(t.target))?e.dom.parentElement:null};return window.addEventListener("dragstart",t),{destroy:function(){window.removeEventListener("dragstart",t)}}},props:{handleDOMEvents:{drop:function(e){return i=r===e.dom.parentElement,!1},paste:function(e,t){var n,r=null===(n=t.clipboardData)||void 0===n?void 0:n.getData("text/html");return o=!!(null===r||void 0===r?void 0:r.includes("data-pm-slice")),!1}}},appendTransaction:function(n,r,a){var s=n[0],l="paste"===s.getMeta("uiEvent")&&!o,u="drop"===s.getMeta("uiEvent")&&!i;if(l||u){var c=r.doc.content.findDiffStart(a.doc.content),d=r.doc.content.findDiffEnd(a.doc.content);if("number"===typeof c&&d&&c!==d.b){var f=a.tr,p=gr({state:a,transaction:f});if(Vr({editor:t,state:p,from:Math.max(c-1,0),to:d.b,rule:e})&&f.steps.length)return f}}}})}))}({editor:n,rules:s})),Object(o.a)(l))}},{key:"attributes",get:function(){return xr(this.extensions)}},{key:"nodeViews",get:function(){var e=this,t=this.editor,n=kr(this.extensions).nodeExtensions;return Object.fromEntries(n.filter((function(e){return!!wr(e,"addNodeView")})).map((function(n){var r=e.attributes.filter((function(e){return e.type===n.name})),o={name:n.name,options:n.options,storage:n.storage,editor:t,type:Or(n.name,e.schema)},i=wr(n,"addNodeView",o);if(!i)return[];return[n.name,function(e,o,a,s){var l=Cr(e,r);return i()({editor:t,node:e,getPos:a,decorations:s,HTMLAttributes:l,extension:n})}]})))}}],[{key:"resolve",value:function(t){var n=e.sort(e.flatten(t)),r=function(e){var t=e.filter((function(t,n){return e.indexOf(t)!==n}));return Object(o.a)(new Set(t))}(n.map((function(e){return e.name})));return r.length&&console.warn("[tiptap warn]: Duplicate extension names found: [".concat(r.map((function(e){return"'".concat(e,"'")})).join(", "),"]. This can lead to issues.")),n}},{key:"flatten",value:function(e){var t=this;return e.map((function(e){var n=wr(e,"addExtensions",{name:e.name,options:e.options,storage:e.storage});return n?[e].concat(Object(o.a)(t.flatten(n()))):e})).flat(10)}},{key:"sort",value:function(e){return e.sort((function(e,t){var n=wr(e,"priority")||100,r=wr(t,"priority")||100;return n>r?-1:n<r?1:0}))}}]),e}();function Br(e){return"Object"===function(e){return Object.prototype.toString.call(e).slice(8,-1)}(e)&&(e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype)}function _r(e,t){var n=Object(f.a)({},e);return Br(e)&&Br(t)&&Object.keys(t).forEach((function(r){Br(t[r])&&r in e?n[r]=_r(e[r],t[r]):Object.assign(n,Object(u.a)({},r,t[r]))})),n}var Ir=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(c.a)(this,e),this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config=Object(f.a)(Object(f.a)({},this.config),t),this.name=this.config.name,t.defaultOptions&&console.warn('[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "'.concat(this.name,'".')),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Dr(wr(this,"addOptions",{name:this.name}))),this.storage=Dr(wr(this,"addStorage",{name:this.name,options:this.options}))||{}}return Object(d.a)(e,[{key:"configure",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.extend();return t.options=_r(this.options,e),t.storage=Dr(wr(t,"addStorage",{name:t.name,options:t.options})),t}},{key:"extend",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=new e(t);return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&console.warn('[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "'.concat(n.name,'".')),n.options=Dr(wr(n,"addOptions",{name:n.name})),n.storage=Dr(wr(n,"addStorage",{name:n.name,options:n.options})),n}}],[{key:"create",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new e(t)}}]),e}();function $r(e,t,n){var r=t.from,o=t.to,i=n||{},a=i.blockSeparator,s=void 0===a?"\n\n":a,l=i.textSerializers,u=void 0===l?{}:l,c="",d=!0;return e.nodesBetween(r,o,(function(e,n,i,a){var l,f=null===u||void 0===u?void 0:u[e.type.name];f?(e.isBlock&&!d&&(c+=s,d=!0),i&&(c+=f({node:e,pos:n,parent:i,index:a,range:t}))):e.isText?(c+=null===(l=null===e||void 0===e?void 0:e.text)||void 0===l?void 0:l.slice(Math.max(r,n)-n,o-n),d=!1):e.isBlock&&!d&&(c+=s,d=!0)})),c}function qr(e){return Object.fromEntries(Object.entries(e.nodes).filter((function(e){return Object(i.a)(e,2)[1].spec.toText})).map((function(e){var t=Object(i.a)(e,2);return[t[0],t[1].spec.toText]})))}var Wr=Ir.create({name:"clipboardTextSerializer",addProseMirrorPlugins:function(){var e=this;return[new p.Plugin({key:new p.PluginKey("clipboardTextSerializer"),props:{clipboardTextSerializer:function(){var t=e.editor,n=t.state,r=t.schema,i=n.doc,a=n.selection.ranges,s=Math.min.apply(Math,Object(o.a)(a.map((function(e){return e.$from.pos})))),l=Math.max.apply(Math,Object(o.a)(a.map((function(e){return e.$to.pos}))));return $r(i,{from:s,to:l},{textSerializers:qr(r)})}}})]}});function Ur(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{strict:!0},r=Object.keys(t);return!r.length||r.every((function(r){return n.strict?t[r]===e[r]:Nr(t[r])?t[r].test(e[r]):t[r]===e[r]}))}function Kr(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e.find((function(e){return e.type===t&&Ur(e.attrs,n)}))}function Gr(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return!!Kr(e,t,n)}function Jr(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e&&t){var r=e.parent.childAfter(e.parentOffset);if(e.parentOffset===r.offset&&0!==r.offset&&(r=e.parent.childBefore(e.parentOffset)),r.node){var i=Kr(Object(o.a)(r.node.marks),t,n);if(i){var a=r.index,s=e.start()+r.offset,l=a+1,u=s+r.node.nodeSize;for(Kr(Object(o.a)(r.node.marks),t,n);a>0&&i.isInSet(e.parent.child(a-1).marks);)a-=1,s-=e.parent.child(a).nodeSize;for(;l<e.parent.childCount&&Gr(Object(o.a)(e.parent.child(l).marks),t,n);)u+=e.parent.child(l).nodeSize,l+=1;return{from:s,to:u}}}}}function Yr(e,t){if("string"===typeof e){if(!t.marks[e])throw Error("There is no mark type named '".concat(e,"'. Maybe you forgot to add the extension?"));return t.marks[e]}return e}function Zr(e){return e&&"object"===typeof e&&!Array.isArray(e)&&!function(e){var t;return"class"===(null===(t=e.constructor)||void 0===t?void 0:t.toString().substring(0,5))}(e)}function Xr(e){return Zr(e)&&e instanceof p.TextSelection}function Qr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return Math.min(Math.max(e,t),n)}function eo(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!t)return null;var n=p.Selection.atStart(e),r=p.Selection.atEnd(e);if("start"===t||!0===t)return n;if("end"===t)return r;var o=n.from,i=r.to;return"all"===t?p.TextSelection.create(e,Qr(0,o,i),Qr(e.content.size,o,i)):p.TextSelection.create(e,Qr(t,o,i),Qr(t,o,i))}function to(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}function no(e){var t="<body>".concat(e,"</body>");return(new window.DOMParser).parseFromString(t,"text/html").body}function ro(e,t,n){if(n=Object(f.a)({slice:!0,parseOptions:{}},n),"object"===typeof e&&null!==e)try{return Array.isArray(e)?v.Fragment.fromArray(e.map((function(e){return t.nodeFromJSON(e)}))):t.nodeFromJSON(e)}catch(o){return console.warn("[tiptap warn]: Invalid content.","Passed value:",e,"Error:",o),ro("",t,n)}if("string"===typeof e){var r=v.DOMParser.fromSchema(t);return n.slice?r.parseSlice(no(e),n.parseOptions).content:r.parse(no(e),n.parseOptions)}return ro("",t,n)}function oo(){return"undefined"!==typeof navigator&&/Mac/.test(navigator.platform)}function io(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=e.selection,o=r.from,i=r.to,a=r.empty,s=t?Or(t,e.schema):null,l=[];e.doc.nodesBetween(o,i,(function(e,t){if(!e.isText){var n=Math.max(o,t),r=Math.min(i,t+e.nodeSize);l.push({node:e,from:n,to:r})}}));var u=i-o,c=l.filter((function(e){return!s||s.name===e.node.type.name})).filter((function(e){return Ur(e.node.attrs,n,{strict:!1})}));if(a)return!!c.length;var d=c.reduce((function(e,t){return e+t.to-t.from}),0);return d>=u}function ao(e,t){return t.nodes[e]?"node":t.marks[e]?"mark":null}function so(e,t){var n="string"===typeof t?[t]:t;return Object.keys(e).reduce((function(t,r){return n.includes(r)||(t[r]=e[r]),t}),{})}function lo(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return ro(e,t,{slice:!1,parseOptions:n})}function uo(e,t){var n=Yr(t,e.schema),r=e.selection,i=r.from,a=r.to,s=r.empty,l=[];s?(e.storedMarks&&l.push.apply(l,Object(o.a)(e.storedMarks)),l.push.apply(l,Object(o.a)(e.selection.$head.marks()))):e.doc.nodesBetween(i,a,(function(e){l.push.apply(l,Object(o.a)(e.marks))}));var u=l.find((function(e){return e.type.name===n.name}));return u?Object(f.a)({},u.attrs):{}}function co(e,t,n){return Object.fromEntries(Object.entries(n).filter((function(n){var r=Object(i.a)(n,1)[0],o=e.find((function(e){return e.type===t&&e.name===r}));return!!o&&o.attribute.keepOnSplit})))}function fo(e){for(var t=0;t<e.edgeCount;t+=1){var n=e.edge(t).type;if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function po(e,t){var n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){var r=n.filter((function(e){return null===t||void 0===t?void 0:t.includes(e.type.name)}));e.tr.ensureMarks(r)}}function ho(e,t){for(var n=e.depth;n>0;n-=1){var r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}}function mo(e){return function(t){return ho(t.$from,e)}}function vo(e,t){var n=kr(t).nodeExtensions.find((function(t){return t.name===e}));if(!n)return!1;var r=Dr(wr(n,"group",{name:n.name,options:n.options,storage:n.storage}));return"string"===typeof r&&r.split(" ").includes("list")}var go=function(e,t){var n=mo((function(e){return e.type===t}))(e.selection);if(!n)return!0;var r=e.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(void 0===r)return!0;var o=e.doc.nodeAt(r);return n.node.type!==(null===o||void 0===o?void 0:o.type)||!Object(g.f)(e.doc,n.pos)||(e.join(n.pos),!0)},yo=function(e,t){var n=mo((function(e){return e.type===t}))(e.selection);if(!n)return!0;var r=e.doc.resolve(n.start).after(n.depth);if(void 0===r)return!0;var o=e.doc.nodeAt(r);return n.node.type!==(null===o||void 0===o?void 0:o.type)||!Object(g.f)(e.doc,r)||(e.join(r),!0)};function bo(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=e.selection,i=r.empty,a=r.ranges,s=t?Yr(t,e.schema):null;if(i)return!!(e.storedMarks||e.selection.$from.marks()).filter((function(e){return!s||s.name===e.type.name})).find((function(e){return Ur(e.attrs,n,{strict:!1})}));var l=0,u=[];if(a.forEach((function(t){var n=t.$from,r=t.$to,i=n.pos,a=r.pos;e.doc.nodesBetween(i,a,(function(e,t){if(e.isText||e.marks.length){var n=Math.max(i,t),r=Math.min(a,t+e.nodeSize);l+=r-n,u.push.apply(u,Object(o.a)(e.marks.map((function(e){return{mark:e,from:n,to:r}}))))}}))})),0===l)return!1;var c=u.filter((function(e){return!s||s.name===e.mark.type.name})).filter((function(e){return Ur(e.mark.attrs,n,{strict:!1})})).reduce((function(e,t){return e+t.to-t.from}),0),d=u.filter((function(e){return!s||e.mark.type!==s&&e.mark.type.excludes(s)})).reduce((function(e,t){return e+t.to-t.from}),0),f=c>0?c+d:c;return f>=l}var wo=Object.freeze({__proto__:null,blur:function(){return function(e){var t=e.editor,n=e.view;return requestAnimationFrame((function(){var e;t.isDestroyed||(n.dom.blur(),null===(e=null===window||void 0===window?void 0:window.getSelection())||void 0===e||e.removeAllRanges())})),!0}},clearContent:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return function(t){return t.commands.setContent("",e)}},clearNodes:function(){return function(e){var t=e.state,n=e.tr,r=e.dispatch,o=n.selection.ranges;return!r||(o.forEach((function(e){var r=e.$from,o=e.$to;t.doc.nodesBetween(r.pos,o.pos,(function(e,t){if(!e.type.isText){var r=n.doc,o=n.mapping,i=r.resolve(o.map(t)),a=r.resolve(o.map(t+e.nodeSize)),s=i.blockRange(a);if(s){var l=Object(g.k)(s);if(e.type.isTextblock){var u=i.parent.contentMatchAt(i.index()).defaultType;n.setNodeMarkup(s.start,u)}(l||0===l)&&n.lift(s,l)}}}))})),!0)}},command:function(e){return function(t){return e(t)}},createParagraphNear:function(){return function(e){var t=e.state,n=e.dispatch;return Qn(t,n)}},deleteNode:function(e){return function(t){for(var n=t.tr,r=t.state,o=t.dispatch,i=Or(e,r.schema),a=n.selection.$anchor,s=a.depth;s>0;s-=1){if(a.node(s).type===i){if(o){var l=a.before(s),u=a.after(s);n.delete(l,u).scrollIntoView()}return!0}}return!1}},deleteRange:function(e){return function(t){var n=t.tr,r=t.dispatch,o=e.from,i=e.to;return r&&n.delete(o,i),!0}},deleteSelection:function(){return function(e){var t=e.state,n=e.dispatch;return _n(t,n)}},enter:function(){return function(e){return e.commands.keyboardShortcut("Enter")}},exitCode:function(){return function(e){var t=e.state,n=e.dispatch;return Xn(t,n)}},extendMarkRange:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=n.tr,o=n.state,i=n.dispatch,a=Yr(e,o.schema),s=r.doc,l=r.selection,u=l.$from,c=l.from,d=l.to;if(i){var f=Jr(u,a,t);if(f&&f.from<=c&&f.to>=d){var h=p.TextSelection.create(s,f.from,f.to);r.setSelection(h)}}return!0}},first:function(e){return function(t){for(var n="function"===typeof e?e(t):e,r=0;r<n.length;r+=1)if(n[r](t))return!0;return!1}},focus:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=n.editor,o=n.view,i=n.tr,a=n.dispatch;t=Object(f.a)({scrollIntoView:!0},t);var s=function(){to()&&o.dom.focus(),requestAnimationFrame((function(){r.isDestroyed||(o.focus(),(null===t||void 0===t?void 0:t.scrollIntoView)&&r.commands.scrollIntoView())}))};if(o.hasFocus()&&null===e||!1===e)return!0;if(a&&null===e&&!Xr(r.state.selection))return s(),!0;var l=eo(i.doc,e)||r.state.selection,u=r.state.selection.eq(l);return a&&(u||i.setSelection(l),u&&i.storedMarks&&i.setStoredMarks(i.storedMarks),s()),!0}},forEach:function(e,t){return function(n){return e.every((function(e,r){return t(e,Object(f.a)(Object(f.a)({},n),{},{index:r}))}))}},insertContent:function(e,t){return function(n){var r=n.tr;return n.commands.insertContentAt({from:r.selection.from,to:r.selection.to},e,t)}},insertContentAt:function(e,t,n){return function(r){var o=r.tr,i=r.dispatch,a=r.editor;if(i){n=Object(f.a)({parseOptions:{},updateSelection:!0},n);var s=ro(t,a.schema,{parseOptions:Object(f.a)({preserveWhitespace:"full"},n.parseOptions)});if("<>"===s.toString())return!0;var l="number"===typeof e?{from:e,to:e}:e,u=l.from,c=l.to,d=!0,h=!0;if((s.toString().startsWith("<")?s:[s]).forEach((function(e){e.check(),d=!!d&&(e.isText&&0===e.marks.length),h=!!h&&e.isBlock})),u===c&&h){var m=o.doc.resolve(u).parent;m.isTextblock&&!m.type.spec.code&&!m.childCount&&(u-=1,c+=1)}d?o.insertText(t,u,c):o.replaceWith(u,c,s),n.updateSelection&&function(e,t,n){var r=e.steps.length-1;if(!(r<t)){var o=e.steps[r];if(o instanceof g.c||o instanceof g.b){var i=e.mapping.maps[r],a=0;i.forEach((function(e,t,n,r){0===a&&(a=r)})),e.setSelection(p.Selection.near(e.doc.resolve(a),n))}}}(o,o.steps.length-1,-1)}return!0}},joinBackward:function(){return function(e){var t=e.state,n=e.dispatch;return In(t,n)}},joinForward:function(){return function(e){var t=e.state,n=e.dispatch;return Un(t,n)}},keyboardShortcut:function(e){return function(t){var n=t.editor,r=t.view,o=t.tr,i=t.dispatch,a=function(e){var t,n,r,o,i=e.split(/-(?!$)/),a=i[i.length-1];"Space"===a&&(a=" ");for(var s=0;s<i.length-1;s+=1){var l=i[s];if(/^(cmd|meta|m)$/i.test(l))o=!0;else if(/^a(lt)?$/i.test(l))t=!0;else if(/^(c|ctrl|control)$/i.test(l))n=!0;else if(/^s(hift)?$/i.test(l))r=!0;else{if(!/^mod$/i.test(l))throw new Error("Unrecognized modifier name: ".concat(l));to()||oo()?o=!0:n=!0}}return t&&(a="Alt-".concat(a)),n&&(a="Ctrl-".concat(a)),o&&(a="Meta-".concat(a)),r&&(a="Shift-".concat(a)),a}(e).split(/-(?!$)/),s=a.find((function(e){return!["Alt","Ctrl","Meta","Shift"].includes(e)})),l=new KeyboardEvent("keydown",{key:"Space"===s?" ":s,altKey:a.includes("Alt"),ctrlKey:a.includes("Ctrl"),metaKey:a.includes("Meta"),shiftKey:a.includes("Shift"),bubbles:!0,cancelable:!0}),u=n.captureTransaction((function(){r.someProp("handleKeyDown",(function(e){return e(r,l)}))}));return null===u||void 0===u||u.steps.forEach((function(e){var t=e.map(o.mapping);t&&i&&o.maybeStep(t)})),!0}},lift:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=n.state,o=n.dispatch;return!!io(r,Or(e,r.schema),t)&&Jn(r,o)}},liftEmptyBlock:function(){return function(e){var t=e.state,n=e.dispatch;return er(t,n)}},liftListItem:function(e){return function(t){var n=t.state,r=t.dispatch;return vr(Or(e,n.schema))(n,r)}},newlineInCode:function(){return function(e){var t=e.state,n=e.dispatch;return Yn(t,n)}},resetAttributes:function(e,t){return function(n){var r=n.tr,o=n.state,i=n.dispatch,a=null,s=null,l=ao("string"===typeof e?e:e.name,o.schema);return!!l&&("node"===l&&(a=Or(e,o.schema)),"mark"===l&&(s=Yr(e,o.schema)),i&&r.selection.ranges.forEach((function(e){o.doc.nodesBetween(e.$from.pos,e.$to.pos,(function(e,n){a&&a===e.type&&r.setNodeMarkup(n,void 0,so(e.attrs,t)),s&&e.marks.length&&e.marks.forEach((function(o){s===o.type&&r.addMark(n,n+e.nodeSize,s.create(so(o.attrs,t)))}))}))})),!0)}},scrollIntoView:function(){return function(e){var t=e.tr;return e.dispatch&&t.scrollIntoView(),!0}},selectAll:function(){return function(e){var t=e.tr;return e.commands.setTextSelection({from:0,to:t.doc.content.size})}},selectNodeBackward:function(){return function(e){var t=e.state,n=e.dispatch;return qn(t,n)}},selectNodeForward:function(){return function(e){var t=e.state,n=e.dispatch;return Kn(t,n)}},selectParentNode:function(){return function(e){return function(e,t){var n,r=e.selection,o=r.$from,i=r.to,a=o.sharedDepth(i);return 0!=a&&(n=o.before(a),t&&t(e.tr.setSelection(p.NodeSelection.create(e.doc,n))),!0)}(e.state,e.dispatch)}},selectTextblockEnd:function(){return function(e){var t=e.state,n=e.dispatch;return ir(t,n)}},selectTextblockStart:function(){return function(e){var t=e.state,n=e.dispatch;return or(t,n)}},setContent:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(r){var o=r.tr,i=r.editor,a=r.dispatch,s=o.doc,l=lo(e,i.schema,n);return a&&o.replaceWith(0,s.content.size,l).setMeta("preventUpdate",!t),!0}},setMark:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=n.tr,o=n.state,i=n.dispatch,a=r.selection,s=a.empty,l=a.ranges,u=Yr(e,o.schema);if(i)if(s){var c=uo(o,u);r.addStoredMark(u.create(Object(f.a)(Object(f.a)({},c),t)))}else l.forEach((function(e){var n=e.$from.pos,i=e.$to.pos;o.doc.nodesBetween(n,i,(function(e,o){var a=Math.max(o,n),s=Math.min(o+e.nodeSize,i);e.marks.find((function(e){return e.type===u}))?e.marks.forEach((function(e){u===e.type&&r.addMark(a,s,u.create(Object(f.a)(Object(f.a)({},e.attrs),t)))})):r.addMark(a,s,u.create(t))}))}));return!0}},setMeta:function(e,t){return function(n){return n.tr.setMeta(e,t),!0}},setNode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=n.state,o=n.dispatch,i=n.chain,a=Or(e,r.schema);return a.isTextblock?i().command((function(e){var n=e.commands;return!!sr(a,t)(r)||n.clearNodes()})).command((function(e){var n=e.state;return sr(a,t)(n,o)})).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)}},setNodeSelection:function(e){return function(t){var n=t.tr;if(t.dispatch){var r=n.doc,o=p.Selection.atStart(r).from,i=p.Selection.atEnd(r).to,a=Qr(e,o,i),s=p.NodeSelection.create(r,a);n.setSelection(s)}return!0}},setTextSelection:function(e){return function(t){var n=t.tr;if(t.dispatch){var r=n.doc,o="number"===typeof e?{from:e,to:e}:e,i=o.from,a=o.to,s=p.TextSelection.atStart(r).from,l=p.TextSelection.atEnd(r).to,u=Qr(i,s,l),c=Qr(a,s,l),d=p.TextSelection.create(r,u,c);n.setSelection(d)}return!0}},sinkListItem:function(e){return function(t){var n,r=t.state,o=t.dispatch,i=Or(e,r.schema);return(n=i,function(e,t){var r=e.selection,o=r.$from,i=r.$to,a=o.blockRange(i,(function(e){return e.childCount>0&&e.firstChild.type==n}));if(!a)return!1;var s=a.startIndex;if(0==s)return!1;var l=a.parent,u=l.child(s-1);if(u.type!=n)return!1;if(t){var c=u.lastChild&&u.lastChild.type==l.type,d=v.Fragment.from(c?n.create():null),f=new v.Slice(v.Fragment.from(n.create(null,v.Fragment.from(l.type.create(null,d)))),c?3:1,0),p=a.start,h=a.end;t(e.tr.step(new g.b(p-(c?3:1),h,p,h,f,1,!0)).scrollIntoView())}return!0})(r,o)}},splitBlock:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.keepMarks,n=void 0===t||t;return function(e){var t=e.tr,r=e.state,o=e.dispatch,i=e.editor,a=t.selection,s=t.doc,l=a.$from,u=a.$to,c=co(i.extensionManager.attributes,l.node().type.name,l.node().attrs);if(a instanceof p.NodeSelection&&a.node.isBlock)return!(!l.parentOffset||!Object(g.g)(s,l.pos))&&(o&&(n&&po(r,i.extensionManager.splittableMarks),t.split(l.pos).scrollIntoView()),!0);if(!l.parent.isBlock)return!1;if(o){var d=u.parentOffset===u.parent.content.size;a instanceof p.TextSelection&&t.deleteSelection();var f=0===l.depth?void 0:fo(l.node(-1).contentMatchAt(l.indexAfter(-1))),h=d&&f?[{type:f,attrs:c}]:void 0,m=Object(g.g)(t.doc,t.mapping.map(l.pos),1,h);if(h||m||!Object(g.g)(t.doc,t.mapping.map(l.pos),1,f?[{type:f}]:void 0)||(m=!0,h=f?[{type:f,attrs:c}]:void 0),m&&(t.split(t.mapping.map(l.pos),1,h),f&&!d&&!l.parentOffset&&l.parent.type!==f)){var v=t.mapping.map(l.before()),y=t.doc.resolve(v);l.node(-1).canReplaceWith(y.index(),y.index()+1,f)&&t.setNodeMarkup(t.mapping.map(l.before()),f)}n&&po(r,i.extensionManager.splittableMarks),t.scrollIntoView()}return!0}},splitListItem:function(e){return function(t){var n,r=t.tr,o=t.state,i=t.dispatch,a=t.editor,s=Or(e,o.schema),l=o.selection,u=l.$from,c=l.$to,d=o.selection.node;if(d&&d.isBlock||u.depth<2||!u.sameParent(c))return!1;var f=u.node(-1);if(f.type!==s)return!1;var h=a.extensionManager.attributes;if(0===u.parent.content.size&&u.node(-1).childCount===u.indexAfter(-1)){if(2===u.depth||u.node(-3).type!==s||u.index(-2)!==u.node(-2).childCount-1)return!1;if(i){for(var m=v.Fragment.empty,y=u.index(-1)?1:u.index(-2)?2:3,b=u.depth-y;b>=u.depth-3;b-=1)m=v.Fragment.from(u.node(b).copy(m));var w=u.indexAfter(-1)<u.node(-2).childCount?1:u.indexAfter(-2)<u.node(-3).childCount?2:3,k=co(h,u.node().type.name,u.node().attrs),x=(null===(n=s.contentMatch.defaultType)||void 0===n?void 0:n.createAndFill(k))||void 0;m=m.append(v.Fragment.from(s.createAndFill(null,x)||void 0));var O=u.before(u.depth-(y-1));r.replace(O,u.after(-w),new v.Slice(m,4-y,0));var S=-1;r.doc.nodesBetween(O,r.doc.content.size,(function(e,t){if(S>-1)return!1;e.isTextblock&&0===e.content.size&&(S=t+1)})),S>-1&&r.setSelection(p.TextSelection.near(r.doc.resolve(S))),r.scrollIntoView()}return!0}var C=c.pos===u.end()?f.contentMatchAt(0).defaultType:null,j=co(h,f.type.name,f.attrs),D=co(h,u.node().type.name,u.node().attrs);r.delete(u.pos,c.pos);var E=C?[{type:s,attrs:j},{type:C,attrs:D}]:[{type:s,attrs:j}];return!!Object(g.g)(r.doc,u.pos,2)&&(i&&r.split(u.pos,2,E).scrollIntoView(),!0)}},toggleList:function(e,t){return function(n){var r=n.editor,o=n.tr,i=n.state,a=n.dispatch,s=n.chain,l=n.commands,u=n.can,c=r.extensionManager.extensions,d=Or(e,i.schema),f=Or(t,i.schema),p=i.selection,h=p.$from,m=p.$to,v=h.blockRange(m);if(!v)return!1;var g=mo((function(e){return vo(e.type.name,c)}))(p);if(v.depth>=1&&g&&v.depth-g.depth<=1){if(g.node.type===d)return l.liftListItem(f);if(vo(g.node.type.name,c)&&d.validContent(g.node.content)&&a)return s().command((function(){return o.setNodeMarkup(g.pos,d),!0})).command((function(){return go(o,d)})).command((function(){return yo(o,d)})).run()}return s().command((function(){return!!u().wrapInList(d)||l.clearNodes()})).wrapInList(d).command((function(){return go(o,d)})).command((function(){return yo(o,d)})).run()}},toggleMark:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(r){var o=r.state,i=r.commands,a=n.extendEmptyMarkRange,s=void 0!==a&&a,l=Yr(e,o.schema);return bo(o,l,t)?i.unsetMark(l,{extendEmptyMarkRange:s}):i.setMark(l,t)}},toggleNode:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(r){var o=r.state,i=r.commands,a=Or(e,o.schema),s=Or(t,o.schema);return io(o,a,n)?i.setNode(s):i.setNode(a,n)}},toggleWrap:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=n.state,o=n.commands,i=Or(e,r.schema);return io(r,i,t)?o.lift(i):o.wrapIn(i,t)}},undoInputRule:function(){return function(e){for(var t=e.state,n=e.dispatch,r=t.plugins,o=0;o<r.length;o+=1){var i=r[o],a=void 0;if(i.spec.isInputRules&&(a=i.getState(t))){if(n){for(var s=t.tr,l=a.transform,u=l.steps.length-1;u>=0;u-=1)s.step(l.steps[u].invert(l.docs[u]));if(a.text){var c=s.doc.resolve(a.from).marks();s.replaceWith(a.from,a.to,t.schema.text(a.text,c))}else s.delete(a.from,a.to)}return!0}}return!1}},unsetAllMarks:function(){return function(e){var t=e.tr,n=e.dispatch,r=t.selection,o=r.empty,i=r.ranges;return o||n&&i.forEach((function(e){t.removeMark(e.$from.pos,e.$to.pos)})),!0}},unsetMark:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r,o=n.tr,i=n.state,a=n.dispatch,s=t.extendEmptyMarkRange,l=void 0!==s&&s,u=o.selection,c=Yr(e,i.schema),d=u.$from,f=u.empty,p=u.ranges;if(!a)return!0;if(f&&l){var h=u.from,m=u.to,v=null===(r=d.marks().find((function(e){return e.type===c})))||void 0===r?void 0:r.attrs,g=Jr(d,c,v);g&&(h=g.from,m=g.to),o.removeMark(h,m,c)}else p.forEach((function(e){o.removeMark(e.$from.pos,e.$to.pos,c)}));return o.removeStoredMark(c),!0}},updateAttributes:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=n.tr,o=n.state,i=n.dispatch,a=null,s=null,l=ao("string"===typeof e?e:e.name,o.schema);return!!l&&("node"===l&&(a=Or(e,o.schema)),"mark"===l&&(s=Yr(e,o.schema)),i&&r.selection.ranges.forEach((function(e){var n=e.$from.pos,i=e.$to.pos;o.doc.nodesBetween(n,i,(function(e,o){a&&a===e.type&&r.setNodeMarkup(o,void 0,Object(f.a)(Object(f.a)({},e.attrs),t)),s&&e.marks.length&&e.marks.forEach((function(a){if(s===a.type){var l=Math.max(o,n),u=Math.min(o+e.nodeSize,i);r.addMark(l,u,s.create(Object(f.a)(Object(f.a)({},a.attrs),t)))}}))}))})),!0)}},wrapIn:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=n.state,o=n.dispatch;return ar(Or(e,r.schema),t)(r,o)}},wrapInList:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=n.state,o=n.dispatch;return hr(Or(e,r.schema),t)(r,o)}}}),ko=Ir.create({name:"commands",addCommands:function(){return Object(f.a)({},wo)}}),xo=Ir.create({name:"editable",addProseMirrorPlugins:function(){var e=this;return[new p.Plugin({key:new p.PluginKey("editable"),props:{editable:function(){return e.editor.options.editable}}})]}}),Oo=Ir.create({name:"focusEvents",addProseMirrorPlugins:function(){var e=this.editor;return[new p.Plugin({key:new p.PluginKey("focusEvents"),props:{handleDOMEvents:{focus:function(t,n){e.isFocused=!0;var r=e.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1},blur:function(t,n){e.isFocused=!1;var r=e.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1}}}})]}}),So=Ir.create({name:"keymap",addKeyboardShortcuts:function(){var e=this,t=function(){return e.editor.commands.first((function(e){var t=e.commands;return[function(){return t.undoInputRule()},function(){return t.command((function(e){var n=e.tr,r=n.selection,o=n.doc,i=r.empty,a=r.$anchor,s=a.pos,l=a.parent,u=p.Selection.atStart(o).from===s;return!(!(i&&u&&l.type.isTextblock)||l.textContent.length)&&t.clearNodes()}))},function(){return t.deleteSelection()},function(){return t.joinBackward()},function(){return t.selectNodeBackward()}]}))},n=function(){return e.editor.commands.first((function(e){var t=e.commands;return[function(){return t.deleteSelection()},function(){return t.joinForward()},function(){return t.selectNodeForward()}]}))},r={Enter:function(){return e.editor.commands.first((function(e){var t=e.commands;return[function(){return t.newlineInCode()},function(){return t.createParagraphNear()},function(){return t.liftEmptyBlock()},function(){return t.splitBlock()}]}))},"Mod-Enter":function(){return e.editor.commands.exitCode()},Backspace:t,"Mod-Backspace":t,"Shift-Backspace":t,Delete:n,"Mod-Delete":n,"Mod-a":function(){return e.editor.commands.selectAll()}},o=Object(f.a)({},r),i=Object(f.a)(Object(f.a)({},r),{},{"Ctrl-h":t,"Alt-Backspace":t,"Ctrl-d":n,"Ctrl-Alt-Backspace":n,"Alt-Delete":n,"Alt-d":n,"Ctrl-a":function(){return e.editor.commands.selectTextblockStart()},"Ctrl-e":function(){return e.editor.commands.selectTextblockEnd()}});return to()||oo()?i:o},addProseMirrorPlugins:function(){var e=this;return[new p.Plugin({key:new p.PluginKey("clearDocument"),appendTransaction:function(t,n,r){if(t.some((function(e){return e.docChanged}))&&!n.doc.eq(r.doc)){var o=n.selection,i=o.empty,a=o.from,s=o.to,l=p.Selection.atStart(n.doc).from,u=p.Selection.atEnd(n.doc).to,c=a===l&&s===u,d=0===r.doc.textBetween(0,r.doc.content.size," "," ").length;if(!i&&c&&d){var f=r.tr,h=gr({state:r,transaction:f});if(new yr({editor:e.editor,state:h}).commands.clearNodes(),f.steps.length)return f}}}})]}}),Co=Ir.create({name:"tabindex",addProseMirrorPlugins:function(){return[new p.Plugin({key:new p.PluginKey("tabindex"),props:{attributes:this.editor.isEditable?{tabindex:"0"}:{}}})]}}),jo=Object.freeze({__proto__:null,ClipboardTextSerializer:Wr,Commands:ko,Editable:xo,FocusEvents:Oo,Keymap:So,Tabindex:Co});function Do(e,t){var n=ao("string"===typeof t?t:t.name,e.schema);return"node"===n?function(e,t){var n=Or(t,e.schema),r=e.selection,o=r.from,i=r.to,a=[];e.doc.nodesBetween(o,i,(function(e){a.push(e)}));var s=a.reverse().find((function(e){return e.type.name===n.name}));return s?Object(f.a)({},s.attrs):{}}(e,t):"mark"===n?uo(e,t):{}}function Eo(e,t){var n=v.DOMSerializer.fromSchema(t).serializeFragment(e),r=document.implementation.createHTMLDocument().createElement("div");return r.appendChild(n),r.innerHTML}function Ao(e,t){return $r(e,{from:0,to:e.content.size},t)}var Mo=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object(c.a)(this,n),(e=t.call(this)).isFocused=!1,e.extensionStorage={},e.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,onBeforeCreate:function(){return null},onCreate:function(){return null},onUpdate:function(){return null},onSelectionUpdate:function(){return null},onTransaction:function(){return null},onFocus:function(){return null},onBlur:function(){return null},onDestroy:function(){return null}},e.isCapturingTransaction=!1,e.capturedTransaction=null,e.setOptions(r),e.createExtensionManager(),e.createCommandManager(),e.createSchema(),e.on("beforeCreate",e.options.onBeforeCreate),e.emit("beforeCreate",{editor:Object(a.a)(e)}),e.createView(),e.injectCSS(),e.on("create",e.options.onCreate),e.on("update",e.options.onUpdate),e.on("selectionUpdate",e.options.onSelectionUpdate),e.on("transaction",e.options.onTransaction),e.on("focus",e.options.onFocus),e.on("blur",e.options.onBlur),e.on("destroy",e.options.onDestroy),window.setTimeout((function(){e.isDestroyed||(e.commands.focus(e.options.autofocus),e.emit("create",{editor:Object(a.a)(e)}))}),0),e}return Object(d.a)(n,[{key:"storage",get:function(){return this.extensionStorage}},{key:"commands",get:function(){return this.commandManager.commands}},{key:"chain",value:function(){return this.commandManager.chain()}},{key:"can",value:function(){return this.commandManager.can()}},{key:"injectCSS",value:function(){this.options.injectCSS&&document&&(this.css=function(e,t){var n=document.querySelector("style[data-tiptap-style]");if(null!==n)return n;var r=document.createElement("style");return t&&r.setAttribute("nonce",t),r.setAttribute("data-tiptap-style",""),r.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(r),r}('.ProseMirror {\n position: relative;\n}\n\n.ProseMirror {\n word-wrap: break-word;\n white-space: pre-wrap;\n white-space: break-spaces;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n font-feature-settings: "liga" 0; /* the above doesn\'t seem to work in Edge */\n}\n\n.ProseMirror [contenteditable="false"] {\n white-space: normal;\n}\n\n.ProseMirror [contenteditable="false"] [contenteditable="true"] {\n white-space: pre-wrap;\n}\n\n.ProseMirror pre {\n white-space: pre-wrap;\n}\n\nimg.ProseMirror-separator {\n display: inline !important;\n border: none !important;\n margin: 0 !important;\n width: 1px !important;\n height: 1px !important;\n}\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n margin: 0;\n}\n\n.ProseMirror-gapcursor:after {\n content: "";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n\n.ProseMirror-hideselection *::selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection * {\n caret-color: transparent;\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}\n\n.tippy-box[data-animation=fade][data-state=hidden] {\n opacity: 0\n}',this.options.injectNonce))}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.options=Object(f.a)(Object(f.a)({},this.options),e),this.view&&this.state&&!this.isDestroyed&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}},{key:"setEditable",value:function(e){this.setOptions({editable:e})}},{key:"isEditable",get:function(){return this.options.editable&&this.view&&this.view.editable}},{key:"state",get:function(){return this.view.state}},{key:"registerPlugin",value:function(e,t){var n=jr(t)?t(e,Object(o.a)(this.state.plugins)):[].concat(Object(o.a)(this.state.plugins),[e]),r=this.state.reconfigure({plugins:n});this.view.updateState(r)}},{key:"unregisterPlugin",value:function(e){if(!this.isDestroyed){var t="string"===typeof e?"".concat(e,"$"):e.key,n=this.state.reconfigure({plugins:this.state.plugins.filter((function(e){return!e.key.startsWith(t)}))});this.view.updateState(n)}}},{key:"createExtensionManager",value:function(){var e=this.options.enableCoreExtensions?Object.values(jo):[],t=[].concat(Object(o.a)(e),Object(o.a)(this.options.extensions)).filter((function(e){return["extension","node","mark"].includes(null===e||void 0===e?void 0:e.type)}));this.extensionManager=new zr(t,this)}},{key:"createCommandManager",value:function(){this.commandManager=new yr({editor:this})}},{key:"createSchema",value:function(){this.schema=this.extensionManager.schema}},{key:"createView",value:function(){var e=lo(this.options.content,this.schema,this.options.parseOptions),t=eo(e,this.options.autofocus);this.view=new wn(this.options.element,Object(f.a)(Object(f.a)({},this.options.editorProps),{},{dispatchTransaction:this.dispatchTransaction.bind(this),state:p.EditorState.create({doc:e,selection:t||void 0})}));var n=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(n),this.createNodeViews(),this.view.dom.editor=this}},{key:"createNodeViews",value:function(){this.view.setProps({nodeViews:this.extensionManager.nodeViews})}},{key:"captureTransaction",value:function(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;var t=this.capturedTransaction;return this.capturedTransaction=null,t}},{key:"dispatchTransaction",value:function(e){var t=this;if(this.isCapturingTransaction)return this.capturedTransaction?void e.steps.forEach((function(e){var n;return null===(n=t.capturedTransaction)||void 0===n?void 0:n.step(e)})):void(this.capturedTransaction=e);var n=this.state.apply(e),r=!this.state.selection.eq(n.selection);this.view.updateState(n),this.emit("transaction",{editor:this,transaction:e}),r&&this.emit("selectionUpdate",{editor:this,transaction:e});var o=e.getMeta("focus"),i=e.getMeta("blur");o&&this.emit("focus",{editor:this,event:o.event,transaction:e}),i&&this.emit("blur",{editor:this,event:i.event,transaction:e}),e.docChanged&&!e.getMeta("preventUpdate")&&this.emit("update",{editor:this,transaction:e})}},{key:"getAttributes",value:function(e){return Do(this.state,e)}},{key:"isActive",value:function(e,t){var n="string"===typeof e?e:null,r="string"===typeof e?t:e;return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!t)return io(e,null,n)||bo(e,null,n);var r=ao(t,e.schema);return"node"===r?io(e,t,n):"mark"===r&&bo(e,t,n)}(this.state,n,r)}},{key:"getJSON",value:function(){return this.state.doc.toJSON()}},{key:"getHTML",value:function(){return Eo(this.state.doc.content,this.schema)}},{key:"getText",value:function(e){var t=e||{},n=t.blockSeparator,r=void 0===n?"\n\n":n,o=t.textSerializers,i=void 0===o?{}:o;return Ao(this.state.doc,{blockSeparator:r,textSerializers:Object(f.a)(Object(f.a)({},i),qr(this.schema))})}},{key:"isEmpty",get:function(){return function(e){var t,n=null===(t=e.type.createAndFill())||void 0===t?void 0:t.toJSON(),r=e.toJSON();return JSON.stringify(n)===JSON.stringify(r)}(this.state.doc)}},{key:"getCharacterCount",value:function(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}},{key:"destroy",value:function(){this.emit("destroy"),this.view&&this.view.destroy(),this.removeAllListeners()}},{key:"isDestroyed",get:function(){var e;return!(null===(e=this.view)||void 0===e?void 0:e.docView)}}]),n}(br);function To(e,t){var n=[];return e.descendants((function(e,r){t(e)&&n.push({node:e,pos:r})})),n}function Lo(e,t,n){var r=[];return e.nodesBetween(t.from,t.to,(function(e,t){n(e)&&r.push({node:e,pos:t})})),r}function No(e){var t=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:JSON.stringify,n={};return e.filter((function(e){var r=t(e);return!Object.prototype.hasOwnProperty.call(n,r)&&(n[r]=!0)}))}(e);return 1===t.length?t:t.filter((function(e,n){return!t.filter((function(e,t){return t!==n})).some((function(t){return e.oldRange.from>=t.oldRange.from&&e.oldRange.to<=t.oldRange.to&&e.newRange.from>=t.newRange.from&&e.newRange.to<=t.newRange.to}))}))}function Po(e,t,n){var r=[];return e===t?n.resolve(e).marks().forEach((function(t){var o=Jr(n.resolve(e-1),t.type);o&&r.push(Object(f.a)({mark:t},o))})):n.nodesBetween(e,t,(function(e,t){r.push.apply(r,Object(o.a)(e.marks.map((function(n){return{from:t,to:t+e.nodeSize,mark:n}}))))})),r}function Ro(e){return new Pr({find:e.find,handler:function(t){var n=t.state,r=t.range,o=t.match,i=Dr(e.getAttributes,void 0,o);if(!1===i||null===i)return null;var a=n.tr,s=o[o.length-1],l=o[0],u=r.to;if(s){var c=l.search(/\S/),d=r.from+l.indexOf(s),f=d+s.length;if(Po(r.from,r.to,n.doc).filter((function(t){return t.mark.type.excluded.find((function(n){return n===e.type&&n!==t.mark.type}))})).filter((function(e){return e.to>d})).length)return null;f<r.to&&a.delete(f,r.to),d>r.from&&a.delete(r.from+c,d),u=r.from+c+s.length,a.addMark(r.from+c,u,e.type.create(i||{})),a.removeStoredMark(e.type)}}})}function Ho(e){return new Pr({find:e.find,handler:function(t){var n=t.state,r=t.range,o=t.match,i=Dr(e.getAttributes,void 0,o)||{},a=n.tr,s=r.from,l=r.to;if(o[1]){var u=s+o[0].lastIndexOf(o[1]);u>l?u=l:l=u+o[1].length;var c=o[0][o[0].length-1];a.insertText(c,s+o[0].length-1),a.replaceWith(u,l,e.type.create(i))}else o[0]&&a.replaceWith(s,l,e.type.create(i))}})}function Fo(e){return new Pr({find:e.find,handler:function(t){var n=t.state,r=t.range,o=t.match,i=n.doc.resolve(r.from),a=Dr(e.getAttributes,void 0,o)||{};if(!i.node(-1).canReplaceWith(i.index(-1),i.indexAfter(-1),e.type))return null;n.tr.delete(r.from,r.to).setBlockType(r.from,r.from,e.type,a)}})}function Vo(e){return new Pr({find:e.find,handler:function(t){var n=t.state,r=t.range,o=t.match,i=Dr(e.getAttributes,void 0,o)||{},a=n.tr.delete(r.from,r.to),s=a.doc.resolve(r.from).blockRange(),l=s&&Object(g.i)(s,e.type,i);if(!l)return null;a.wrap(s,l);var u=a.doc.resolve(r.from-1).nodeBefore;u&&u.type===e.type&&Object(g.f)(a.doc,r.from-1)&&(!e.joinPredicate||e.joinPredicate(o,u))&&a.join(r.from-1)}})}var zo=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(c.a)(this,e),this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config=Object(f.a)(Object(f.a)({},this.config),t),this.name=this.config.name,t.defaultOptions&&console.warn('[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "'.concat(this.name,'".')),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Dr(wr(this,"addOptions",{name:this.name}))),this.storage=Dr(wr(this,"addStorage",{name:this.name,options:this.options}))||{}}return Object(d.a)(e,[{key:"configure",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.extend();return t.options=_r(this.options,e),t.storage=Dr(wr(t,"addStorage",{name:t.name,options:t.options})),t}},{key:"extend",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=new e(t);return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&console.warn('[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "'.concat(n.name,'".')),n.options=Dr(wr(n,"addOptions",{name:n.name})),n.storage=Dr(wr(n,"addStorage",{name:n.name,options:n.options})),n}}],[{key:"create",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new e(t)}}]),e}(),Bo=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(c.a)(this,e),this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config=Object(f.a)(Object(f.a)({},this.config),t),this.name=this.config.name,t.defaultOptions&&console.warn('[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "'.concat(this.name,'".')),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Dr(wr(this,"addOptions",{name:this.name}))),this.storage=Dr(wr(this,"addStorage",{name:this.name,options:this.options}))||{}}return Object(d.a)(e,[{key:"configure",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.extend();return t.options=_r(this.options,e),t.storage=Dr(wr(t,"addStorage",{name:t.name,options:t.options})),t}},{key:"extend",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=new e(t);return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&console.warn('[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "'.concat(n.name,'".')),n.options=Dr(wr(n,"addOptions",{name:n.name})),n.storage=Dr(wr(n,"addStorage",{name:n.name,options:n.options})),n}}],[{key:"create",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new e(t)}}]),e}();function _o(e){return new Fr({find:e.find,handler:function(t){var n=t.state,r=t.range,o=t.match,i=Dr(e.getAttributes,void 0,o);if(!1===i||null===i)return null;var a=n.tr,s=o[o.length-1],l=o[0],u=r.to;if(s){var c=l.search(/\S/),d=r.from+l.indexOf(s),f=d+s.length;if(Po(r.from,r.to,n.doc).filter((function(t){return t.mark.type.excluded.find((function(n){return n===e.type&&n!==t.mark.type}))})).filter((function(e){return e.to>d})).length)return null;f<r.to&&a.delete(f,r.to),d>r.from&&a.delete(r.from+c,d),u=r.from+c+s.length,a.addMark(r.from+c,u,e.type.create(i||{})),a.removeStoredMark(e.type)}}})}var Io=Ir.create({name:"characterCount",addOptions:function(){return{limit:null,mode:"textSize"}},addStorage:function(){return{characters:function(){return 0},words:function(){return 0}}},onBeforeCreate:function(){var e=this;this.storage.characters=function(t){var n=(null===t||void 0===t?void 0:t.node)||e.editor.state.doc;return"textSize"===((null===t||void 0===t?void 0:t.mode)||e.options.mode)?n.textBetween(0,n.content.size,void 0," ").length:n.nodeSize},this.storage.words=function(t){var n=(null===t||void 0===t?void 0:t.node)||e.editor.state.doc;return n.textBetween(0,n.content.size," "," ").split(" ").filter((function(e){return""!==e})).length}},addProseMirrorPlugins:function(){var e=this;return[new p.Plugin({key:new p.PluginKey("characterCount"),filterTransaction:function(t,n){var r=e.options.limit;if(!t.docChanged||0===r||null===r||void 0===r)return!0;var o=e.storage.characters({node:n.doc}),i=e.storage.characters({node:t.doc});if(i<=r)return!0;if(o>r&&i>r&&i<=o)return!0;if(o>r&&i>r&&i>o)return!1;if(!t.getMeta("paste"))return!1;var a=t.selection.$head.pos,s=a-(i-r),l=a;return t.deleteRange(s,l),!(e.storage.characters({node:t.doc})>r)}})]}}),$o="undefined"!=typeof navigator?navigator:null,qo="undefined"!=typeof document?document:null,Wo=$o&&$o.userAgent||"",Uo=/Edge\/(\d+)/.exec(Wo),Ko=/MSIE \d/.exec(Wo),Go=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Wo),Jo=!!(Ko||Go||Uo),Yo=Ko?document.documentMode:Go?+Go[1]:Uo?+Uo[1]:0,Zo=!Jo&&/gecko\/(\d+)/i.test(Wo);Zo&&(/Firefox\/(\d+)/.exec(Wo)||[0,0])[1];var Xo=!Jo&&/Chrome\/(\d+)/.exec(Wo),Qo=!!Xo,ei=Xo?+Xo[1]:0,ti=!Jo&&!!$o&&/Apple Computer/.test($o.vendor),ni=ti&&(/Mobile\/\w+/.test(Wo)||!!$o&&$o.maxTouchPoints>2),ri=ni||!!$o&&/Mac/.test($o.platform),oi=/Android \d/.test(Wo),ii=!!qo&&"webkitFontSmoothing"in qo.documentElement.style,ai=ii?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,si=function(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t},li=function(e,t,n,r){return n&&(ci(e,t,n,r,-1)||ci(e,t,n,r,1))},ui=/^(img|br|input|textarea|hr)$/i;function ci(e,t,n,r,o){for(;;){if(e==n&&t==r)return!0;if(t==(o<0?0:di(e))){var i=e.parentNode;if(!i||1!=i.nodeType||pi(e)||ui.test(e.nodeName)||"false"==e.contentEditable)return!1;t=si(e)+(o<0?0:1),e=i}else{if(1!=e.nodeType)return!1;if("false"==(e=e.childNodes[t+(o<0?-1:0)]).contentEditable)return!1;t=o<0?di(e):0}}}function di(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function fi(e,t,n){for(var r=0==t,o=t==di(e);r||o;){if(e==n)return!0;var i=si(e);if(!(e=e.parentNode))return!1;r=r&&0==i,o=o&&i==di(e)}}function pi(e){for(var t,n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}var hi=function(e){var t=e.isCollapsed;return t&&Qo&&e.rangeCount&&!e.getRangeAt(0).collapsed&&(t=!1),t};function mi(e,t){var n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}var vi=function(e){e&&(this.nodeName=e)};vi.prototype=Object.create(null);new vi;function gi(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=e.domSelection(),r=e.state.doc;if(!n.focusNode)return null;var o=e.docView.nearestDesc(n.focusNode),i=o&&0==o.size,a=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(a<0)return null;var s,l,u=r.resolve(a);if(hi(n)){for(s=u;o&&!o.node;)o=o.parent;var c=o.node;if(o&&c.isAtom&&p.NodeSelection.isSelectable(c)&&o.parent&&(!c.isInline||!fi(n.focusNode,n.focusOffset,o.dom))){var d=o.posBefore;l=new p.NodeSelection(a==d?u:r.resolve(d))}}else{var f=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(f<0)return null;s=r.resolve(f)}if(!l){var h="pointer"==t||e.state.selection.head<u.pos&&!i?1:-1;l=Ei(e,s,u,h)}return l}function yi(e){return e.editable?e.hasFocus():Ai(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function bi(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.state.selection;if(ji(e,n),yi(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&Qo){var r=e.domSelection(),o=e.domObserver.currentSelection;if(r.anchorNode&&o.anchorNode&&li(r.anchorNode,r.anchorOffset,o.anchorNode,o.anchorOffset))return e.input.mouseDown.delayedSelectionSync=!0,void e.domObserver.setCurSelection()}if(e.domObserver.disconnectSelection(),e.cursorWrapper)Ci(e);else{var i,a,s=n.anchor,l=n.head;!wi||n instanceof p.TextSelection||(n.$from.parent.inlineContent||(i=ki(e,n.from)),n.empty||n.$from.parent.inlineContent||(a=ki(e,n.to))),e.docView.setSelection(s,l,e.root,t),wi&&(i&&Oi(i),a&&Oi(a)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&Si(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}var wi=ti||Qo&&ei<63;function ki(e,t){var n=e.docView.domFromPos(t,0),r=n.node,o=n.offset,i=o<r.childNodes.length?r.childNodes[o]:null,a=o?r.childNodes[o-1]:null;if(ti&&i&&"false"==i.contentEditable)return xi(i);if((!i||"false"==i.contentEditable)&&(!a||"false"==a.contentEditable)){if(i)return xi(i);if(a)return xi(a)}}function xi(e){return e.contentEditable="true",ti&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function Oi(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function Si(e){var t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.input.hideSelectionGuard);var n=e.domSelection(),r=n.anchorNode,o=n.anchorOffset;t.addEventListener("selectionchange",e.input.hideSelectionGuard=function(){n.anchorNode==r&&n.anchorOffset==o||(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout((function(){yi(e)&&!e.state.selection.visible||e.dom.classList.remove("ProseMirror-hideselection")}),20))})}function Ci(e){var t=e.domSelection(),n=document.createRange(),r=e.cursorWrapper.dom,o="IMG"==r.nodeName;o?n.setEnd(r.parentNode,si(r)+1):n.setEnd(r,0),n.collapse(!1),t.removeAllRanges(),t.addRange(n),!o&&!e.state.selection.visible&&Jo&&Yo<=11&&(r.disabled=!0,r.disabled=!1)}function ji(e,t){if(t instanceof p.NodeSelection){var n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(Di(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else Di(e)}function Di(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function Ei(e,t,n,r){return e.someProp("createSelectionBetween",(function(r){return r(e,t,n)}))||p.TextSelection.between(t,n,r)}function Ai(e){var t=e.domSelection();if(!t.anchorNode)return!1;try{return e.dom.contains(3==t.anchorNode.nodeType?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(3==t.focusNode.nodeType?t.focusNode.parentNode:t.focusNode))}catch(n){return!1}}function Mi(e,t){var n=e.selection,r=n.$anchor,o=n.$head,i=t>0?r.max(o):r.min(o),a=i.parent.inlineContent?i.depth?e.doc.resolve(t>0?i.after():i.before()):null:i;return a&&p.Selection.findFrom(a,t)}function Ti(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function Li(e,t,n){var r=e.state.selection;if(!(r instanceof p.TextSelection)){if(r instanceof p.NodeSelection&&r.node.isInline)return Ti(e,new p.TextSelection(t>0?r.$to:r.$from));var o=Mi(e.state,t);return!!o&&Ti(e,o)}if(!r.empty||n.indexOf("s")>-1)return!1;if(e.endOfTextblock(t>0?"right":"left")){var i=Mi(e.state,t);return!!(i&&i instanceof p.NodeSelection)&&Ti(e,i)}if(!(ri&&n.indexOf("m")>-1)){var a,s=r.$head,l=s.textOffset?null:t<0?s.nodeBefore:s.nodeAfter;if(!l||l.isText)return!1;var u=t<0?s.pos-l.nodeSize:s.pos;return!!(l.isAtom||(a=e.docView.descAt(u))&&!a.contentDOM)&&(p.NodeSelection.isSelectable(l)?Ti(e,new p.NodeSelection(t<0?e.state.doc.resolve(s.pos-l.nodeSize):s)):!!ii&&Ti(e,new p.TextSelection(e.state.doc.resolve(t<0?u:u+l.nodeSize))))}}function Ni(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function Pi(e){var t=e.pmViewDesc;return t&&0==t.size&&(e.nextSibling||"BR"!=e.nodeName)}function Ri(e){var t=e.domSelection(),n=t.focusNode,r=t.focusOffset;if(n){var o,i,a=!1;for(Zo&&1==n.nodeType&&r<Ni(n)&&Pi(n.childNodes[r])&&(a=!0);;)if(r>0){if(1!=n.nodeType)break;var s=n.childNodes[r-1];if(Pi(s))o=n,i=--r;else{if(3!=s.nodeType)break;r=(n=s).nodeValue.length}}else{if(Fi(n))break;for(var l=n.previousSibling;l&&Pi(l);)o=n.parentNode,i=si(l),l=l.previousSibling;if(l)r=Ni(n=l);else{if((n=n.parentNode)==e.dom)break;r=0}}a?Vi(e,t,n,r):o&&Vi(e,t,o,i)}}function Hi(e){var t=e.domSelection(),n=t.focusNode,r=t.focusOffset;if(n){for(var o,i,a=Ni(n);;)if(r<a){if(1!=n.nodeType)break;if(!Pi(n.childNodes[r]))break;o=n,i=++r}else{if(Fi(n))break;for(var s=n.nextSibling;s&&Pi(s);)o=s.parentNode,i=si(s)+1,s=s.nextSibling;if(s)r=0,a=Ni(n=s);else{if((n=n.parentNode)==e.dom)break;r=a=0}}o&&Vi(e,t,o,i)}}function Fi(e){var t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function Vi(e,t,n,r){if(hi(t)){var o=document.createRange();o.setEnd(n,r),o.setStart(n,r),t.removeAllRanges(),t.addRange(o)}else t.extend&&t.extend(n,r);e.domObserver.setCurSelection();var i=e.state;setTimeout((function(){e.state==i&&bi(e)}),50)}function zi(e,t,n){var r=e.state.selection;if(r instanceof p.TextSelection&&!r.empty||n.indexOf("s")>-1)return!1;if(ri&&n.indexOf("m")>-1)return!1;var o=r.$from,i=r.$to;if(!o.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){var a=Mi(e.state,t);if(a&&a instanceof p.NodeSelection)return Ti(e,a)}if(!o.parent.inlineContent){var s=t<0?o:i,l=r instanceof p.AllSelection?p.Selection.near(s,t):p.Selection.findFrom(s,t);return!!l&&Ti(e,l)}return!1}function Bi(e,t){if(!(e.state.selection instanceof p.TextSelection))return!0;var n=e.state.selection,r=n.$head,o=n.$anchor,i=n.empty;if(!r.sameParent(o))return!0;if(!i)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;var a=!r.textOffset&&(t<0?r.nodeBefore:r.nodeAfter);if(a&&!a.isText){var s=e.state.tr;return t<0?s.delete(r.pos-a.nodeSize,r.pos):s.delete(r.pos,r.pos+a.nodeSize),e.dispatch(s),!0}return!1}function _i(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function Ii(e,t){var n=t.keyCode,r=function(e){var t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}(t);return 8==n||ri&&72==n&&"c"==r?Bi(e,-1)||Ri(e):46==n||ri&&68==n&&"c"==r?Bi(e,1)||Hi(e):13==n||27==n||(37==n||ri&&66==n&&"c"==r?Li(e,-1,r)||Ri(e):39==n||ri&&70==n&&"c"==r?Li(e,1,r)||Hi(e):38==n||ri&&80==n&&"c"==r?zi(e,-1,r)||Ri(e):40==n||ri&&78==n&&"c"==r?function(e){if(!ti||e.state.selection.$head.parentOffset>0)return!1;var t=e.domSelection(),n=t.focusNode,r=t.focusOffset;if(n&&1==n.nodeType&&0==r&&n.firstChild&&"false"==n.firstChild.contentEditable){var o=n.firstChild;_i(e,o,"true"),setTimeout((function(){return _i(e,o,"false")}),20)}return!1}(e)||zi(e,1,r)||Hi(e):r==(ri?"m":"c")&&(66==n||73==n||89==n||90==n))}function $i(e,t){for(var n=[],r=t.content,o=t.openStart,i=t.openEnd;o>1&&i>1&&1==r.childCount&&1==r.firstChild.childCount;){o--,i--;var a=r.firstChild;n.push(a.type.name,a.attrs!=a.type.defaultAttrs?a.attrs:null),r=a.content}var s=e.someProp("clipboardSerializer")||v.DOMSerializer.fromSchema(e.state.schema),l=Qi(),u=l.createElement("div");u.appendChild(s.serializeFragment(r,{document:l}));for(var c,d=u.firstChild,f=0;d&&1==d.nodeType&&(c=Zi[d.nodeName.toLowerCase()]);){for(var p=c.length-1;p>=0;p--){for(var h=l.createElement(c[p]);u.firstChild;)h.appendChild(u.firstChild);u.appendChild(h),f++}d=u.firstChild}return d&&1==d.nodeType&&d.setAttribute("data-pm-slice","".concat(o," ").concat(i).concat(f?" -".concat(f):""," ").concat(JSON.stringify(n))),{dom:u,text:e.someProp("clipboardTextSerializer",(function(e){return e(t)}))||t.content.textBetween(0,t.content.size,"\n\n")}}function qi(e,t,n,r,o){var i,a,s=o.parent.type.spec.code;if(!n&&!t)return null;var l=t&&(r||s||!n);if(l){if(e.someProp("transformPastedText",(function(e){t=e(t,s||r)})),s)return t?new v.Slice(v.Fragment.from(e.state.schema.text(t.replace(/\r\n?/g,"\n"))),0,0):v.Slice.empty;var u=e.someProp("clipboardTextParser",(function(e){return e(t,o,r)}));if(u)a=u;else{var c=o.marks(),d=e.state.schema,f=v.DOMSerializer.fromSchema(d);i=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach((function(e){var t=i.appendChild(document.createElement("p"));e&&t.appendChild(f.serializeNode(d.text(e,c)))}))}}else e.someProp("transformPastedHTML",(function(e){n=e(n)})),i=function(e){var t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));var n,r=Qi().createElement("div"),o=/<([a-z][^>\s]+)/i.exec(e);(n=o&&Zi[o[1].toLowerCase()])&&(e=n.map((function(e){return"<"+e+">"})).join("")+e+n.map((function(e){return"</"+e+">"})).reverse().join(""));if(r.innerHTML=e,n)for(var i=0;i<n.length;i++)r=r.querySelector(n[i])||r;return r}(n),ii&&function(e){for(var t=e.querySelectorAll(Qo?"span:not([class]):not([style])":"span.Apple-converted-space"),n=0;n<t.length;n++){var r=t[n];1==r.childNodes.length&&"\xa0"==r.textContent&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),r)}}(i);var p=i&&i.querySelector("[data-pm-slice]"),h=p&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(p.getAttribute("data-pm-slice")||"");if(h&&h[3])for(var m=+h[3];m>0&&i.firstChild;m--)i=i.firstChild;if(!a){var g=e.someProp("clipboardParser")||e.someProp("domParser")||v.DOMParser.fromSchema(e.state.schema);a=g.parseSlice(i,{preserveWhitespace:!(!l&&!h),context:o,ruleFromNode:function(e){return"BR"!=e.nodeName||e.nextSibling||!e.parentNode||Wi.test(e.parentNode.nodeName)?null:{ignore:!0}}})}if(h)a=function(e,t){if(!e.size)return e;var n,r=e.content.firstChild.type.schema;try{n=JSON.parse(t)}catch(u){return e}for(var o=e.content,i=e.openStart,a=e.openEnd,s=n.length-2;s>=0;s-=2){var l=r.nodes[n[s]];if(!l||l.hasRequiredAttrs())break;o=v.Fragment.from(l.create(n[s+1],o)),i++,a++}return new v.Slice(o,i,a)}(Yi(a,+h[1],+h[2]),h[4]);else if(a=v.Slice.maxOpen(function(e,t){if(e.childCount<2)return e;for(var n=function(n){var r=t.node(n).contentMatchAt(t.index(n)),o=void 0,i=[];if(e.forEach((function(e){if(i){var t,n=r.findWrapping(e.type);if(!n)return i=null;if(t=i.length&&o.length&&Ki(n,o,e,i[i.length-1],0))i[i.length-1]=t;else{i.length&&(i[i.length-1]=Gi(i[i.length-1],o.length));var a=Ui(e,n);i.push(a),r=r.matchType(a.type),o=n}}})),i)return{v:v.Fragment.from(i)}},r=t.depth;r>=0;r--){var o=n(r);if("object"===typeof o)return o.v}return e}(a.content,o),!0),a.openStart||a.openEnd){for(var y=0,b=0,w=a.content.firstChild;y<a.openStart&&!w.type.spec.isolating;y++,w=w.firstChild);for(var k=a.content.lastChild;b<a.openEnd&&!k.type.spec.isolating;b++,k=k.lastChild);a=Yi(a,y,b)}return e.someProp("transformPasted",(function(e){a=e(a)})),a}var Wi=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function Ui(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=t.length-1;r>=n;r--)e=t[r].create(null,v.Fragment.from(e));return e}function Ki(e,t,n,r,o){if(o<e.length&&o<t.length&&e[o]==t[o]){var i=Ki(e,t,n,r.lastChild,o+1);if(i)return r.copy(r.content.replaceChild(r.childCount-1,i));if(r.contentMatchAt(r.childCount).matchType(o==e.length-1?n.type:e[o+1]))return r.copy(r.content.append(v.Fragment.from(Ui(n,e,o+1))))}}function Gi(e,t){if(0==t)return e;var n=e.content.replaceChild(e.childCount-1,Gi(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(v.Fragment.empty,!0);return e.copy(n.append(r))}function Ji(e,t,n,r,o,i){var a=t<0?e.firstChild:e.lastChild,s=a.content;return o<r-1&&(s=Ji(s,t,n,r,o+1,i)),o>=n&&(s=t<0?a.contentMatchAt(0).fillBefore(s,e.childCount>1||i<=o).append(s):s.append(a.contentMatchAt(a.childCount).fillBefore(v.Fragment.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,a.copy(s))}function Yi(e,t,n){return t<e.openStart&&(e=new v.Slice(Ji(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new v.Slice(Ji(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}var Zi={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]},Xi=null;function Qi(){return Xi||(Xi=document.implementation.createHTMLDocument("title"))}var ea={},ta={};function na(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function ra(e){return{left:e.clientX,top:e.clientY}}function oa(e,t,n,r,o){if(-1==r)return!1;for(var i=e.state.doc.resolve(r),a=function(r){if(e.someProp(t,(function(t){return r>i.depth?t(e,n,i.nodeAfter,i.before(r),o,!0):t(e,n,i.node(r),i.before(r),o,!1)})))return{v:!0}},s=i.depth+1;s>0;s--){var l=a(s);if("object"===typeof l)return l.v}return!1}function ia(e,t,n){e.focused||e.focus();var r=e.state.tr.setSelection(t);"pointer"==n&&r.setMeta("pointer",!0),e.dispatch(r)}function aa(e,t,n,r,o){return oa(e,"handleClickOn",t,n,r)||e.someProp("handleClick",(function(n){return n(e,t,r)}))||(o?function(e,t){if(-1==t)return!1;var n,r,o=e.state.selection;o instanceof p.NodeSelection&&(n=o.node);for(var i=e.state.doc.resolve(t),a=i.depth+1;a>0;a--){var s=a>i.depth?i.nodeAfter:i.node(a);if(p.NodeSelection.isSelectable(s)){r=n&&o.$from.depth>0&&a>=o.$from.depth&&i.before(o.$from.depth+1)==o.$from.pos?i.before(o.$from.depth):i.before(a);break}}return null!=r&&(ia(e,p.NodeSelection.create(e.state.doc,r),"pointer"),!0)}(e,n):function(e,t){if(-1==t)return!1;var n=e.state.doc.resolve(t),r=n.nodeAfter;return!!(r&&r.isAtom&&p.NodeSelection.isSelectable(r))&&(ia(e,new p.NodeSelection(n),"pointer"),!0)}(e,n))}function sa(e,t,n,r){return oa(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",(function(n){return n(e,t,r)}))}function la(e,t,n,r){return oa(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",(function(n){return n(e,t,r)}))||function(e,t,n){if(0!=n.button)return!1;var r=e.state.doc;if(-1==t)return!!r.inlineContent&&(ia(e,p.TextSelection.create(r,0,r.content.size),"pointer"),!0);for(var o=r.resolve(t),i=o.depth+1;i>0;i--){var a=i>o.depth?o.nodeAfter:o.node(i),s=o.before(i);if(a.inlineContent)ia(e,p.TextSelection.create(r,s+1,s+1+a.content.size),"pointer");else{if(!p.NodeSelection.isSelectable(a))continue;ia(e,p.NodeSelection.create(r,s),"pointer")}return!0}}(e,n,r)}function ua(e){return va(e)}ta.keydown=function(e,t){var n=t;if(e.input.shiftKey=16==n.keyCode||n.shiftKey,!fa(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!oi||!Qo||13!=n.keyCode))if(229!=n.keyCode&&e.domObserver.forceFlush(),!ni||13!=n.keyCode||n.ctrlKey||n.altKey||n.metaKey)e.someProp("handleKeyDown",(function(t){return t(e,n)}))||Ii(e,n)?n.preventDefault():na(e,"key");else{var r=Date.now();e.input.lastIOSEnter=r,e.input.lastIOSEnterFallbackTimeout=setTimeout((function(){e.input.lastIOSEnter==r&&(e.someProp("handleKeyDown",(function(t){return t(e,mi(13,"Enter"))})),e.input.lastIOSEnter=0)}),200)}},ta.keyup=function(e,t){16==t.keyCode&&(e.input.shiftKey=!1)},ta.keypress=function(e,t){var n=t;if(!(fa(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||ri&&n.metaKey))if(e.someProp("handleKeyPress",(function(t){return t(e,n)})))n.preventDefault();else{var r=e.state.selection;if(!(r instanceof p.TextSelection)||!r.$from.sameParent(r.$to)){var o=String.fromCharCode(n.charCode);e.someProp("handleTextInput",(function(t){return t(e,r.$from.pos,r.$to.pos,o)}))||e.dispatch(e.state.tr.insertText(o).scrollIntoView()),n.preventDefault()}}};var ca=ri?"metaKey":"ctrlKey";ea.mousedown=function(e,t){var n=t;e.input.shiftKey=n.shiftKey;var r=ua(e),o=Date.now(),i="singleClick";o-e.input.lastClick.time<500&&function(e,t){var n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}(n,e.input.lastClick)&&!n[ca]&&("singleClick"==e.input.lastClick.type?i="doubleClick":"doubleClick"==e.input.lastClick.type&&(i="tripleClick")),e.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:i};var a=e.posAtCoords(ra(n));a&&("singleClick"==i?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new da(e,a,n,!!r)):("doubleClick"==i?sa:la)(e,a.pos,a.inside,n)?n.preventDefault():na(e,"pointer"))};var da=function(){function e(t,n,r,o){var i,a,s=this;if(Object(c.a)(this,e),this.view=t,this.pos=n,this.event=r,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!r[ca],this.allowDefault=r.shiftKey,n.inside>-1)i=t.state.doc.nodeAt(n.inside),a=n.inside;else{var l=t.state.doc.resolve(n.pos);i=l.parent,a=l.depth?l.before():0}var u=o?null:r.target,d=u?t.docView.nearestDesc(u,!0):null;this.target=d?d.dom:null;var f=t.state.selection;(0==r.button&&i.type.spec.draggable&&!1!==i.type.spec.selectable||f instanceof p.NodeSelection&&f.from<=a&&f.to>a)&&(this.mightDrag={node:i,pos:a,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!Zo||this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout((function(){s.view.input.mouseDown==s&&s.target.setAttribute("contentEditable","false")}),20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),na(t,"pointer")}return Object(d.a)(e,[{key:"done",value:function(){var e=this;this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout((function(){return bi(e.view)})),this.view.input.mouseDown=null}},{key:"up",value:function(e){if(this.done(),this.view.dom.contains(e.target)){var t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(ra(e))),this.allowDefault||!t?na(this.view,"pointer"):aa(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():0==e.button&&(this.flushed||ti&&this.mightDrag&&!this.mightDrag.node.isAtom||Qo&&!(this.view.state.selection instanceof p.TextSelection)&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(ia(this.view,p.Selection.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):na(this.view,"pointer")}}},{key:"move",value:function(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0),na(this.view,"pointer"),0==e.buttons&&this.done()}}]),e}();function fa(e,t){return!!e.composing||!!(ti&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500)&&(e.input.compositionEndedAt=-2e8,!0)}ea.touchdown=function(e){ua(e),na(e,"pointer")},ea.contextmenu=function(e){return ua(e)};var pa=oi?5e3:-1;function ha(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout((function(){return va(e)}),t))}function ma(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=function(){var e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function va(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!(oi&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),ma(e),t||e.docView&&e.docView.dirty){var n=gi(e);return n&&!n.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(n)):e.updateState(e.state),!0}return!1}}ta.compositionstart=ta.compositionupdate=function(e){if(!e.composing){e.domObserver.flush();var t=e.state,n=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some((function(e){return!1===e.type.spec.inclusive}))))e.markCursor=e.state.storedMarks||n.marks(),va(e,!0),e.markCursor=null;else if(va(e),Zo&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length)for(var r=e.domSelection(),o=r.focusNode,i=r.focusOffset;o&&1==o.nodeType&&0!=i;){var a=i<0?o.lastChild:o.childNodes[i-1];if(!a)break;if(3==a.nodeType){r.collapse(a,a.nodeValue.length);break}o=a,i=-1}e.input.composing=!0}ha(e,pa)},ta.compositionend=function(e,t){e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,ha(e,20))};var ga=Jo&&Yo<15||ni&&ai<604;function ya(e,t,n,r){var o=qi(e,t,n,e.input.shiftKey,e.state.selection.$from);if(e.someProp("handlePaste",(function(t){return t(e,r,o||v.Slice.empty)})))return!0;if(!o)return!1;var i=function(e){return 0==e.openStart&&0==e.openEnd&&1==e.content.childCount?e.content.firstChild:null}(o),a=i?e.state.tr.replaceSelectionWith(i,e.input.shiftKey):e.state.tr.replaceSelection(o);return e.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}ea.copy=ta.cut=function(e,t){var n=t,r=e.state.selection,o="cut"==n.type;if(!r.empty){var i=ga?null:n.clipboardData,a=$i(e,r.content()),s=a.dom,l=a.text;i?(n.preventDefault(),i.clearData(),i.setData("text/html",s.innerHTML),i.setData("text/plain",l)):function(e,t){if(e.dom.parentNode){var n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";var r=getSelection(),o=document.createRange();o.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout((function(){n.parentNode&&n.parentNode.removeChild(n),e.focus()}),50)}}(e,s),o&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))}},ta.paste=function(e,t){var n=t;if(!e.composing||oi){var r=ga?null:n.clipboardData;r&&ya(e,r.getData("text/plain"),r.getData("text/html"),n)?n.preventDefault():function(e,t){if(e.dom.parentNode){var n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus(),setTimeout((function(){e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?ya(e,r.value,null,t):ya(e,r.textContent,r.innerHTML,t)}),50)}}(e,n)}};var ba=Object(d.a)((function e(t,n){Object(c.a)(this,e),this.slice=t,this.move=n})),wa=ri?"altKey":"ctrlKey";for(var ka in ea.dragstart=function(e,t){var n=t,r=e.input.mouseDown;if(r&&r.done(),n.dataTransfer){var o=e.state.selection,i=o.empty?null:e.posAtCoords(ra(n));if(i&&i.pos>=o.from&&i.pos<=(o instanceof p.NodeSelection?o.to-1:o.to));else if(r&&r.mightDrag)e.dispatch(e.state.tr.setSelection(p.NodeSelection.create(e.state.doc,r.mightDrag.pos)));else if(n.target&&1==n.target.nodeType){var a=e.docView.nearestDesc(n.target,!0);a&&a.node.type.spec.draggable&&a!=e.docView&&e.dispatch(e.state.tr.setSelection(p.NodeSelection.create(e.state.doc,a.posBefore)))}var s=e.state.selection.content(),l=$i(e,s),u=l.dom,c=l.text;n.dataTransfer.clearData(),n.dataTransfer.setData(ga?"Text":"text/html",u.innerHTML),n.dataTransfer.effectAllowed="copyMove",ga||n.dataTransfer.setData("text/plain",c),e.dragging=new ba(s,!n[wa])}},ea.dragend=function(e){var t=e.dragging;window.setTimeout((function(){e.dragging==t&&(e.dragging=null)}),50)},ta.dragover=ta.dragenter=function(e,t){return t.preventDefault()},ta.drop=function(e,t){var n=t,r=e.dragging;if(e.dragging=null,n.dataTransfer){var o=e.posAtCoords(ra(n));if(o){var i=e.state.doc.resolve(o.pos);if(i){var a=r&&r.slice;a?e.someProp("transformPasted",(function(e){a=e(a)})):a=qi(e,n.dataTransfer.getData(ga?"Text":"text/plain"),ga?null:n.dataTransfer.getData("text/html"),!1,i);var s=!(!r||n[wa]);if(e.someProp("handleDrop",(function(t){return t(e,n,a||v.Slice.empty,s)})))n.preventDefault();else if(a){n.preventDefault();var l=a?Object(g.h)(e.state.doc,i.pos,a):i.pos;null==l&&(l=i.pos);var u=e.state.tr;s&&u.deleteSelection();var c=u.mapping.map(l),d=0==a.openStart&&0==a.openEnd&&1==a.content.childCount,f=u.doc;if(d?u.replaceRangeWith(c,c,a.content.firstChild):u.replaceRange(c,c,a),!u.doc.eq(f)){var h=u.doc.resolve(c);if(d&&p.NodeSelection.isSelectable(a.content.firstChild)&&h.nodeAfter&&h.nodeAfter.sameMarkup(a.content.firstChild))u.setSelection(new p.NodeSelection(h));else{var m=u.mapping.map(l);u.mapping.maps[u.mapping.maps.length-1].forEach((function(e,t,n,r){return m=r})),u.setSelection(Ei(e,h,u.doc.resolve(m)))}e.focus(),e.dispatch(u.setMeta("uiEvent","drop"))}}}}}},ea.focus=function(e){e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout((function(){e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelection())&&bi(e)}),20))},ea.blur=function(e,t){var n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)},ea.beforeinput=function(e,t){if(Qo&&oi&&"deleteContentBackward"==t.inputType){e.domObserver.flushSoon();var n=e.input.domChangeCount;setTimeout((function(){if(e.input.domChangeCount==n&&(e.dom.blur(),e.focus(),!e.someProp("handleKeyDown",(function(t){return t(e,mi(8,"Backspace"))})))){var t=e.state.selection.$cursor;t&&t.pos>0&&e.dispatch(e.state.tr.delete(t.pos-1,t.pos).scrollIntoView())}}),50)}},ta)ea[ka]=ta[ka];function xa(e,t){if(e==t)return!0;for(var n in e)if(e[n]!==t[n])return!1;for(var r in t)if(!(r in e))return!1;return!0}var Oa=function(){function e(t,n){Object(c.a)(this,e),this.toDOM=t,this.spec=n||Ea,this.side=this.spec.side||0}return Object(d.a)(e,[{key:"map",value:function(e,t,n,r){var o=e.mapResult(t.from+r,this.side<0?-1:1),i=o.pos;return o.deleted?null:new ja(i-n,i-n,this)}},{key:"valid",value:function(){return!0}},{key:"eq",value:function(t){return this==t||t instanceof e&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&xa(this.spec,t.spec))}},{key:"destroy",value:function(e){this.spec.destroy&&this.spec.destroy(e)}}]),e}(),Sa=function(){function e(t,n){Object(c.a)(this,e),this.attrs=t,this.spec=n||Ea}return Object(d.a)(e,[{key:"map",value:function(e,t,n,r){var o=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-n,i=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-n;return o>=i?null:new ja(o,i,this)}},{key:"valid",value:function(e,t){return t.from<t.to}},{key:"eq",value:function(t){return this==t||t instanceof e&&xa(this.attrs,t.attrs)&&xa(this.spec,t.spec)}},{key:"destroy",value:function(){}}],[{key:"is",value:function(t){return t.type instanceof e}}]),e}(),Ca=function(){function e(t,n){Object(c.a)(this,e),this.attrs=t,this.spec=n||Ea}return Object(d.a)(e,[{key:"map",value:function(e,t,n,r){var o=e.mapResult(t.from+r,1);if(o.deleted)return null;var i=e.mapResult(t.to+r,-1);return i.deleted||i.pos<=o.pos?null:new ja(o.pos-n,i.pos-n,this)}},{key:"valid",value:function(e,t){var n,r=e.content.findIndex(t.from),o=r.index,i=r.offset;return i==t.from&&!(n=e.child(o)).isText&&i+n.nodeSize==t.to}},{key:"eq",value:function(t){return this==t||t instanceof e&&xa(this.attrs,t.attrs)&&xa(this.spec,t.spec)}},{key:"destroy",value:function(){}}]),e}(),ja=function(){function e(t,n,r){Object(c.a)(this,e),this.from=t,this.to=n,this.type=r}return Object(d.a)(e,[{key:"copy",value:function(t,n){return new e(t,n,this.type)}},{key:"eq",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}},{key:"map",value:function(e,t,n){return this.type.map(e,this,t,n)}},{key:"spec",get:function(){return this.type.spec}},{key:"inline",get:function(){return this.type instanceof Sa}}],[{key:"widget",value:function(t,n,r){return new e(t,t,new Oa(n,r))}},{key:"inline",value:function(t,n,r,o){return new e(t,n,new Sa(r,o))}},{key:"node",value:function(t,n,r,o){return new e(t,n,new Ca(r,o))}}]),e}(),Da=[],Ea={},Aa=function(){function e(t,n){Object(c.a)(this,e),this.local=t.length?t:Da,this.children=n.length?n:Da}return Object(d.a)(e,[{key:"find",value:function(e,t,n){var r=[];return this.findInner(null==e?0:e,null==t?1e9:t,r,0,n),r}},{key:"findInner",value:function(e,t,n,r,o){for(var i=0;i<this.local.length;i++){var a=this.local[i];a.from<=t&&a.to>=e&&(!o||o(a.spec))&&n.push(a.copy(a.from+r,a.to+r))}for(var s=0;s<this.children.length;s+=3)if(this.children[s]<t&&this.children[s+1]>e){var l=this.children[s]+1;this.children[s+2].findInner(e-l,t-l,n,r+l,o)}}},{key:"map",value:function(e,t,n){return this==Ma||0==e.maps.length?this:this.mapInner(e,t,0,0,n||Ea)}},{key:"mapInner",value:function(t,n,r,o,i){for(var a,s=0;s<this.local.length;s++){var l=this.local[s].map(t,r,o);l&&l.type.valid(n,l)?(a||(a=[])).push(l):i.onRemove&&i.onRemove(this.local[s].spec)}return this.children.length?function(e,t,n,r,o,i,a){for(var s=e.slice(),l=function(e,t,n,r){for(var a=0;a<s.length;a+=3){var l=s[a+1],u=void 0;if(!(l<0||e>l+i)){var c=s[a]+i;t>=c?s[a+1]=e<=c?-2:-1:n>=o&&(u=r-n-(t-e))&&(s[a]+=u,s[a+1]+=u)}}},u=0;u<n.maps.length;u++)n.maps[u].forEach(l);for(var c=!1,d=0;d<s.length;d+=3)if(s[d+1]<0){if(-2==s[d+1]){c=!0,s[d+1]=-1;continue}var f=n.map(e[d]+i),p=f-o;if(p<0||p>=r.content.size){c=!0;continue}var h=n.map(e[d+1]+i,-1)-o,m=r.content.findIndex(p),v=m.index,g=m.offset,y=r.maybeChild(v);if(y&&g==p&&g+y.nodeSize==h){var b=s[d+2].mapInner(n,y,f+1,e[d]+i+1,a);b!=Ma?(s[d]=p,s[d+1]=h,s[d+2]=b):(s[d+1]=-2,c=!0)}else c=!0}if(c){var w=function(e,t,n,r,o,i,a){function s(e,t){for(var i=0;i<e.local.length;i++){var l=e.local[i].map(r,o,t);l?n.push(l):a.onRemove&&a.onRemove(e.local[i].spec)}for(var u=0;u<e.children.length;u+=3)s(e.children[u+2],e.children[u]+t+1)}for(var l=0;l<e.length;l+=3)-1==e[l+1]&&s(e[l+2],t[l]+i+1);return n}(s,e,t,n,o,i,a),k=Ra(w,r,0,a);t=k.local;for(var x=0;x<s.length;x+=3)s[x+1]<0&&(s.splice(x,3),x-=3);for(var O=0,S=0;O<k.children.length;O+=3){for(var C=k.children[O];S<s.length&&s[S]<C;)S+=3;s.splice(S,0,k.children[O],k.children[O+1],k.children[O+2])}}return new Aa(t.sort(Ha),s)}(this.children,a||[],t,n,r,o,i):a?new e(a.sort(Ha),Da):Ma}},{key:"add",value:function(t,n){return n.length?this==Ma?e.create(t,n):this.addInner(t,n,0):this}},{key:"addInner",value:function(t,n,r){var o,i=this,a=0;t.forEach((function(e,t){var s,l=t+r;if(s=Na(n,e,l)){for(o||(o=i.children.slice());a<o.length&&o[a]<t;)a+=3;o[a]==t?o[a+2]=o[a+2].addInner(e,s,l+1):o.splice(a,0,t,t+e.nodeSize,Ra(s,e,l+1,Ea)),a+=3}}));for(var s=La(a?Pa(n):n,-r),l=0;l<s.length;l++)s[l].type.valid(t,s[l])||s.splice(l--,1);return new e(s.length?this.local.concat(s).sort(Ha):this.local,o||this.children)}},{key:"remove",value:function(e){return 0==e.length||this==Ma?this:this.removeInner(e,0)}},{key:"removeInner",value:function(t,n){for(var r=this.children,o=this.local,i=0;i<r.length;i+=3){for(var a,s=void 0,l=r[i]+n,u=r[i+1]+n,c=0;c<t.length;c++)(a=t[c])&&a.from>l&&a.to<u&&(t[c]=null,(s||(s=[])).push(a));if(s){r==this.children&&(r=this.children.slice());var d=r[i+2].removeInner(s,l+1);d!=Ma?r[i+2]=d:(r.splice(i,3),i-=3)}}if(o.length)for(var f,p=0;p<t.length;p++)if(f=t[p])for(var h=0;h<o.length;h++)o[h].eq(f,n)&&(o==this.local&&(o=this.local.slice()),o.splice(h--,1));return r==this.children&&o==this.local?this:o.length||r.length?new e(o,r):Ma}},{key:"forChild",value:function(t,n){if(this==Ma)return this;if(n.isLeaf)return e.empty;for(var r,o,i=0;i<this.children.length;i+=3)if(this.children[i]>=t){this.children[i]==t&&(r=this.children[i+2]);break}for(var a=t+1,s=a+n.content.size,l=0;l<this.local.length;l++){var u=this.local[l];if(u.from<s&&u.to>a&&u.type instanceof Sa){var c=Math.max(a,u.from)-a,d=Math.min(s,u.to)-a;c<d&&(o||(o=[])).push(u.copy(c,d))}}if(o){var f=new e(o.sort(Ha),Da);return r?new Ta([f,r]):f}return r||Ma}},{key:"eq",value:function(t){if(this==t)return!0;if(!(t instanceof e)||this.local.length!=t.local.length||this.children.length!=t.children.length)return!1;for(var n=0;n<this.local.length;n++)if(!this.local[n].eq(t.local[n]))return!1;for(var r=0;r<this.children.length;r+=3)if(this.children[r]!=t.children[r]||this.children[r+1]!=t.children[r+1]||!this.children[r+2].eq(t.children[r+2]))return!1;return!0}},{key:"locals",value:function(e){return Fa(this.localsInner(e))}},{key:"localsInner",value:function(e){if(this==Ma)return Da;if(e.inlineContent||!this.local.some(Sa.is))return this.local;for(var t=[],n=0;n<this.local.length;n++)this.local[n].type instanceof Sa||t.push(this.local[n]);return t}}],[{key:"create",value:function(e,t){return t.length?Ra(t,e,0,Ea):Ma}}]),e}();Aa.empty=new Aa([],[]),Aa.removeOverlap=Fa;var Ma=Aa.empty,Ta=function(){function e(t){Object(c.a)(this,e),this.members=t}return Object(d.a)(e,[{key:"map",value:function(t,n){var r=this.members.map((function(e){return e.map(t,n,Ea)}));return e.from(r)}},{key:"forChild",value:function(t,n){if(n.isLeaf)return Aa.empty;for(var r=[],o=0;o<this.members.length;o++){var i=this.members[o].forChild(t,n);i!=Ma&&(i instanceof e?r=r.concat(i.members):r.push(i))}return e.from(r)}},{key:"eq",value:function(t){if(!(t instanceof e)||t.members.length!=this.members.length)return!1;for(var n=0;n<this.members.length;n++)if(!this.members[n].eq(t.members[n]))return!1;return!0}},{key:"locals",value:function(e){for(var t,n=!0,r=0;r<this.members.length;r++){var o=this.members[r].localsInner(e);if(o.length)if(t){n&&(t=t.slice(),n=!1);for(var i=0;i<o.length;i++)t.push(o[i])}else t=o}return t?Fa(n?t:t.sort(Ha)):Da}}],[{key:"from",value:function(t){switch(t.length){case 0:return Ma;case 1:return t[0];default:return new e(t)}}}]),e}();function La(e,t){if(!t||!e.length)return e;for(var n=[],r=0;r<e.length;r++){var o=e[r];n.push(new ja(o.from+t,o.to+t,o.type))}return n}function Na(e,t,n){if(t.isLeaf)return null;for(var r,o=n+t.nodeSize,i=null,a=0;a<e.length;a++)(r=e[a])&&r.from>n&&r.to<o&&((i||(i=[])).push(r),e[a]=null);return i}function Pa(e){for(var t=[],n=0;n<e.length;n++)null!=e[n]&&t.push(e[n]);return t}function Ra(e,t,n,r){var o=[],i=!1;t.forEach((function(t,a){var s=Na(e,t,a+n);if(s){i=!0;var l=Ra(s,t,n+a+1,r);l!=Ma&&o.push(a,a+t.nodeSize,l)}}));for(var a=La(i?Pa(e):e,-n).sort(Ha),s=0;s<a.length;s++)a[s].type.valid(t,a[s])||(r.onRemove&&r.onRemove(a[s].spec),a.splice(s--,1));return a.length||o.length?new Aa(a,o):Ma}function Ha(e,t){return e.from-t.from||e.to-t.to}function Fa(e){for(var t=e,n=0;n<t.length-1;n++){var r=t[n];if(r.from!=r.to)for(var o=n+1;o<t.length;o++){var i=t[o];if(i.from!=r.from){i.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,i.from),Va(t,o,r.copy(i.from,r.to)));break}i.to!=r.to&&(t==e&&(t=e.slice()),t[o]=i.copy(i.from,r.to),Va(t,o+1,i.copy(r.to,i.to)))}}return t}function Va(e,t,n){for(;t<e.length&&Ha(n,e[t])>0;)t++;e.splice(t,0,n)}var za=Ir.create({name:"placeholder",addOptions:function(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something \u2026",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins:function(){var e=this;return[new p.Plugin({props:{decorations:function(t){var n=t.doc,r=t.selection,o=e.editor.isEditable||!e.options.showOnlyWhenEditable,i=r.anchor,a=[];return o?(n.descendants((function(t,n){var r=i>=n&&i<=n+t.nodeSize,o=!t.isLeaf&&!t.childCount;if((r||!e.options.showOnlyCurrent)&&o){var s=[e.options.emptyNodeClass];e.editor.isEmpty&&s.push(e.options.emptyEditorClass);var l=ja.node(n,n+t.nodeSize,{class:s.join(" "),"data-placeholder":"function"===typeof e.options.placeholder?e.options.placeholder({editor:e.editor,node:t,pos:n,hasAnchor:r}):e.options.placeholder});a.push(l)}return e.options.includeChildren})),Aa.create(n,a)):null}}})]}}),Ba=zo.create({name:"underline",addOptions:function(){return{HTMLAttributes:{}}},parseHTML:function(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:function(e){return!!e.includes("underline")&&{}}}]},renderHTML:function(e){var t=e.HTMLAttributes;return["u",Sr(this.options.HTMLAttributes,t),0]},addCommands:function(){var e=this;return{setUnderline:function(){return function(t){return t.commands.setMark(e.name)}},toggleUnderline:function(){return function(t){return t.commands.toggleMark(e.name)}},unsetUnderline:function(){return function(t){return t.commands.unsetMark(e.name)}}}},addKeyboardShortcuts:function(){var e=this;return{"Mod-u":function(){return e.editor.commands.toggleUnderline()},"Mod-U":function(){return e.editor.commands.toggleUnderline()}}}}),_a=/^\s*>\s$/,Ia=Bo.create({name:"blockquote",addOptions:function(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML:function(){return[{tag:"blockquote"}]},renderHTML:function(e){var t=e.HTMLAttributes;return["blockquote",Sr(this.options.HTMLAttributes,t),0]},addCommands:function(){var e=this;return{setBlockquote:function(){return function(t){return t.commands.wrapIn(e.name)}},toggleBlockquote:function(){return function(t){return t.commands.toggleWrap(e.name)}},unsetBlockquote:function(){return function(t){return t.commands.lift(e.name)}}}},addKeyboardShortcuts:function(){var e=this;return{"Mod-Shift-b":function(){return e.editor.commands.toggleBlockquote()}}},addInputRules:function(){return[Vo({find:_a,type:this.type})]}}),$a=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))$/,qa=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))/g,Wa=/(?:^|\s)((?:__)((?:[^__]+))(?:__))$/,Ua=/(?:^|\s)((?:__)((?:[^__]+))(?:__))/g,Ka=zo.create({name:"bold",addOptions:function(){return{HTMLAttributes:{}}},parseHTML:function(){return[{tag:"strong"},{tag:"b",getAttrs:function(e){return"normal"!==e.style.fontWeight&&null}},{style:"font-weight",getAttrs:function(e){return/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}}]},renderHTML:function(e){var t=e.HTMLAttributes;return["strong",Sr(this.options.HTMLAttributes,t),0]},addCommands:function(){var e=this;return{setBold:function(){return function(t){return t.commands.setMark(e.name)}},toggleBold:function(){return function(t){return t.commands.toggleMark(e.name)}},unsetBold:function(){return function(t){return t.commands.unsetMark(e.name)}}}},addKeyboardShortcuts:function(){var e=this;return{"Mod-b":function(){return e.editor.commands.toggleBold()},"Mod-B":function(){return e.editor.commands.toggleBold()}}},addInputRules:function(){return[Ro({find:$a,type:this.type}),Ro({find:Wa,type:this.type})]},addPasteRules:function(){return[_o({find:qa,type:this.type}),_o({find:Ua,type:this.type})]}}),Ga=/^\s*([-+*])\s$/,Ja=Bo.create({name:"bulletList",addOptions:function(){return{itemTypeName:"listItem",HTMLAttributes:{}}},group:"block list",content:function(){return"".concat(this.options.itemTypeName,"+")},parseHTML:function(){return[{tag:"ul"}]},renderHTML:function(e){var t=e.HTMLAttributes;return["ul",Sr(this.options.HTMLAttributes,t),0]},addCommands:function(){var e=this;return{toggleBulletList:function(){return function(t){return t.commands.toggleList(e.name,e.options.itemTypeName)}}}},addKeyboardShortcuts:function(){var e=this;return{"Mod-Shift-8":function(){return e.editor.commands.toggleBulletList()}}},addInputRules:function(){return[Vo({find:Ga,type:this.type})]}}),Ya=/(?:^|\s)((?:`)((?:[^`]+))(?:`))$/,Za=/(?:^|\s)((?:`)((?:[^`]+))(?:`))/g,Xa=zo.create({name:"code",addOptions:function(){return{HTMLAttributes:{}}},excludes:"_",code:!0,parseHTML:function(){return[{tag:"code"}]},renderHTML:function(e){var t=e.HTMLAttributes;return["code",Sr(this.options.HTMLAttributes,t),0]},addCommands:function(){var e=this;return{setCode:function(){return function(t){return t.commands.setMark(e.name)}},toggleCode:function(){return function(t){return t.commands.toggleMark(e.name)}},unsetCode:function(){return function(t){return t.commands.unsetMark(e.name)}}}},addKeyboardShortcuts:function(){var e=this;return{"Mod-e":function(){return e.editor.commands.toggleCode()}}},addInputRules:function(){return[Ro({find:Ya,type:this.type})]},addPasteRules:function(){return[_o({find:Za,type:this.type})]}}),Qa=/^```([a-z]+)?[\s\n]$/,es=/^~~~([a-z]+)?[\s\n]$/,ts=Bo.create({name:"codeBlock",addOptions:function(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes:function(){var e=this;return{language:{default:null,parseHTML:function(t){var n,r=e.options.languageClassPrefix,i=Object(o.a)((null===(n=t.firstElementChild)||void 0===n?void 0:n.classList)||[]).filter((function(e){return e.startsWith(r)})).map((function(e){return e.replace(r,"")}))[0];return i||null},rendered:!1}}},parseHTML:function(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML:function(e){var t=e.node,n=e.HTMLAttributes;return["pre",Sr(this.options.HTMLAttributes,n),["code",{class:t.attrs.language?this.options.languageClassPrefix+t.attrs.language:null},0]]},addCommands:function(){var e=this;return{setCodeBlock:function(t){return function(n){return n.commands.setNode(e.name,t)}},toggleCodeBlock:function(t){return function(n){return n.commands.toggleNode(e.name,"paragraph",t)}}}},addKeyboardShortcuts:function(){var e=this;return{"Mod-Alt-c":function(){return e.editor.commands.toggleCodeBlock()},Backspace:function(){var t=e.editor.state.selection,n=t.empty,r=t.$anchor,o=1===r.pos;return!(!n||r.parent.type.name!==e.name)&&(!(!o&&r.parent.textContent.length)&&e.editor.commands.clearNodes())},Enter:function(t){var n=t.editor;if(!e.options.exitOnTripleEnter)return!1;var r=n.state.selection,o=r.$from;if(!r.empty||o.parent.type!==e.type)return!1;var i=o.parentOffset===o.parent.nodeSize-2,a=o.parent.textContent.endsWith("\n\n");return!(!i||!a)&&n.chain().command((function(e){return e.tr.delete(o.pos-2,o.pos),!0})).exitCode().run()},ArrowDown:function(t){var n=t.editor;if(!e.options.exitOnArrowDown)return!1;var r=n.state,o=r.selection,i=r.doc,a=o.$from;if(!o.empty||a.parent.type!==e.type)return!1;if(!(a.parentOffset===a.parent.nodeSize-2))return!1;var s=a.after();return void 0!==s&&(!i.nodeAt(s)&&n.commands.exitCode())}}},addInputRules:function(){return[Fo({find:Qa,type:this.type,getAttributes:function(e){return{language:e[1]}}}),Fo({find:es,type:this.type,getAttributes:function(e){return{language:e[1]}}})]},addProseMirrorPlugins:function(){var e=this;return[new p.Plugin({key:new p.PluginKey("codeBlockVSCodeHandler"),props:{handlePaste:function(t,n){if(!n.clipboardData)return!1;if(e.editor.isActive(e.type.name))return!1;var r=n.clipboardData.getData("text/plain"),o=n.clipboardData.getData("vscode-editor-data"),i=o?JSON.parse(o):void 0,a=null===i||void 0===i?void 0:i.mode;if(!r||!a)return!1;var s=t.state.tr;return s.replaceSelectionWith(e.type.create({language:a})),s.setSelection(p.TextSelection.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.insertText(r.replace(/\r\n?/g,"\n")),s.setMeta("paste",!0),t.dispatch(s),!0}}})]}}),ns=Bo.create({name:"doc",topNode:!0,content:"block+"});function rs(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new p.Plugin({view:function(t){return new is(t,e)}})}var is=function(){function e(t,n){var r=this;Object(c.a)(this,e),this.editorView=t,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=n.width||1,this.color=n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map((function(e){var n=function(t){r[e](t)};return t.dom.addEventListener(e,n),{name:e,handler:n}}))}return Object(d.a)(e,[{key:"destroy",value:function(){var e=this;this.handlers.forEach((function(t){var n=t.name,r=t.handler;return e.editorView.dom.removeEventListener(n,r)}))}},{key:"update",value:function(e,t){null!=this.cursorPos&&t.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}},{key:"setCursor",value:function(e){e!=this.cursorPos&&(this.cursorPos=e,null==e?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}},{key:"updateOverlay",value:function(){var e,t=this.editorView.state.doc.resolve(this.cursorPos);if(!t.parent.inlineContent){var n=t.nodeBefore,r=t.nodeAfter;if(n||r){var o=this.editorView.nodeDOM(this.cursorPos-(n?n.nodeSize:0)).getBoundingClientRect(),i=n?o.bottom:o.top;n&&r&&(i=(i+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),e={left:o.left,right:o.right,top:i-this.width/2,bottom:i+this.width/2}}}if(!e){var a=this.editorView.coordsAtPos(this.cursorPos);e={left:a.left-this.width/2,right:a.left+this.width/2,top:a.top,bottom:a.bottom}}var s,l,u=this.editorView.dom.offsetParent;if(this.element||(this.element=u.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none; background-color: "+this.color),!u||u==document.body&&"static"==getComputedStyle(u).position)s=-pageXOffset,l=-pageYOffset;else{var c=u.getBoundingClientRect();s=c.left-u.scrollLeft,l=c.top-u.scrollTop}this.element.style.left=e.left-s+"px",this.element.style.top=e.top-l+"px",this.element.style.width=e.right-e.left+"px",this.element.style.height=e.bottom-e.top+"px"}},{key:"scheduleRemoval",value:function(e){var t=this;clearTimeout(this.timeout),this.timeout=setTimeout((function(){return t.setCursor(null)}),e)}},{key:"dragover",value:function(e){if(this.editorView.editable){var t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),n=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),r=n&&n.type.spec.disableDropCursor,o="function"==typeof r?r(this.editorView,t):r;if(t&&!o){var i=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice&&null==(i=Object(g.h)(this.editorView.state.doc,i,this.editorView.dragging.slice)))return this.setCursor(null);this.setCursor(i),this.scheduleRemoval(5e3)}}}},{key:"dragend",value:function(){this.scheduleRemoval(20)}},{key:"drop",value:function(){this.scheduleRemoval(20)}},{key:"dragleave",value:function(e){e.target!=this.editorView.dom&&this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}]),e}(),as=Ir.create({name:"dropCursor",addOptions:function(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins:function(){return[rs(this.options)]}}),ss="undefined"!=typeof navigator?navigator:null,ls="undefined"!=typeof document?document:null,us=ss&&ss.userAgent||"",cs=/Edge\/(\d+)/.exec(us),ds=/MSIE \d/.exec(us),fs=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(us),ps=!!(ds||fs||cs),hs=ds?document.documentMode:fs?+fs[1]:cs?+cs[1]:0,ms=!ps&&/gecko\/(\d+)/i.test(us);ms&&(/Firefox\/(\d+)/.exec(us)||[0,0])[1];var vs=!ps&&/Chrome\/(\d+)/.exec(us),gs=!!vs,ys=vs?+vs[1]:0,bs=!ps&&!!ss&&/Apple Computer/.test(ss.vendor),ws=bs&&(/Mobile\/\w+/.test(us)||!!ss&&ss.maxTouchPoints>2),ks=ws||!!ss&&/Mac/.test(ss.platform),xs=/Android \d/.test(us),Os=!!ls&&"webkitFontSmoothing"in ls.documentElement.style,Ss=Os?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,Cs=function(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t},js=function(e){var t=e.assignedSlot||e.parentNode;return t&&11==t.nodeType?t.host:t},Ds=null,Es=function(e,t,n){var r=Ds||(Ds=document.createRange());return r.setEnd(e,null==n?e.nodeValue.length:n),r.setStart(e,t||0),r},As=function(e,t,n,r){return n&&(Ts(e,t,n,r,-1)||Ts(e,t,n,r,1))},Ms=/^(img|br|input|textarea|hr)$/i;function Ts(e,t,n,r,o){for(;;){if(e==n&&t==r)return!0;if(t==(o<0?0:Ls(e))){var i=e.parentNode;if(!i||1!=i.nodeType||Ps(e)||Ms.test(e.nodeName)||"false"==e.contentEditable)return!1;t=Cs(e)+(o<0?0:1),e=i}else{if(1!=e.nodeType)return!1;if("false"==(e=e.childNodes[t+(o<0?-1:0)]).contentEditable)return!1;t=o<0?Ls(e):0}}}function Ls(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function Ns(e,t,n){for(var r=0==t,o=t==Ls(e);r||o;){if(e==n)return!0;var i=Cs(e);if(!(e=e.parentNode))return!1;r=r&&0==i,o=o&&i==Ls(e)}}function Ps(e){for(var t,n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}var Rs=function(e){var t=e.isCollapsed;return t&&gs&&e.rangeCount&&!e.getRangeAt(0).collapsed&&(t=!1),t};function Hs(e,t){var n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function Fs(e){return{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function Vs(e,t){return"number"==typeof e?e:e[t]}function zs(e){var 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 Bs(e,t,n){for(var r=e.someProp("scrollThreshold")||0,o=e.someProp("scrollMargin")||5,i=e.dom.ownerDocument,a=n||e.dom;a;a=js(a))if(1==a.nodeType){var s=a,l=s==i.body,u=l?Fs(i):zs(s),c=0,d=0;if(t.top<u.top+Vs(r,"top")?d=-(u.top-t.top+Vs(o,"top")):t.bottom>u.bottom-Vs(r,"bottom")&&(d=t.bottom-u.bottom+Vs(o,"bottom")),t.left<u.left+Vs(r,"left")?c=-(u.left-t.left+Vs(o,"left")):t.right>u.right-Vs(r,"right")&&(c=t.right-u.right+Vs(o,"right")),c||d)if(l)i.defaultView.scrollBy(c,d);else{var f=s.scrollLeft,p=s.scrollTop;d&&(s.scrollTop+=d),c&&(s.scrollLeft+=c);var h=s.scrollLeft-f,m=s.scrollTop-p;t={left:t.left-h,top:t.top-m,right:t.right-h,bottom:t.bottom-m}}if(l)break}}function _s(e){for(var t=[],n=e.ownerDocument,r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=js(r));return t}function Is(e,t){for(var n=0;n<e.length;n++){var r=e[n],o=r.dom,i=r.top,a=r.left;o.scrollTop!=i+t&&(o.scrollTop=i+t),o.scrollLeft!=a&&(o.scrollLeft=a)}}var $s=null;function qs(e,t){for(var n,r,o=2e8,i=0,a=t.top,s=t.top,l=e.firstChild,u=0;l;l=l.nextSibling,u++){var c=void 0;if(1==l.nodeType)c=l.getClientRects();else{if(3!=l.nodeType)continue;c=Es(l).getClientRects()}for(var d=0;d<c.length;d++){var f=c[d];if(f.top<=a&&f.bottom>=s){a=Math.max(f.bottom,a),s=Math.min(f.top,s);var p=f.left>t.left?f.left-t.left:f.right<t.left?t.left-f.right:0;if(p<o){n=l,o=p,r=p&&3==n.nodeType?{left:f.right<t.left?f.right:f.left,top:t.top}:t,1==l.nodeType&&p&&(i=u+(t.left>=(f.left+f.right)/2?1:0));continue}}!n&&(t.left>=f.right&&t.top>=f.top||t.left>=f.left&&t.top>=f.bottom)&&(i=u+1)}}return n&&3==n.nodeType?function(e,t){for(var n=e.nodeValue.length,r=document.createRange(),o=0;o<n;o++){r.setEnd(e,o+1),r.setStart(e,o);var i=Gs(r,1);if(i.top!=i.bottom&&Ws(t,i))return{node:e,offset:o+(t.left>=(i.left+i.right)/2?1:0)}}return{node:e,offset:0}}(n,r):!n||o&&1==n.nodeType?{node:e,offset:i}:qs(n,r)}function Ws(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function Us(e,t,n){var r=e.childNodes.length;if(r&&n.top<n.bottom)for(var o=Math.max(0,Math.min(r-1,Math.floor(r*(t.top-n.top)/(n.bottom-n.top))-2)),i=o;;){var a=e.childNodes[i];if(1==a.nodeType)for(var s=a.getClientRects(),l=0;l<s.length;l++){var u=s[l];if(Ws(t,u))return Us(a,t,u)}if((i=(i+1)%r)==o)break}return e}function Ks(e,t){var n,r=e.dom.ownerDocument,o=0;if(r.caretPositionFromPoint)try{var i=r.caretPositionFromPoint(t.left,t.top);i&&(n=i.offsetNode,o=i.offset)}catch(h){}if(!n&&r.caretRangeFromPoint){var a=r.caretRangeFromPoint(t.left,t.top);a&&(n=a.startContainer,o=a.startOffset)}var s,l=(e.root.elementFromPoint?e.root:r).elementFromPoint(t.left,t.top);if(!l||!e.dom.contains(1!=l.nodeType?l.parentNode:l)){var u=e.dom.getBoundingClientRect();if(!Ws(t,u))return null;if(!(l=Us(e.dom,t,u)))return null}if(bs)for(var c=l;n&&c;c=js(c))c.draggable&&(n=void 0);if(l=function(e,t){var n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left?n:e}(l,t),n){if(ms&&1==n.nodeType&&(o=Math.min(o,n.childNodes.length))<n.childNodes.length){var d,f=n.childNodes[o];"IMG"==f.nodeName&&(d=f.getBoundingClientRect()).right<=t.left&&d.bottom>t.top&&o++}n==e.dom&&o==n.childNodes.length-1&&1==n.lastChild.nodeType&&t.top>n.lastChild.getBoundingClientRect().bottom?s=e.state.doc.content.size:0!=o&&1==n.nodeType&&"BR"==n.childNodes[o-1].nodeName||(s=function(e,t,n,r){for(var o=-1,i=t;i!=e.dom;){var a=e.docView.nearestDesc(i,!0);if(!a)return null;if(a.node.isBlock&&a.parent){var s=a.dom.getBoundingClientRect();if(s.left>r.left||s.top>r.top)o=a.posBefore;else{if(!(s.right<r.left||s.bottom<r.top))break;o=a.posAfter}}i=a.dom.parentNode}return o>-1?o:e.docView.posFromDOM(t,n,1)}(e,n,o,t))}null==s&&(s=function(e,t,n){var r=qs(t,n),o=r.node,i=r.offset,a=-1;if(1==o.nodeType&&!o.firstChild){var s=o.getBoundingClientRect();a=s.left!=s.right&&n.left>(s.left+s.right)/2?1:-1}return e.docView.posFromDOM(o,i,a)}(e,l,t));var p=e.docView.nearestDesc(l,!0);return{pos:s,inside:p?p.posAtStart-p.border:-1}}function Gs(e,t){var n=e.getClientRects();return n.length?n[t<0?0:n.length-1]:e.getBoundingClientRect()}var Js=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function Ys(e,t,n){var r=e.docView.domFromPos(t,n<0?-1:1),o=r.node,i=r.offset,a=r.atom,s=Os||ms;if(3==o.nodeType){if(!s||!Js.test(o.nodeValue)&&(n<0?i:i!=o.nodeValue.length)){var l=i,u=i,c=n<0?1:-1;return n<0&&!i?(u++,c=-1):n>=0&&i==o.nodeValue.length?(l--,c=1):n<0?l--:u++,Zs(Gs(Es(o,l,u),c),c<0)}var d=Gs(Es(o,i,i),n);if(ms&&i&&/\s/.test(o.nodeValue[i-1])&&i<o.nodeValue.length){var f=Gs(Es(o,i-1,i-1),-1);if(f.top==d.top){var p=Gs(Es(o,i,i+1),-1);if(p.top!=d.top)return Zs(p,p.left<f.left)}}return d}if(!e.state.doc.resolve(t-(a||0)).parent.inlineContent){if(null==a&&i&&(n<0||i==Ls(o))){var h=o.childNodes[i-1];if(1==h.nodeType)return Xs(h.getBoundingClientRect(),!1)}if(null==a&&i<Ls(o)){var m=o.childNodes[i];if(1==m.nodeType)return Xs(m.getBoundingClientRect(),!0)}return Xs(o.getBoundingClientRect(),n>=0)}if(null==a&&i&&(n<0||i==Ls(o))){var v=o.childNodes[i-1],g=3==v.nodeType?Es(v,Ls(v)-(s?0:1)):1!=v.nodeType||"BR"==v.nodeName&&v.nextSibling?null:v;if(g)return Zs(Gs(g,1),!1)}if(null==a&&i<Ls(o)){for(var y=o.childNodes[i];y.pmViewDesc&&y.pmViewDesc.ignoreForCoords;)y=y.nextSibling;var b=y?3==y.nodeType?Es(y,0,s?0:1):1==y.nodeType?y:null:null;if(b)return Zs(Gs(b,-1),!0)}return Zs(Gs(3==o.nodeType?Es(o):o,-n),n>=0)}function Zs(e,t){if(0==e.width)return e;var n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function Xs(e,t){if(0==e.height)return e;var n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function Qs(e,t,n){var r=e.state,o=e.root.activeElement;r!=t&&e.updateState(t),o!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),o!=e.dom&&o&&o.focus()}}var el=/[\u0590-\u08ac]/;var tl=null,nl=null,rl=!1;function ol(e,t,n){return tl==t&&nl==n?rl:(tl=t,nl=n,rl="up"==n||"down"==n?function(e,t,n){var r=t.selection,o="up"==n?r.$from:r.$to;return Qs(e,t,(function(){for(var t=e.docView.domFromPos(o.pos,"up"==n?-1:1).node;;){var r=e.docView.nearestDesc(t,!0);if(!r)break;if(r.node.isBlock){t=r.dom;break}t=r.dom.parentNode}for(var i=Ys(e,o.pos,1),a=t.firstChild;a;a=a.nextSibling){var s=void 0;if(1==a.nodeType)s=a.getClientRects();else{if(3!=a.nodeType)continue;s=Es(a,0,a.nodeValue.length).getClientRects()}for(var l=0;l<s.length;l++){var u=s[l];if(u.bottom>u.top+1&&("up"==n?i.top-u.top>2*(u.bottom-i.top):u.bottom-i.bottom>2*(i.bottom-u.top)))return!1}}return!0}))}(e,t,n):function(e,t,n){var r=t.selection.$head;if(!r.parent.isTextblock)return!1;var o=r.parentOffset,i=!o,a=o==r.parent.content.size,s=e.domSelection();return el.test(r.parent.textContent)&&s.modify?Qs(e,t,(function(){var t=s.getRangeAt(0),o=s.focusNode,i=s.focusOffset,a=s.caretBidiLevel;s.modify("move",n,"character");var l=!(r.depth?e.docView.domAfterPos(r.before()):e.dom).contains(1==s.focusNode.nodeType?s.focusNode:s.focusNode.parentNode)||o==s.focusNode&&i==s.focusOffset;return s.removeAllRanges(),s.addRange(t),null!=a&&(s.caretBidiLevel=a),l})):"left"==n||"backward"==n?i:a}(e,t,n))}var il=function(){function e(t,n,r,o){Object(c.a)(this,e),this.parent=t,this.children=n,this.dom=r,this.contentDOM=o,this.dirty=0,r.pmViewDesc=this}return Object(d.a)(e,[{key:"matchesWidget",value:function(e){return!1}},{key:"matchesMark",value:function(e){return!1}},{key:"matchesNode",value:function(e,t,n){return!1}},{key:"matchesHack",value:function(e){return!1}},{key:"parseRule",value:function(){return null}},{key:"stopEvent",value:function(e){return!1}},{key:"size",get:function(){for(var e=0,t=0;t<this.children.length;t++)e+=this.children[t].size;return e}},{key:"border",get:function(){return 0}},{key:"destroy",value:function(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(var e=0;e<this.children.length;e++)this.children[e].destroy()}},{key:"posBeforeChild",value:function(e){for(var t=0,n=this.posAtStart;;t++){var r=this.children[t];if(r==e)return n;n+=r.size}}},{key:"posBefore",get:function(){return this.parent.posBeforeChild(this)}},{key:"posAtStart",get:function(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}},{key:"posAfter",get:function(){return this.posBefore+this.size}},{key:"posAtEnd",get:function(){return this.posAtStart+this.size-2*this.border}},{key:"localPosFromDOM",value:function(e,t,n){if(this.contentDOM&&this.contentDOM.contains(1==e.nodeType?e:e.parentNode)){if(n<0){var r,o;if(e==this.contentDOM)r=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;r=e.previousSibling}for(;r&&(!(o=r.pmViewDesc)||o.parent!=this);)r=r.previousSibling;return r?this.posBeforeChild(o)+o.size:this.posAtStart}var i,a;if(e==this.contentDOM)i=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.nextSibling}for(;i&&(!(a=i.pmViewDesc)||a.parent!=this);)i=i.nextSibling;return i?this.posBeforeChild(a):this.posAtEnd}var s;if(e==this.dom&&this.contentDOM)s=t>Cs(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))s=2&e.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==t)for(var l=e;;l=l.parentNode){if(l==this.dom){s=!1;break}if(l.previousSibling)break}if(null==s&&t==e.childNodes.length)for(var u=e;;u=u.parentNode){if(u==this.dom){s=!0;break}if(u.nextSibling)break}}return(null==s?n>0:s)?this.posAtEnd:this.posAtStart}},{key:"nearestDesc",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!0,r=e;r;r=r.parentNode){var o=this.getDesc(r),i=void 0;if(o&&(!t||o.node)){if(!n||!(i=o.nodeDOM)||(1==i.nodeType?i.contains(1==e.nodeType?e:e.parentNode):i==e))return o;n=!1}}}},{key:"getDesc",value:function(e){for(var t=e.pmViewDesc,n=t;n;n=n.parent)if(n==this)return t}},{key:"posFromDOM",value:function(e,t,n){for(var r=e;r;r=r.parentNode){var o=this.getDesc(r);if(o)return o.localPosFromDOM(e,t,n)}return-1}},{key:"descAt",value:function(e){for(var t=0,n=0;t<this.children.length;t++){var r=this.children[t],o=n+r.size;if(n==e&&o!=n){for(;!r.border&&r.children.length;)r=r.children[0];return r}if(e<o)return r.descAt(e-n-r.border);n=o}}},{key:"domFromPos",value:function(e,t){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};for(var n,r=0,o=0,i=0;r<this.children.length;r++){var a=this.children[r],s=i+a.size;if(s>e||a instanceof fl){o=e-i;break}i=s}if(o)return this.children[r].domFromPos(o-this.children[r].border,t);for(;r&&!(n=this.children[r-1]).size&&n instanceof al&&n.side>=0;r--);if(t<=0){for(var l,u=!0;(l=r?this.children[r-1]:null)&&l.dom.parentNode!=this.contentDOM;r--,u=!1);return l&&t&&u&&!l.border&&!l.domAtom?l.domFromPos(l.size,t):{node:this.contentDOM,offset:l?Cs(l.dom)+1:0}}for(var c,d=!0;(c=r<this.children.length?this.children[r]:null)&&c.dom.parentNode!=this.contentDOM;r++,d=!1);return c&&d&&!c.border&&!c.domAtom?c.domFromPos(0,t):{node:this.contentDOM,offset:c?Cs(c.dom):this.contentDOM.childNodes.length}}},{key:"parseRange",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(0==this.children.length)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};for(var r=-1,o=-1,i=n,a=0;;a++){var s=this.children[a],l=i+s.size;if(-1==r&&e<=l){var u=i+s.border;if(e>=u&&t<=l-s.border&&s.node&&s.contentDOM&&this.contentDOM.contains(s.contentDOM))return s.parseRange(e,t,u);e=i;for(var c=a;c>0;c--){var d=this.children[c-1];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(1)){r=Cs(d.dom)+1;break}e-=d.size}-1==r&&(r=0)}if(r>-1&&(l>t||a==this.children.length-1)){t=l;for(var f=a+1;f<this.children.length;f++){var p=this.children[f];if(p.size&&p.dom.parentNode==this.contentDOM&&!p.emptyChildAt(-1)){o=Cs(p.dom);break}t+=p.size}-1==o&&(o=this.contentDOM.childNodes.length);break}i=l}return{node:this.contentDOM,from:e,to:t,fromOffset:r,toOffset:o}}},{key:"emptyChildAt",value:function(e){if(this.border||!this.contentDOM||!this.children.length)return!1;var t=this.children[e<0?0:this.children.length-1];return 0==t.size||t.emptyChildAt(e)}},{key:"domAfterPos",value:function(e){var t=this.domFromPos(e,0),n=t.node,r=t.offset;if(1!=n.nodeType||r==n.childNodes.length)throw new RangeError("No node after pos "+e);return n.childNodes[r]}},{key:"setSelection",value:function(e,t,n){for(var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=Math.min(e,t),i=Math.max(e,t),a=0,s=0;a<this.children.length;a++){var l=this.children[a],u=s+l.size;if(o>s&&i<u)return l.setSelection(e-s-l.border,t-s-l.border,n,r);s=u}var c=this.domFromPos(e,e?-1:1),d=t==e?c:this.domFromPos(t,t?-1:1),f=n.getSelection(),p=!1;if((ms||bs)&&e==t){var h=c,m=h.node,v=h.offset;if(3==m.nodeType){if((p=!(!v||"\n"!=m.nodeValue[v-1]))&&v==m.nodeValue.length)for(var g,y=m;y;y=y.parentNode){if(g=y.nextSibling){"BR"==g.nodeName&&(c=d={node:g.parentNode,offset:Cs(g)+1});break}var b=y.pmViewDesc;if(b&&b.node&&b.node.isBlock)break}}else{var w=m.childNodes[v-1];p=w&&("BR"==w.nodeName||"false"==w.contentEditable)}}if(ms&&f.focusNode&&f.focusNode!=d.node&&1==f.focusNode.nodeType){var k=f.focusNode.childNodes[f.focusOffset];k&&"false"==k.contentEditable&&(r=!0)}if(r||p&&bs||!As(c.node,c.offset,f.anchorNode,f.anchorOffset)||!As(d.node,d.offset,f.focusNode,f.focusOffset)){var x=!1;if((f.extend||e==t)&&!p){f.collapse(c.node,c.offset);try{e!=t&&f.extend(d.node,d.offset),x=!0}catch(C){if(!(C instanceof DOMException))throw C}}if(!x){if(e>t){var O=c;c=d,d=O}var S=document.createRange();S.setEnd(d.node,d.offset),S.setStart(c.node,c.offset),f.removeAllRanges(),f.addRange(S)}}}},{key:"ignoreMutation",value:function(e){return!this.contentDOM&&"selection"!=e.type}},{key:"contentLost",get:function(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}},{key:"markDirty",value:function(e,t){for(var n=0,r=0;r<this.children.length;r++){var o=this.children[r],i=n+o.size;if(n==i?e<=i&&t>=n:e<i&&t>n){var a=n+o.border,s=i-o.border;if(e>=a&&t<=s)return this.dirty=e==n||t==i?2:1,void(e!=a||t!=s||!o.contentLost&&o.dom.parentNode==this.contentDOM?o.markDirty(e-a,t-a):o.dirty=3);o.dirty=o.dom!=o.contentDOM||o.dom.parentNode!=this.contentDOM||o.children.length?3:2}n=i}this.dirty=2}},{key:"markParentsDirty",value:function(){for(var e=1,t=this.parent;t;t=t.parent,e++){var n=1==e?2:1;t.dirty<n&&(t.dirty=n)}}},{key:"domAtom",get:function(){return!1}},{key:"ignoreForCoords",get:function(){return!1}}]),e}(),al=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e,r,o,i){var s;Object(c.a)(this,n);var l,u=r.type.toDOM;if("function"==typeof u&&(u=u(o,(function(){return l?l.parent?l.parent.posBeforeChild(l):void 0:i}))),!r.type.spec.raw){if(1!=u.nodeType){var d=document.createElement("span");d.appendChild(u),u=d}u.contentEditable="false",u.classList.add("ProseMirror-widget")}return(s=t.call(this,e,[],u,null)).widget=r,s.widget=r,l=Object(a.a)(s),s}return Object(d.a)(n,[{key:"matchesWidget",value:function(e){return 0==this.dirty&&e.type.eq(this.widget.type)}},{key:"parseRule",value:function(){return{ignore:!0}}},{key:"stopEvent",value:function(e){var t=this.widget.spec.stopEvent;return!!t&&t(e)}},{key:"ignoreMutation",value:function(e){return"selection"!=e.type||this.widget.spec.ignoreSelection}},{key:"destroy",value:function(){this.widget.type.destroy(this.dom),Object(h.a)(Object(m.a)(n.prototype),"destroy",this).call(this)}},{key:"domAtom",get:function(){return!0}},{key:"side",get:function(){return this.widget.type.side}}]),n}(il),sl=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e,r,o,i){var a;return Object(c.a)(this,n),(a=t.call(this,e,[],r,null)).textDOM=o,a.text=i,a}return Object(d.a)(n,[{key:"size",get:function(){return this.text.length}},{key:"localPosFromDOM",value:function(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t}},{key:"domFromPos",value:function(e){return{node:this.textDOM,offset:e}}},{key:"ignoreMutation",value:function(e){return"characterData"===e.type&&e.target.nodeValue==e.oldValue}}]),n}(il),ll=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e,r,o,i){var a;return Object(c.a)(this,n),(a=t.call(this,e,[],o,i)).mark=r,a}return Object(d.a)(n,[{key:"parseRule",value:function(){return 3&this.dirty||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM||void 0}}},{key:"matchesMark",value:function(e){return 3!=this.dirty&&this.mark.eq(e)}},{key:"markDirty",value:function(e,t){if(Object(h.a)(Object(m.a)(n.prototype),"markDirty",this).call(this,e,t),0!=this.dirty){for(var r=this.parent;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=0}}},{key:"slice",value:function(e,t,r){var o=n.create(this.parent,this.mark,!0,r),i=this.children,a=this.size;t<a&&(i=Cl(i,t,a,r)),e>0&&(i=Cl(i,0,e,r));for(var s=0;s<i.length;s++)i[s].parent=o;return o.children=i,o}}],[{key:"create",value:function(e,t,r,o){var i=o.nodeViews[t.type.name],a=i&&i(t,o,r);return a&&a.dom||(a=v.DOMSerializer.renderSpec(document,t.type.spec.toDOM(t,r))),new n(e,t,a.dom,a.contentDOM||a.dom)}}]),n}(il),ul=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e,r,o,i,a,s,l,u,d){var f;return Object(c.a)(this,n),(f=t.call(this,e,[],a,s)).node=r,f.outerDeco=o,f.innerDeco=i,f.nodeDOM=l,s&&f.updateChildren(u,d),f}return Object(d.a)(n,[{key:"parseRule",value:function(){var e=this;if(this.node.type.spec.reparseInView)return null;var t={node:this.node.type.name,attrs:this.node.attrs};if("pre"==this.node.type.whitespace&&(t.preserveWhitespace="full"),this.contentDOM)if(this.contentLost){for(var n=this.children.length-1;n>=0;n--){var r=this.children[n];if(this.dom.contains(r.dom.parentNode)){t.contentElement=r.dom.parentNode;break}}t.contentElement||(t.getContent=function(){return v.Fragment.empty})}else t.contentElement=this.contentDOM;else t.getContent=function(){return e.node.content};return t}},{key:"matchesNode",value:function(e,t,n){return 0==this.dirty&&e.eq(this.node)&&kl(t,this.outerDeco)&&n.eq(this.innerDeco)}},{key:"size",get:function(){return this.node.nodeSize}},{key:"border",get:function(){return this.node.isLeaf?0:1}},{key:"updateChildren",value:function(e,t){var n=this,r=this.node.inlineContent,o=t,i=e.composing?this.localCompositionInfo(e,t):null,a=i&&i.pos>-1?i:null,s=i&&i.pos<0,l=new Ol(this,a&&a.node);!function(e,t,n,r){var o=t.locals(e),i=0;if(0==o.length){for(var a=0;a<e.childCount;a++){var s=e.child(a);r(s,o,t.forChild(i,s),a),i+=s.nodeSize}return}for(var l=0,u=[],c=null,d=0;;){if(l<o.length&&o[l].to==i){for(var f=o[l++],p=void 0;l<o.length&&o[l].to==i;)(p||(p=[f])).push(o[l++]);if(p){p.sort(Sl);for(var h=0;h<p.length;h++)n(p[h],d,!!c)}else n(f,d,!!c)}var m=void 0,v=void 0;if(c)v=-1,m=c,c=null;else{if(!(d<e.childCount))break;v=d,m=e.child(d++)}for(var g=0;g<u.length;g++)u[g].to<=i&&u.splice(g--,1);for(;l<o.length&&o[l].from<=i&&o[l].to>i;)u.push(o[l++]);var y=i+m.nodeSize;if(m.isText){var b=y;l<o.length&&o[l].from<b&&(b=o[l].from);for(var w=0;w<u.length;w++)u[w].to<b&&(b=u[w].to);b<y&&(c=m.cut(b-i),m=m.cut(0,b-i),y=b,v=-1)}r(m,m.isInline&&!m.isLeaf?u.filter((function(e){return!e.inline})):u.slice(),t.forChild(i,m),v),i=y}}(this.node,this.innerDeco,(function(t,i,a){t.spec.marks?l.syncToMarks(t.spec.marks,r,e):t.type.side>=0&&!a&&l.syncToMarks(i==n.node.childCount?v.Mark.none:n.node.child(i).marks,r,e),l.placeWidget(t,e,o)}),(function(t,n,a,u){var c;l.syncToMarks(t.marks,r,e),l.findNodeMatch(t,n,a,u)||s&&e.state.selection.from>o&&e.state.selection.to<o+t.nodeSize&&(c=l.findIndexWithChild(i.node))>-1&&l.updateNodeAt(t,n,a,c,e)||l.updateNextNode(t,n,a,e,u)||l.addNode(t,n,a,e,o),o+=t.nodeSize})),l.syncToMarks([],r,e),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||2==this.dirty)&&(a&&this.protectLocalComposition(e,a),hl(this.contentDOM,this.children,e),ws&&function(e){if("UL"==e.nodeName||"OL"==e.nodeName){var t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}(this.dom))}},{key:"localCompositionInfo",value:function(e,t){var n=e.state.selection,r=n.from,o=n.to;if(!(e.state.selection instanceof p.TextSelection)||r<t||o>t+this.node.content.size)return null;var i=e.domSelection(),a=function(e,t){for(;;){if(3==e.nodeType)return e;if(1==e.nodeType&&t>0){if(e.childNodes.length>t&&3==e.childNodes[t].nodeType)return e.childNodes[t];t=Ls(e=e.childNodes[t-1])}else{if(!(1==e.nodeType&&t<e.childNodes.length))return null;e=e.childNodes[t],t=0}}}(i.focusNode,i.focusOffset);if(!a||!this.dom.contains(a.parentNode))return null;if(this.node.inlineContent){var s=a.nodeValue,l=function(e,t,n,r){for(var o=0,i=0;o<e.childCount&&i<=r;){var a=e.child(o++),s=i;if(i+=a.nodeSize,a.isText){for(var l=a.text;o<e.childCount;){var u=e.child(o++);if(i+=u.nodeSize,!u.isText)break;l+=u.text}if(i>=n){var c=s<r?l.lastIndexOf(t,r-s-1):-1;if(c>=0&&c+t.length+s>=n)return s+c;if(n==r&&l.length>=r+t.length-s&&l.slice(r-s,r-s+t.length)==t)return r}}}return-1}(this.node.content,s,r-t,o-t);return l<0?null:{node:a,pos:l,text:s}}return{node:a,pos:-1,text:""}}},{key:"protectLocalComposition",value:function(e,t){var n=t.node,r=t.pos,o=t.text;if(!this.getDesc(n)){for(var i=n;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&&(i.pmViewDesc=void 0)}var a=new sl(this,i,n,o);e.input.compositionNodes.push(a),this.children=Cl(this.children,r,r+o.length,e,a)}}},{key:"update",value:function(e,t,n,r){return!(3==this.dirty||!e.sameMarkup(this.node))&&(this.updateInner(e,t,n,r),!0)}},{key:"updateInner",value:function(e,t,n,r){this.updateOuterDeco(t),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=0}},{key:"updateOuterDeco",value:function(e){if(!kl(e,this.outerDeco)){var t=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=yl(this.dom,this.nodeDOM,gl(this.outerDeco,this.node,t),gl(e,this.node,t)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}}},{key:"selectNode",value:function(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!0)}},{key:"deselectNode",value:function(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.dom.removeAttribute("draggable")}},{key:"domAtom",get:function(){return this.node.isAtom}}],[{key:"create",value:function(e,t,r,o,i,a){var s,l=i.nodeViews[t.type.name],u=l&&l(t,i,(function(){return s?s.parent?s.parent.posBeforeChild(s):void 0:a}),r,o),c=u&&u.dom,d=u&&u.contentDOM;if(t.isText)if(c){if(3!=c.nodeType)throw new RangeError("Text must be rendered as a DOM text node")}else c=document.createTextNode(t.text);else if(!c){var f=v.DOMSerializer.renderSpec(document,t.type.spec.toDOM(t));c=f.dom,d=f.contentDOM}d||t.isText||"BR"==c.nodeName||(c.hasAttribute("contenteditable")||(c.contentEditable="false"),t.type.spec.draggable&&(c.draggable=!0));var p=c;return c=wl(c,r,t),u?s=new pl(e,t,r,o,c,d||null,p,u,i,a+1):t.isText?new dl(e,t,r,o,c,p,i):new n(e,t,r,o,c,d||null,p,i,a+1)}}]),n}(il);function cl(e,t,n,r,o){return wl(r,t,e),new ul(void 0,e,t,n,r,r,r,o,0)}var dl=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e,r,o,i,a,s,l){return Object(c.a)(this,n),t.call(this,e,r,o,i,a,null,s,l,0)}return Object(d.a)(n,[{key:"parseRule",value:function(){for(var e=this.nodeDOM.parentNode;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}},{key:"update",value:function(e,t,n,r){return!(3==this.dirty||0!=this.dirty&&!this.inParent()||!e.sameMarkup(this.node))&&(this.updateOuterDeco(t),0==this.dirty&&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=0,!0)}},{key:"inParent",value:function(){for(var e=this.parent.contentDOM,t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}},{key:"domFromPos",value:function(e){return{node:this.nodeDOM,offset:e}}},{key:"localPosFromDOM",value:function(e,t,r){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):Object(h.a)(Object(m.a)(n.prototype),"localPosFromDOM",this).call(this,e,t,r)}},{key:"ignoreMutation",value:function(e){return"characterData"!=e.type&&"selection"!=e.type}},{key:"slice",value:function(e,t,r){var o=this.node.cut(e,t),i=document.createTextNode(o.text);return new n(this.parent,o,this.outerDeco,this.innerDeco,i,i,r)}},{key:"markDirty",value:function(e,t){Object(h.a)(Object(m.a)(n.prototype),"markDirty",this).call(this,e,t),this.dom==this.nodeDOM||0!=e&&t!=this.nodeDOM.nodeValue.length||(this.dirty=3)}},{key:"domAtom",get:function(){return!1}}]),n}(ul),fl=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(){return Object(c.a)(this,n),t.apply(this,arguments)}return Object(d.a)(n,[{key:"parseRule",value:function(){return{ignore:!0}}},{key:"matchesHack",value:function(e){return 0==this.dirty&&this.dom.nodeName==e}},{key:"domAtom",get:function(){return!0}},{key:"ignoreForCoords",get:function(){return"IMG"==this.dom.nodeName}}]),n}(il),pl=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e,r,o,i,a,s,l,u,d,f){var p;return Object(c.a)(this,n),(p=t.call(this,e,r,o,i,a,s,l,d,f)).spec=u,p}return Object(d.a)(n,[{key:"update",value:function(e,t,r,o){if(3==this.dirty)return!1;if(this.spec.update){var i=this.spec.update(e,t,r);return i&&this.updateInner(e,t,r,o),i}return!(!this.contentDOM&&!e.isLeaf)&&Object(h.a)(Object(m.a)(n.prototype),"update",this).call(this,e,t,r,o)}},{key:"selectNode",value:function(){this.spec.selectNode?this.spec.selectNode():Object(h.a)(Object(m.a)(n.prototype),"selectNode",this).call(this)}},{key:"deselectNode",value:function(){this.spec.deselectNode?this.spec.deselectNode():Object(h.a)(Object(m.a)(n.prototype),"deselectNode",this).call(this)}},{key:"setSelection",value:function(e,t,r,o){this.spec.setSelection?this.spec.setSelection(e,t,r):Object(h.a)(Object(m.a)(n.prototype),"setSelection",this).call(this,e,t,r,o)}},{key:"destroy",value:function(){this.spec.destroy&&this.spec.destroy(),Object(h.a)(Object(m.a)(n.prototype),"destroy",this).call(this)}},{key:"stopEvent",value:function(e){return!!this.spec.stopEvent&&this.spec.stopEvent(e)}},{key:"ignoreMutation",value:function(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):Object(h.a)(Object(m.a)(n.prototype),"ignoreMutation",this).call(this,e)}}]),n}(ul);function hl(e,t,n){for(var r=e.firstChild,o=!1,i=0;i<t.length;i++){var a=t[i],s=a.dom;if(s.parentNode==e){for(;s!=r;)r=xl(r),o=!0;r=r.nextSibling}else o=!0,e.insertBefore(s,r);if(a instanceof ll){var l=r?r.previousSibling:e.lastChild;hl(a.contentDOM,a.children,n),r=l?l.nextSibling:e.firstChild}}for(;r;)r=xl(r),o=!0;o&&n.trackWrites==e&&(n.trackWrites=null)}var ml=function(e){e&&(this.nodeName=e)};ml.prototype=Object.create(null);var vl=[new ml];function gl(e,t,n){if(0==e.length)return vl;for(var r=n?vl[0]:new ml,o=[r],i=0;i<e.length;i++){var a=e[i].type.attrs;if(a)for(var s in a.nodeName&&o.push(r=new ml(a.nodeName)),a){var l=a[s];null!=l&&(n&&1==o.length&&o.push(r=new ml(t.isInline?"span":"div")),"class"==s?r.class=(r.class?r.class+" ":"")+l:"style"==s?r.style=(r.style?r.style+";":"")+l:"nodeName"!=s&&(r[s]=l))}}return o}function yl(e,t,n,r){if(n==vl&&r==vl)return t;for(var o=t,i=0;i<r.length;i++){var a=r[i],s=n[i];if(i){var l=void 0;s&&s.nodeName==a.nodeName&&o!=e&&(l=o.parentNode)&&l.nodeName.toLowerCase()==a.nodeName||((l=document.createElement(a.nodeName)).pmIsDeco=!0,l.appendChild(o),s=vl[0]),o=l}bl(o,s||vl[0],a)}return o}function bl(e,t,n){for(var r in t)"class"==r||"style"==r||"nodeName"==r||r in n||e.removeAttribute(r);for(var o in n)"class"!=o&&"style"!=o&&"nodeName"!=o&&n[o]!=t[o]&&e.setAttribute(o,n[o]);if(t.class!=n.class){for(var i=t.class?t.class.split(" ").filter(Boolean):[],a=n.class?n.class.split(" ").filter(Boolean):[],s=0;s<i.length;s++)-1==a.indexOf(i[s])&&e.classList.remove(i[s]);for(var l=0;l<a.length;l++)-1==i.indexOf(a[l])&&e.classList.add(a[l]);0==e.classList.length&&e.removeAttribute("class")}if(t.style!=n.style){if(t.style)for(var u,c=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g;u=c.exec(t.style);)e.style.removeProperty(u[1]);n.style&&(e.style.cssText+=n.style)}}function wl(e,t,n){return yl(e,e,vl,gl(t,n,1!=e.nodeType))}function kl(e,t){if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function xl(e){var t=e.nextSibling;return e.parentNode.removeChild(e),t}var Ol=function(){function e(t,n){Object(c.a)(this,e),this.lock=n,this.index=0,this.stack=[],this.changed=!1,this.top=t,this.preMatch=function(e,t){var n=t,r=n.children.length,o=e.childCount,i=new Map,a=[];e:for(;o>0;){for(var s=void 0;;)if(r){var l=n.children[r-1];if(!(l instanceof ll)){s=l,r--;break}n=l,r=l.children.length}else{if(n==t)break e;r=n.parent.children.indexOf(n),n=n.parent}var u=s.node;if(u){if(u!=e.child(o-1))break;--o,i.set(s,o),a.push(s)}}return{index:o,matched:i,matches:a.reverse()}}(t.node.content,t)}return Object(d.a)(e,[{key:"destroyBetween",value:function(e,t){if(e!=t){for(var n=e;n<t;n++)this.top.children[n].destroy();this.top.children.splice(e,t-e),this.changed=!0}}},{key:"destroyRest",value:function(){this.destroyBetween(this.index,this.top.children.length)}},{key:"syncToMarks",value:function(e,t,n){for(var r=0,o=this.stack.length>>1,i=Math.min(o,e.length);r<i&&(r==o-1?this.top:this.stack[r+1<<1]).matchesMark(e[r])&&!1!==e[r].type.spec.spanning;)r++;for(;r<o;)this.destroyRest(),this.top.dirty=0,this.index=this.stack.pop(),this.top=this.stack.pop(),o--;for(;o<e.length;){this.stack.push(this.top,this.index+1);for(var a=-1,s=this.index;s<Math.min(this.index+3,this.top.children.length);s++)if(this.top.children[s].matchesMark(e[o])){a=s;break}if(a>-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{var l=ll.create(this.top,e[o],t,n);this.top.children.splice(this.index,0,l),this.top=l,this.changed=!0}this.index=0,o++}}},{key:"findNodeMatch",value:function(e,t,n,r){var o,i=-1;if(r>=this.preMatch.index&&(o=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&o.matchesNode(e,t,n))i=this.top.children.indexOf(o,this.index);else for(var a=this.index,s=Math.min(this.top.children.length,a+5);a<s;a++){var l=this.top.children[a];if(l.matchesNode(e,t,n)&&!this.preMatch.matched.has(l)){i=a;break}}return!(i<0)&&(this.destroyBetween(this.index,i),this.index++,!0)}},{key:"updateNodeAt",value:function(e,t,n,r,o){var i=this.top.children[r];return 3==i.dirty&&i.dom==i.contentDOM&&(i.dirty=2),!!i.update(e,t,n,o)&&(this.destroyBetween(this.index,r),this.index++,!0)}},{key:"findIndexWithChild",value:function(e){for(;;){var t=e.parentNode;if(!t)return-1;if(t==this.top.contentDOM){var n=e.pmViewDesc;if(n)for(var r=this.index;r<this.top.children.length;r++)if(this.top.children[r]==n)return r;return-1}e=t}}},{key:"updateNextNode",value:function(e,t,n,r,o){for(var i=this.index;i<this.top.children.length;i++){var a=this.top.children[i];if(a instanceof ul){var s=this.preMatch.matched.get(a);if(null!=s&&s!=o)return!1;var l=a.dom;if(!(this.lock&&(l==this.lock||1==l.nodeType&&l.contains(this.lock.parentNode))&&!(e.isText&&a.node&&a.node.isText&&a.nodeDOM.nodeValue==e.text&&3!=a.dirty&&kl(t,a.outerDeco)))&&a.update(e,t,n,r))return this.destroyBetween(this.index,i),a.dom!=l&&(this.changed=!0),this.index++,!0;break}}return!1}},{key:"addNode",value:function(e,t,n,r,o){this.top.children.splice(this.index++,0,ul.create(this.top,e,t,n,r,o)),this.changed=!0}},{key:"placeWidget",value:function(e,t,n){var 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){var o=new al(this.top,e,t,n);this.top.children.splice(this.index++,0,o),this.changed=!0}else this.index++}},{key:"addTextblockHacks",value:function(){for(var e=this.top.children[this.index-1],t=this.top;e instanceof ll;)e=(t=e).children[t.children.length-1];e&&e instanceof dl&&!/\n$/.test(e.node.text)||((bs||gs)&&e&&"false"==e.dom.contentEditable&&this.addHackNode("IMG",t),this.addHackNode("BR",this.top))}},{key:"addHackNode",value:function(e,t){if(t==this.top&&this.index<t.children.length&&t.children[this.index].matchesHack(e))this.index++;else{var n=document.createElement(e);"IMG"==e&&(n.className="ProseMirror-separator",n.alt=""),"BR"==e&&(n.className="ProseMirror-trailingBreak");var r=new fl(this.top,[],n,null);t!=this.top?t.children.push(r):t.children.splice(this.index++,0,r),this.changed=!0}}}]),e}();function Sl(e,t){return e.type.side-t.type.side}function Cl(e,t,n,r,o){for(var i=[],a=0,s=0;a<e.length;a++){var l=e[a],u=s,c=s+=l.size;u>=n||c<=t?i.push(l):(u<t&&i.push(l.slice(0,t-u,r)),o&&(i.push(o),o=void 0),c>n&&i.push(l.slice(n-u,l.size,r)))}return i}function jl(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=e.domSelection(),r=e.state.doc;if(!n.focusNode)return null;var o=e.docView.nearestDesc(n.focusNode),i=o&&0==o.size,a=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(a<0)return null;var s,l,u=r.resolve(a);if(Rs(n)){for(s=u;o&&!o.node;)o=o.parent;var c=o.node;if(o&&c.isAtom&&p.NodeSelection.isSelectable(c)&&o.parent&&(!c.isInline||!Ns(n.focusNode,n.focusOffset,o.dom))){var d=o.posBefore;l=new p.NodeSelection(a==d?u:r.resolve(d))}}else{var f=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(f<0)return null;s=r.resolve(f)}if(!l){var h="pointer"==t||e.state.selection.head<u.pos&&!i?1:-1;l=Fl(e,s,u,h)}return l}function Dl(e){return e.editable?e.hasFocus():zl(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function El(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.state.selection;if(Rl(e,n),Dl(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&gs){var r=e.domSelection(),o=e.domObserver.currentSelection;if(r.anchorNode&&o.anchorNode&&As(r.anchorNode,r.anchorOffset,o.anchorNode,o.anchorOffset))return e.input.mouseDown.delayedSelectionSync=!0,void e.domObserver.setCurSelection()}if(e.domObserver.disconnectSelection(),e.cursorWrapper)Pl(e);else{var i,a,s=n.anchor,l=n.head;!Al||n instanceof p.TextSelection||(n.$from.parent.inlineContent||(i=Ml(e,n.from)),n.empty||n.$from.parent.inlineContent||(a=Ml(e,n.to))),e.docView.setSelection(s,l,e.root,t),Al&&(i&&Ll(i),a&&Ll(a)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&Nl(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}var Al=bs||gs&&ys<63;function Ml(e,t){var n=e.docView.domFromPos(t,0),r=n.node,o=n.offset,i=o<r.childNodes.length?r.childNodes[o]:null,a=o?r.childNodes[o-1]:null;if(bs&&i&&"false"==i.contentEditable)return Tl(i);if((!i||"false"==i.contentEditable)&&(!a||"false"==a.contentEditable)){if(i)return Tl(i);if(a)return Tl(a)}}function Tl(e){return e.contentEditable="true",bs&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function Ll(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function Nl(e){var t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.input.hideSelectionGuard);var n=e.domSelection(),r=n.anchorNode,o=n.anchorOffset;t.addEventListener("selectionchange",e.input.hideSelectionGuard=function(){n.anchorNode==r&&n.anchorOffset==o||(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout((function(){Dl(e)&&!e.state.selection.visible||e.dom.classList.remove("ProseMirror-hideselection")}),20))})}function Pl(e){var t=e.domSelection(),n=document.createRange(),r=e.cursorWrapper.dom,o="IMG"==r.nodeName;o?n.setEnd(r.parentNode,Cs(r)+1):n.setEnd(r,0),n.collapse(!1),t.removeAllRanges(),t.addRange(n),!o&&!e.state.selection.visible&&ps&&hs<=11&&(r.disabled=!0,r.disabled=!1)}function Rl(e,t){if(t instanceof p.NodeSelection){var n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(Hl(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else Hl(e)}function Hl(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function Fl(e,t,n,r){return e.someProp("createSelectionBetween",(function(r){return r(e,t,n)}))||p.TextSelection.between(t,n,r)}function Vl(e){return(!e.editable||e.root.activeElement==e.dom)&&zl(e)}function zl(e){var t=e.domSelection();if(!t.anchorNode)return!1;try{return e.dom.contains(3==t.anchorNode.nodeType?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(3==t.focusNode.nodeType?t.focusNode.parentNode:t.focusNode))}catch(n){return!1}}function Bl(e,t){var n=e.selection,r=n.$anchor,o=n.$head,i=t>0?r.max(o):r.min(o),a=i.parent.inlineContent?i.depth?e.doc.resolve(t>0?i.after():i.before()):null:i;return a&&p.Selection.findFrom(a,t)}function _l(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function Il(e,t,n){var r=e.state.selection;if(!(r instanceof p.TextSelection)){if(r instanceof p.NodeSelection&&r.node.isInline)return _l(e,new p.TextSelection(t>0?r.$to:r.$from));var o=Bl(e.state,t);return!!o&&_l(e,o)}if(!r.empty||n.indexOf("s")>-1)return!1;if(e.endOfTextblock(t>0?"right":"left")){var i=Bl(e.state,t);return!!(i&&i instanceof p.NodeSelection)&&_l(e,i)}if(!(ks&&n.indexOf("m")>-1)){var a,s=r.$head,l=s.textOffset?null:t<0?s.nodeBefore:s.nodeAfter;if(!l||l.isText)return!1;var u=t<0?s.pos-l.nodeSize:s.pos;return!!(l.isAtom||(a=e.docView.descAt(u))&&!a.contentDOM)&&(p.NodeSelection.isSelectable(l)?_l(e,new p.NodeSelection(t<0?e.state.doc.resolve(s.pos-l.nodeSize):s)):!!Os&&_l(e,new p.TextSelection(e.state.doc.resolve(t<0?u:u+l.nodeSize))))}}function $l(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function ql(e){var t=e.pmViewDesc;return t&&0==t.size&&(e.nextSibling||"BR"!=e.nodeName)}function Wl(e){var t=e.domSelection(),n=t.focusNode,r=t.focusOffset;if(n){var o,i,a=!1;for(ms&&1==n.nodeType&&r<$l(n)&&ql(n.childNodes[r])&&(a=!0);;)if(r>0){if(1!=n.nodeType)break;var s=n.childNodes[r-1];if(ql(s))o=n,i=--r;else{if(3!=s.nodeType)break;r=(n=s).nodeValue.length}}else{if(Kl(n))break;for(var l=n.previousSibling;l&&ql(l);)o=n.parentNode,i=Cs(l),l=l.previousSibling;if(l)r=$l(n=l);else{if((n=n.parentNode)==e.dom)break;r=0}}a?Gl(e,t,n,r):o&&Gl(e,t,o,i)}}function Ul(e){var t=e.domSelection(),n=t.focusNode,r=t.focusOffset;if(n){for(var o,i,a=$l(n);;)if(r<a){if(1!=n.nodeType)break;if(!ql(n.childNodes[r]))break;o=n,i=++r}else{if(Kl(n))break;for(var s=n.nextSibling;s&&ql(s);)o=s.parentNode,i=Cs(s)+1,s=s.nextSibling;if(s)r=0,a=$l(n=s);else{if((n=n.parentNode)==e.dom)break;r=a=0}}o&&Gl(e,t,o,i)}}function Kl(e){var t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function Gl(e,t,n,r){if(Rs(t)){var o=document.createRange();o.setEnd(n,r),o.setStart(n,r),t.removeAllRanges(),t.addRange(o)}else t.extend&&t.extend(n,r);e.domObserver.setCurSelection();var i=e.state;setTimeout((function(){e.state==i&&El(e)}),50)}function Jl(e,t,n){var r=e.state.selection;if(r instanceof p.TextSelection&&!r.empty||n.indexOf("s")>-1)return!1;if(ks&&n.indexOf("m")>-1)return!1;var o=r.$from,i=r.$to;if(!o.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){var a=Bl(e.state,t);if(a&&a instanceof p.NodeSelection)return _l(e,a)}if(!o.parent.inlineContent){var s=t<0?o:i,l=r instanceof p.AllSelection?p.Selection.near(s,t):p.Selection.findFrom(s,t);return!!l&&_l(e,l)}return!1}function Yl(e,t){if(!(e.state.selection instanceof p.TextSelection))return!0;var n=e.state.selection,r=n.$head,o=n.$anchor,i=n.empty;if(!r.sameParent(o))return!0;if(!i)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;var a=!r.textOffset&&(t<0?r.nodeBefore:r.nodeAfter);if(a&&!a.isText){var s=e.state.tr;return t<0?s.delete(r.pos-a.nodeSize,r.pos):s.delete(r.pos,r.pos+a.nodeSize),e.dispatch(s),!0}return!1}function Zl(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function Xl(e,t){var n=t.keyCode,r=function(e){var t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}(t);return 8==n||ks&&72==n&&"c"==r?Yl(e,-1)||Wl(e):46==n||ks&&68==n&&"c"==r?Yl(e,1)||Ul(e):13==n||27==n||(37==n||ks&&66==n&&"c"==r?Il(e,-1,r)||Wl(e):39==n||ks&&70==n&&"c"==r?Il(e,1,r)||Ul(e):38==n||ks&&80==n&&"c"==r?Jl(e,-1,r)||Wl(e):40==n||ks&&78==n&&"c"==r?function(e){if(!bs||e.state.selection.$head.parentOffset>0)return!1;var t=e.domSelection(),n=t.focusNode,r=t.focusOffset;if(n&&1==n.nodeType&&0==r&&n.firstChild&&"false"==n.firstChild.contentEditable){var o=n.firstChild;Zl(e,o,"true"),setTimeout((function(){return Zl(e,o,"false")}),20)}return!1}(e)||Jl(e,1,r)||Ul(e):r==(ks?"m":"c")&&(66==n||73==n||89==n||90==n))}function Ql(e,t){for(var n=[],r=t.content,o=t.openStart,i=t.openEnd;o>1&&i>1&&1==r.childCount&&1==r.firstChild.childCount;){o--,i--;var a=r.firstChild;n.push(a.type.name,a.attrs!=a.type.defaultAttrs?a.attrs:null),r=a.content}var s=e.someProp("clipboardSerializer")||v.DOMSerializer.fromSchema(e.state.schema),l=uu(),u=l.createElement("div");u.appendChild(s.serializeFragment(r,{document:l}));for(var c,d=u.firstChild,f=0;d&&1==d.nodeType&&(c=su[d.nodeName.toLowerCase()]);){for(var p=c.length-1;p>=0;p--){for(var h=l.createElement(c[p]);u.firstChild;)h.appendChild(u.firstChild);u.appendChild(h),f++}d=u.firstChild}return d&&1==d.nodeType&&d.setAttribute("data-pm-slice","".concat(o," ").concat(i).concat(f?" -".concat(f):""," ").concat(JSON.stringify(n))),{dom:u,text:e.someProp("clipboardTextSerializer",(function(e){return e(t)}))||t.content.textBetween(0,t.content.size,"\n\n")}}function eu(e,t,n,r,o){var i,a,s=o.parent.type.spec.code;if(!n&&!t)return null;var l=t&&(r||s||!n);if(l){if(e.someProp("transformPastedText",(function(e){t=e(t,s||r)})),s)return t?new v.Slice(v.Fragment.from(e.state.schema.text(t.replace(/\r\n?/g,"\n"))),0,0):v.Slice.empty;var u=e.someProp("clipboardTextParser",(function(e){return e(t,o,r)}));if(u)a=u;else{var c=o.marks(),d=e.state.schema,f=v.DOMSerializer.fromSchema(d);i=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach((function(e){var t=i.appendChild(document.createElement("p"));e&&t.appendChild(f.serializeNode(d.text(e,c)))}))}}else e.someProp("transformPastedHTML",(function(e){n=e(n)})),i=function(e){var t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));var n,r=uu().createElement("div"),o=/<([a-z][^>\s]+)/i.exec(e);(n=o&&su[o[1].toLowerCase()])&&(e=n.map((function(e){return"<"+e+">"})).join("")+e+n.map((function(e){return"</"+e+">"})).reverse().join(""));if(r.innerHTML=e,n)for(var i=0;i<n.length;i++)r=r.querySelector(n[i])||r;return r}(n),Os&&function(e){for(var t=e.querySelectorAll(gs?"span:not([class]):not([style])":"span.Apple-converted-space"),n=0;n<t.length;n++){var r=t[n];1==r.childNodes.length&&"\xa0"==r.textContent&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),r)}}(i);var p=i&&i.querySelector("[data-pm-slice]"),h=p&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(p.getAttribute("data-pm-slice")||"");if(h&&h[3])for(var m=+h[3];m>0&&i.firstChild;m--)i=i.firstChild;if(!a){var g=e.someProp("clipboardParser")||e.someProp("domParser")||v.DOMParser.fromSchema(e.state.schema);a=g.parseSlice(i,{preserveWhitespace:!(!l&&!h),context:o,ruleFromNode:function(e){return"BR"!=e.nodeName||e.nextSibling||!e.parentNode||tu.test(e.parentNode.nodeName)?null:{ignore:!0}}})}if(h)a=function(e,t){if(!e.size)return e;var n,r=e.content.firstChild.type.schema;try{n=JSON.parse(t)}catch(u){return e}for(var o=e.content,i=e.openStart,a=e.openEnd,s=n.length-2;s>=0;s-=2){var l=r.nodes[n[s]];if(!l||l.hasRequiredAttrs())break;o=v.Fragment.from(l.create(n[s+1],o)),i++,a++}return new v.Slice(o,i,a)}(au(a,+h[1],+h[2]),h[4]);else if(a=v.Slice.maxOpen(function(e,t){if(e.childCount<2)return e;for(var n=function(n){var r=t.node(n).contentMatchAt(t.index(n)),o=void 0,i=[];if(e.forEach((function(e){if(i){var t,n=r.findWrapping(e.type);if(!n)return i=null;if(t=i.length&&o.length&&ru(n,o,e,i[i.length-1],0))i[i.length-1]=t;else{i.length&&(i[i.length-1]=ou(i[i.length-1],o.length));var a=nu(e,n);i.push(a),r=r.matchType(a.type),o=n}}})),i)return{v:v.Fragment.from(i)}},r=t.depth;r>=0;r--){var o=n(r);if("object"===typeof o)return o.v}return e}(a.content,o),!0),a.openStart||a.openEnd){for(var y=0,b=0,w=a.content.firstChild;y<a.openStart&&!w.type.spec.isolating;y++,w=w.firstChild);for(var k=a.content.lastChild;b<a.openEnd&&!k.type.spec.isolating;b++,k=k.lastChild);a=au(a,y,b)}return e.someProp("transformPasted",(function(e){a=e(a)})),a}var tu=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function nu(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=t.length-1;r>=n;r--)e=t[r].create(null,v.Fragment.from(e));return e}function ru(e,t,n,r,o){if(o<e.length&&o<t.length&&e[o]==t[o]){var i=ru(e,t,n,r.lastChild,o+1);if(i)return r.copy(r.content.replaceChild(r.childCount-1,i));if(r.contentMatchAt(r.childCount).matchType(o==e.length-1?n.type:e[o+1]))return r.copy(r.content.append(v.Fragment.from(nu(n,e,o+1))))}}function ou(e,t){if(0==t)return e;var n=e.content.replaceChild(e.childCount-1,ou(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(v.Fragment.empty,!0);return e.copy(n.append(r))}function iu(e,t,n,r,o,i){var a=t<0?e.firstChild:e.lastChild,s=a.content;return o<r-1&&(s=iu(s,t,n,r,o+1,i)),o>=n&&(s=t<0?a.contentMatchAt(0).fillBefore(s,e.childCount>1||i<=o).append(s):s.append(a.contentMatchAt(a.childCount).fillBefore(v.Fragment.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,a.copy(s))}function au(e,t,n){return t<e.openStart&&(e=new v.Slice(iu(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new v.Slice(iu(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}var su={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]},lu=null;function uu(){return lu||(lu=document.implementation.createHTMLDocument("title"))}var cu={},du={},fu=Object(d.a)((function e(){Object(c.a)(this,e),this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastAndroidDelete=0,this.composing=!1,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}));function pu(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function hu(e){e.someProp("handleDOMEvents",(function(t){for(var n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=function(t){return mu(e,t)})}))}function mu(e,t){return e.someProp("handleDOMEvents",(function(n){var r=n[t.type];return!!r&&(r(e,t)||t.defaultPrevented)}))}function vu(e){return{left:e.clientX,top:e.clientY}}function gu(e,t,n,r,o){if(-1==r)return!1;for(var i=e.state.doc.resolve(r),a=function(r){if(e.someProp(t,(function(t){return r>i.depth?t(e,n,i.nodeAfter,i.before(r),o,!0):t(e,n,i.node(r),i.before(r),o,!1)})))return{v:!0}},s=i.depth+1;s>0;s--){var l=a(s);if("object"===typeof l)return l.v}return!1}function yu(e,t,n){e.focused||e.focus();var r=e.state.tr.setSelection(t);"pointer"==n&&r.setMeta("pointer",!0),e.dispatch(r)}function bu(e,t,n,r,o){return gu(e,"handleClickOn",t,n,r)||e.someProp("handleClick",(function(n){return n(e,t,r)}))||(o?function(e,t){if(-1==t)return!1;var n,r,o=e.state.selection;o instanceof p.NodeSelection&&(n=o.node);for(var i=e.state.doc.resolve(t),a=i.depth+1;a>0;a--){var s=a>i.depth?i.nodeAfter:i.node(a);if(p.NodeSelection.isSelectable(s)){r=n&&o.$from.depth>0&&a>=o.$from.depth&&i.before(o.$from.depth+1)==o.$from.pos?i.before(o.$from.depth):i.before(a);break}}return null!=r&&(yu(e,p.NodeSelection.create(e.state.doc,r),"pointer"),!0)}(e,n):function(e,t){if(-1==t)return!1;var n=e.state.doc.resolve(t),r=n.nodeAfter;return!!(r&&r.isAtom&&p.NodeSelection.isSelectable(r))&&(yu(e,new p.NodeSelection(n),"pointer"),!0)}(e,n))}function wu(e,t,n,r){return gu(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",(function(n){return n(e,t,r)}))}function ku(e,t,n,r){return gu(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",(function(n){return n(e,t,r)}))||function(e,t,n){if(0!=n.button)return!1;var r=e.state.doc;if(-1==t)return!!r.inlineContent&&(yu(e,p.TextSelection.create(r,0,r.content.size),"pointer"),!0);for(var o=r.resolve(t),i=o.depth+1;i>0;i--){var a=i>o.depth?o.nodeAfter:o.node(i),s=o.before(i);if(a.inlineContent)yu(e,p.TextSelection.create(r,s+1,s+1+a.content.size),"pointer");else{if(!p.NodeSelection.isSelectable(a))continue;yu(e,p.NodeSelection.create(r,s),"pointer")}return!0}}(e,n,r)}function xu(e){return Au(e)}du.keydown=function(e,t){var n=t;if(e.input.shiftKey=16==n.keyCode||n.shiftKey,!Cu(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!xs||!gs||13!=n.keyCode))if(229!=n.keyCode&&e.domObserver.forceFlush(),!ws||13!=n.keyCode||n.ctrlKey||n.altKey||n.metaKey)e.someProp("handleKeyDown",(function(t){return t(e,n)}))||Xl(e,n)?n.preventDefault():pu(e,"key");else{var r=Date.now();e.input.lastIOSEnter=r,e.input.lastIOSEnterFallbackTimeout=setTimeout((function(){e.input.lastIOSEnter==r&&(e.someProp("handleKeyDown",(function(t){return t(e,Hs(13,"Enter"))})),e.input.lastIOSEnter=0)}),200)}},du.keyup=function(e,t){16==t.keyCode&&(e.input.shiftKey=!1)},du.keypress=function(e,t){var n=t;if(!(Cu(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||ks&&n.metaKey))if(e.someProp("handleKeyPress",(function(t){return t(e,n)})))n.preventDefault();else{var r=e.state.selection;if(!(r instanceof p.TextSelection)||!r.$from.sameParent(r.$to)){var o=String.fromCharCode(n.charCode);e.someProp("handleTextInput",(function(t){return t(e,r.$from.pos,r.$to.pos,o)}))||e.dispatch(e.state.tr.insertText(o).scrollIntoView()),n.preventDefault()}}};var Ou=ks?"metaKey":"ctrlKey";cu.mousedown=function(e,t){var n=t;e.input.shiftKey=n.shiftKey;var r=xu(e),o=Date.now(),i="singleClick";o-e.input.lastClick.time<500&&function(e,t){var n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}(n,e.input.lastClick)&&!n[Ou]&&("singleClick"==e.input.lastClick.type?i="doubleClick":"doubleClick"==e.input.lastClick.type&&(i="tripleClick")),e.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:i};var a=e.posAtCoords(vu(n));a&&("singleClick"==i?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new Su(e,a,n,!!r)):("doubleClick"==i?wu:ku)(e,a.pos,a.inside,n)?n.preventDefault():pu(e,"pointer"))};var Su=function(){function e(t,n,r,o){var i,a,s=this;if(Object(c.a)(this,e),this.view=t,this.pos=n,this.event=r,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!r[Ou],this.allowDefault=r.shiftKey,n.inside>-1)i=t.state.doc.nodeAt(n.inside),a=n.inside;else{var l=t.state.doc.resolve(n.pos);i=l.parent,a=l.depth?l.before():0}var u=o?null:r.target,d=u?t.docView.nearestDesc(u,!0):null;this.target=d?d.dom:null;var f=t.state.selection;(0==r.button&&i.type.spec.draggable&&!1!==i.type.spec.selectable||f instanceof p.NodeSelection&&f.from<=a&&f.to>a)&&(this.mightDrag={node:i,pos:a,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!ms||this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout((function(){s.view.input.mouseDown==s&&s.target.setAttribute("contentEditable","false")}),20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),pu(t,"pointer")}return Object(d.a)(e,[{key:"done",value:function(){var e=this;this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout((function(){return El(e.view)})),this.view.input.mouseDown=null}},{key:"up",value:function(e){if(this.done(),this.view.dom.contains(e.target)){var t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(vu(e))),this.allowDefault||!t?pu(this.view,"pointer"):bu(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():0==e.button&&(this.flushed||bs&&this.mightDrag&&!this.mightDrag.node.isAtom||gs&&!(this.view.state.selection instanceof p.TextSelection)&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(yu(this.view,p.Selection.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):pu(this.view,"pointer")}}},{key:"move",value:function(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0),pu(this.view,"pointer"),0==e.buttons&&this.done()}}]),e}();function Cu(e,t){return!!e.composing||!!(bs&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500)&&(e.input.compositionEndedAt=-2e8,!0)}cu.touchdown=function(e){xu(e),pu(e,"pointer")},cu.contextmenu=function(e){return xu(e)};var ju=xs?5e3:-1;function Du(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout((function(){return Au(e)}),t))}function Eu(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=function(){var e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function Au(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!(xs&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),Eu(e),t||e.docView&&e.docView.dirty){var n=jl(e);return n&&!n.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(n)):e.updateState(e.state),!0}return!1}}du.compositionstart=du.compositionupdate=function(e){if(!e.composing){e.domObserver.flush();var t=e.state,n=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some((function(e){return!1===e.type.spec.inclusive}))))e.markCursor=e.state.storedMarks||n.marks(),Au(e,!0),e.markCursor=null;else if(Au(e),ms&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length)for(var r=e.domSelection(),o=r.focusNode,i=r.focusOffset;o&&1==o.nodeType&&0!=i;){var a=i<0?o.lastChild:o.childNodes[i-1];if(!a)break;if(3==a.nodeType){r.collapse(a,a.nodeValue.length);break}o=a,i=-1}e.input.composing=!0}Du(e,ju)},du.compositionend=function(e,t){e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,Du(e,20))};var Mu=ps&&hs<15||ws&&Ss<604;function Tu(e,t,n,r){var o=eu(e,t,n,e.input.shiftKey,e.state.selection.$from);if(e.someProp("handlePaste",(function(t){return t(e,r,o||v.Slice.empty)})))return!0;if(!o)return!1;var i=function(e){return 0==e.openStart&&0==e.openEnd&&1==e.content.childCount?e.content.firstChild:null}(o),a=i?e.state.tr.replaceSelectionWith(i,e.input.shiftKey):e.state.tr.replaceSelection(o);return e.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}cu.copy=du.cut=function(e,t){var n=t,r=e.state.selection,o="cut"==n.type;if(!r.empty){var i=Mu?null:n.clipboardData,a=Ql(e,r.content()),s=a.dom,l=a.text;i?(n.preventDefault(),i.clearData(),i.setData("text/html",s.innerHTML),i.setData("text/plain",l)):function(e,t){if(e.dom.parentNode){var n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";var r=getSelection(),o=document.createRange();o.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout((function(){n.parentNode&&n.parentNode.removeChild(n),e.focus()}),50)}}(e,s),o&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))}},du.paste=function(e,t){var n=t;if(!e.composing||xs){var r=Mu?null:n.clipboardData;r&&Tu(e,r.getData("text/plain"),r.getData("text/html"),n)?n.preventDefault():function(e,t){if(e.dom.parentNode){var n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus(),setTimeout((function(){e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?Tu(e,r.value,null,t):Tu(e,r.textContent,r.innerHTML,t)}),50)}}(e,n)}};var Lu=Object(d.a)((function e(t,n){Object(c.a)(this,e),this.slice=t,this.move=n})),Nu=ks?"altKey":"ctrlKey";for(var Pu in cu.dragstart=function(e,t){var n=t,r=e.input.mouseDown;if(r&&r.done(),n.dataTransfer){var o=e.state.selection,i=o.empty?null:e.posAtCoords(vu(n));if(i&&i.pos>=o.from&&i.pos<=(o instanceof p.NodeSelection?o.to-1:o.to));else if(r&&r.mightDrag)e.dispatch(e.state.tr.setSelection(p.NodeSelection.create(e.state.doc,r.mightDrag.pos)));else if(n.target&&1==n.target.nodeType){var a=e.docView.nearestDesc(n.target,!0);a&&a.node.type.spec.draggable&&a!=e.docView&&e.dispatch(e.state.tr.setSelection(p.NodeSelection.create(e.state.doc,a.posBefore)))}var s=e.state.selection.content(),l=Ql(e,s),u=l.dom,c=l.text;n.dataTransfer.clearData(),n.dataTransfer.setData(Mu?"Text":"text/html",u.innerHTML),n.dataTransfer.effectAllowed="copyMove",Mu||n.dataTransfer.setData("text/plain",c),e.dragging=new Lu(s,!n[Nu])}},cu.dragend=function(e){var t=e.dragging;window.setTimeout((function(){e.dragging==t&&(e.dragging=null)}),50)},du.dragover=du.dragenter=function(e,t){return t.preventDefault()},du.drop=function(e,t){var n=t,r=e.dragging;if(e.dragging=null,n.dataTransfer){var o=e.posAtCoords(vu(n));if(o){var i=e.state.doc.resolve(o.pos);if(i){var a=r&&r.slice;a?e.someProp("transformPasted",(function(e){a=e(a)})):a=eu(e,n.dataTransfer.getData(Mu?"Text":"text/plain"),Mu?null:n.dataTransfer.getData("text/html"),!1,i);var s=!(!r||n[Nu]);if(e.someProp("handleDrop",(function(t){return t(e,n,a||v.Slice.empty,s)})))n.preventDefault();else if(a){n.preventDefault();var l=a?Object(g.h)(e.state.doc,i.pos,a):i.pos;null==l&&(l=i.pos);var u=e.state.tr;s&&u.deleteSelection();var c=u.mapping.map(l),d=0==a.openStart&&0==a.openEnd&&1==a.content.childCount,f=u.doc;if(d?u.replaceRangeWith(c,c,a.content.firstChild):u.replaceRange(c,c,a),!u.doc.eq(f)){var h=u.doc.resolve(c);if(d&&p.NodeSelection.isSelectable(a.content.firstChild)&&h.nodeAfter&&h.nodeAfter.sameMarkup(a.content.firstChild))u.setSelection(new p.NodeSelection(h));else{var m=u.mapping.map(l);u.mapping.maps[u.mapping.maps.length-1].forEach((function(e,t,n,r){return m=r})),u.setSelection(Fl(e,h,u.doc.resolve(m)))}e.focus(),e.dispatch(u.setMeta("uiEvent","drop"))}}}}}},cu.focus=function(e){e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout((function(){e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelection())&&El(e)}),20))},cu.blur=function(e,t){var n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)},cu.beforeinput=function(e,t){if(gs&&xs&&"deleteContentBackward"==t.inputType){e.domObserver.flushSoon();var n=e.input.domChangeCount;setTimeout((function(){if(e.input.domChangeCount==n&&(e.dom.blur(),e.focus(),!e.someProp("handleKeyDown",(function(t){return t(e,Hs(8,"Backspace"))})))){var t=e.state.selection.$cursor;t&&t.pos>0&&e.dispatch(e.state.tr.delete(t.pos-1,t.pos).scrollIntoView())}}),50)}},du)cu[Pu]=du[Pu];function Ru(e,t){if(e==t)return!0;for(var n in e)if(e[n]!==t[n])return!1;for(var r in t)if(!(r in e))return!1;return!0}var Hu=function(){function e(t,n){Object(c.a)(this,e),this.toDOM=t,this.spec=n||_u,this.side=this.spec.side||0}return Object(d.a)(e,[{key:"map",value:function(e,t,n,r){var o=e.mapResult(t.from+r,this.side<0?-1:1),i=o.pos;return o.deleted?null:new zu(i-n,i-n,this)}},{key:"valid",value:function(){return!0}},{key:"eq",value:function(t){return this==t||t instanceof e&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&Ru(this.spec,t.spec))}},{key:"destroy",value:function(e){this.spec.destroy&&this.spec.destroy(e)}}]),e}(),Fu=function(){function e(t,n){Object(c.a)(this,e),this.attrs=t,this.spec=n||_u}return Object(d.a)(e,[{key:"map",value:function(e,t,n,r){var o=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-n,i=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-n;return o>=i?null:new zu(o,i,this)}},{key:"valid",value:function(e,t){return t.from<t.to}},{key:"eq",value:function(t){return this==t||t instanceof e&&Ru(this.attrs,t.attrs)&&Ru(this.spec,t.spec)}},{key:"destroy",value:function(){}}],[{key:"is",value:function(t){return t.type instanceof e}}]),e}(),Vu=function(){function e(t,n){Object(c.a)(this,e),this.attrs=t,this.spec=n||_u}return Object(d.a)(e,[{key:"map",value:function(e,t,n,r){var o=e.mapResult(t.from+r,1);if(o.deleted)return null;var i=e.mapResult(t.to+r,-1);return i.deleted||i.pos<=o.pos?null:new zu(o.pos-n,i.pos-n,this)}},{key:"valid",value:function(e,t){var n,r=e.content.findIndex(t.from),o=r.index,i=r.offset;return i==t.from&&!(n=e.child(o)).isText&&i+n.nodeSize==t.to}},{key:"eq",value:function(t){return this==t||t instanceof e&&Ru(this.attrs,t.attrs)&&Ru(this.spec,t.spec)}},{key:"destroy",value:function(){}}]),e}(),zu=function(){function e(t,n,r){Object(c.a)(this,e),this.from=t,this.to=n,this.type=r}return Object(d.a)(e,[{key:"copy",value:function(t,n){return new e(t,n,this.type)}},{key:"eq",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}},{key:"map",value:function(e,t,n){return this.type.map(e,this,t,n)}},{key:"spec",get:function(){return this.type.spec}},{key:"inline",get:function(){return this.type instanceof Fu}}],[{key:"widget",value:function(t,n,r){return new e(t,t,new Hu(n,r))}},{key:"inline",value:function(t,n,r,o){return new e(t,n,new Fu(r,o))}},{key:"node",value:function(t,n,r,o){return new e(t,n,new Vu(r,o))}}]),e}(),Bu=[],_u={},Iu=function(){function e(t,n){Object(c.a)(this,e),this.local=t.length?t:Bu,this.children=n.length?n:Bu}return Object(d.a)(e,[{key:"find",value:function(e,t,n){var r=[];return this.findInner(null==e?0:e,null==t?1e9:t,r,0,n),r}},{key:"findInner",value:function(e,t,n,r,o){for(var i=0;i<this.local.length;i++){var a=this.local[i];a.from<=t&&a.to>=e&&(!o||o(a.spec))&&n.push(a.copy(a.from+r,a.to+r))}for(var s=0;s<this.children.length;s+=3)if(this.children[s]<t&&this.children[s+1]>e){var l=this.children[s]+1;this.children[s+2].findInner(e-l,t-l,n,r+l,o)}}},{key:"map",value:function(e,t,n){return this==$u||0==e.maps.length?this:this.mapInner(e,t,0,0,n||_u)}},{key:"mapInner",value:function(t,n,r,o,i){for(var a,s=0;s<this.local.length;s++){var l=this.local[s].map(t,r,o);l&&l.type.valid(n,l)?(a||(a=[])).push(l):i.onRemove&&i.onRemove(this.local[s].spec)}return this.children.length?function(e,t,n,r,o,i,a){for(var s=e.slice(),l=function(e,t,n,r){for(var a=0;a<s.length;a+=3){var l=s[a+1],u=void 0;if(!(l<0||e>l+i)){var c=s[a]+i;t>=c?s[a+1]=e<=c?-2:-1:n>=o&&(u=r-n-(t-e))&&(s[a]+=u,s[a+1]+=u)}}},u=0;u<n.maps.length;u++)n.maps[u].forEach(l);for(var c=!1,d=0;d<s.length;d+=3)if(s[d+1]<0){if(-2==s[d+1]){c=!0,s[d+1]=-1;continue}var f=n.map(e[d]+i),p=f-o;if(p<0||p>=r.content.size){c=!0;continue}var h=n.map(e[d+1]+i,-1)-o,m=r.content.findIndex(p),v=m.index,g=m.offset,y=r.maybeChild(v);if(y&&g==p&&g+y.nodeSize==h){var b=s[d+2].mapInner(n,y,f+1,e[d]+i+1,a);b!=$u?(s[d]=p,s[d+1]=h,s[d+2]=b):(s[d+1]=-2,c=!0)}else c=!0}if(c){var w=function(e,t,n,r,o,i,a){function s(e,t){for(var i=0;i<e.local.length;i++){var l=e.local[i].map(r,o,t);l?n.push(l):a.onRemove&&a.onRemove(e.local[i].spec)}for(var u=0;u<e.children.length;u+=3)s(e.children[u+2],e.children[u]+t+1)}for(var l=0;l<e.length;l+=3)-1==e[l+1]&&s(e[l+2],t[l]+i+1);return n}(s,e,t,n,o,i,a),k=Gu(w,r,0,a);t=k.local;for(var x=0;x<s.length;x+=3)s[x+1]<0&&(s.splice(x,3),x-=3);for(var O=0,S=0;O<k.children.length;O+=3){for(var C=k.children[O];S<s.length&&s[S]<C;)S+=3;s.splice(S,0,k.children[O],k.children[O+1],k.children[O+2])}}return new Iu(t.sort(Ju),s)}(this.children,a||[],t,n,r,o,i):a?new e(a.sort(Ju),Bu):$u}},{key:"add",value:function(t,n){return n.length?this==$u?e.create(t,n):this.addInner(t,n,0):this}},{key:"addInner",value:function(t,n,r){var o,i=this,a=0;t.forEach((function(e,t){var s,l=t+r;if(s=Uu(n,e,l)){for(o||(o=i.children.slice());a<o.length&&o[a]<t;)a+=3;o[a]==t?o[a+2]=o[a+2].addInner(e,s,l+1):o.splice(a,0,t,t+e.nodeSize,Gu(s,e,l+1,_u)),a+=3}}));for(var s=Wu(a?Ku(n):n,-r),l=0;l<s.length;l++)s[l].type.valid(t,s[l])||s.splice(l--,1);return new e(s.length?this.local.concat(s).sort(Ju):this.local,o||this.children)}},{key:"remove",value:function(e){return 0==e.length||this==$u?this:this.removeInner(e,0)}},{key:"removeInner",value:function(t,n){for(var r=this.children,o=this.local,i=0;i<r.length;i+=3){for(var a,s=void 0,l=r[i]+n,u=r[i+1]+n,c=0;c<t.length;c++)(a=t[c])&&a.from>l&&a.to<u&&(t[c]=null,(s||(s=[])).push(a));if(s){r==this.children&&(r=this.children.slice());var d=r[i+2].removeInner(s,l+1);d!=$u?r[i+2]=d:(r.splice(i,3),i-=3)}}if(o.length)for(var f,p=0;p<t.length;p++)if(f=t[p])for(var h=0;h<o.length;h++)o[h].eq(f,n)&&(o==this.local&&(o=this.local.slice()),o.splice(h--,1));return r==this.children&&o==this.local?this:o.length||r.length?new e(o,r):$u}},{key:"forChild",value:function(t,n){if(this==$u)return this;if(n.isLeaf)return e.empty;for(var r,o,i=0;i<this.children.length;i+=3)if(this.children[i]>=t){this.children[i]==t&&(r=this.children[i+2]);break}for(var a=t+1,s=a+n.content.size,l=0;l<this.local.length;l++){var u=this.local[l];if(u.from<s&&u.to>a&&u.type instanceof Fu){var c=Math.max(a,u.from)-a,d=Math.min(s,u.to)-a;c<d&&(o||(o=[])).push(u.copy(c,d))}}if(o){var f=new e(o.sort(Ju),Bu);return r?new qu([f,r]):f}return r||$u}},{key:"eq",value:function(t){if(this==t)return!0;if(!(t instanceof e)||this.local.length!=t.local.length||this.children.length!=t.children.length)return!1;for(var n=0;n<this.local.length;n++)if(!this.local[n].eq(t.local[n]))return!1;for(var r=0;r<this.children.length;r+=3)if(this.children[r]!=t.children[r]||this.children[r+1]!=t.children[r+1]||!this.children[r+2].eq(t.children[r+2]))return!1;return!0}},{key:"locals",value:function(e){return Yu(this.localsInner(e))}},{key:"localsInner",value:function(e){if(this==$u)return Bu;if(e.inlineContent||!this.local.some(Fu.is))return this.local;for(var t=[],n=0;n<this.local.length;n++)this.local[n].type instanceof Fu||t.push(this.local[n]);return t}}],[{key:"create",value:function(e,t){return t.length?Gu(t,e,0,_u):$u}}]),e}();Iu.empty=new Iu([],[]),Iu.removeOverlap=Yu;var $u=Iu.empty,qu=function(){function e(t){Object(c.a)(this,e),this.members=t}return Object(d.a)(e,[{key:"map",value:function(t,n){var r=this.members.map((function(e){return e.map(t,n,_u)}));return e.from(r)}},{key:"forChild",value:function(t,n){if(n.isLeaf)return Iu.empty;for(var r=[],o=0;o<this.members.length;o++){var i=this.members[o].forChild(t,n);i!=$u&&(i instanceof e?r=r.concat(i.members):r.push(i))}return e.from(r)}},{key:"eq",value:function(t){if(!(t instanceof e)||t.members.length!=this.members.length)return!1;for(var n=0;n<this.members.length;n++)if(!this.members[n].eq(t.members[n]))return!1;return!0}},{key:"locals",value:function(e){for(var t,n=!0,r=0;r<this.members.length;r++){var o=this.members[r].localsInner(e);if(o.length)if(t){n&&(t=t.slice(),n=!1);for(var i=0;i<o.length;i++)t.push(o[i])}else t=o}return t?Yu(n?t:t.sort(Ju)):Bu}}],[{key:"from",value:function(t){switch(t.length){case 0:return $u;case 1:return t[0];default:return new e(t)}}}]),e}();function Wu(e,t){if(!t||!e.length)return e;for(var n=[],r=0;r<e.length;r++){var o=e[r];n.push(new zu(o.from+t,o.to+t,o.type))}return n}function Uu(e,t,n){if(t.isLeaf)return null;for(var r,o=n+t.nodeSize,i=null,a=0;a<e.length;a++)(r=e[a])&&r.from>n&&r.to<o&&((i||(i=[])).push(r),e[a]=null);return i}function Ku(e){for(var t=[],n=0;n<e.length;n++)null!=e[n]&&t.push(e[n]);return t}function Gu(e,t,n,r){var o=[],i=!1;t.forEach((function(t,a){var s=Uu(e,t,a+n);if(s){i=!0;var l=Gu(s,t,n+a+1,r);l!=$u&&o.push(a,a+t.nodeSize,l)}}));for(var a=Wu(i?Ku(e):e,-n).sort(Ju),s=0;s<a.length;s++)a[s].type.valid(t,a[s])||(r.onRemove&&r.onRemove(a[s].spec),a.splice(s--,1));return a.length||o.length?new Iu(a,o):$u}function Ju(e,t){return e.from-t.from||e.to-t.to}function Yu(e){for(var t=e,n=0;n<t.length-1;n++){var r=t[n];if(r.from!=r.to)for(var o=n+1;o<t.length;o++){var i=t[o];if(i.from!=r.from){i.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,i.from),Zu(t,o,r.copy(i.from,r.to)));break}i.to!=r.to&&(t==e&&(t=e.slice()),t[o]=i.copy(i.from,r.to),Zu(t,o+1,i.copy(r.to,i.to)))}}return t}function Zu(e,t,n){for(;t<e.length&&Ju(n,e[t])>0;)t++;e.splice(t,0,n)}function Xu(e){var t=[];return e.someProp("decorations",(function(n){var r=n(e.state);r&&r!=$u&&t.push(r)})),e.cursorWrapper&&t.push(Iu.create(e.state.doc,[e.cursorWrapper.deco])),qu.from(t)}var Qu={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},ec=ps&&hs<=11,tc=function(){function e(){Object(c.a)(this,e),this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}return Object(d.a)(e,[{key:"set",value:function(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}},{key:"clear",value:function(){this.anchorNode=this.focusNode=null}},{key:"eq",value:function(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}]),e}(),nc=function(){function e(t,n){var r=this;Object(c.a)(this,e),this.view=t,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new tc,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.observer=window.MutationObserver&&new window.MutationObserver((function(e){for(var t=0;t<e.length;t++)r.queue.push(e[t]);ps&&hs<=11&&e.some((function(e){return"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length}))?r.flushSoon():r.flush()})),ec&&(this.onCharData=function(e){r.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),r.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}return Object(d.a)(e,[{key:"flushSoon",value:function(){var e=this;this.flushingSoon<0&&(this.flushingSoon=window.setTimeout((function(){e.flushingSoon=-1,e.flush()}),20))}},{key:"forceFlush",value:function(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}},{key:"start",value:function(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,Qu)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}},{key:"stop",value:function(){var e=this;if(this.observer){var t=this.observer.takeRecords();if(t.length){for(var n=0;n<t.length;n++)this.queue.push(t[n]);window.setTimeout((function(){return e.flush()}),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}},{key:"connectSelection",value:function(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}},{key:"disconnectSelection",value:function(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}},{key:"suppressSelectionUpdates",value:function(){var e=this;this.suppressingSelectionUpdates=!0,setTimeout((function(){return e.suppressingSelectionUpdates=!1}),50)}},{key:"onSelectionChange",value:function(){if(Vl(this.view)){if(this.suppressingSelectionUpdates)return El(this.view);if(ps&&hs<=11&&!this.view.state.selection.empty){var e=this.view.domSelection();if(e.focusNode&&As(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}},{key:"setCurSelection",value:function(){this.currentSelection.set(this.view.domSelection())}},{key:"ignoreSelectionChange",value:function(e){if(0==e.rangeCount)return!0;var t=e.getRangeAt(0).commonAncestorContainer,n=this.view.docView.nearestDesc(t);return n&&n.ignoreMutation({type:"selection",target:3==t.nodeType?t.parentNode:t})?(this.setCurSelection(),!0):void 0}},{key:"flush",value:function(){if(this.view.docView&&!(this.flushingSoon>-1)){var e=this.observer?this.observer.takeRecords():[];this.queue.length&&(e=this.queue.concat(e),this.queue.length=0);var t=this.view.domSelection(),n=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(t)&&Vl(this.view)&&!this.ignoreSelectionChange(t),r=-1,o=-1,i=!1,a=[];if(this.view.editable)for(var s=0;s<e.length;s++){var l=this.registerMutation(e[s],a);l&&(r=r<0?l.from:Math.min(l.from,r),o=o<0?l.to:Math.max(l.to,o),l.typeOver&&(i=!0))}if(ms&&a.length>1){var u=a.filter((function(e){return"BR"==e.nodeName}));if(2==u.length){var c=u[0],d=u[1];c.parentNode&&c.parentNode.parentNode==d.parentNode?d.remove():c.remove()}}(r>-1||n)&&(r>-1&&(this.view.docView.markDirty(r,o),function(e){if(rc)return;rc=!0,"normal"==getComputedStyle(e.dom).whiteSpace&&console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package.")}(this.view)),this.handleDOMChange(r,o,i,a),this.view.docView&&this.view.docView.dirty?this.view.updateState(this.view.state):this.currentSelection.eq(t)||El(this.view),this.currentSelection.set(t))}}},{key:"registerMutation",value:function(e,t){if(t.indexOf(e.target)>-1)return null;var n=this.view.docView.nearestDesc(e.target);if("attributes"==e.type&&(n==this.view.docView||"contenteditable"==e.attributeName||"style"==e.attributeName&&!e.oldValue&&!e.target.getAttribute("style")))return null;if(!n||n.ignoreMutation(e))return null;if("childList"==e.type){for(var r=0;r<e.addedNodes.length;r++)t.push(e.addedNodes[r]);if(n.contentDOM&&n.contentDOM!=n.dom&&!n.contentDOM.contains(e.target))return{from:n.posBefore,to:n.posAfter};var o=e.previousSibling,i=e.nextSibling;if(ps&&hs<=11&&e.addedNodes.length)for(var a=0;a<e.addedNodes.length;a++){var s=e.addedNodes[a],l=s.previousSibling,u=s.nextSibling;(!l||Array.prototype.indexOf.call(e.addedNodes,l)<0)&&(o=l),(!u||Array.prototype.indexOf.call(e.addedNodes,u)<0)&&(i=u)}var c=o&&o.parentNode==e.target?Cs(o)+1:0,d=n.localPosFromDOM(e.target,c,-1),f=i&&i.parentNode==e.target?Cs(i):e.target.childNodes.length;return{from:d,to:n.localPosFromDOM(e.target,f,1)}}return"attributes"==e.type?{from:n.posAtStart-n.border,to:n.posAtEnd+n.border}:{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}}}]),e}(),rc=!1;function oc(e){var t=e.pmViewDesc;if(t)return t.parseRule();if("BR"==e.nodeName&&e.parentNode){if(bs&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){var n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}if(e.parentNode.lastChild==e||bs&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if("IMG"==e.nodeName&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}function ic(e,t,n,r,o){if(t<0){var i=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,a=jl(e,i);if(a&&!e.state.selection.eq(a)){var s=e.state.tr.setSelection(a);"pointer"==i?s.setMeta("pointer",!0):"key"==i&&s.scrollIntoView(),e.dispatch(s)}}else{var l=e.state.doc.resolve(t),u=l.sharedDepth(n);t=l.before(u+1),n=e.state.doc.resolve(n).after(u+1);var c=e.state.selection,d=function(e,t,n){var r,o=e.docView.parseRange(t,n),i=o.node,a=o.fromOffset,s=o.toOffset,l=o.from,u=o.to,c=e.domSelection(),d=c.anchorNode;if(d&&e.dom.contains(1==d.nodeType?d:d.parentNode)&&(r=[{node:d,offset:c.anchorOffset}],Rs(c)||r.push({node:c.focusNode,offset:c.focusOffset})),gs&&8===e.input.lastKeyCode)for(var f=s;f>a;f--){var p=i.childNodes[f-1],h=p.pmViewDesc;if("BR"==p.nodeName&&!h){s=f;break}if(!h||h.size)break}var m=e.state.doc,g=e.someProp("domParser")||v.DOMParser.fromSchema(e.state.schema),y=m.resolve(l),b=null,w=g.parse(i,{topNode:y.parent,topMatch:y.parent.contentMatchAt(y.index()),topOpen:!0,from:a,to:s,preserveWhitespace:"pre"!=y.parent.type.whitespace||"full",findPositions:r,ruleFromNode:oc,context:y});if(r&&null!=r[0].pos){var k=r[0].pos,x=r[1]&&r[1].pos;null==x&&(x=k),b={anchor:k+l,head:x+l}}return{doc:w,sel:b,from:l,to:u}}(e,t,n);if(gs&&e.cursorWrapper&&d.sel&&d.sel.anchor==e.cursorWrapper.deco.from){var f=e.cursorWrapper.deco.type.toDOM.nextSibling,h=f&&f.nodeValue?f.nodeValue.length:1;d.sel={anchor:d.sel.anchor+h,head:d.sel.anchor+h}}var m,g,y=e.state.doc,b=y.slice(d.from,d.to);8===e.input.lastKeyCode&&Date.now()-100<e.input.lastKeyCodeTime?(m=e.state.selection.to,g="end"):(m=e.state.selection.from,g="start"),e.input.lastKeyCode=null;var w=function(e,t,n,r,o){var i=e.findDiffStart(t,n);if(null==i)return null;var a=e.findDiffEnd(t,n+e.size,n+t.size),s=a.a,l=a.b;if("end"==o){r-=s+Math.max(0,i-Math.min(s,l))-i}if(s<i&&e.size<t.size){l=(i-=r<=i&&r>=s?i-r:0)+(l-s),s=i}else if(l<i){s=(i-=r<=i&&r>=l?i-r:0)+(s-l),l=i}return{start:i,endA:s,endB:l}}(b.content,d.doc.content,d.from,m,g);if((ws&&e.input.lastIOSEnter>Date.now()-225||xs)&&o.some((function(e){return"DIV"==e.nodeName||"P"==e.nodeName}))&&(!w||w.endA>=w.endB)&&e.someProp("handleKeyDown",(function(t){return t(e,Hs(13,"Enter"))})))e.input.lastIOSEnter=0;else{if(!w){if(!(r&&c instanceof p.TextSelection&&!c.empty&&c.$head.sameParent(c.$anchor))||e.composing||d.sel&&d.sel.anchor!=d.sel.head){if(d.sel){var k=ac(e,e.state.doc,d.sel);k&&!k.eq(e.state.selection)&&e.dispatch(e.state.tr.setSelection(k))}return}w={start:c.from,endA:c.to,endB:c.to}}e.input.domChangeCount++,e.state.selection.from<e.state.selection.to&&w.start==w.endB&&e.state.selection instanceof p.TextSelection&&(w.start>e.state.selection.from&&w.start<=e.state.selection.from+2&&e.state.selection.from>=d.from?w.start=e.state.selection.from:w.endA<e.state.selection.to&&w.endA>=e.state.selection.to-2&&e.state.selection.to<=d.to&&(w.endB+=e.state.selection.to-w.endA,w.endA=e.state.selection.to)),ps&&hs<=11&&w.endB==w.start+1&&w.endA==w.start&&w.start>d.from&&" \xa0"==d.doc.textBetween(w.start-d.from-1,w.start-d.from+1)&&(w.start--,w.endA--,w.endB--);var x,O=d.doc.resolveNoCache(w.start-d.from),S=d.doc.resolveNoCache(w.endB-d.from),C=y.resolve(w.start),j=O.sameParent(S)&&O.parent.inlineContent&&C.end()>=w.endA;if((ws&&e.input.lastIOSEnter>Date.now()-225&&(!j||o.some((function(e){return"DIV"==e.nodeName||"P"==e.nodeName})))||!j&&O.pos<d.doc.content.size&&(x=p.Selection.findFrom(d.doc.resolve(O.pos+1),1,!0))&&x.head==S.pos)&&e.someProp("handleKeyDown",(function(t){return t(e,Hs(13,"Enter"))})))e.input.lastIOSEnter=0;else if(e.state.selection.anchor>w.start&&function(e,t,n,r,o){if(!r.parent.isTextblock||n-t<=o.pos-r.pos||sc(r,!0,!1)<o.pos)return!1;var i=e.resolve(t);if(i.parentOffset<i.parent.content.size||!i.parent.isTextblock)return!1;var a=e.resolve(sc(i,!0,!0));return!(!a.parent.isTextblock||a.pos>n||sc(a,!0,!1)<n)&&r.parent.content.cut(r.parentOffset).eq(a.parent.content)}(y,w.start,w.endA,O,S)&&e.someProp("handleKeyDown",(function(t){return t(e,Hs(8,"Backspace"))})))xs&&gs&&e.domObserver.suppressSelectionUpdates();else{gs&&xs&&w.endB==w.start&&(e.input.lastAndroidDelete=Date.now()),xs&&!j&&O.start()!=S.start()&&0==S.parentOffset&&O.depth==S.depth&&d.sel&&d.sel.anchor==d.sel.head&&d.sel.head==w.endA&&(w.endB-=2,S=d.doc.resolveNoCache(w.endB-d.from),setTimeout((function(){e.someProp("handleKeyDown",(function(t){return t(e,Hs(13,"Enter"))}))}),20));var D,E,A,M=w.start,T=w.endA;if(j)if(O.pos==S.pos)ps&&hs<=11&&0==O.parentOffset&&(e.domObserver.suppressSelectionUpdates(),setTimeout((function(){return El(e)}),20)),D=e.state.tr.delete(M,T),E=y.resolve(w.start).marksAcross(y.resolve(w.endA));else if(w.endA==w.endB&&(A=function(e,t){for(var n,r,o,i=e.firstChild.marks,a=t.firstChild.marks,s=i,l=a,u=0;u<a.length;u++)s=a[u].removeFromSet(s);for(var c=0;c<i.length;c++)l=i[c].removeFromSet(l);if(1==s.length&&0==l.length)r=s[0],n="add",o=function(e){return e.mark(r.addToSet(e.marks))};else{if(0!=s.length||1!=l.length)return null;r=l[0],n="remove",o=function(e){return e.mark(r.removeFromSet(e.marks))}}for(var d=[],f=0;f<t.childCount;f++)d.push(o(t.child(f)));if(v.Fragment.from(d).eq(e))return{mark:r,type:n}}(O.parent.content.cut(O.parentOffset,S.parentOffset),C.parent.content.cut(C.parentOffset,w.endA-C.start()))))D=e.state.tr,"add"==A.type?D.addMark(M,T,A.mark):D.removeMark(M,T,A.mark);else if(O.parent.child(O.index()).isText&&O.index()==S.index()-(S.textOffset?0:1)){var L=O.parent.textBetween(O.parentOffset,S.parentOffset);if(e.someProp("handleTextInput",(function(t){return t(e,M,T,L)})))return;D=e.state.tr.insertText(L,M,T)}if(D||(D=e.state.tr.replace(M,T,d.doc.slice(w.start-d.from,w.endB-d.from))),d.sel){var N=ac(e,D.doc,d.sel);N&&!(gs&&xs&&e.composing&&N.empty&&(w.start!=w.endB||e.input.lastAndroidDelete<Date.now()-100)&&(N.head==M||N.head==D.mapping.map(T)-1)||ps&&N.empty&&N.head==M)&&D.setSelection(N)}E&&D.ensureMarks(E),e.dispatch(D.scrollIntoView())}}}}function ac(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:Fl(e,t.resolve(n.anchor),t.resolve(n.head))}function sc(e,t,n){for(var r=e.depth,o=t?e.end():e.pos;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,o++,t=!1;if(n)for(var i=e.node(r).maybeChild(e.indexAfter(r));i&&!i.isLeaf;)i=i.firstChild,o++;return o}var lc=Ql,uc=function(){function e(t,n){var r=this;Object(c.a)(this,e),this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new fu,this.prevDirectPlugins=[],this.pluginViews=[],this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(hc),this.dispatch=this.dispatch.bind(this),this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):"function"==typeof t?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=fc(this),dc(this),this.nodeViews=pc(this),this.docView=cl(this.state.doc,cc(this),Xu(this),this.dom,this),this.domObserver=new nc(this,(function(e,t,n,o){return ic(r,e,t,n,o)})),this.domObserver.start(),function(e){var t=function(t){var n=cu[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=function(t){!function(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(var n=t.target;n!=e.dom;n=n.parentNode)if(!n||11==n.nodeType||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}(e,t)||mu(e,t)||!e.editable&&t.type in du||n(e,t)})};for(var n in cu)t(n);bs&&e.dom.addEventListener("input",(function(){return null})),hu(e)}(this),this.updatePluginViews()}return Object(d.a)(e,[{key:"composing",get:function(){return this.input.composing}},{key:"props",get:function(){if(this._props.state!=this.state){var e=this._props;for(var t in this._props={},e)this._props[t]=e[t];this._props.state=this.state}return this._props}},{key:"update",value:function(e){e.handleDOMEvents!=this._props.handleDOMEvents&&hu(this),this._props=e,e.plugins&&(e.plugins.forEach(hc),this.directPlugins=e.plugins),this.updateStateInner(e.state,!0)}},{key:"setProps",value:function(e){var t={};for(var n in this._props)t[n]=this._props[n];for(var r in t.state=this.state,e)t[r]=e[r];this.update(t)}},{key:"updateState",value:function(e){this.updateStateInner(e,this.state.plugins!=e.plugins)}},{key:"updateStateInner",value:function(e,t){var n=this,r=this.state,o=!1,i=!1;if(e.storedMarks&&this.composing&&(Eu(this),i=!0),this.state=e,t){var a=pc(this);(function(e,t){var n=0,r=0;for(var o in e){if(e[o]!=t[o])return!0;n++}for(var i in t)r++;return n!=r})(a,this.nodeViews)&&(this.nodeViews=a,o=!0),hu(this)}this.editable=fc(this),dc(this);var s=Xu(this),l=cc(this),u=t?"reset":e.scrollToSelection>r.scrollToSelection?"to selection":"preserve",c=o||!this.docView.matchesNode(e.doc,l,s);!c&&e.selection.eq(r.selection)||(i=!0);var d="preserve"==u&&i&&null==this.dom.style.overflowAnchor&&function(e){for(var t,n,r=e.dom.getBoundingClientRect(),o=Math.max(0,r.top),i=(r.left+r.right)/2,a=o+1;a<Math.min(innerHeight,r.bottom);a+=5){var s=e.root.elementFromPoint(i,a);if(s&&s!=e.dom&&e.dom.contains(s)){var l=s.getBoundingClientRect();if(l.top>=o-20){t=s,n=l.top;break}}}return{refDOM:t,refTop:n,stack:_s(e.dom)}}(this);if(i){this.domObserver.stop();var f=c&&(ps||gs)&&!this.composing&&!r.selection.empty&&!e.selection.empty&&function(e,t){var n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}(r.selection,e.selection);if(c){var h=gs?this.trackWrites=this.domSelection().focusNode:null;!o&&this.docView.update(e.doc,l,s,this)||(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=cl(e.doc,l,s,this.dom,this)),h&&!this.trackWrites&&(f=!0)}f||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelection())&&function(e){var t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelection();return As(t.node,t.offset,n.anchorNode,n.anchorOffset)}(this))?El(this,f):(Rl(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}if(this.updatePluginViews(r),"reset"==u)this.dom.scrollTop=0;else if("to selection"==u){var m=this.domSelection().focusNode;if(this.someProp("handleScrollToSelection",(function(e){return e(n)})));else if(e.selection instanceof p.NodeSelection){var v=this.docView.domAfterPos(e.selection.from);1==v.nodeType&&Bs(this,v.getBoundingClientRect(),m)}else Bs(this,this.coordsAtPos(e.selection.head,1),m)}else d&&function(e){var t=e.refDOM,n=e.refTop,r=e.stack,o=t?t.getBoundingClientRect().top:0;Is(r,0==o?0:o-n)}(d)}},{key:"destroyPluginViews",value:function(){for(var e;e=this.pluginViews.pop();)e.destroy&&e.destroy()}},{key:"updatePluginViews",value:function(e){if(e&&e.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(var t=0;t<this.pluginViews.length;t++){var n=this.pluginViews[t];n.update&&n.update(this,e)}else{this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(var r=0;r<this.directPlugins.length;r++){var o=this.directPlugins[r];o.spec.view&&this.pluginViews.push(o.spec.view(this))}for(var i=0;i<this.state.plugins.length;i++){var a=this.state.plugins[i];a.spec.view&&this.pluginViews.push(a.spec.view(this))}}}},{key:"someProp",value:function(e,t){var n,r=this._props&&this._props[e];if(null!=r&&(n=t?t(r):r))return n;for(var o=0;o<this.directPlugins.length;o++){var i=this.directPlugins[o].props[e];if(null!=i&&(n=t?t(i):i))return n}var a=this.state.plugins;if(a)for(var s=0;s<a.length;s++){var l=a[s].props[e];if(null!=l&&(n=t?t(l):l))return n}}},{key:"hasFocus",value:function(){return this.root.activeElement==this.dom}},{key:"focus",value:function(){this.domObserver.stop(),this.editable&&function(e){if(e.setActive)return e.setActive();if($s)return e.focus($s);var t=_s(e);e.focus(null==$s?{get preventScroll(){return $s={preventScroll:!0},!0}}:void 0),$s||($s=!1,Is(t,0))}(this.dom),El(this),this.domObserver.start()}},{key:"root",get:function(){var e=this,t=this._root;if(null==t)for(var n=function(t){if(9==t.nodeType||11==t.nodeType&&t.host)return t.getSelection||(Object.getPrototypeOf(t).getSelection=function(){return t.ownerDocument.getSelection()}),{v:e._root=t}},r=this.dom.parentNode;r;r=r.parentNode){var o=n(r);if("object"===typeof o)return o.v}return t||document}},{key:"posAtCoords",value:function(e){return Ks(this,e)}},{key:"coordsAtPos",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Ys(this,e,t)}},{key:"domAtPos",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.docView.domFromPos(e,t)}},{key:"nodeDOM",value:function(e){var t=this.docView.descAt(e);return t?t.nodeDOM:null}},{key:"posAtDOM",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,r=this.docView.posFromDOM(e,t,n);if(null==r)throw new RangeError("DOM position not inside the editor");return r}},{key:"endOfTextblock",value:function(e,t){return ol(this,t||this.state,e)}},{key:"destroy",value:function(){this.docView&&(!function(e){for(var t in e.domObserver.stop(),e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Xu(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)}},{key:"isDestroyed",get:function(){return null==this.docView}},{key:"dispatchEvent",value:function(e){return function(e,t){mu(e,t)||!cu[t.type]||!e.editable&&t.type in du||cu[t.type](e,t)}(this,e)}},{key:"dispatch",value:function(e){var t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))}},{key:"domSelection",value:function(){return this.root.getSelection()}}]),e}();function cc(e){var t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),t.translate="no",e.someProp("attributes",(function(n){if("function"==typeof n&&(n=n(e.state)),n)for(var r in n)"class"==r&&(t.class+=" "+n[r]),"style"==r?t.style=(t.style?t.style+";":"")+n[r]:t[r]||"contenteditable"==r||"nodeName"==r||(t[r]=String(n[r]))})),[zu.node(0,e.state.doc.content.size,t)]}function dc(e){if(e.markCursor){var t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:zu.widget(e.state.selection.head,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function fc(e){return!e.someProp("editable",(function(t){return!1===t(e.state)}))}function pc(e){var t=Object.create(null);function n(e){for(var n in e)Object.prototype.hasOwnProperty.call(t,n)||(t[n]=e[n])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function hc(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var mc=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e){return Object(c.a)(this,n),t.call(this,e,e)}return Object(d.a)(n,[{key:"map",value:function(e,t){var r=e.resolve(t.map(this.head));return n.valid(r)?new n(r):p.Selection.near(r)}},{key:"content",value:function(){return v.Slice.empty}},{key:"eq",value:function(e){return e instanceof n&&e.head==this.head}},{key:"toJSON",value:function(){return{type:"gapcursor",pos:this.head}}},{key:"getBookmark",value:function(){return new vc(this.anchor)}}],[{key:"fromJSON",value:function(e,t){if("number"!=typeof t.pos)throw new RangeError("Invalid input for GapCursor.fromJSON");return new n(e.resolve(t.pos))}},{key:"valid",value:function(e){var t=e.parent;if(t.isTextblock||!function(e){for(var t=e.depth;t>=0;t--){var n=e.index(t),r=e.node(t);if(0!=n)for(var o=r.child(n-1);;o=o.lastChild){if(0==o.childCount&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}else if(r.type.spec.isolating)return!0}return!0}(e)||!function(e){for(var t=e.depth;t>=0;t--){var n=e.indexAfter(t),r=e.node(t);if(n!=r.childCount)for(var o=r.child(n);;o=o.firstChild){if(0==o.childCount&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}else if(r.type.spec.isolating)return!0}return!0}(e))return!1;var n=t.type.spec.allowGapCursor;if(null!=n)return n;var r=t.contentMatchAt(e.index()).defaultType;return r&&r.isTextblock}},{key:"findGapCursorFrom",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];e:for(;;){if(!r&&n.valid(e))return e;for(var o=e.pos,i=null,a=e.depth;;a--){var s=e.node(a);if(t>0?e.indexAfter(a)<s.childCount:e.index(a)>0){i=s.child(t>0?e.indexAfter(a):e.index(a)-1);break}if(0==a)return null;o+=t;var l=e.doc.resolve(o);if(n.valid(l))return l}for(;;){var u=t>0?i.firstChild:i.lastChild;if(!u){if(i.isAtom&&!i.isText&&!p.NodeSelection.isSelectable(i)){e=e.doc.resolve(o+i.nodeSize*t),r=!1;continue e}break}i=u,o+=t;var c=e.doc.resolve(o);if(n.valid(c))return c}return null}}}]),n}(p.Selection);mc.prototype.visible=!1,mc.findFrom=mc.findGapCursorFrom,p.Selection.jsonID("gapcursor",mc);var vc=function(){function e(t){Object(c.a)(this,e),this.pos=t}return Object(d.a)(e,[{key:"map",value:function(t){return new e(t.map(this.pos))}},{key:"resolve",value:function(e){var t=e.resolve(this.pos);return mc.valid(t)?new mc(t):p.Selection.near(t)}}]),e}();var gc=Bn({ArrowLeft:yc("horiz",-1),ArrowRight:yc("horiz",1),ArrowUp:yc("vert",-1),ArrowDown:yc("vert",1)});function yc(e,t){var n="vert"==e?t>0?"down":"up":t>0?"right":"left";return function(e,r,o){var i=e.selection,a=t>0?i.$to:i.$from,s=i.empty;if(i instanceof p.TextSelection){if(!o.endOfTextblock(n)||0==a.depth)return!1;s=!1,a=e.doc.resolve(t>0?a.after():a.before())}var l=mc.findGapCursorFrom(a,t,s);return!!l&&(r&&r(e.tr.setSelection(new mc(l))),!0)}}function bc(e,t,n){if(!e||!e.editable)return!1;var r=e.state.doc.resolve(t);if(!mc.valid(r))return!1;var o=e.posAtCoords({left:n.clientX,top:n.clientY});return!(o&&o.inside>-1&&p.NodeSelection.isSelectable(e.state.doc.nodeAt(o.inside)))&&(e.dispatch(e.state.tr.setSelection(new mc(r))),!0)}function wc(e,t){if("insertCompositionText"!=t.inputType||!(e.state.selection instanceof mc))return!1;var n=e.state.selection.$from,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;for(var o=v.Fragment.empty,i=r.length-1;i>=0;i--)o=v.Fragment.from(r[i].createAndFill(null,o));var a=e.state.tr.replace(n.pos,n.pos,new v.Slice(o,0,0));return a.setSelection(p.TextSelection.near(a.doc.resolve(n.pos+1))),e.dispatch(a),!1}function kc(e){if(!(e.selection instanceof mc))return null;var t=document.createElement("div");return t.className="ProseMirror-gapcursor",Iu.create(e.doc,[zu.widget(e.selection.head,t,{key:"gapcursor"})])}var xc=Ir.create({name:"gapCursor",addProseMirrorPlugins:function(){return[new p.Plugin({props:{decorations:kc,createSelectionBetween:function(e,t,n){return t.pos==n.pos&&mc.valid(n)?new mc(n):null},handleClick:bc,handleKeyDown:gc,handleDOMEvents:{beforeinput:wc}}})]},extendNodeSchema:function(e){var t;return{allowGapCursor:null!==(t=Dr(wr(e,"allowGapCursor",{name:e.name,options:e.options,storage:e.storage})))&&void 0!==t?t:null}}}),Oc=Bo.create({name:"hardBreak",addOptions:function(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,parseHTML:function(){return[{tag:"br"}]},renderHTML:function(e){var t=e.HTMLAttributes;return["br",Sr(this.options.HTMLAttributes,t)]},renderText:function(){return"\n"},addCommands:function(){var e=this;return{setHardBreak:function(){return function(t){var n=t.commands,r=t.chain,o=t.state,i=t.editor;return n.first([function(){return n.exitCode()},function(){return n.command((function(){var t=o.selection,n=o.storedMarks;if(t.$from.parent.type.spec.isolating)return!1;var a=e.options.keepMarks,s=i.extensionManager.splittableMarks,l=n||t.$to.parentOffset&&t.$from.marks();return r().insertContent({type:e.name}).command((function(e){var t=e.tr;if(e.dispatch&&l&&a){var n=l.filter((function(e){return s.includes(e.type.name)}));t.ensureMarks(n)}return!0})).run()}))}])}}}},addKeyboardShortcuts:function(){var e=this;return{"Mod-Enter":function(){return e.editor.commands.setHardBreak()},"Shift-Enter":function(){return e.editor.commands.setHardBreak()}}}}),Sc=Bo.create({name:"heading",addOptions:function(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes:function(){return{level:{default:1,rendered:!1}}},parseHTML:function(){return this.options.levels.map((function(e){return{tag:"h".concat(e),attrs:{level:e}}}))},renderHTML:function(e){var t=e.node,n=e.HTMLAttributes,r=this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0];return["h".concat(r),Sr(this.options.HTMLAttributes,n),0]},addCommands:function(){var e=this;return{setHeading:function(t){return function(n){var r=n.commands;return!!e.options.levels.includes(t.level)&&r.setNode(e.name,t)}},toggleHeading:function(t){return function(n){var r=n.commands;return!!e.options.levels.includes(t.level)&&r.toggleNode(e.name,"paragraph",t)}}}},addKeyboardShortcuts:function(){var e=this;return this.options.levels.reduce((function(t,n){return Object(f.a)(Object(f.a)({},t),Object(u.a)({},"Mod-Alt-".concat(n),(function(){return e.editor.commands.toggleHeading({level:n})})))}),{})},addInputRules:function(){var e=this;return this.options.levels.map((function(t){return Fo({find:new RegExp("^(#{1,".concat(t,"})\\s$")),type:e.type,getAttributes:{level:t}})}))}}),Cc=200,jc=function(){};jc.prototype.append=function(e){return e.length?(e=jc.from(e),!this.length&&e||e.length<Cc&&this.leafAppend(e)||this.length<Cc&&e.leafPrepend(this)||this.appendInner(e)):this},jc.prototype.prepend=function(e){return e.length?jc.from(e).append(this):this},jc.prototype.appendInner=function(e){return new Ec(this,e)},jc.prototype.slice=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.length),e>=t?jc.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},jc.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},jc.prototype.forEach=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},jc.prototype.map=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length);var r=[];return this.forEach((function(t,n){return r.push(e(t,n))}),t,n),r},jc.from=function(e){return e instanceof jc?e:e&&e.length?new Dc(e):jc.empty};var Dc=function(e){function t(t){e.call(this),this.values=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,n){return 0==e&&n==this.length?this:new t(this.values.slice(e,n))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,n,r){for(var o=t;o<n;o++)if(!1===e(this.values[o],r+o))return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){for(var o=t-1;o>=n;o--)if(!1===e(this.values[o],r+o))return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=Cc)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=Cc)return new t(e.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(jc);jc.empty=new Dc([]);var Ec=function(e){function t(t,n){e.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return e<this.left.length?this.left.get(e):this.right.get(e-this.left.length)},t.prototype.forEachInner=function(e,t,n,r){var o=this.left.length;return!(t<o&&!1===this.left.forEachInner(e,t,Math.min(n,o),r))&&(!(n>o&&!1===this.right.forEachInner(e,Math.max(t-o,0),Math.min(this.length,n)-o,r+o))&&void 0)},t.prototype.forEachInvertedInner=function(e,t,n,r){var o=this.left.length;return!(t>o&&!1===this.right.forEachInvertedInner(e,t-o,Math.max(n,o)-o,r+o))&&(!(n<o&&!1===this.left.forEachInvertedInner(e,Math.min(t,o),n,r))&&void 0)},t.prototype.sliceInner=function(e,t){if(0==e&&t==this.length)return this;var n=this.left.length;return t<=n?this.left.slice(e,t):e>=n?this.right.slice(e-n,t-n):this.left.slice(e,n).append(this.right.slice(0,t-n))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e);if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e);if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(jc),Ac=jc,Mc=function(){function e(t,n){Object(c.a)(this,e),this.items=t,this.eventCount=n}return Object(d.a)(e,[{key:"popEvent",value:function(t,n){var r=this;if(0==this.eventCount)return null;for(var o,i,a=this.items.length;;a--){if(this.items.get(a-1).selection){--a;break}}n&&(o=this.remapping(a,this.items.length),i=o.maps.length);var s,l,u=t.tr,c=[],d=[];return this.items.forEach((function(t,n){if(!t.step)return o||(o=r.remapping(a,n+1),i=o.maps.length),i--,void d.push(t);if(o){d.push(new Tc(t.map));var f,p=t.step.map(o.slice(i));p&&u.maybeStep(p).doc&&(f=u.mapping.maps[u.mapping.maps.length-1],c.push(new Tc(f,void 0,void 0,c.length+d.length))),i--,f&&o.appendMap(f,i)}else u.maybeStep(t.step);return t.selection?(s=o?t.selection.map(o.slice(i)):t.selection,l=new e(r.items.slice(0,a).append(d.reverse().concat(c)),r.eventCount-1),!1):void 0}),this.items.length,0),{remaining:l,transform:u,selection:s}}},{key:"addTransform",value:function(t,n,r,o){for(var i=[],a=this.eventCount,s=this.items,l=!o&&s.length?s.get(s.length-1):null,u=0;u<t.steps.length;u++){var c,d=t.steps[u].invert(t.docs[u]),f=new Tc(t.mapping.maps[u],d,n);(c=l&&l.merge(f))&&(f=c,u?i.pop():s=s.slice(0,s.length-1)),i.push(f),n&&(a++,n=void 0),o||(l=f)}var p=a-r.depth;return p>Nc&&(s=function(e,t){var n;return e.forEach((function(e,r){if(e.selection&&0==t--)return n=r,!1})),e.slice(n)}(s,p),a-=p),new e(s.append(i),a)}},{key:"remapping",value:function(e,t){var n=new g.a;return this.items.forEach((function(t,r){var o=null!=t.mirrorOffset&&r-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:void 0;n.appendMap(t.map,o)}),e,t),n}},{key:"addMaps",value:function(t){return 0==this.eventCount?this:new e(this.items.append(t.map((function(e){return new Tc(e)}))),this.eventCount)}},{key:"rebased",value:function(t,n){if(!this.eventCount)return this;var r=[],o=Math.max(0,this.items.length-n),i=t.mapping,a=t.steps.length,s=this.eventCount;this.items.forEach((function(e){e.selection&&s--}),o);var l=n;this.items.forEach((function(e){var n=i.getMirror(--l);if(null!=n){a=Math.min(a,n);var o=i.maps[n];if(e.step){var u=t.steps[n].invert(t.docs[n]),c=e.selection&&e.selection.map(i.slice(l+1,n));c&&s++,r.push(new Tc(o,u,c))}else r.push(new Tc(o))}}),o);for(var u=[],c=n;c<a;c++)u.push(new Tc(i.maps[c]));var d=new e(this.items.slice(0,o).append(u).append(r),s);return d.emptyItemCount()>500&&(d=d.compress(this.items.length-r.length)),d}},{key:"emptyItemCount",value:function(){var e=0;return this.items.forEach((function(t){t.step||e++})),e}},{key:"compress",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.items.length,n=this.remapping(0,t),r=n.maps.length,o=[],i=0;return this.items.forEach((function(e,a){if(a>=t)o.push(e),e.selection&&i++;else if(e.step){var s=e.step.map(n.slice(r)),l=s&&s.getMap();if(r--,l&&n.appendMap(l,r),s){var u=e.selection&&e.selection.map(n.slice(r));u&&i++;var c,d=new Tc(l.invert(),s,u),f=o.length-1;(c=o.length&&o[f].merge(d))?o[f]=c:o.push(d)}}else e.map&&r--}),this.items.length,0),new e(Ac.from(o.reverse()),i)}}]),e}();Mc.empty=new Mc(Ac.empty,0);var Tc=function(){function e(t,n,r,o){Object(c.a)(this,e),this.map=t,this.step=n,this.selection=r,this.mirrorOffset=o}return Object(d.a)(e,[{key:"merge",value:function(t){if(this.step&&t.step&&!t.selection){var n=t.step.merge(this.step);if(n)return new e(n.getMap().invert(),n,this.selection)}}}]),e}(),Lc=Object(d.a)((function e(t,n,r,o){Object(c.a)(this,e),this.done=t,this.undone=n,this.prevRanges=r,this.prevTime=o})),Nc=20;function Pc(e,t,n,r){var o,i=n.getMeta(_c);if(i)return i.historyState;n.getMeta(Ic)&&(e=new Lc(e.done,e.undone,null,0));var a=n.getMeta("appendedTransaction");if(0==n.steps.length)return e;if(a&&a.getMeta(_c))return a.getMeta(_c).redo?new Lc(e.done.addTransform(n,void 0,r,Bc(t)),e.undone,Rc(n.mapping.maps[n.steps.length-1]),e.prevTime):new Lc(e.done,e.undone.addTransform(n,void 0,r,Bc(t)),null,e.prevTime);if(!1===n.getMeta("addToHistory")||a&&!1===a.getMeta("addToHistory"))return(o=n.getMeta("rebased"))?new Lc(e.done.rebased(n,o),e.undone.rebased(n,o),Hc(e.prevRanges,n.mapping),e.prevTime):new Lc(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),Hc(e.prevRanges,n.mapping),e.prevTime);var s=0==e.prevTime||!a&&(e.prevTime<(n.time||0)-r.newGroupDelay||!function(e,t){if(!t)return!1;if(!e.docChanged)return!0;var n=!1;return e.mapping.maps[0].forEach((function(e,r){for(var o=0;o<t.length;o+=2)e<=t[o+1]&&r>=t[o]&&(n=!0)})),n}(n,e.prevRanges)),l=a?Hc(e.prevRanges,n.mapping):Rc(n.mapping.maps[n.steps.length-1]);return new Lc(e.done.addTransform(n,s?t.selection.getBookmark():void 0,r,Bc(t)),Mc.empty,l,n.time)}function Rc(e){var t=[];return e.forEach((function(e,n,r,o){return t.push(r,o)})),t}function Hc(e,t){if(!e)return null;for(var n=[],r=0;r<e.length;r+=2){var o=t.map(e[r],1),i=t.map(e[r+1],-1);o<=i&&n.push(o,i)}return n}function Fc(e,t,n,r){var o=Bc(t),i=_c.get(t).spec.config,a=(r?e.undone:e.done).popEvent(t,o);if(a){var s=a.selection.resolve(a.transform.doc),l=(r?e.done:e.undone).addTransform(a.transform,t.selection.getBookmark(),i,o),u=new Lc(r?l:a.remaining,r?a.remaining:l,null,0);n(a.transform.setSelection(s).setMeta(_c,{redo:r,historyState:u}).scrollIntoView())}}var Vc=!1,zc=null;function Bc(e){var t=e.plugins;if(zc!=t){Vc=!1,zc=t;for(var n=0;n<t.length;n++)if(t[n].spec.historyPreserveItems){Vc=!0;break}}return Vc}var _c=new p.PluginKey("history"),Ic=new p.PluginKey("closeHistory");function $c(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new p.Plugin({key:_c,state:{init:function(){return new Lc(Mc.empty,Mc.empty,null,0)},apply:function(t,n,r){return Pc(n,r,t,e)}},config:e,props:{handleDOMEvents:{beforeinput:function(e,t){var n=t.inputType,r="historyUndo"==n?qc:"historyRedo"==n?Wc:null;return!!r&&(t.preventDefault(),r(e.state,e.dispatch))}}}})}var qc=function(e,t){var n=_c.getState(e);return!(!n||0==n.done.eventCount)&&(t&&Fc(n,e,t,!1),!0)},Wc=function(e,t){var n=_c.getState(e);return!(!n||0==n.undone.eventCount)&&(t&&Fc(n,e,t,!0),!0)};var Uc=Ir.create({name:"history",addOptions:function(){return{depth:100,newGroupDelay:500}},addCommands:function(){return{undo:function(){return function(e){var t=e.state,n=e.dispatch;return qc(t,n)}},redo:function(){return function(e){var t=e.state,n=e.dispatch;return Wc(t,n)}}}},addProseMirrorPlugins:function(){return[$c(this.options)]},addKeyboardShortcuts:function(){var e=this;return{"Mod-z":function(){return e.editor.commands.undo()},"Mod-y":function(){return e.editor.commands.redo()},"Shift-Mod-z":function(){return e.editor.commands.redo()},"Mod-\u044f":function(){return e.editor.commands.undo()},"Shift-Mod-\u044f":function(){return e.editor.commands.redo()}}}}),Kc=Bo.create({name:"horizontalRule",addOptions:function(){return{HTMLAttributes:{}}},group:"block",parseHTML:function(){return[{tag:"hr"}]},renderHTML:function(e){var t=e.HTMLAttributes;return["hr",Sr(this.options.HTMLAttributes,t)]},addCommands:function(){var e=this;return{setHorizontalRule:function(){return function(t){return(0,t.chain)().insertContent({type:e.name}).command((function(e){var t,n=e.tr;if(e.dispatch){var r=n.selection.$to,o=r.end();if(r.nodeAfter)n.setSelection(p.TextSelection.create(n.doc,r.pos));else{var i=null===(t=r.parent.type.contentMatch.defaultType)||void 0===t?void 0:t.create();i&&(n.insert(o,i),n.setSelection(p.TextSelection.create(n.doc,o)))}n.scrollIntoView()}return!0})).run()}}}},addInputRules:function(){return[Ho({find:/^(?:---|\u2014-|___\s|\*\*\*\s)$/,type:this.type})]}}),Gc=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))$/,Jc=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))/g,Yc=/(?:^|\s)((?:_)((?:[^_]+))(?:_))$/,Zc=/(?:^|\s)((?:_)((?:[^_]+))(?:_))/g,Xc=zo.create({name:"italic",addOptions:function(){return{HTMLAttributes:{}}},parseHTML:function(){return[{tag:"em"},{tag:"i",getAttrs:function(e){return"normal"!==e.style.fontStyle&&null}},{style:"font-style=italic"}]},renderHTML:function(e){var t=e.HTMLAttributes;return["em",Sr(this.options.HTMLAttributes,t),0]},addCommands:function(){var e=this;return{setItalic:function(){return function(t){return t.commands.setMark(e.name)}},toggleItalic:function(){return function(t){return t.commands.toggleMark(e.name)}},unsetItalic:function(){return function(t){return t.commands.unsetMark(e.name)}}}},addKeyboardShortcuts:function(){var e=this;return{"Mod-i":function(){return e.editor.commands.toggleItalic()},"Mod-I":function(){return e.editor.commands.toggleItalic()}}},addInputRules:function(){return[Ro({find:Gc,type:this.type}),Ro({find:Yc,type:this.type})]},addPasteRules:function(){return[_o({find:Jc,type:this.type}),_o({find:Zc,type:this.type})]}}),Qc=Bo.create({name:"listItem",addOptions:function(){return{HTMLAttributes:{}}},content:"paragraph block*",defining:!0,parseHTML:function(){return[{tag:"li"}]},renderHTML:function(e){var t=e.HTMLAttributes;return["li",Sr(this.options.HTMLAttributes,t),0]},addKeyboardShortcuts:function(){var e=this;return{Enter:function(){return e.editor.commands.splitListItem(e.name)},Tab:function(){return e.editor.commands.sinkListItem(e.name)},"Shift-Tab":function(){return e.editor.commands.liftListItem(e.name)}}}});function ed(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var td=["start"],nd=/^(\d+)\.\s$/,rd=Bo.create({name:"orderedList",addOptions:function(){return{itemTypeName:"listItem",HTMLAttributes:{}}},group:"block list",content:function(){return"".concat(this.options.itemTypeName,"+")},addAttributes:function(){return{start:{default:1,parseHTML:function(e){return e.hasAttribute("start")?parseInt(e.getAttribute("start")||"",10):1}}}},parseHTML:function(){return[{tag:"ol"}]},renderHTML:function(e){var t=e.HTMLAttributes,n=t.start,r=ed(t,td);return 1===n?["ol",Sr(this.options.HTMLAttributes,r),0]:["ol",Sr(this.options.HTMLAttributes,t),0]},addCommands:function(){var e=this;return{toggleOrderedList:function(){return function(t){return t.commands.toggleList(e.name,e.options.itemTypeName)}}}},addKeyboardShortcuts:function(){var e=this;return{"Mod-Shift-7":function(){return e.editor.commands.toggleOrderedList()}}},addInputRules:function(){return[Vo({find:nd,type:this.type,getAttributes:function(e){return{start:+e[1]}},joinPredicate:function(e,t){return t.childCount+t.attrs.start===+e[1]}})]}}),od=Bo.create({name:"paragraph",priority:1e3,addOptions:function(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML:function(){return[{tag:"p"}]},renderHTML:function(e){var t=e.HTMLAttributes;return["p",Sr(this.options.HTMLAttributes,t),0]},addCommands:function(){var e=this;return{setParagraph:function(){return function(t){return t.commands.setNode(e.name)}}}},addKeyboardShortcuts:function(){var e=this;return{"Mod-Alt-0":function(){return e.editor.commands.setParagraph()}}}}),id=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))$/,ad=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))/g,sd=zo.create({name:"strike",addOptions:function(){return{HTMLAttributes:{}}},parseHTML:function(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:function(e){return!!e.includes("line-through")&&{}}}]},renderHTML:function(e){var t=e.HTMLAttributes;return["s",Sr(this.options.HTMLAttributes,t),0]},addCommands:function(){var e=this;return{setStrike:function(){return function(t){return t.commands.setMark(e.name)}},toggleStrike:function(){return function(t){return t.commands.toggleMark(e.name)}},unsetStrike:function(){return function(t){return t.commands.unsetMark(e.name)}}}},addKeyboardShortcuts:function(){var e=this;return{"Mod-Shift-x":function(){return e.editor.commands.toggleStrike()}}},addInputRules:function(){return[Ro({find:id,type:this.type})]},addPasteRules:function(){return[_o({find:ad,type:this.type})]}}),ld=Bo.create({name:"text",group:"inline"}),ud=Ir.create({name:"starterKit",addExtensions:function(){var e,t,n,r,o,i,a,s,l,u,c,d,f,p,h,m,v,g,y=[];return!1!==this.options.blockquote&&y.push(Ia.configure(null===(e=this.options)||void 0===e?void 0:e.blockquote)),!1!==this.options.bold&&y.push(Ka.configure(null===(t=this.options)||void 0===t?void 0:t.bold)),!1!==this.options.bulletList&&y.push(Ja.configure(null===(n=this.options)||void 0===n?void 0:n.bulletList)),!1!==this.options.code&&y.push(Xa.configure(null===(r=this.options)||void 0===r?void 0:r.code)),!1!==this.options.codeBlock&&y.push(ts.configure(null===(o=this.options)||void 0===o?void 0:o.codeBlock)),!1!==this.options.document&&y.push(ns.configure(null===(i=this.options)||void 0===i?void 0:i.document)),!1!==this.options.dropcursor&&y.push(as.configure(null===(a=this.options)||void 0===a?void 0:a.dropcursor)),!1!==this.options.gapcursor&&y.push(xc.configure(null===(s=this.options)||void 0===s?void 0:s.gapcursor)),!1!==this.options.hardBreak&&y.push(Oc.configure(null===(l=this.options)||void 0===l?void 0:l.hardBreak)),!1!==this.options.heading&&y.push(Sc.configure(null===(u=this.options)||void 0===u?void 0:u.heading)),!1!==this.options.history&&y.push(Uc.configure(null===(c=this.options)||void 0===c?void 0:c.history)),!1!==this.options.horizontalRule&&y.push(Kc.configure(null===(d=this.options)||void 0===d?void 0:d.horizontalRule)),!1!==this.options.italic&&y.push(Xc.configure(null===(f=this.options)||void 0===f?void 0:f.italic)),!1!==this.options.listItem&&y.push(Qc.configure(null===(p=this.options)||void 0===p?void 0:p.listItem)),!1!==this.options.orderedList&&y.push(rd.configure(null===(h=this.options)||void 0===h?void 0:h.orderedList)),!1!==this.options.paragraph&&y.push(od.configure(null===(m=this.options)||void 0===m?void 0:m.paragraph)),!1!==this.options.strike&&y.push(sd.configure(null===(v=this.options)||void 0===v?void 0:v.strike)),!1!==this.options.text&&y.push(ld.configure(null===(g=this.options)||void 0===g?void 0:g.text)),y}}),cd=Ir.create({name:"textAlign",addOptions:function(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:"left"}},addGlobalAttributes:function(){var e=this;return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:function(t){return t.style.textAlign||e.options.defaultAlignment},renderHTML:function(t){return t.textAlign===e.options.defaultAlignment?{}:{style:"text-align: ".concat(t.textAlign)}}}}}]},addCommands:function(){var e=this;return{setTextAlign:function(t){return function(n){var r=n.commands;return!!e.options.alignments.includes(t)&&e.options.types.every((function(e){return r.updateAttributes(e,{textAlign:t})}))}},unsetTextAlign:function(){return function(t){var n=t.commands;return e.options.types.every((function(e){return n.resetAttributes(e,"textAlign")}))}}}},addKeyboardShortcuts:function(){var e=this;return{"Mod-Shift-l":function(){return e.editor.commands.setTextAlign("left")},"Mod-Shift-e":function(){return e.editor.commands.setTextAlign("center")},"Mod-Shift-r":function(){return e.editor.commands.setTextAlign("right")},"Mod-Shift-j":function(){return e.editor.commands.setTextAlign("justify")}}}}),dd=zo.create({name:"subscript",addOptions:function(){return{HTMLAttributes:{}}},parseHTML:function(){return[{tag:"sub"},{style:"vertical-align",getAttrs:function(e){return"sub"===e&&null}}]},renderHTML:function(e){var t=e.HTMLAttributes;return["sub",Sr(this.options.HTMLAttributes,t),0]},addCommands:function(){var e=this;return{setSubscript:function(){return function(t){return t.commands.setMark(e.name)}},toggleSubscript:function(){return function(t){return t.commands.toggleMark(e.name)}},unsetSubscript:function(){return function(t){return t.commands.unsetMark(e.name)}}}},addKeyboardShortcuts:function(){var e=this;return{"Mod-,":function(){return e.editor.commands.toggleSubscript()}}}}),fd=zo.create({name:"superscript",addOptions:function(){return{HTMLAttributes:{}}},parseHTML:function(){return[{tag:"sup"},{style:"vertical-align",getAttrs:function(e){return"super"===e&&null}}]},renderHTML:function(e){var t=e.HTMLAttributes;return["sup",Sr(this.options.HTMLAttributes,t),0]},addCommands:function(){var e=this;return{setSuperscript:function(){return function(t){return t.commands.setMark(e.name)}},toggleSuperscript:function(){return function(t){return t.commands.toggleMark(e.name)}},unsetSuperscript:function(){return function(t){return t.commands.unsetMark(e.name)}}}},addKeyboardShortcuts:function(){var e=this;return{"Mod-.":function(){return e.editor.commands.toggleSuperscript()}}}}),pd=zo.create({name:"textStyle",addOptions:function(){return{HTMLAttributes:{}}},parseHTML:function(){return[{tag:"span",getAttrs:function(e){return!!e.hasAttribute("style")&&{}}}]},renderHTML:function(e){var t=e.HTMLAttributes;return["span",Sr(this.options.HTMLAttributes,t),0]},addCommands:function(){var e=this;return{removeEmptyTextStyle:function(){return function(t){var n=t.state,r=t.commands,o=uo(n,e.type);return!!Object.entries(o).some((function(e){return!!Object(i.a)(e,2)[1]}))||r.unsetMark(e.name)}}}}}),hd=Ir.create({name:"fontSize",defaultOptions:{types:["textStyle"],defaultFontSize:16},addGlobalAttributes:function(){return[{types:this.options.types,attributes:{fontSize:{default:"".concat(this.options.defaultFontSize,"px"),parseHTML:function(e){return e.style.fontSize},renderHTML:function(e){return e.fontSize?{style:"font-size: ".concat(e.fontSize)}:{}}}}}]},addCommands:function(){return{setFontSize:function(e){return function(t){return(0,t.chain)().setMark("textStyle",{fontSize:e}).run()}},unsetFontSize:function(){return function(e){return(0,e.chain)().setMark("textStyle",{fontSize:null}).removeEmptyTextStyle().run()}}}}}),md=Ir.create({name:"textDirection",defaultOptions:{types:["paragraph","heading"],defaultDirection:"ltr"},addGlobalAttributes:function(){return[{types:this.options.types,attributes:{textDirection:{default:this.options.defaultDirection,parseHTML:function(e){return e.dir},renderHTML:function(e){return e.textDirection?{dir:e.textDirection}:{}}}}}]},addCommands:function(){var e=this;return{setTextDirection:function(t){return function(n){var r=n.commands;return e.options.types.every((function(e){return r.updateAttributes(e,{textDirection:t})}))}}}}}),vd=Ir.create({name:"fontFamily",addOptions:function(){return{types:["textStyle"]}},addGlobalAttributes:function(){return[{types:this.options.types,attributes:{fontFamily:{default:null,parseHTML:function(e){var t;return null===(t=e.style.fontFamily)||void 0===t?void 0:t.replace(/['"]+/g,"")},renderHTML:function(e){return e.fontFamily?{style:"font-family: ".concat(e.fontFamily)}:{}}}}}]},addCommands:function(){return{setFontFamily:function(e){return function(t){return(0,t.chain)().setMark("textStyle",{fontFamily:e}).run()}},unsetFontFamily:function(){return function(e){return(0,e.chain)().setMark("textStyle",{fontFamily:null}).removeEmptyTextStyle().run()}}}}}),gd=Ja.extend({addAttributes:function(){return{listType:{default:null,parseHTML:function(e){return e.style.listStyleType},renderHTML:function(e){return e.listType?{style:"list-style-type: ".concat(e.listType)}:{}}}}}}),yd=rd.extend({addAttributes:function(){return{listType:{default:null,parseHTML:function(e){return e.style.listStyleType},renderHTML:function(e){return e.listType?{style:"list-style-type: ".concat(e.listType)}:{}}}}}}),bd=Ir.create({name:"color",addOptions:function(){return{types:["textStyle"]}},addGlobalAttributes:function(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:function(e){var t;return null===(t=e.style.color)||void 0===t?void 0:t.replace(/['"]+/g,"")},renderHTML:function(e){return e.color?{style:"color: ".concat(e.color)}:{}}}}}]},addCommands:function(){return{setColor:function(e){return function(t){return(0,t.chain)().setMark("textStyle",{color:e}).run()}},unsetColor:function(){return function(e){return(0,e.chain)().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()}}}}}),wd=Bo.create({name:"tableRow",addOptions:function(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML:function(){return[{tag:"tr"}]},renderHTML:function(e){var t=e.HTMLAttributes;return["tr",Sr(this.options.HTMLAttributes,t),0]}});function kd(e,t,n){return{default:null,parseHTML:function(t){var r;return n?null===(r=t.style[e])||void 0===r?void 0:r.toString().replace(n,""):t.style[e]},renderHTML:function(r){return r[e]?{style:"".concat(t,": ").concat(r[e]).concat(n||"")}:{}}}}var xd=Bo.create({name:"tableCell",addOptions:function(){return{HTMLAttributes:{}}},content:"block+",addAttributes:function(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:function(e){var t=e.getAttribute("colwidth");return t?[parseInt(t,10)]:null}}}},tableRole:"cell",isolating:!0,parseHTML:function(){return[{tag:"td"}]},renderHTML:function(e){var t=e.HTMLAttributes;return["td",Sr(this.options.HTMLAttributes,t),0]}}).extend({addAttributes:function(){var e;return Object.assign(Object.assign({},null===(e=this.parent)||void 0===e?void 0:e.call(this)),{backgroundColor:kd("backgroundColor","background-color"),color:kd("color","color"),borderWidth:kd("borderWidth","border-width","px"),borderStyle:kd("borderStyle","border-style"),borderColor:kd("borderColor","border-color")})}}),Od=Bo.create({name:"tableHeader",addOptions:function(){return{HTMLAttributes:{}}},content:"block+",addAttributes:function(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:function(e){var t=e.getAttribute("colwidth");return t?[parseInt(t,10)]:null}}}},tableRole:"header_cell",isolating:!0,parseHTML:function(){return[{tag:"th"}]},renderHTML:function(e){var t=e.HTMLAttributes;return["th",Sr(this.options.HTMLAttributes,t),0]}}),Sd=n(15),Cd=n(0),jd=n(1),Dd=n.n(jd),Ed=n(32),Ad=n(46);n(60);function Md(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Td=function(e,t){return"function"===typeof t?t(e):function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Md(Object(n),!0).forEach((function(t){Object(u.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Md(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e,{},t)},Ld=Object(Ad.a)((function(e){return Object(Ad.a)((function(t){return Td(e,t)}))})),Nd=function(e){return Object(jd.createElement)(Ed.a.Consumer,null,(function(t){return e.theme!==t&&(t=Ld(t)(e.theme)),Object(jd.createElement)(Ed.a.Provider,{value:t},e.children)}))};var Pd=n(47),Rd=n.n(Pd)()((function(e,t){return{theme:void 0,isMobile:!1,isKeyboardOpen:!0,openedPopups:{},setIsKeyboardOpen:function(t){return e((function(e){e.isKeyboardOpen=t}))},setIsMobile:function(t){return e((function(e){e.isMobile=t}))},setTheme:function(t){return e((function(e){e.theme=t}))},toolbarLocation:"top",setToolbarLocation:function(t){return e((function(e){e.toolbarLocation=t}))},closePopup:function(t){return e((function(e){e.openedPopups=Object.assign(Object.assign({},e.openedPopups),Object(u.a)({},t,!1))}))},isPopupOpen:function(e){return!!t().openedPopups[e]},openPopup:function(t){return e((function(e){e.openedPopups=Object.assign(Object.assign({},e.openedPopups),Object(u.a)({},t.id,t))}))},closePopupGroup:function(t,n){return e((function(e){for(var r in e.openedPopups){var o=e.openedPopups[r];o&&o.group===t&&!n.includes(o.id)&&(e.openedPopups[r]=!1)}}))}}}));function Hd(){return Rd((function(e){return e.toolbarLocation}))}function Fd(){return Rd((function(e){return e.isMobile}))}var Vd=Object.defineProperty((function(){return Rd((function(e){return e.theme}))}),"current",{get:function(){return Rd.getState().theme}}),zd=Object.defineProperty((function(){return Rd((function(e){return e.isKeyboardOpen}))}),"current",{get:function(){return Rd.getState().isKeyboardOpen}});function Bd(e){var t=Vd();return Object(Cd.jsx)(Nd,Object.assign({theme:t||{}},{children:e.children}))}var _d=function(){function e(t,n,r,o){var i=this;Object(c.a)(this,e),this.editor=n,this.getPos=r,this.options=o,this.isDragging=!1,this.handleRef=function(e){return i._handleRef(e)},this.portalProviderAPI=n.storage.portalProviderAPI,this.node=t}return Object(d.a)(e,[{key:"init",value:function(){var e=this;this.domRef=this.createDomRef(),this.domRef.ondragstart=function(t){return e.onDragStart(t)};var t=this.getContentDOM()||{dom:void 0,contentDOM:void 0},n=t.dom,r=t.contentDOM;return this.domRef&&n&&(this.domRef.appendChild(n),this.contentDOM=r||n,this.contentDOMWrapper=n||r),this.domRef.classList.add("".concat(this.node.type.name,"-view-content-wrap")),this.renderReactComponent((function(){return e.render(e.options.props,e.handleRef)})),this}},{key:"renderReactComponent",value:function(e){this.domRef&&e&&this.portalProviderAPI?this.portalProviderAPI.render(e,this.domRef):console.warn("Cannot render node view",this.editor.storage)}},{key:"createDomRef",value:function(){return this.options.wrapperFactory?this.options.wrapperFactory():this.node.isInline?document.createElement("span"):document.createElement("div")}},{key:"getContentDOM",value:function(){var e,t;if(this.options.contentDOMFactory){if(!0===this.options.contentDOMFactory){var n=document.createElement("div");return n.classList.add("".concat(this.node.type.name.toLowerCase(),"-content-wrapper")),n.style.whiteSpace="inherit",n.style.minWidth="20px",{dom:n}}return null===(t=(e=this.options).contentDOMFactory)||void 0===t?void 0:t.call(e)}}},{key:"_handleRef",value:function(e){var t=this.contentDOMWrapper||this.contentDOM;e&&t&&!e.contains(t)&&e.appendChild(t)}},{key:"render",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return this.options.component?Object(Cd.jsx)(Bd,{children:Object(Cd.jsx)(this.options.component,Object.assign({},t,{editor:this.editor,getPos:this.getPos,node:this.node,forwardRef:n,updateAttributes:function(t,n){return e.updateAttributes(t,e.getPos(),null===n||void 0===n?void 0:n.addToHistory,null===n||void 0===n?void 0:n.preventUpdate)}}))}):null}},{key:"updateAttributes",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];this.editor.commands.command((function(i){var a=i.tr;return a.setNodeMarkup(t,void 0,Object.assign(Object.assign({},n.node.attrs),e)),a.setMeta("addToHistory",r),a.setMeta("preventUpdate",o),!0}))}},{key:"update",value:function(e,t,n){var r=this;return this.node.type===e.type&&(this.viewShouldUpdate(e)?(this.node=e,this.renderReactComponent((function(){return r.render(r.options.props,r.handleRef)})),!0):(this.node=e,!0))}},{key:"onDragStart",value:function(e){var t,n,r,o,i,a,s,l=this.editor.view,u=e.target,c=3===u.nodeType?null===(t=u.parentElement)||void 0===t?void 0:t.closest("[data-drag-handle]"):u.closest("[data-drag-handle]");if(this.dom&&!(null===(n=this.contentDOM)||void 0===n?void 0:n.contains(u))&&c){var d=this.dom.querySelector("[data-drag-image]")||this.dom,f=0,h=0;if(d!==c){var m=d.getBoundingClientRect(),v=c.getBoundingClientRect(),g=null!==(r=e.offsetX)&&void 0!==r?r:null===(o=e.nativeEvent)||void 0===o?void 0:o.offsetX,y=null!==(i=e.offsetY)&&void 0!==i?i:null===(a=e.nativeEvent)||void 0===a?void 0:a.offsetY;f=v.x-m.x+g,h=v.y-m.y+y}var b=p.NodeSelection.create(l.state.doc,this.getPos()),w=l.state.tr.setSelection(b);l.dispatch(w),null===(s=e.dataTransfer)||void 0===s||s.setDragImage(d,f,h),function(e,t){if(!e.dataTransfer)return;var n=t.view,r=n.state.selection.content(),o=lc(n,r),i=o.dom,a=o.text;e.dataTransfer.clearData(),e.dataTransfer.setData("Text",a),e.dataTransfer.setData("text/plain",a),e.dataTransfer.setData("text/html",i.innerHTML),e.dataTransfer.effectAllowed="copyMove",n.dragging={slice:r,move:!0}}(e,this.editor)}}},{key:"stopEvent",value:function(e){var t,n=this;if(!this.dom)return!1;var r=e.target;if(!(this.dom.contains(r)&&!(null===(t=this.contentDOM)||void 0===t?void 0:t.contains(r))))return!1;var o="drop"===e.type;if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(r.tagName)||r.isContentEditable)&&!o)return!0;var i=this.editor.isEditable,a=this.isDragging,s=!!this.node.type.spec.draggable,l=p.NodeSelection.isSelectable(this.node),u="copy"===e.type,c="paste"===e.type,d="cut"===e.type,f="mousedown"===e.type,h=e.type.startsWith("drag");if(!s&&l&&h&&e.preventDefault(),s&&h&&!a)return e.preventDefault(),!1;if(s&&i&&!a&&f){var m=r.closest("[data-drag-handle]");m&&(this.dom===m||this.dom.contains(m))&&(this.isDragging=!0,document.addEventListener("dragend",(function(){n.isDragging=!1}),{once:!0}),document.addEventListener("mouseup",(function(){n.isDragging=!1}),{once:!0}))}return!(a||o||u||c||d||f&&l)}},{key:"ignoreMutation",value:function(e){if(!this.dom||!this.contentDOM)return!0;if(this.node.isLeaf||this.node.isAtom)return!0;if("selection"===e.type)return!1;if(this.dom.contains(e.target)&&"childList"===e.type&&this.editor.isFocused&&[].concat(Object(o.a)(Array.from(e.addedNodes)),Object(o.a)(Array.from(e.removedNodes))).every((function(e){return e.isContentEditable})))return!1;return this.contentDOM===e.target&&"attributes"===e.type||!this.contentDOM.contains(e.target)}},{key:"viewShouldUpdate",value:function(e){return!this.options.shouldUpdate||this.options.shouldUpdate(this.node,e)}},{key:"setDomAttrs",value:function(e,t){Object.keys(e.attrs||{}).forEach((function(n){t.setAttribute(n,e.attrs[n])}))}},{key:"dom",get:function(){return this.domRef}},{key:"destroy",value:function(){this.domRef&&this.portalProviderAPI&&(this.portalProviderAPI.remove(this.domRef),this.domRef=void 0,this.contentDOM=void 0)}}]),e}();function Id(e,t){return function(n){var r=n.node,o=n.getPos,i=n.editor;return new _d(r,i,(function(){return"boolean"===typeof o?-1:o()}),Object.assign(Object.assign({},t),{component:e})).init()}}var $d=n(25),qd=n.n($d),Wd=function(){function e(){Object(c.a)(this,e),this.listeners={}}return Object(d.a)(e,[{key:"on",value:function(e,t){this.listeners[e]||(this.listeners[e]=new Set),this.listeners[e].add(t)}},{key:"off",value:function(e,t){this.listeners[e]&&this.listeners[e].has(t)&&this.listeners[e].delete(t)}},{key:"emit",value:function(e,t){this.listeners[e]&&this.listeners[e].forEach((function(e){return e(t)}))}},{key:"destroy",value:function(){this.listeners={}}}]),e}();var Ud=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(){var e;return Object(c.a)(this,n),(e=t.call(this)).portals=new Map,e.setContext=function(t){e.context=t},e}return Object(d.a)(n,[{key:"render",value:function(e,t){this.portals.set(t,{children:e});var n=e();Object($d.unstable_renderSubtreeIntoContainer)(this.context,n,t)}},{key:"forceUpdate",value:function(){}},{key:"remove",value:function(e){this.portals.delete(e);try{Object($d.unmountComponentAtNode)(e)}catch(t){}}}]),n}(Wd),Kd=Dd.a.createContext(void 0);function Gd(){return Object(jd.useContext)(Kd)}var Jd=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e){var r;return Object(c.a)(this,n),(r=t.call(this,e)).portalProviderAPI=new Ud,r}return Object(d.a)(n,[{key:"render",value:function(){return Object(Cd.jsxs)(Kd.Provider,Object.assign({value:this.portalProviderAPI},{children:[this.props.children,Object(Cd.jsx)(Yd,{portalProviderAPI:this.portalProviderAPI})]}))}},{key:"componentDidUpdate",value:function(){this.portalProviderAPI.forceUpdate()}}]),n}(Dd.a.Component);Jd.displayName="PortalProvider";var Yd=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e){var r;return Object(c.a)(this,n),(r=t.call(this,e)).handleUpdate=function(e){return r.setState({portals:e})},e.portalProviderAPI.setContext(Object(a.a)(r)),e.portalProviderAPI.on("update",r.handleUpdate),r.state={portals:new Map},r}return Object(d.a)(n,[{key:"render",value:function(){var e=this.state.portals;return Object(Cd.jsx)(Cd.Fragment,{children:Array.from(e.entries()).map((function(e){var t=Object(i.a)(e,2),n=t[0],r=t[1];return Object($d.createPortal)(r,n)}))})}}]),n}(Dd.a.Component),Zd=function(){function e(){Object(c.a)(this,e),this.changeHandlers=[],this.changeHandlers=[]}return Object(d.a)(e,[{key:"subscribe",value:function(e){this.changeHandlers.push(e)}},{key:"unsubscribe",value:function(e){this.changeHandlers=this.changeHandlers.filter((function(t){return t!==e}))}},{key:"notifyNewSelection",value:function(e,t){this.changeHandlers.forEach((function(n){return n(e,t)}))}}]),e}(),Xd=new p.PluginKey("reactNodeView"),Qd=new p.Plugin({state:{init:function(){return new Zd},apply:function(e,t){return t}},key:Xd,view:function(e){var t=Xd.getState(e.state);return{update:function(e){var n=e.state.selection,r=n.from,o=n.to;t.notifyNewSelection(r,o)}}}}),ef=Ir.create({name:"node-view-selection-notifier",addProseMirrorPlugins:function(){return[Qd]}}),tf=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e,r,o,i){var a;return Object(c.a)(this,n),(a=t.call(this,e,r,o,i)).pos=-1,a.isNodeInsideSelection=function(e,t,n,r){var o=a.getPositionsWithDefault(n,r);return n=o.pos,r=o.posEnd,"number"===typeof n&&"number"===typeof r&&(e<=n&&t>=r)},a.isSelectionInsideNode=function(e,t,n,r){var o=a.getPositionsWithDefault(n,r);return n=o.pos,r=o.posEnd,"number"===typeof n&&"number"===typeof r&&(n<e&&t<r)},a.isSelectedNode=function(e){if(e instanceof p.NodeSelection){var t=a.editor.view.state.selection,n=t.from,r=t.to;return e.node===a.node||a.pos===n&&a.posEnd===r&&e.node.eq(a.node)}return!1},a.insideSelection=function(){var e=a.editor.view.state.selection,t=e.from,n=e.to;return a.isSelectedNode(a.editor.view.state.selection)||a.isSelectionInsideNode(t,n)},a.nodeInsideSelection=function(){var e=a.editor.view.state.selection,t=e.from,n=e.to;return a.isSelectedNode(e)||a.isNodeInsideSelection(t,n)},a.onSelectionChange=function(){a.update(a.node,[],Iu.empty)},a.updatePos(),a.oldSelection=r.view.state.selection,a.selectionChangeState=Xd.getState(a.editor.view.state),a.selectionChangeState.subscribe(a.onSelectionChange),a}return Object(d.a)(n,[{key:"render",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(!this.options.component)return null;var r=this.editor.isEditable&&(this.insideSelection()||this.nodeInsideSelection());return Object(Cd.jsx)(Bd,{children:Object(Cd.jsx)(this.options.component,Object.assign({},t,{editor:this.editor,getPos:this.getPos,node:this.node,forwardRef:n,selected:r,updateAttributes:function(t,n){return e.updateAttributes(t,e.pos,null===n||void 0===n?void 0:n.addToHistory,null===n||void 0===n?void 0:n.preventUpdate)}}))})}},{key:"updatePos",value:function(){"boolean"!==typeof this.getPos&&(this.pos=this.getPos(),this.posEnd=this.pos+this.node.nodeSize)}},{key:"getPositionsWithDefault",value:function(e,t){return{pos:"number"!==typeof e?this.pos:e,posEnd:"number"!==typeof t?this.posEnd:t}}},{key:"viewShouldUpdate",value:function(e){if(Object(h.a)(Object(m.a)(n.prototype),"viewShouldUpdate",this).call(this,e))return!0;var t=this.editor.view.state.selection,r=this.oldSelection;this.oldSelection=t;var o=this.pos,i=this.posEnd;this.updatePos();var a=t.from,s=t.to,l=r.from,u=r.to;if(this.node.type.spec.selectable){var c=t instanceof p.NodeSelection&&t.from===this.pos,d=r instanceof p.NodeSelection&&r.from===this.pos;if(c&&!d||d&&!c)return!0}var f=this.isNodeInsideSelection(a,s)&&!this.isNodeInsideSelection(l,u),v=!this.isNodeInsideSelection(a,s)&&this.isNodeInsideSelection(l,u),g=this.isNodeInsideSelection(a,s,o,i)&&!this.isNodeInsideSelection(a,s);return!!(f||v||g)}},{key:"destroy",value:function(){this.selectionChangeState.unsubscribe(this.onSelectionChange),Object(h.a)(Object(m.a)(n.prototype),"destroy",this).call(this)}}]),n}(_d);function nf(e,t){return function(n){var r=n.node,o=n.getPos,i=n.editor;return new tf(r,i,(function(){return"boolean"===typeof o?-1:o()}),Object.assign(Object.assign({},t),{component:e})).init()}}var rf=n(23),of=n.n(rf),af=n(30);function sf(){return sf=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sf.apply(this,arguments)}var lf=Object(rf.forwardRef)((function(e,t){return of.a.createElement(af.Box,sf({ref:t,tx:"text"},e))})),uf=(Object(rf.forwardRef)((function(e,t){return of.a.createElement(af.Box,sf({ref:t,as:"h2",tx:"text",variant:"heading"},e,{__css:{fontSize:4,fontFamily:"heading",fontWeight:"heading",lineHeight:"heading"}}))})),Object(rf.forwardRef)((function(e,t){return of.a.createElement(af.Box,sf({ref:t,as:"a",variant:"link"},e))})),Object(rf.forwardRef)((function(e,t){return of.a.createElement(af.Box,sf({ref:t,as:"button",tx:"buttons",variant:"primary"},e,{__css:{appearance:"none",display:"inline-block",textAlign:"center",lineHeight:"inherit",textDecoration:"none",fontSize:"inherit",px:3,py:2,color:"white",bg:"primary",border:0,borderRadius:4}}))}))),cf=Object(rf.forwardRef)((function(e,t){return of.a.createElement(af.Box,sf({ref:t,as:"img"},e,{__css:{maxWidth:"100%",height:"auto"}}))})),df=(Object(rf.forwardRef)((function(e,t){return of.a.createElement(af.Box,sf({ref:t,variant:"card"},e))})),n(61)),ff=n.n(df),pf=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function hf(e){var t=e.title,n=e.path,r=e.size,o=void 0===r?24:r,i=e.color,a=void 0===i?"icon":i,s=e.stroke,l=e.rotate,u=Dd.a.useContext(Ed.a),c=(null===u||void 0===u?void 0:u.colors)?u.colors[a]:a;return Object(Cd.jsx)(ff.a,{className:"icon",title:t,path:n,size:"".concat("string"===typeof o?(null===u||void 0===u?void 0:u.iconSizes[o])||24:o,"px"),style:{strokeWidth:s||"0px",stroke:c},color:c,spin:l})}function mf(e){var t=e.sx,n=e.title,r=e.color,o=e.size,i=e.stroke,a=e.rotate,s=e.path,l=pf(e,["sx","title","color","size","stroke","rotate","path"]);return Object(Cd.jsx)(af.Flex,Object.assign({sx:Object.assign({flexShrink:0,justifyContent:"center",alignItems:"center"},t)},l,{children:Object(Cd.jsx)(hf,{title:n,path:s,rotate:a,color:r,stroke:i,size:o})}))}var vf={bold:"M13.5,15.5H10V12.5H13.5A1.5,1.5 0 0,1 15,14A1.5,1.5 0 0,1 13.5,15.5M10,6.5H13A1.5,1.5 0 0,1 14.5,8A1.5,1.5 0 0,1 13,9.5H10M15.6,10.79C16.57,10.11 17.25,9 17.25,8C17.25,5.74 15.5,4 13.25,4H7V18H14.04C16.14,18 17.75,16.3 17.75,14.21C17.75,12.69 16.89,11.39 15.6,10.79Z",italic:"M10,4V7H12.21L8.79,15H6V18H14V15H11.79L15.21,7H18V4H10Z",underline:"M5,21H19V19H5V21M12,17A6,6 0 0,0 18,11V3H15.5V11A3.5,3.5 0 0,1 12,14.5A3.5,3.5 0 0,1 8.5,11V3H6V11A6,6 0 0,0 12,17Z",strikethrough:"M3,14H21V12H3M5,4V7H10V10H14V7H19V4M10,19H14V16H10V19Z",code:"M14.6,16.6L19.2,12L14.6,7.4L16,6L22,12L16,18L14.6,16.6M9.4,16.6L4.8,12L9.4,7.4L8,6L2,12L8,18L9.4,16.6Z",codeRemove:"M3.62109375 1.83837892 2.26318358 3.13037107 6.46289063 7.536621 1.9995117 12l6.0000003 6 1.40039025-1.400391L4.80029295 12l3.0292968-3.0292965 7.0283205 7.371093-.2578125.2578125L16.000488 18l.224121-.224121 4.3125 4.52490225 1.35791025-1.29492225-4.34326125-4.55712825L22.000488 12l-6-6-1.40039025 1.40039063L19.19970675 12l-3.016113 3.016113L9.156738 7.6435545l.24316425-.24316387L7.999512 6l-.2109375.2109375Z",alignCenter:"M3,3H21V5H3V3M7,7H17V9H7V7M3,11H21V13H3V11M7,15H17V17H7V15M3,19H21V21H3V19Z",alignLeft:"M3,3H21V5H3V3M3,7H15V9H3V7M3,11H21V13H3V11M3,15H15V17H3V15M3,19H21V21H3V19Z",alignRight:"M3,3H21V5H3V3M9,7H21V9H9V7M3,11H21V13H3V11M9,15H21V17H9V15M3,19H21V21H3V19Z",alignJustify:"M3,3H21V5H3V3M3,7H21V9H3V7M3,11H21V13H3V11M3,15H21V17H3V15M3,19H21V21H3V19Z",subscript:"M16,7.41L11.41,12L16,16.59L14.59,18L10,13.41L5.41,18L4,16.59L8.59,12L4,7.41L5.41,6L10,10.59L14.59,6L16,7.41M21.85,21.03H16.97V20.03L17.86,19.23C18.62,18.58 19.18,18.04 19.56,17.6C19.93,17.16 20.12,16.75 20.13,16.36C20.14,16.08 20.05,15.85 19.86,15.66C19.68,15.5 19.39,15.38 19,15.38C18.69,15.38 18.42,15.44 18.16,15.56L17.5,15.94L17.05,14.77C17.32,14.56 17.64,14.38 18.03,14.24C18.42,14.1 18.85,14 19.32,14C20.1,14.04 20.7,14.25 21.1,14.66C21.5,15.07 21.72,15.59 21.72,16.23C21.71,16.79 21.53,17.31 21.18,17.78C20.84,18.25 20.42,18.7 19.91,19.14L19.27,19.66V19.68H21.85V21.03Z",superscript:"M16,7.41L11.41,12L16,16.59L14.59,18L10,13.41L5.41,18L4,16.59L8.59,12L4,7.41L5.41,6L10,10.59L14.59,6L16,7.41M21.85,9H16.97V8L17.86,7.18C18.62,6.54 19.18,6 19.56,5.55C19.93,5.11 20.12,4.7 20.13,4.32C20.14,4.04 20.05,3.8 19.86,3.62C19.68,3.43 19.39,3.34 19,3.33C18.69,3.34 18.42,3.4 18.16,3.5L17.5,3.89L17.05,2.72C17.32,2.5 17.64,2.33 18.03,2.19C18.42,2.05 18.85,2 19.32,2C20.1,2 20.7,2.2 21.1,2.61C21.5,3 21.72,3.54 21.72,4.18C21.71,4.74 21.53,5.26 21.18,5.73C20.84,6.21 20.42,6.66 19.91,7.09L19.27,7.61V7.63H21.85V9Z",horizontalRule:"M19,21H21V19H19M15,21H17V19H15M11,17H13V15H11M19,9H21V7H19M19,5H21V3H19M3,13H21V11H3M11,21H13V19H11M19,17H21V15H19M13,3H11V5H13M13,7H11V9H13M17,3H15V5H17M9,3H7V5H9M5,3H3V5H5M7,21H9V19H7M3,17H5V15H3M5,7H3V9H5M3,21H5V19H3V21Z",codeblock:"M8,3A2,2 0 0,0 6,5V9A2,2 0 0,1 4,11H3V13H4A2,2 0 0,1 6,15V19A2,2 0 0,0 8,21H10V19H8V14A2,2 0 0,0 6,12A2,2 0 0,0 8,10V5H10V3M16,3A2,2 0 0,1 18,5V9A2,2 0 0,0 20,11H21V13H20A2,2 0 0,0 18,15V19A2,2 0 0,1 16,21H14V19H16V14A2,2 0 0,1 18,12A2,2 0 0,1 16,10V5H14V3H16Z",blockquote:"M14,17H17L19,13V7H13V13H16M6,17H9L11,13V7H5V13H8L6,17Z",formatClear:"M6,5V5.18L8.82,8H11.22L10.5,9.68L12.6,11.78L14.21,8H20V5H6M3.27,5L2,6.27L8.97,13.24L6.5,19H9.5L11.07,15.34L16.73,21L18,19.73L3.55,5.27L3.27,5Z",ltr:"M21,18L17,14V17H5V19H17V22M9,10V15H11V4H13V15H15V4H17V2H9A4,4 0 0,0 5,6A4,4 0 0,0 9,10Z",rtl:"M8,17V14L4,18L8,22V19H20V17M10,10V15H12V4H14V15H16V4H18V2H10A4,4 0 0,0 6,6A4,4 0 0,0 10,10Z",numberedList:"M7,13V11H21V13H7M7,19V17H21V19H7M7,7V5H21V7H7M3,8V5H2V4H4V8H3M2,17V16H5V20H2V19H4V18.5H3V17.5H4V17H2M4.25,10A0.75,0.75 0 0,1 5,10.75C5,10.95 4.92,11.14 4.79,11.27L3.12,13H5V14H2V13.08L4,11H2V10H4.25Z",bulletList:"M7,5H21V7H7V5M7,13V11H21V13H7M4,4.5A1.5,1.5 0 0,1 5.5,6A1.5,1.5 0 0,1 4,7.5A1.5,1.5 0 0,1 2.5,6A1.5,1.5 0 0,1 4,4.5M4,10.5A1.5,1.5 0 0,1 5.5,12A1.5,1.5 0 0,1 4,13.5A1.5,1.5 0 0,1 2.5,12A1.5,1.5 0 0,1 4,10.5M7,19V17H21V19H7M4,16.5A1.5,1.5 0 0,1 5.5,18A1.5,1.5 0 0,1 4,19.5A1.5,1.5 0 0,1 2.5,18A1.5,1.5 0 0,1 4,16.5Z",highlight:"M4,17L6.75,14.25L6.72,14.23C6.14,13.64 6.14,12.69 6.72,12.11L11.46,7.37L15.7,11.61L10.96,16.35C10.39,16.93 9.46,16.93 8.87,16.37L8.24,17H4M15.91,2.91C16.5,2.33 17.45,2.33 18.03,2.91L20.16,5.03C20.74,5.62 20.74,6.57 20.16,7.16L16.86,10.45L12.62,6.21L15.91,2.91Z",textColor:"M9.62,12L12,5.67L14.37,12M11,3L5.5,17H7.75L8.87,14H15.12L16.25,17H18.5L13,3H11Z",link:"M7,7H11V9H7A3,3 0 0,0 4,12A3,3 0 0,0 7,15H11V17H7A5,5 0 0,1 2,12A5,5 0 0,1 7,7M17,7A5,5 0 0,1 22,12H20A3,3 0 0,0 17,9H13V7H17M8,11H16V13H8V11M17,12H19V15H22V17H19V20H17V17H14V15H17V12Z",linkRemove:"M17,7H13V8.9H17C18.71,8.9 20.1,10.29 20.1,12C20.1,13.43 19.12,14.63 17.79,15L19.25,16.44C20.88,15.61 22,13.95 22,12A5,5 0 0,0 17,7M16,11H13.81L15.81,13H16V11M2,4.27L5.11,7.38C3.29,8.12 2,9.91 2,12A5,5 0 0,0 7,17H11V15.1H7C5.29,15.1 3.9,13.71 3.9,12C3.9,10.41 5.11,9.1 6.66,8.93L8.73,11H8V13H10.73L13,15.27V17H14.73L18.74,21L20,19.74L3.27,3L2,4.27Z",openLink:"M14,3V5H17.59L7.76,14.83L9.17,16.24L19,6.41V10H21V3M19,19H5V5H12V3H5C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V12H19V19Z",linkEdit:"m19 14 1.28 1.28c.22.21.22.56 0 .77l-1 1L17.23 15l1-1c.11-.11.25-.17.39-.17s.27.06.38.17m-.3 3.63-6.06 6.07h-2.06v-2.06l6.07-6.06zM7 7h4v2H7c-1.6568542 0-3 1.343146-3 3s1.3431458 3 3 3h4v2H7c-2.7614237 0-5-2.238576-5-5 0-2.7614237 2.2385763-5 5-5m10 0c2.761424 0 5 2.2385763 5 5h-2c0-1.656854-1.343146-3-3-3h-4V7h4m-9 4h8v2H8v-2",linkSettings:"M7 7h4v2H7c-1.6568542 0-3 1.343146-3 3s1.3431458 3 3 3h4v2H7c-2.7614237 0-5-2.238576-5-5 0-2.7614237 2.2385763-5 5-5m10 0c2.761424 0 5 2.2385763 5 5h-2c0-1.656854-1.343146-3-3-3h-4V7h4m-9 4h8v2H8v-2m15.119777 8.323608-1.07-.82c.02-.17.04-.33.04-.5 0-.17-.01-.33-.04-.5l1.06-.82c.09258-.07939.117526-.212463.06-.32l-1-1.73c-.06-.13-.19-.13-.33-.13l-1.22.5c-.28-.18-.54-.35-.85-.47l-.19-1.32c-.01-.12-.12-.21-.24-.21h-2c-.12 0-.23.09-.25.21l-.19 1.32c-.3.13-.59.29-.85.47l-1.24-.5c-.11 0-.24 0-.31.13l-1 1.73c-.06.11-.04.24.06.32l1.06.82c-.03989.33214-.03989.66786 0 1l-1.06.82c-.09258.07939-.117526.212462-.06.32l1 1.73c.06.13.19.13.31.13l1.24-.5c.26.18.54.35.85.47l.19 1.32c.02.12.12.21.25.21h2c.12 0 .23-.09.25-.21l.19-1.32c.3-.13.56-.29.84-.47l1.22.5c.14 0 .27 0 .34-.13l1-1.73c.05753-.107538.03258-.240607-.06-.32m-4.78.18c-.83 0-1.5-.67-1.5-1.5s.68-1.5 1.5-1.5 1.5.67 1.5 1.5-.66 1.5-1.5 1.5z",url:"M3.9,12C3.9,10.29 5.29,8.9 7,8.9H11V7H7A5,5 0 0,0 2,12A5,5 0 0,0 7,17H11V15.1H7C5.29,15.1 3.9,13.71 3.9,12M8,13H16V11H8V13M17,7H13V8.9H17C18.71,8.9 20.1,10.29 20.1,12C20.1,13.71 18.71,15.1 17,15.1H13V17H17A5,5 0 0,0 22,12A5,5 0 0,0 17,7Z",image:"M19,19H5V5H19M19,3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5A2,2 0 0,0 19,3M13.96,12.29L11.21,15.83L9.25,13.47L6.5,17H17.5L13.96,12.29Z",imageDownload:"M13,2.03C17.73,2.5 21.5,6.25 21.95,11C22.5,16.5 18.5,21.38 13,21.93V19.93C16.64,19.5 19.5,16.61 19.96,12.97C20.5,8.58 17.39,4.59 13,4.05V2.05L13,2.03M11,2.06V4.06C9.57,4.26 8.22,4.84 7.1,5.74L5.67,4.26C7.19,3 9.05,2.25 11,2.06M4.26,5.67L5.69,7.1C4.8,8.23 4.24,9.58 4.05,11H2.05C2.25,9.04 3,7.19 4.26,5.67M2.06,13H4.06C4.24,14.42 4.81,15.77 5.69,16.9L4.27,18.33C3.03,16.81 2.26,14.96 2.06,13M7.1,18.37C8.23,19.25 9.58,19.82 11,20V22C9.04,21.79 7.18,21 5.67,19.74L7.1,18.37M12,16.5L7.5,12H11V8H13V12H16.5L12,16.5Z",imageFailed:"M13,2V4C17.39,4.54 20.5,8.53 19.96,12.92C19.5,16.56 16.64,19.43 13,19.88V21.88C18.5,21.28 22.45,16.34 21.85,10.85C21.33,6.19 17.66,2.5 13,2M11,2C9.04,2.18 7.19,2.95 5.67,4.2L7.1,5.74C8.22,4.84 9.57,4.26 11,4.06V2.06M4.26,5.67C3,7.19 2.24,9.04 2.05,11H4.05C4.24,9.58 4.8,8.23 5.69,7.1L4.26,5.67M2.06,13C2.26,14.96 3.03,16.81 4.27,18.33L5.69,16.9C4.81,15.77 4.24,14.42 4.06,13H2.06M7.06,18.37L5.67,19.74C7.18,21 9.04,21.79 11,22V20C9.58,19.82 8.23,19.25 7.1,18.37H7.06M13,13V7H11V13H13M13,17V15H11V17H13Z",imageSettings:"M22.7 14.3L21.7 15.3L19.7 13.3L20.7 12.3C20.8 12.2 20.9 12.1 21.1 12.1C21.2 12.1 21.4 12.2 21.5 12.3L22.8 13.6C22.9 13.8 22.9 14.1 22.7 14.3M13 19.9V22H15.1L21.2 15.9L19.2 13.9L13 19.9M11.21 15.83L9.25 13.47L6.5 17H13.12L15.66 14.55L13.96 12.29L11.21 15.83M11 19.9V19.05L11.05 19H5V5H19V11.31L21 9.38V5C21 3.9 20.11 3 19 3H5C3.9 3 3 3.9 3 5V19C3 20.11 3.9 21 5 21H11V19.9Z",colorClear:"M20.65,20.87L18.3,18.5L12,12.23L8.44,8.66L7,7.25L4.27,4.5L3,5.77L5.78,8.55C3.23,11.69 3.42,16.31 6.34,19.24C7.9,20.8 9.95,21.58 12,21.58C13.79,21.58 15.57,21 17.03,19.8L19.73,22.5L21,21.23L20.65,20.87M12,19.59C10.4,19.59 8.89,18.97 7.76,17.83C6.62,16.69 6,15.19 6,13.59C6,12.27 6.43,11 7.21,10L12,14.77V19.59M12,5.1V9.68L19.25,16.94C20.62,14 20.09,10.37 17.65,7.93L12,2.27L8.3,5.97L9.71,7.38L12,5.1Z",check:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z",checkbox:"M19,19H5V5H15V3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V11H19M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z",loading:"M12,4V2A10,10 0 0,0 2,12H4A8,8 0 0,1 12,4Z",more:"M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z",upload:"M9,10V16H15V10H19L12,3L5,10H9M12,5.8L14.2,8H13V14H11V8H9.8L12,5.8M19,18H5V20H19V18Z",camera:"M20,4H16.83L15,2H9L7.17,4H4A2,2 0 0,0 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V6A2,2 0 0,0 20,4M20,18H4V6H8.05L9.88,4H14.12L15.95,6H20V18M12,7A5,5 0 0,0 7,12A5,5 0 0,0 12,17A5,5 0 0,0 17,12A5,5 0 0,0 12,7M12,15A3,3 0 0,1 9,12A3,3 0 0,1 12,9A3,3 0 0,1 15,12A3,3 0 0,1 12,15Z",attachment:"M7.5,18A5.5,5.5 0 0,1 2,12.5A5.5,5.5 0 0,1 7.5,7H18A4,4 0 0,1 22,11A4,4 0 0,1 18,15H9.5A2.5,2.5 0 0,1 7,12.5A2.5,2.5 0 0,1 9.5,10H17V11.5H9.5A1,1 0 0,0 8.5,12.5A1,1 0 0,0 9.5,13.5H18A2.5,2.5 0 0,0 20.5,11A2.5,2.5 0 0,0 18,8.5H7.5A4,4 0 0,0 3.5,12.5A4,4 0 0,0 7.5,16.5H17V18H7.5Z",table:"M5,4H19A2,2 0 0,1 21,6V18A2,2 0 0,1 19,20H5A2,2 0 0,1 3,18V6A2,2 0 0,1 5,4M5,8V12H11V8H5M13,8V12H19V8H13M5,14V18H11V14H5M13,14V18H19V14H13Z",rowProperties:"M3,5H15A2,2 0 0,1 17,7V17A2,2 0 0,1 15,19H3A2,2 0 0,1 1,17V7A2,2 0 0,1 3,5M3,9V12H8V9H3M10,9V12H15V9H10M3,14V17H8V14H3M10,14V17H15V14H10M23,14V7H19V9H21V12H19V14H23Z",insertRowBelow:"M22,10A2,2 0 0,1 20,12H4A2,2 0 0,1 2,10V3H4V5H8V3H10V5H14V3H16V5H20V3H22V10M4,10H8V7H4V10M10,10H14V7H10V10M20,10V7H16V10H20M11,14H13V17H16V19H13V22H11V19H8V17H11V14Z",insertRowAbove:"M22,14A2,2 0 0,0 20,12H4A2,2 0 0,0 2,14V21H4V19H8V21H10V19H14V21H16V19H20V21H22V14M4,14H8V17H4V14M10,14H14V17H10V14M20,14V17H16V14H20M11,10H13V7H16V5H13V2H11V5H8V7H11V10Z",moveRowDown:"M22,4V2H2V4H11V18.17L5.5,12.67L4.08,14.08L12,22L19.92,14.08L18.5,12.67L13,18.17V4H22Z",moveRowUp:"M2,20V22H22V20H13V5.83L18.5,11.33L19.92,9.92L12,2L4.08,9.92L5.5,11.33L11,5.83V20H2Z",deleteRow:"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",toggleHeaderRow:"M21,19A1,1 0 0,1 20,20H19V18H21V19M15,20V18H17V20H15M11,20V18H13V20H11M7,20V18H9V20H7M4,20A1,1 0 0,1 3,19V18H5V20H4M19,4H5A2,2 0 0,0 3,6V8H5L11,8H13L19,8H21V6C21,4.89 20.11,4 19,4M5,14H3V16H5V14M5,10H3V12H5V10M21,10H19V12H21V10M21,14H19V16H21V14M11,16V14H13V16H11M11,12V10H13V12H11",columnProperties:"M5,8H19A2,2 0 0,1 21,10V20A2,2 0 0,1 19,22H5A2,2 0 0,1 3,20V10A2,2 0 0,1 5,8M5,12V15H11V12H5M13,12V15H19V12H13M5,17V20H11V17H5M13,17V20H19V17H13M11,2H21V6H19V4H13V6H11V2Z",insertColumnRight:"M11,2A2,2 0 0,1 13,4V20A2,2 0 0,1 11,22H2V2H11M4,10V14H11V10H4M4,16V20H11V16H4M4,4V8H11V4H4M15,11H18V8H20V11H23V13H20V16H18V13H15V11Z",insertColumnLeft:"M13,2A2,2 0 0,0 11,4V20A2,2 0 0,0 13,22H22V2H13M20,10V14H13V10H20M20,16V20H13V16H20M20,4V8H13V4H20M9,11H6V8H4V11H1V13H4V16H6V13H9V11Z",moveColumnRight:"M4,2H2V22H4V13H18.17L12.67,18.5L14.08,19.92L22,12L14.08,4.08L12.67,5.5L18.17,11H4V2Z",moveColumnLeft:"M20,22H22V2H20V11H5.83L11.33,5.5L9.92,4.08L2,12L9.92,19.92L11.33,18.5L5.83,13H20V22Z",deleteColumn:"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",cellProperties:"M4,6V19H20V6H4Z",cellBorderColor:"M4 24q-.825 0-1.412-.587Q2 22.825 2 22q0-.825.588-1.413Q3.175 20 4 20h16q.825 0 1.413.587Q22 21.175 22 22q0 .825-.587 1.413Q20.825 24 20 24Zm1-6q-.425 0-.713-.288Q4 17.425 4 17v-2.325q0-.2.075-.388q.075-.187.225-.337l8.75-8.75l3.75 3.75l-8.75 8.75q-.15.15-.337.225q-.188.075-.388.075Zm1-2h.9L14 8.95L13.05 8L6 15.1Zm11.925-8.15l-3.75-3.75l1.8-1.8q.275-.3.7-.288q.425.013.7.288l2.35 2.35q.275.275.275.688q0 .412-.275.712ZM6 16Z",backgroundColor:"M19,11.5C19,11.5 17,13.67 17,15A2,2 0 0,0 19,17A2,2 0 0,0 21,15C21,13.67 19,11.5 19,11.5M5.21,10L10,5.21L14.79,10M16.56,8.94L7.62,0L6.21,1.41L8.59,3.79L3.44,8.94C2.85,9.5 2.85,10.47 3.44,11.06L8.94,16.56C9.23,16.85 9.62,17 10,17C10.38,17 10.77,16.85 11.06,16.56L16.56,11.06C17.15,10.47 17.15,9.5 16.56,8.94Z",borderColor:"M4 24q-.825 0-1.412-.587Q2 22.825 2 22q0-.825.588-1.413Q3.175 20 4 20h16q.825 0 1.413.587Q22 21.175 22 22q0 .825-.587 1.413Q20.825 24 20 24Zm1-6q-.425 0-.713-.288Q4 17.425 4 17v-2.325q0-.2.075-.388q.075-.187.225-.337l8.75-8.75l3.75 3.75l-8.75 8.75q-.15.15-.337.225q-.188.075-.388.075Zm1-2h.9L14 8.95L13.05 8L6 15.1Zm11.925-8.15l-3.75-3.75l1.8-1.8q.275-.3.7-.288q.425.013.7.288l2.35 2.35q.275.275.275.688q0 .412-.275.712ZM6 16Z",sortDesc:"M19 7H22L18 3L14 7H17V21H19M2 17H12V19H2M6 5V7H2V5M2 11H9V13H2V11Z",deleteTable:"M22.11 21.46L2.39 1.73L1.11 3L3.22 5.11C3.08 5.38 3 5.68 3 6V18C3 19.11 3.9 20 5 20H18.11L20.84 22.73L22.11 21.46M10.11 12H5V8H6.11L10.11 12M11 18H5V14H11V18M13 18V14.89L16.11 18H13M13 9.8L7.2 4H19C20.11 4 21 4.89 21 6V17.8L19 15.8V14H17.2L15.2 12H19V8H13V9.8Z",mergeCells:"M5,10H3V4H11V6H5V10M19,18H13V20H21V14H19V18M5,18V14H3V20H11V18H5M21,4H13V6H19V10H21V4M8,13V15L11,12L8,9V11H3V13H8M16,11V9L13,12L16,15V13H21V11H16Z",splitCells:"M19 14H21V20H3V14H5V18H19V14M3 4V10H5V6H19V10H21V4H3M11 11V13H8V15L5 12L8 9V11H11M16 11V9L19 12L16 15V13H13V11H16Z",checklist:"M21,19V17H8V19H21M21,13V11H8V13H21M8,7H21V5H8V7M4,5V7H6V5H4M3,5A1,1 0 0,1 4,4H6A1,1 0 0,1 7,5V7A1,1 0 0,1 6,8H4A1,1 0 0,1 3,7V5M4,11V13H6V11H4M3,11A1,1 0 0,1 4,10H6A1,1 0 0,1 7,11V13A1,1 0 0,1 6,14H4A1,1 0 0,1 3,13V11M4,17V19H6V17H4M3,17A1,1 0 0,1 4,16H6A1,1 0 0,1 7,17V19A1,1 0 0,1 6,20H4A1,1 0 0,1 3,19V17Z",dragHandle:"M7,19V17H9V19H7M11,19V17H13V19H11M15,19V17H17V19H15M7,15V13H9V15H7M11,15V13H13V15H11M15,15V13H17V15H15M7,11V9H9V11H7M11,11V9H13V11H11M15,11V9H17V11H15M7,7V5H9V7H7M11,7V5H13V7H11M15,7V5H17V7H15Z",previousMatch:"M13,20H11V8L5.5,13.5L4.08,12.08L12,4.16L19.92,12.08L18.5,13.5L13,8V20Z",nextMatch:"M11,4H13V16L18.5,10.5L19.92,11.92L12,19.84L4.08,11.92L5.5,10.5L11,16V4Z",replaceOne:"m5.4 5.42 3.48 3.5 3.43-3.43-1.08-1.08-1.57 1.55V3.5a.8.8 0 0 1 .76-.81h2.35v-1.5h-2.35a2.29 2.29 0 0 0-2.28 2.3v2.5L6.48 4.33Zm10.3 2.77c.3.48.7.72 1.25.72.61 0 1.1-.26 1.45-.78.37-.51.55-1.2.55-2.05 0-.8-.15-1.41-.46-1.87a1.51 1.51 0 0 0-1.33-.68c-.63 0-1.11.3-1.45.9h-.02V1.19h-1.37v7.6h1.37v-.6Zm-.03-1.64v-.52c0-.39.09-.7.27-.93a.83.83 0 0 1 .69-.36.76.76 0 0 1 .67.36c.16.24.24.57.24 1 0 .5-.09.9-.26 1.18a.8.8 0 0 1-.73.42.76.76 0 0 1-.63-.33 1.32 1.32 0 0 1-.25-.82zm-1.35 12.82c-.4.23-.97.35-1.71.35-.87 0-1.58-.27-2.12-.82a2.9 2.9 0 0 1-.8-2.12c0-1 .28-1.8.86-2.37a3.12 3.12 0 0 1 2.31-.87c.67 0 1.16.1 1.46.28v1.54a1.95 1.95 0 0 0-1.23-.42c-.5 0-.9.15-1.2.46-.29.3-.43.72-.43 1.26 0 .52.14.93.42 1.23.28.3.67.44 1.16.44.43 0 .86-.14 1.28-.43zm-7.73-8.91L5.05 12v9.27l1.54 1.54h10.82l1.54-1.54V12l-1.54-1.54zm0 1.54h10.82v9.27H6.59Z",replaceAll:"M16.53 4.22c.22-.45.52-.68.92-.68.36 0 .64.17.83.52.2.34.3.81.3 1.4a3.1 3.1 0 0 1-.35 1.57c-.22.39-.53.59-.91.59-.35 0-.61-.19-.79-.55h-.01v.45h-.87V1.77h.87v2.45h.01zm-.02 1.6a1.14 1.14 0 0 0 .15.63c.1.17.24.25.4.25.2 0 .35-.1.46-.32a2 2 0 0 0 .17-.9c0-.32-.05-.57-.15-.75-.1-.18-.24-.27-.43-.27-.17 0-.32.09-.43.27a1.3 1.3 0 0 0-.17.7ZM5.6 11.56l-3.1-3.1.97-.97 1.47 1.46v-2.2A2.03 2.03 0 0 1 6.96 4.7h3.43v1.32H6.96a.72.72 0 0 0-.68.73l.01 2.19 1.39-1.38.96.96-3.04 3.04Zm7.65-4.04h.94v-2.5c0-1.18-.46-1.78-1.38-1.78-.2 0-.41.04-.66.1a2.11 2.11 0 0 0-.56.25v.97c.34-.3.71-.44 1.1-.44.38 0 .57.23.57.68l-.88.16c-.74.12-1.11.59-1.11 1.4 0 .38.09.7.27.92a.9.9 0 0 0 .74.35c.42 0 .74-.24.96-.7h.01zm0-1.98v.28a1.1 1.1 0 0 1-.17.64.54.54 0 0 1-.46.25.4.4 0 0 1-.32-.14.56.56 0 0 1-.11-.36c0-.33.16-.51.48-.57l.59-.1zM9.82 19.21h-.94v-.6h-.02c-.21.46-.53.7-.96.7a.9.9 0 0 1-.74-.35 1.47 1.47 0 0 1-.27-.92c0-.8.38-1.28 1.12-1.4l.87-.15c0-.46-.19-.69-.57-.69-.38 0-.75.15-1.1.45v-.98c.14-.09.33-.17.57-.24.24-.07.46-.1.66-.1.92 0 1.38.59 1.38 1.78zm-.94-1.7v-.29l-.58.1c-.33.06-.49.25-.49.57 0 .15.04.27.12.36a.4.4 0 0 0 .32.14.54.54 0 0 0 .46-.25c.11-.17.17-.38.17-.63zm4.24 1.8c.47 0 .83-.09 1.08-.26v-1.03a1.32 1.32 0 0 1-.8.3.9.9 0 0 1-.74-.31c-.17-.22-.26-.5-.26-.88s.1-.68.28-.9a.94.94 0 0 1 .75-.32c.28 0 .54.1.77.3v-1.1c-.19-.12-.5-.19-.91-.19-.61 0-1.1.2-1.47.62-.36.4-.54.97-.54 1.68 0 .61.17 1.11.5 1.5.35.4.8.59 1.34.59zM2.5 13.46 3.96 12h13.16l1.46 1.46v7.3l-1.46 1.47H3.96L2.5 20.77Zm1.46 0v7.3h13.16v-7.3Zm4.39-2.92L9.8 9.08h10.23l1.46 1.46v7.3l-1.46 1.47v-8.77z",replace:"M21 4.5000005V14.25a1.5000007 1.5000005 0 0 1-1.500007 1.500005h-8.999996v1.49999a.74999993.74999995 0 0 1-.459373.693747.79687482.79687478 0 0 1-.290624.056263.77812509.77812509 0 0 1-.534375-.215621l-2.25-2.25a.759375.759375 0 0 1 0-1.068763l2.25-2.25a.7875.7875 0 0 1 .824999-.159371.74999993.74999995 0 0 1 .459373.693745V14.25h8.999996V4.5000005H9.0000007v.7499997a.75000036.75000039 0 0 1-1.5000007 0v-.7499997A1.5000007 1.5000005 0 0 1 9.0000007 3H19.499993A1.5000007 1.5000005 0 0 1 21 4.5000005ZM15.750007 18.000005a.74999993.74999995 0 0 0-.750014.749995v.749995H4.5000007V9.7500002h9.0000063v1.5000048a.759375.759375 0 0 0 .459381.693745.79687482.79687478 0 0 0 .290612.05631.77812509.77812509 0 0 0 .534372-.215621l2.25-2.2500079a.759375.759375 0 0 0 0-1.06875l-2.25-2.25a.76875023.76875019 0 0 0-.824984-.1594227.74999993.74999995 0 0 0-.459381.6937502v1.4999978H4.5000007A1.5000007 1.5000005 0 0 0 3 9.7500002v9.7499948A1.5000007 1.5000005 0 0 0 4.5000007 21H14.999993A1.5000007 1.5000005 0 0 0 16.5 19.499995V18.75a.74999993.74999995 0 0 0-.749993-.749995z",attachmentSettings:"m24.0138 20.223188-1.07-.82c.02-.17.04-.33.04-.5 0-.17-.01-.33-.04-.5l1.06-.82c.09258-.07939.117526-.212463.06-.32l-1-1.73c-.06-.13-.19-.13-.33-.13l-1.22.5c-.28-.18-.54-.35-.85-.47l-.19-1.32c-.01-.12-.12-.21-.24-.21h-2c-.12 0-.23.09-.25.21l-.19 1.32c-.3.13-.59.29-.85.47l-1.24-.5c-.11 0-.24 0-.31.13l-1 1.73c-.06.11-.04.24.06.32l1.06.82c-.03989.33214-.03989.66786 0 1l-1.06.82c-.09258.07939-.117526.212463-.06.32l1 1.73c.06.13.19.13.31.13l1.24-.5c.26.18.54.35.85.47l.19 1.32c.02.12.12.21.25.21h2c.12 0 .23-.09.25-.21l.19-1.32c.3-.13.56-.29.84-.47l1.22.5c.14 0 .27 0 .34-.13l1-1.73c.05753-.107537.03258-.240606-.06-.32m-4.78.18c-.83 0-1.5-.67-1.5-1.5s.68-1.5 1.5-1.5 1.5.67 1.5 1.5-.66 1.5-1.5 1.5zM16.61 13.5c-.8.35-1.5.86-2.07 1.5H9.5c-3.3333319 0-3.3333319-5 0-5H17v1.5H9.5c-.55 0-1 .45-1 1s.45 1 1 1h7.11m-13.11-1c0-2.21 1.79-4 4-4H18c2.434718-.00632 3.435847 3.121347 1.45 4.53.6.04 1.18.17 1.72.38.52-.67.83-1.5.83-2.41 0-2.21-1.79-4-4-4H7.5C4.46 7 2 9.46 2 12.5S4.46 18 7.5 18h5.59c.09-.53.25-1.03.46-1.5H7.5c-2.21 0-4-1.79-4-4",caseSensitive:"M20.06,18C20,17.83 19.91,17.54 19.86,17.11C19.19,17.81 18.38,18.16 17.45,18.16C16.62,18.16 15.93,17.92 15.4,17.45C14.87,17 14.6,16.39 14.6,15.66C14.6,14.78 14.93,14.1 15.6,13.61C16.27,13.12 17.21,12.88 18.43,12.88H19.83V12.24C19.83,11.75 19.68,11.36 19.38,11.07C19.08,10.78 18.63,10.64 18.05,10.64C17.53,10.64 17.1,10.76 16.75,11C16.4,11.25 16.23,11.54 16.23,11.89H14.77C14.77,11.46 14.92,11.05 15.22,10.65C15.5,10.25 15.93,9.94 16.44,9.71C16.95,9.5 17.5,9.36 18.13,9.36C19.11,9.36 19.87,9.6 20.42,10.09C20.97,10.58 21.26,11.25 21.28,12.11V16C21.28,16.8 21.38,17.42 21.58,17.88V18H20.06M17.66,16.88C18.11,16.88 18.54,16.77 18.95,16.56C19.35,16.35 19.65,16.07 19.83,15.73V14.16H18.7C16.93,14.16 16.04,14.63 16.04,15.57C16.04,16 16.19,16.3 16.5,16.53C16.8,16.76 17.18,16.88 17.66,16.88M5.46,13.71H9.53L7.5,8.29L5.46,13.71M6.64,6H8.36L13.07,18H11.14L10.17,15.43H4.82L3.86,18H1.93L6.64,6Z",wholeWord:"M11.14 4L6.43 16H8.36L9.32 13.43H14.67L15.64 16H17.57L12.86 4M12 6.29L14.03 11.71H9.96M20 14V18H4V15H2V20H22V14Z",regex:"M16,16.92C15.67,16.97 15.34,17 15,17C14.66,17 14.33,16.97 14,16.92V13.41L11.5,15.89C11,15.5 10.5,15 10.11,14.5L12.59,12H9.08C9.03,11.67 9,11.34 9,11C9,10.66 9.03,10.33 9.08,10H12.59L10.11,7.5C10.3,7.25 10.5,7 10.76,6.76V6.76C11,6.5 11.25,6.3 11.5,6.11L14,8.59V5.08C14.33,5.03 14.66,5 15,5C15.34,5 15.67,5.03 16,5.08V8.59L18.5,6.11C19,6.5 19.5,7 19.89,7.5L17.41,10H20.92C20.97,10.33 21,10.66 21,11C21,11.34 20.97,11.67 20.92,12H17.41L19.89,14.5C19.7,14.75 19.5,15 19.24,15.24V15.24C19,15.5 18.75,15.7 18.5,15.89L16,13.41V16.92H16V16.92M5,19A2,2 0 0,1 7,17A2,2 0 0,1 9,19A2,2 0 0,1 7,21A2,2 0 0,1 5,19H5Z",embed:"M13 19C13 19.34 13.04 19.67 13.09 20H4C2.9 20 2 19.11 2 18V6C2 4.89 2.9 4 4 4H5L7 8H10L8 4H10L12 8H15L13 4H15L17 8H20L18 4H22V13.81C21.39 13.46 20.72 13.22 20 13.09V10H5.76L4 6.47V18H13.09C13.04 18.33 13 18.66 13 19M20 18V15H18V18H15V20H18V23H20V20H23V18H20Z",embedSettings:"M12 19C12 19.34 12.03 19.67 12.08 20H4C2.9 20 2 19.11 2 18V6C2 4.89 2.9 4 4 4H5L7 8H10L8 4H10L12 8H15L13 4H15L17 8H20L18 4H22V12.68C21.38 12.39 20.71 12.18 20 12.08V10H5.76L4 6.47V18H12.08C12.03 18.33 12 18.66 12 19M23.8 20.4C23.9 20.4 23.9 20.5 23.8 20.6L22.8 22.3C22.7 22.4 22.6 22.4 22.5 22.4L21.3 22C21 22.2 20.8 22.3 20.5 22.5L20.3 23.8C20.3 23.9 20.2 24 20.1 24H18.1C18 24 17.9 23.9 17.8 23.8L17.6 22.5C17.3 22.4 17 22.2 16.8 22L15.6 22.5C15.5 22.5 15.4 22.5 15.3 22.4L14.3 20.7C14.2 20.6 14.3 20.5 14.4 20.4L15.5 19.6V18.6L14.4 17.8C14.3 17.7 14.3 17.6 14.3 17.5L15.3 15.8C15.4 15.7 15.5 15.7 15.6 15.7L16.8 16.2C17.1 16 17.3 15.9 17.6 15.7L17.8 14.4C17.8 14.3 17.9 14.2 18.1 14.2H20.1C20.2 14.2 20.3 14.3 20.3 14.4L20.5 15.7C20.8 15.8 21.1 16 21.4 16.2L22.6 15.7C22.7 15.7 22.9 15.7 22.9 15.8L23.9 17.5C24 17.6 23.9 17.7 23.8 17.8L22.7 18.6V19.6L23.8 20.4M20.5 19C20.5 18.2 19.8 17.5 19 17.5S17.5 18.2 17.5 19 18.2 20.5 19 20.5 20.5 19.8 20.5 19Z",palette:"M12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2C17.5,2 22,6 22,11A6,6 0 0,1 16,17H14.2C13.9,17 13.7,17.2 13.7,17.5C13.7,17.6 13.8,17.7 13.8,17.8C14.2,18.3 14.4,18.9 14.4,19.5C14.5,20.9 13.4,22 12,22M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20C12.3,20 12.5,19.8 12.5,19.5C12.5,19.3 12.4,19.2 12.4,19.1C12,18.6 11.8,18.1 11.8,17.5C11.8,16.1 12.9,15 14.3,15H16A4,4 0 0,0 20,11C20,7.1 16.4,4 12,4M6.5,10C7.3,10 8,10.7 8,11.5C8,12.3 7.3,13 6.5,13C5.7,13 5,12.3 5,11.5C5,10.7 5.7,10 6.5,10M9.5,6C10.3,6 11,6.7 11,7.5C11,8.3 10.3,9 9.5,9C8.7,9 8,8.3 8,7.5C8,6.7 8.7,6 9.5,6M14.5,6C15.3,6 16,6.7 16,7.5C16,8.3 15.3,9 14.5,9C13.7,9 13,8.3 13,7.5C13,6.7 13.7,6 14.5,6M17.5,10C18.3,10 19,10.7 19,11.5C19,12.3 18.3,13 17.5,13C16.7,13 16,12.3 16,11.5C16,10.7 16.7,10 17.5,10Z",tableSettings:"M3 3H17C18.11 3 19 3.9 19 5V12.08C17.45 11.82 15.92 12.18 14.68 13H11V17H12.08C11.97 17.68 11.97 18.35 12.08 19H3C1.9 19 1 18.11 1 17V5C1 3.9 1.9 3 3 3M3 7V11H9V7H3M11 7V11H17V7H11M3 13V17H9V13H3M22.78 19.32L21.71 18.5C21.73 18.33 21.75 18.17 21.75 18S21.74 17.67 21.71 17.5L22.77 16.68C22.86 16.6 22.89 16.47 22.83 16.36L21.83 14.63C21.77 14.5 21.64 14.5 21.5 14.5L20.28 15C20 14.82 19.74 14.65 19.43 14.53L19.24 13.21C19.23 13.09 19.12 13 19 13H17C16.88 13 16.77 13.09 16.75 13.21L16.56 14.53C16.26 14.66 15.97 14.82 15.71 15L14.47 14.5C14.36 14.5 14.23 14.5 14.16 14.63L13.16 16.36C13.1 16.47 13.12 16.6 13.22 16.68L14.28 17.5C14.26 17.67 14.25 17.83 14.25 18S14.26 18.33 14.28 18.5L13.22 19.32C13.13 19.4 13.1 19.53 13.16 19.64L14.16 21.37C14.22 21.5 14.35 21.5 14.47 21.5L15.71 21C15.97 21.18 16.25 21.35 16.56 21.47L16.75 22.79C16.77 22.91 16.87 23 17 23H19C19.12 23 19.23 22.91 19.25 22.79L19.44 21.47C19.74 21.34 20 21.18 20.28 21L21.5 21.5C21.64 21.5 21.77 21.5 21.84 21.37L22.84 19.64C22.9 19.53 22.87 19.4 22.78 19.32M18 19.5C17.17 19.5 16.5 18.83 16.5 18S17.18 16.5 18 16.5 19.5 17.17 19.5 18 18.84 19.5 18 19.5Z",math:"M12.42,5.29C11.32,5.19 10.35,6 10.25,7.11L10,10H12.82V12H9.82L9.38,17.07C9.18,19.27 7.24,20.9 5.04,20.7C3.79,20.59 2.66,19.9 2,18.83L3.5,17.33C3.83,18.38 4.96,18.97 6,18.63C6.78,18.39 7.33,17.7 7.4,16.89L7.82,12H4.82V10H8L8.27,6.93C8.46,4.73 10.39,3.1 12.6,3.28C13.86,3.39 15,4.09 15.66,5.17L14.16,6.67C13.91,5.9 13.23,5.36 12.42,5.29M22,13.65L20.59,12.24L17.76,15.07L14.93,12.24L13.5,13.65L16.35,16.5L13.5,19.31L14.93,20.72L17.76,17.89L20.59,20.72L22,19.31L19.17,16.5L22,13.65Z",mathBlock:"M11.5 19.1C11.3 20.2 10.9 21 10.2 21.5C9.5 22 8.6 22.1 7.5 21.9C7.1 21.8 6.3 21.7 6 21.5L6.5 20C6.8 20.1 7.4 20.3 7.7 20.3C8.8 20.5 9.4 20 9.6 18.8L12 5.2C12.2 4 12.7 3.2 13.4 2.6C14.1 2.1 15.1 1.9 16.2 2.1C16.6 2.2 17.4 2.3 18 2.6L17.5 4C17.3 3.9 16.6 3.8 16.3 3.7C15 3.5 14.3 4.1 14 5.6L11.5 19.1Z",outlineList:"M12 13H7V18H12V20H5V10H7V11H12V13M8 4V6H4V4H8M10 2H2V8H10V2M20 11V13H16V11H20M22 9H14V15H22V9M20 18V20H16V18H20M22 16H14V22H22V16Z",fontFamily:"M17,8H20V20H21V21H17V20H18V17H14L12.5,20H14V21H10V20H11L17,8M18,9L14.5,16H18V9M5,3H10C11.11,3 12,3.89 12,5V16H9V11H6V16H3V5C3,3.89 3.89,3 5,3M6,5V9H9V5H6Z",fontSize:"M5.12,14L7.5,7.67L9.87,14M6.5,5L1,19H3.25L4.37,16H10.62L11.75,19H14L8.5,5H6.5M18,7L13,12.07L14.41,13.5L17,10.9V17H19V10.9L21.59,13.5L23,12.07L18,7Z",heading:"M3,4H5V10H9V4H11V18H9V12H5V18H3V4M13,8H15.31L15.63,5H17.63L17.31,8H19.31L19.63,5H21.63L21.31,8H23V10H21.1L20.9,12H23V14H20.69L20.37,17H18.37L18.69,14H16.69L16.37,17H14.37L14.69,14H13V12H14.9L15.1,10H13V8M17.1,10L16.9,12H18.9L19.1,10H17.1Z",indent:"M11,13H21V11H11M11,9H21V7H11M3,3V5H21V3M11,17H21V15H11M3,8V16L7,12M3,21H21V19H3V21Z",outdent:"M11,13H21V11H11M11,9H21V7H11M3,3V5H21V3M3,21H21V19H3M3,12L7,16V8M11,17H21V15H11V17Z",plus:"M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z",minus:"M19,13H5V11H19V13Z",close:"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z",delete:"M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19M8,9H16V19H8V9M15.5,4L14.5,3H9.5L8.5,4H5V6H19V4H15.5Z",download:"M13,5V11H14.17L12,13.17L9.83,11H11V5H13M15,3H9V9H5L12,16L19,9H15V3M19,18H5V20H19V18Z",chevronDown:"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z",chevronUp:"M7.41,15.41L12,10.83L16.59,15.41L18,14L12,8L6,14L7.41,15.41Z",chevronRight:"M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z",chevronLeft:"M15.41,16.58L10.83,12L15.41,7.41L14,6L8,12L14,18L15.41,16.58Z",circle:"M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z",arrowLeft:"M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z",resize:"M22,22H20V20H22V22M22,18H20V16H22V18M18,22H16V20H18V22M18,18H16V16H18V18M14,22H12V20H14V22M22,14H20V12H22V14Z",none:""},gf=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},yf=Object(jd.forwardRef)((function(e,t){var n,r=e.sx,o=gf(e,["sx"]),i=(null===(n=null===r||void 0===r?void 0:r[":hover"])||void 0===n?void 0:n.bg)||"hover",a=(null===r||void 0===r?void 0:r.bg)||"unset",s=Object(jd.useRef)();Object(jd.useEffect)((function(){if(s.current)return s.current.addEventListener("mousedown",l,{passive:!1,capture:!0}),function(){var e;null===(e=s.current)||void 0===e||e.removeEventListener("mousedown",l,{capture:!0})}}),[]);var l=Object(jd.useCallback)((function(e){e.preventDefault()}),[]);return Object(Cd.jsx)(uf,Object.assign({},o,{sx:Object.assign(Object.assign({},r),{":hover":{bg:[a,i]},":active":{bg:i}}),ref:function(e){s.current=e,"function"===typeof t?t(e):t&&(t.current=e)},onClick:e.onClick}))})),bf=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},wf=Dd.a.memo((function(e){var t=e.id,n=e.icon,r=e.iconSize,o=e.iconColor,i=e.toggled,a=e.sx,s=e.buttonRef,l=e.variant,u=void 0===l?"normal":l,c=bf(e,["id","icon","iconSize","iconColor","toggled","sx","buttonRef","variant"]);return Object(Cd.jsx)(yf,Object.assign({ref:s,tabIndex:-1,id:"tool-".concat(t||n),sx:Object.assign({flexShrink:0,p:"small"===u?"small":1,borderRadius:"small"===u?"small":"default",m:0,bg:i?"hover":"transparent",mr:"small"===u?0:1,":hover":{bg:"hover"},":last-of-type":{mr:0}},a),onMouseDown:function(e){return e.preventDefault()}},c,{children:Object(Cd.jsx)(mf,{path:vf[n],color:o||"icon",size:r||("small"===u?"medium":"big")})}))}),(function(e,t){return e.toggled===t.toggled&&e.icon===t.icon&&JSON.stringify(e.sx)===JSON.stringify(t.sx)}));function kf(e){var t=e.item,n=e.isFocused,r=e.onMouseEnter,o=e.onMouseLeave,i=e.onClick,a=t.title,s=t.key,l=t.icon,u=t.tooltip,c=t.isDisabled,d=t.isChecked,f=t.menu,p=t.modifier,h=t.styles,m=Object(jd.useRef)(null),v="bottom"===Hd();return Object(Cd.jsx)(af.Flex,Object.assign({as:"li",sx:{flexShrink:0,flexDirection:"column"},onMouseEnter:r,onMouseLeave:o},{children:Object(Cd.jsxs)(yf,Object.assign({id:s,"data-test-id":"MenuButton-".concat(s),ref:m,tabIndex:-1,variant:"menuitem",title:u,disabled:c,onClick:i,sx:Object.assign(Object.assign({},h),{bg:n&&!v?"hover":"transparent",display:"flex",alignItems:"center",justifyContent:"space-between",":hover":{bg:v?"transparent":"hover"}})},{children:[Object(Cd.jsxs)(af.Flex,Object.assign({sx:{fontSize:"inherit",fontFamily:"inherit"}},{children:[l&&Object(Cd.jsx)(mf,{path:vf[l],color:"text",size:"medium",sx:{mr:2}}),Object(Cd.jsx)(lf,Object.assign({as:"span",variant:"body",sx:{fontSize:"inherit",fontFamily:"inherit"}},{children:a}))]})),d||f||p?Object(Cd.jsxs)(af.Flex,Object.assign({sx:{ml:4}},{children:[d&&Object(Cd.jsx)(mf,{path:vf.check,size:"small"}),f&&Object(Cd.jsx)(mf,{path:vf.chevronRight,size:"small"}),p&&Object(Cd.jsx)(lf,Object.assign({as:"span",sx:{fontFamily:"body",fontSize:"menu",color:"fontTertiary"}},{children:p}))]})):null]}),s)}))}function xf(){return Object(Cd.jsx)(af.Box,{as:"li",sx:{width:"95%",height:"0.5px",bg:"border",my:2,alignSelf:"center"}})}var Of=n(48),Sf=n.n(Of),Cf=function(e,t){return Cf=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Cf(e,t)};function jf(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Cf(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Df=function(){return Df=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Df.apply(this,arguments)};function Ef(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}Object.create;function Af(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function Mf(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}Object.create;var Tf=function(e){return{isEnabled:function(t){return e.some((function(e){return!!t[e]}))}}},Lf={measureLayout:Tf(["layout","layoutId","drag","_layoutResetTransform"]),animation:Tf(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag"]),exit:Tf(["exit"]),drag:Tf(["drag","dragControls"]),focus:Tf(["whileFocus"]),hover:Tf(["whileHover","onHoverStart","onHoverEnd"]),tap:Tf(["whileTap","onTap","onTapStart","onTapCancel"]),pan:Tf(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),layoutAnimation:Tf(["layout","layoutId"])};var Nf=Object(jd.createContext)({strict:!1}),Pf=Object.keys(Lf),Rf=Pf.length;var Hf=Object(jd.createContext)({transformPagePoint:function(e){return e},isStatic:!1}),Ff=Object(jd.createContext)({});var Vf=Object(jd.createContext)(null);function zf(e){var t=Object(jd.useRef)(null);return null===t.current&&(t.current=e()),t.current}function Bf(){var e=Object(jd.useContext)(Vf);if(null===e)return[!0,null];var t=e.isPresent,n=e.onExitComplete,r=e.register,o=qf();Object(jd.useEffect)((function(){return r(o)}),[]);return!t&&n?[!1,function(){return null===n||void 0===n?void 0:n(o)}]:[!0]}function _f(e){return null===e||e.isPresent}var If=0,$f=function(){return If++},qf=function(){return zf($f)},Wf=Object(jd.createContext)(null),Uf="undefined"!==typeof window,Kf=Uf?jd.useLayoutEffect:jd.useEffect;function Gf(e,t,n,r){var o=Object(jd.useContext)(Hf),i=Object(jd.useContext)(Nf),a=Object(jd.useContext)(Ff).visualElement,s=Object(jd.useContext)(Vf),l=function(e){var t=e.layoutId,n=Object(jd.useContext)(Wf);return n&&void 0!==t?n+"-"+t:t}(n),u=Object(jd.useRef)(void 0);r||(r=i.renderer),!u.current&&r&&(u.current=r(e,{visualState:t,parent:a,props:Df(Df({},n),{layoutId:l}),presenceId:null===s||void 0===s?void 0:s.id,blockInitialAnimation:!1===(null===s||void 0===s?void 0:s.initial)}));var c=u.current;return Kf((function(){c&&(c.setProps(Df(Df(Df({},o),n),{layoutId:l})),c.isPresent=_f(s),c.isPresenceRoot=!a||a.presenceId!==(null===s||void 0===s?void 0:s.id),c.syncRender())})),Object(jd.useEffect)((function(){var e;c&&(null===(e=c.animationState)||void 0===e||e.animateChanges())})),Kf((function(){return function(){return null===c||void 0===c?void 0:c.notifyUnmount()}}),[]),c}function Jf(e){return"object"===typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function Yf(e){return Array.isArray(e)}function Zf(e){return"string"===typeof e||Yf(e)}function Xf(e,t,n,r,o){var i;return void 0===r&&(r={}),void 0===o&&(o={}),"string"===typeof t&&(t=null===(i=e.variants)||void 0===i?void 0:i[t]),"function"===typeof t?t(null!==n&&void 0!==n?n:e.custom,r,o):t}function Qf(e,t,n){var r=e.getProps();return Xf(r,t,null!==n&&void 0!==n?n:r.custom,function(e){var t={};return e.forEachValue((function(e,n){return t[n]=e.get()})),t}(e),function(e){var t={};return e.forEachValue((function(e,n){return t[n]=e.getVelocity()})),t}(e))}function ep(e){var t;return"function"===typeof(null===(t=e.animate)||void 0===t?void 0:t.start)||Zf(e.initial)||Zf(e.animate)||Zf(e.whileHover)||Zf(e.whileDrag)||Zf(e.whileTap)||Zf(e.whileFocus)||Zf(e.exit)}function tp(e){return Boolean(ep(e)||e.variants)}function np(e,t){var n=function(e,t){if(ep(e)){var n=e.initial,r=e.animate;return{initial:!1===n||Zf(n)?n:void 0,animate:Zf(r)?r:void 0}}return!1!==e.inherit?t:{}}(e,Object(jd.useContext)(Ff)),r=n.initial,o=n.animate;return Object(jd.useMemo)((function(){return{initial:r,animate:o}}),t?[rp(r),rp(o)]:[])}function rp(e){return Array.isArray(e)?e.join(" "):e}function op(e){var t=e.preloadedFeatures,n=e.createVisualElement,r=e.useRender,o=e.useVisualState,i=e.Component;return t&&function(e){for(var t in e){var n=e[t];null!==n&&(Lf[t].Component=n)}}(t),Object(jd.forwardRef)((function(e,t){var a=Object(jd.useContext)(Hf).isStatic,s=null,l=np(e,a),u=o(e,a);return!a&&Uf&&(l.visualElement=Gf(i,u,e,n),s=function(e,t,n){var r=[];if(Object(jd.useContext)(Nf),!t)return null;for(var o=0;o<Rf;o++){var i=Pf[o],a=Lf[i],s=a.isEnabled,l=a.Component;s(e)&&l&&r.push(jd.createElement(l,Df({key:i},e,{visualElement:t})))}return r}(e,l.visualElement)),jd.createElement(jd.Fragment,null,jd.createElement(Ff.Provider,{value:l},r(i,e,function(e,t,n){return Object(jd.useCallback)((function(r){var o;r&&(null===(o=e.mount)||void 0===o||o.call(e,r)),t&&(r?t.mount(r):t.unmount()),n&&("function"===typeof n?n(r):Jf(n)&&(n.current=r))}),[t])}(u,l.visualElement,t),u,a)),s)}))}function ip(e){function t(t,n){return void 0===n&&(n={}),op(e(t,n))}var n=new Map;return new Proxy(t,{get:function(e,r){return n.has(r)||n.set(r,t(r)),n.get(r)}})}var ap=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function sp(e){return"string"===typeof e&&!e.includes("-")&&!!(ap.indexOf(e)>-1||/[A-Z]/.test(e))}var lp={};var up=["","X","Y","Z"],cp=["transformPerspective","x","y","z"];function dp(e,t){return cp.indexOf(e)-cp.indexOf(t)}["translate","scale","rotate","skew"].forEach((function(e){return up.forEach((function(t){return cp.push(e+t)}))}));var fp=new Set(cp);function pp(e){return fp.has(e)}var hp=new Set(["originX","originY","originZ"]);function mp(e){return hp.has(e)}function vp(e,t){var n=t.layout,r=t.layoutId;return pp(e)||mp(e)||(n||void 0!==r)&&(!!lp[e]||"opacity"===e)}var gp=function(e){return null!==e&&"object"===typeof e&&e.getVelocity},yp={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function bp(e){return e.startsWith("--")}var wp=function(e,t){return t&&"number"===typeof e?t.transform(e):e},kp=function(e,t){return function(n){return Math.max(Math.min(n,t),e)}},xp=function(e){return e%1?Number(e.toFixed(5)):e},Op=/(-)?([\d]*\.?[\d])+/g,Sp=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,Cp=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;function jp(e){return"string"===typeof e}var Dp=function(e){return{test:function(t){return jp(t)&&t.endsWith(e)&&1===t.split(" ").length},parse:parseFloat,transform:function(t){return""+t+e}}},Ep=Dp("deg"),Ap=Dp("%"),Mp=Dp("px"),Tp=Dp("vh"),Lp=Dp("vw"),Np=Df(Df({},Ap),{parse:function(e){return Ap.parse(e)/100},transform:function(e){return Ap.transform(100*e)}}),Pp={test:function(e){return"number"===typeof e},parse:parseFloat,transform:function(e){return e}},Rp=Df(Df({},Pp),{transform:kp(0,1)}),Hp=Df(Df({},Pp),{default:1}),Fp=Df(Df({},Pp),{transform:Math.round}),Vp={borderWidth:Mp,borderTopWidth:Mp,borderRightWidth:Mp,borderBottomWidth:Mp,borderLeftWidth:Mp,borderRadius:Mp,radius:Mp,borderTopLeftRadius:Mp,borderTopRightRadius:Mp,borderBottomRightRadius:Mp,borderBottomLeftRadius:Mp,width:Mp,maxWidth:Mp,height:Mp,maxHeight:Mp,size:Mp,top:Mp,right:Mp,bottom:Mp,left:Mp,padding:Mp,paddingTop:Mp,paddingRight:Mp,paddingBottom:Mp,paddingLeft:Mp,margin:Mp,marginTop:Mp,marginRight:Mp,marginBottom:Mp,marginLeft:Mp,rotate:Ep,rotateX:Ep,rotateY:Ep,rotateZ:Ep,scale:Hp,scaleX:Hp,scaleY:Hp,scaleZ:Hp,skew:Ep,skewX:Ep,skewY:Ep,distance:Mp,translateX:Mp,translateY:Mp,translateZ:Mp,x:Mp,y:Mp,z:Mp,perspective:Mp,transformPerspective:Mp,opacity:Rp,originX:Np,originY:Np,originZ:Mp,zIndex:Fp,fillOpacity:Rp,strokeOpacity:Rp,numOctaves:Fp};function zp(e,t,n,r,o,i,a,s){var l,u=e.style,c=e.vars,d=e.transform,f=e.transformKeys,p=e.transformOrigin;f.length=0;var h=!1,m=!1,v=!0;for(var g in t){var y=t[g];if(bp(g))c[g]=y;else{var b=Vp[g],w=wp(y,b);if(pp(g)){if(h=!0,d[g]=w,f.push(g),!v)continue;y!==(null!==(l=b.default)&&void 0!==l?l:0)&&(v=!1)}else if(mp(g))p[g]=w,m=!0;else if((null===n||void 0===n?void 0:n.isHydrated)&&(null===r||void 0===r?void 0:r.isHydrated)&&lp[g]){var k=lp[g].process(y,r,n),x=lp[g].applyTo;if(x)for(var O=x.length,S=0;S<O;S++)u[x[S]]=k;else u[g]=k}else u[g]=w}}r&&n&&a&&s?(u.transform=a(r.deltaFinal,r.treeScale,h?d:void 0),i&&(u.transform=i(d,u.transform)),u.transformOrigin=s(r)):(h&&(u.transform=function(e,t,n,r){var o=e.transform,i=e.transformKeys,a=t.enableHardwareAcceleration,s=void 0===a||a,l=t.allowTransformNone,u=void 0===l||l,c="";i.sort(dp);for(var d=!1,f=i.length,p=0;p<f;p++){var h=i[p];c+=(yp[h]||h)+"("+o[h]+") ","z"===h&&(d=!0)}return!d&&s?c+="translateZ(0)":c=c.trim(),r?c=r(o,n?"":c):u&&n&&(c="none"),c}(e,o,v,i)),m&&(u.transformOrigin=function(e){var t=e.originX,n=void 0===t?"50%":t,r=e.originY,o=void 0===r?"50%":r,i=e.originZ;return n+" "+o+" "+(void 0===i?0:i)}(p)))}var Bp=function(){return{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}};function _p(e,t,n){for(var r in t)gp(t[r])||vp(r,n)||(e[r]=t[r])}function Ip(e,t,n){var r={};return _p(r,e.style||{},e),Object.assign(r,function(e,t,n){var r=e.transformTemplate;return Object(jd.useMemo)((function(){var e={style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}};zp(e,t,void 0,void 0,{enableHardwareAcceleration:!n},r);var o=e.style;return Df(Df({},e.vars),o)}),[t])}(e,t,n)),e.transformValues&&(r=e.transformValues(r)),r}function $p(e,t,n){var r={},o=Ip(e,t,n);return Boolean(e.drag)&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),r.style=o,r}var qp=new Set(["initial","animate","exit","style","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","_layoutResetTransform","onLayoutAnimationComplete","onViewportBoxUpdate","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","whileDrag","onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","onHoverStart","onHoverEnd","whileFocus","whileTap","whileHover"]);function Wp(e){return qp.has(e)}var Up=function(e){return!Wp(e)};try{var Kp=n(38).default;Up=function(e){return e.startsWith("on")?!Wp(e):Kp(e)}}catch(jM){}function Gp(e,t,n){return"string"===typeof e?e:Mp.transform(t+n*e)}var Jp=function(e,t){return Mp.transform(e*t)},Yp={offset:"stroke-dashoffset",array:"stroke-dasharray"},Zp={offset:"strokeDashoffset",array:"strokeDasharray"};function Xp(e,t,n,r,o,i,a,s){var l=t.attrX,u=t.attrY,c=t.originX,d=t.originY,f=t.pathLength,p=t.pathSpacing,h=void 0===p?1:p,m=t.pathOffset,v=void 0===m?0:m;zp(e,Ef(t,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]),n,r,o,i,a,s),e.attrs=e.style,e.style={};var g=e.attrs,y=e.style,b=e.dimensions,w=e.totalPathLength;g.transform&&(b&&(y.transform=g.transform),delete g.transform),b&&(void 0!==c||void 0!==d||y.transform)&&(y.transformOrigin=function(e,t,n){return Gp(t,e.x,e.width)+" "+Gp(n,e.y,e.height)}(b,void 0!==c?c:.5,void 0!==d?d:.5)),void 0!==l&&(g.x=l),void 0!==u&&(g.y=u),void 0!==w&&void 0!==f&&function(e,t,n,r,o,i){void 0===r&&(r=1),void 0===o&&(o=0),void 0===i&&(i=!0);var a=i?Yp:Zp;e[a.offset]=Jp(-o,t);var s=Jp(n,t),l=Jp(r,t);e[a.array]=s+" "+l}(g,w,f,h,v,!1)}var Qp=function(){return Df(Df({},{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}),{attrs:{}})};function eh(e,t){var n=Object(jd.useMemo)((function(){var n=Qp();return Xp(n,t,void 0,void 0,{enableHardwareAcceleration:!1},e.transformTemplate),Df(Df({},n.attrs),{style:Df({},n.style)})}),[t]);if(e.style){var r={};_p(r,e.style,e),n.style=Df(Df({},r),n.style)}return n}function th(e){void 0===e&&(e=!1);return function(t,n,r,o,i){var a=o.latestValues,s=(sp(t)?eh:$p)(n,a,i),l=function(e,t,n){var r={};for(var o in e)(Up(o)||!0===n&&Wp(o)||!t&&!Wp(o))&&(r[o]=e[o]);return r}(n,"string"===typeof t,e),u=Df(Df(Df({},l),s),{ref:r});return Object(jd.createElement)(t,u)}}var nh=/([a-z])([A-Z])/g,rh=function(e){return e.replace(nh,"$1-$2").toLowerCase()};function oh(e,t){var n=t.style,r=t.vars;for(var o in Object.assign(e.style,n),r)e.style.setProperty(o,r[o])}var ih=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform"]);function ah(e,t){for(var n in oh(e,t),t.attrs)e.setAttribute(ih.has(n)?n:rh(n),t.attrs[n])}function sh(e){var t=e.style,n={};for(var r in t)(gp(t[r])||vp(r,e))&&(n[r]=t[r]);return n}function lh(e){var t=sh(e);for(var n in e){if(gp(e[n]))t["x"===n||"y"===n?"attr"+n.toUpperCase():n]=e[n]}return t}function uh(e){return"object"===typeof e&&"function"===typeof e.start}var ch=function(e){return Array.isArray(e)};function dh(e){var t,n=gp(e)?e.get():e;return t=n,Boolean(t&&"object"===typeof t&&t.mix&&t.toValue)?n.toValue():n}function fh(e,t,n,r){var o=e.scrapeMotionValuesFromProps,i=e.createRenderState,a=e.onMount,s={latestValues:hh(t,n,r,o),renderState:i()};return a&&(s.mount=function(e){return a(t,e,s)}),s}var ph=function(e){return function(t,n){var r=Object(jd.useContext)(Ff),o=Object(jd.useContext)(Vf);return n?fh(e,t,r,o):zf((function(){return fh(e,t,r,o)}))}};function hh(e,t,n,r){var o={},i=!1===(null===n||void 0===n?void 0:n.initial),a=r(e);for(var s in a)o[s]=dh(a[s]);var l=e.initial,u=e.animate,c=ep(e),d=tp(e);t&&d&&!c&&!1!==e.inherit&&(null!==l&&void 0!==l||(l=t.initial),null!==u&&void 0!==u||(u=t.animate));var f=i||!1===l?u:l;f&&"boolean"!==typeof f&&!uh(f)&&(Array.isArray(f)?f:[f]).forEach((function(t){var n=Xf(e,t);if(n){var r=n.transitionEnd;n.transition;var i=Ef(n,["transitionEnd","transition"]);for(var a in i)o[a]=i[a];for(var a in r)o[a]=r[a]}}));return o}var mh={useVisualState:ph({scrapeMotionValuesFromProps:lh,createRenderState:Qp,onMount:function(e,t,n){var r=n.renderState,o=n.latestValues;try{r.dimensions="function"===typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(i){r.dimensions={x:0,y:0,width:0,height:0}}"path"===t.tagName&&(r.totalPathLength=t.getTotalLength()),Xp(r,o,void 0,void 0,{enableHardwareAcceleration:!1},e.transformTemplate),ah(t,r)}})};var vh,gh={useVisualState:ph({scrapeMotionValuesFromProps:sh,createRenderState:Bp})};function yh(e,t,n,r){var o=t.forwardMotionProps,i=void 0!==o&&o,a=sp(e)?mh:gh;return Df(Df({},a),{preloadedFeatures:n,useRender:th(i),createVisualElement:r,Component:e})}function bh(e,t,n,r){return e.addEventListener(t,n,r),function(){return e.removeEventListener(t,n,r)}}function wh(e,t,n,r){Object(jd.useEffect)((function(){var o=e.current;if(n&&o)return bh(o,t,n,r)}),[e,t,n,r])}function kh(e){return"undefined"!==typeof PointerEvent&&e instanceof PointerEvent?!("mouse"!==e.pointerType):e instanceof MouseEvent}function xh(e){return!!e.touches}!function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.Exit="exit"}(vh||(vh={}));var Oh={pageX:0,pageY:0};function Sh(e,t){void 0===t&&(t="page");var n=e.touches[0]||e.changedTouches[0]||Oh;return{x:n[t+"X"],y:n[t+"Y"]}}function Ch(e,t){return void 0===t&&(t="page"),{x:e[t+"X"],y:e[t+"Y"]}}function jh(e,t){return void 0===t&&(t="page"),{point:xh(e)?Sh(e,t):Ch(e,t)}}var Dh=function(e,t){void 0===t&&(t=!1);var n,r=function(t){return e(t,jh(t))};return t?(n=r,function(e){var t=e instanceof MouseEvent;(!t||t&&0===e.button)&&n(e)}):r},Eh={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Ah={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function Mh(e){return Uf&&null===window.onpointerdown?e:Uf&&null===window.ontouchstart?Ah[e]:Uf&&null===window.onmousedown?Eh[e]:e}function Th(e,t,n,r){return bh(e,Mh(t),Dh(n,"pointerdown"===t),r)}function Lh(e,t,n,r){return wh(e,Mh(t),n&&Dh(n,"pointerdown"===t),r)}function Nh(e){var t=null;return function(){return null===t&&(t=e,function(){t=null})}}var Ph=Nh("dragHorizontal"),Rh=Nh("dragVertical");function Hh(e){var t=!1;if("y"===e)t=Rh();else if("x"===e)t=Ph();else{var n=Ph(),r=Rh();n&&r?t=function(){n(),r()}:(n&&n(),r&&r())}return t}function Fh(){var e=Hh(!0);return!e||(e(),!1)}function Vh(e,t,n){return function(r,o){var i;kh(r)&&!Fh()&&(null===n||void 0===n||n(r,o),null===(i=e.animationState)||void 0===i||i.setActive(vh.Hover,t))}}var zh=function e(t,n){return!!n&&(t===n||e(t,n.parentElement))};function Bh(e){return Object(jd.useEffect)((function(){return function(){return e()}}),[])}var _h=function(e,t){return function(n){return t(e(n))}},Ih=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.reduce(_h)};var $h=function(e){return function(t){return e(t),null}},qh={tap:$h((function(e){var t=e.onTap,n=e.onTapStart,r=e.onTapCancel,o=e.whileTap,i=e.visualElement,a=t||n||r||o,s=Object(jd.useRef)(!1),l=Object(jd.useRef)(null);function u(){var e;null===(e=l.current)||void 0===e||e.call(l),l.current=null}function c(){var e;return u(),s.current=!1,null===(e=i.animationState)||void 0===e||e.setActive(vh.Tap,!1),!Fh()}function d(e,n){c()&&(zh(i.getInstance(),e.target)?null===t||void 0===t||t(e,n):null===r||void 0===r||r(e,n))}function f(e,t){c()&&(null===r||void 0===r||r(e,t))}Lh(i,"pointerdown",a?function(e,t){var r;u(),s.current||(s.current=!0,l.current=Ih(Th(window,"pointerup",d),Th(window,"pointercancel",f)),null===n||void 0===n||n(e,t),null===(r=i.animationState)||void 0===r||r.setActive(vh.Tap,!0))}:void 0),Bh(u)})),focus:$h((function(e){var t=e.whileFocus,n=e.visualElement;wh(n,"focus",t?function(){var e;null===(e=n.animationState)||void 0===e||e.setActive(vh.Focus,!0)}:void 0),wh(n,"blur",t?function(){var e;null===(e=n.animationState)||void 0===e||e.setActive(vh.Focus,!1)}:void 0)})),hover:$h((function(e){var t=e.onHoverStart,n=e.onHoverEnd,r=e.whileHover,o=e.visualElement;Lh(o,"pointerenter",t||r?Vh(o,!0,t):void 0),Lh(o,"pointerleave",n||r?Vh(o,!1,n):void 0)}))};function Wh(e,t){if(!Array.isArray(t))return!1;var n=t.length;if(n!==e.length)return!1;for(var r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var Uh=function(e,t,n){return Math.min(Math.max(n,e),t)},Kh=.001;function Gh(e){var t,n,r=e.duration,o=void 0===r?800:r,i=e.bounce,a=void 0===i?.25:i,s=e.velocity,l=void 0===s?0:s,u=e.mass,c=void 0===u?1:u,d=1-a;d=Uh(.05,1,d),o=Uh(.01,10,o/1e3),d<1?(t=function(e){var t=e*d,n=t*o,r=t-l,i=Jh(e,d),a=Math.exp(-n);return Kh-r/i*a},n=function(e){var n=e*d*o,r=n*l+l,i=Math.pow(d,2)*Math.pow(e,2)*o,a=Math.exp(-n),s=Jh(Math.pow(e,2),d);return(-t(e)+Kh>0?-1:1)*((r-i)*a)/s}):(t=function(e){return Math.exp(-e*o)*((e-l)*o+1)-.001},n=function(e){return Math.exp(-e*o)*(o*o*(l-e))});var f=function(e,t,n){for(var r=n,o=1;o<12;o++)r-=e(r)/t(r);return r}(t,n,5/o);if(o*=1e3,isNaN(f))return{stiffness:100,damping:10,duration:o};var p=Math.pow(f,2)*c;return{stiffness:p,damping:2*d*Math.sqrt(c*p),duration:o}}function Jh(e,t){return e*Math.sqrt(1-t*t)}var Yh=["duration","bounce"],Zh=["stiffness","damping","mass"];function Xh(e,t){return t.some((function(t){return void 0!==e[t]}))}function Qh(e){var t=e.from,n=void 0===t?0:t,r=e.to,o=void 0===r?1:r,i=e.restSpeed,a=void 0===i?2:i,s=e.restDelta,l=Ef(e,["from","to","restSpeed","restDelta"]),u={done:!1,value:n},c=function(e){var t=Df({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!Xh(e,Zh)&&Xh(e,Yh)){var n=Gh(e);(t=Df(Df(Df({},t),n),{velocity:0,mass:1})).isResolvedFromDuration=!0}return t}(l),d=c.stiffness,f=c.damping,p=c.mass,h=c.velocity,m=c.duration,v=c.isResolvedFromDuration,g=em,y=em;function b(){var e=h?-h/1e3:0,t=o-n,r=f/(2*Math.sqrt(d*p)),i=Math.sqrt(d/p)/1e3;if(null!==s&&void 0!==s||(s=Math.abs(o-n)<=1?.01:.4),r<1){var a=Jh(i,r);g=function(n){var s=Math.exp(-r*i*n);return o-s*((e+r*i*t)/a*Math.sin(a*n)+t*Math.cos(a*n))},y=function(n){var o=Math.exp(-r*i*n);return r*i*o*(Math.sin(a*n)*(e+r*i*t)/a+t*Math.cos(a*n))-o*(Math.cos(a*n)*(e+r*i*t)-a*t*Math.sin(a*n))}}else if(1===r)g=function(n){return o-Math.exp(-i*n)*(t+(e+i*t)*n)};else{var l=i*Math.sqrt(r*r-1);g=function(n){var a=Math.exp(-r*i*n),s=Math.min(l*n,300);return o-a*((e+r*i*t)*Math.sinh(s)+l*t*Math.cosh(s))/l}}}return b(),{next:function(e){var t=g(e);if(v)u.done=e>=m;else{var n=1e3*y(e),r=Math.abs(n)<=a,i=Math.abs(o-t)<=s;u.done=r&&i}return u.value=u.done?o:t,u},flipTarget:function(){var e;h=-h,n=(e=[o,n])[0],o=e[1],b()}}}Qh.needsInterpolation=function(e,t){return"string"===typeof e||"string"===typeof t};var em=function(e){return 0},tm=function(e,t,n){var r=t-e;return 0===r?1:(n-e)/r},nm=function(e,t,n){return-n*e+n*t+e},rm=function(e,t){return function(n){return Boolean(jp(n)&&Cp.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t))}},om=function(e,t,n){return function(r){var o;if(!jp(r))return r;var i=r.match(Op),a=i[0],s=i[1],l=i[2],u=i[3];return(o={})[e]=parseFloat(a),o[t]=parseFloat(s),o[n]=parseFloat(l),o.alpha=void 0!==u?parseFloat(u):1,o}},im=kp(0,255),am=Df(Df({},Pp),{transform:function(e){return Math.round(im(e))}}),sm={test:rm("rgb","red"),parse:om("red","green","blue"),transform:function(e){var t=e.red,n=e.green,r=e.blue,o=e.alpha,i=void 0===o?1:o;return"rgba("+am.transform(t)+", "+am.transform(n)+", "+am.transform(r)+", "+xp(Rp.transform(i))+")"}};var lm={test:rm("#"),parse:function(e){var t="",n="",r="",o="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),o=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),o=e.substr(4,1),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}},transform:sm.transform},um={test:rm("hsl","hue"),parse:om("hue","saturation","lightness"),transform:function(e){var t=e.hue,n=e.saturation,r=e.lightness,o=e.alpha,i=void 0===o?1:o;return"hsla("+Math.round(t)+", "+Ap.transform(xp(n))+", "+Ap.transform(xp(r))+", "+xp(Rp.transform(i))+")"}},cm=function(e,t,n){var r=e*e,o=t*t;return Math.sqrt(Math.max(0,n*(o-r)+r))},dm=[lm,sm,um],fm=function(e){return dm.find((function(t){return t.test(e)}))},pm=function(e){return"'"+e+"' is not an animatable color. Use the equivalent color code instead."},hm=function(e,t){var n=fm(e),r=fm(t);pm(e),pm(t),n.transform,r.transform;var o=n.parse(e),i=r.parse(t),a=Df({},o),s=n===um?nm:cm;return function(e){for(var t in a)"alpha"!==t&&(a[t]=s(o[t],i[t],e));return a.alpha=nm(o.alpha,i.alpha,e),n.transform(a)}},mm={test:function(e){return sm.test(e)||lm.test(e)||um.test(e)},parse:function(e){return sm.test(e)?sm.parse(e):um.test(e)?um.parse(e):lm.parse(e)},transform:function(e){return jp(e)?e:e.hasOwnProperty("red")?sm.transform(e):um.transform(e)}},vm="${c}",gm="${n}";function ym(e){var t=[],n=0,r=e.match(Sp);r&&(n=r.length,e=e.replace(Sp,vm),t.push.apply(t,r.map(mm.parse)));var o=e.match(Op);return o&&(e=e.replace(Op,gm),t.push.apply(t,o.map(Pp.parse))),{values:t,numColors:n,tokenised:e}}function bm(e){return ym(e).values}function wm(e){var t=ym(e),n=t.values,r=t.numColors,o=t.tokenised,i=n.length;return function(e){for(var t=o,n=0;n<i;n++)t=t.replace(n<r?vm:gm,n<r?mm.transform(e[n]):xp(e[n]));return t}}var km=function(e){return"number"===typeof e?0:e};var xm={test:function(e){var t,n,r,o;return isNaN(e)&&jp(e)&&(null!==(n=null===(t=e.match(Op))||void 0===t?void 0:t.length)&&void 0!==n?n:0)+(null!==(o=null===(r=e.match(Sp))||void 0===r?void 0:r.length)&&void 0!==o?o:0)>0},parse:bm,createTransformer:wm,getAnimatableNone:function(e){var t=bm(e);return wm(e)(t.map(km))}},Om=function(e){return"number"===typeof e};function Sm(e,t){return Om(e)?function(n){return nm(e,t,n)}:mm.test(e)?hm(e,t):Em(e,t)}var Cm=function(e,t){var n=Mf([],e),r=n.length,o=e.map((function(e,n){return Sm(e,t[n])}));return function(e){for(var t=0;t<r;t++)n[t]=o[t](e);return n}},jm=function(e,t){var n=Df(Df({},e),t),r={};for(var o in n)void 0!==e[o]&&void 0!==t[o]&&(r[o]=Sm(e[o],t[o]));return function(e){for(var t in r)n[t]=r[t](e);return n}};function Dm(e){for(var t=xm.parse(e),n=t.length,r=0,o=0,i=0,a=0;a<n;a++)r||"number"===typeof t[a]?r++:void 0!==t[a].hue?i++:o++;return{parsed:t,numNumbers:r,numRGB:o,numHSL:i}}var Em=function(e,t){var n=xm.createTransformer(t),r=Dm(e),o=Dm(t);return r.numHSL===o.numHSL&&r.numRGB===o.numRGB&&(r.numNumbers,o.numNumbers),Ih(Cm(r.parsed,o.parsed),n)},Am=function(e,t){return function(n){return nm(e,t,n)}};function Mm(e,t,n){for(var r,o=[],i=n||("number"===typeof(r=e[0])?Am:"string"===typeof r?mm.test(r)?hm:Em:Array.isArray(r)?Cm:"object"===typeof r?jm:void 0),a=e.length-1,s=0;s<a;s++){var l=i(e[s],e[s+1]);if(t){var u=Array.isArray(t)?t[s]:t;l=Ih(u,l)}o.push(l)}return o}function Tm(e,t,n){var r=void 0===n?{}:n,o=r.clamp,i=void 0===o||o,a=r.ease,s=r.mixer,l=e.length;t.length,!a||!Array.isArray(a)||a.length,e[0]>e[l-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());var u=Mm(t,a,s),c=2===l?function(e,t){var n=e[0],r=e[1],o=t[0];return function(e){return o(tm(n,r,e))}}(e,u):function(e,t){var n=e.length,r=n-1;return function(o){var i=0,a=!1;if(o<=e[0]?a=!0:o>=e[r]&&(i=r-1,a=!0),!a){for(var s=1;s<n&&!(e[s]>o||s===r);s++);i=s-1}var l=tm(e[i],e[i+1],o);return t[i](l)}}(e,u);return i?function(t){return c(Uh(e[0],e[l-1],t))}:c}var Lm,Nm=function(e){return function(t){return 1-e(1-t)}},Pm=function(e){return function(t){return t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2}},Rm=function(e){return function(t){return t*t*((e+1)*t-e)}},Hm=function(e){return e},Fm=(Lm=2,function(e){return Math.pow(e,Lm)}),Vm=Nm(Fm),zm=Pm(Fm),Bm=function(e){return 1-Math.sin(Math.acos(e))},_m=Nm(Bm),Im=Pm(_m),$m=Rm(1.525),qm=Nm($m),Wm=Pm($m),Um=function(e){var t=Rm(e);return function(e){return(e*=2)<1?.5*t(e):.5*(2-Math.pow(2,-10*(e-1)))}}(1.525),Km=function(e){if(1===e||0===e)return e;var t=e*e;return e<.36363636363636365?7.5625*t:e<.7272727272727273?9.075*t-9.9*e+3.4:e<.9?12.066481994459833*t-19.63545706371191*e+8.898060941828255:10.8*e*e-20.52*e+10.72},Gm=Nm(Km);function Jm(e,t){return e.map((function(){return t||zm})).splice(0,e.length-1)}function Ym(e){var t=e.from,n=void 0===t?0:t,r=e.to,o=void 0===r?1:r,i=e.ease,a=e.offset,s=e.duration,l=void 0===s?300:s,u={done:!1,value:n},c=Array.isArray(o)?o:[n,o],d=function(e,t){return e.map((function(e){return e*t}))}(a&&a.length===c.length?a:function(e){var t=e.length;return e.map((function(e,n){return 0!==n?n/(t-1):0}))}(c),l);function f(){return Tm(d,c,{ease:Array.isArray(i)?i:Jm(c,i)})}var p=f();return{next:function(e){return u.value=p(e),u.done=e>=l,u},flipTarget:function(){c.reverse(),p=f()}}}var Zm={keyframes:Ym,spring:Qh,decay:function(e){var t=e.velocity,n=void 0===t?0:t,r=e.from,o=void 0===r?0:r,i=e.power,a=void 0===i?.8:i,s=e.timeConstant,l=void 0===s?350:s,u=e.restDelta,c=void 0===u?.5:u,d=e.modifyTarget,f={done:!1,value:o},p=a*n,h=o+p,m=void 0===d?h:d(h);return m!==h&&(p=m-o),{next:function(e){var t=-p*Math.exp(-e/l);return f.done=!(t>c||t<-c),f.value=f.done?m:m+t,f},flipTarget:function(){}}}};var Xm=1/60*1e3,Qm="undefined"!==typeof performance?function(){return performance.now()}:function(){return Date.now()},ev="undefined"!==typeof window?function(e){return window.requestAnimationFrame(e)}:function(e){return setTimeout((function(){return e(Qm())}),Xm)};var tv=!0,nv=!1,rv=!1,ov={delta:0,timestamp:0},iv=["read","update","preRender","render","postRender"],av=iv.reduce((function(e,t){return e[t]=function(e){var t=[],n=[],r=0,o=!1,i=new WeakSet,a={schedule:function(e,a,s){void 0===a&&(a=!1),void 0===s&&(s=!1);var l=s&&o,u=l?t:n;return a&&i.add(e),-1===u.indexOf(e)&&(u.push(e),l&&o&&(r=t.length)),e},cancel:function(e){var t=n.indexOf(e);-1!==t&&n.splice(t,1),i.delete(e)},process:function(s){var l;if(o=!0,t=(l=[n,t])[0],(n=l[1]).length=0,r=t.length)for(var u=0;u<r;u++){var c=t[u];c(s),i.has(c)&&(a.schedule(c),e())}o=!1}};return a}((function(){return nv=!0})),e}),{}),sv=iv.reduce((function(e,t){var n=av[t];return e[t]=function(e,t,r){return void 0===t&&(t=!1),void 0===r&&(r=!1),nv||fv(),n.schedule(e,t,r)},e}),{}),lv=iv.reduce((function(e,t){return e[t]=av[t].cancel,e}),{}),uv=iv.reduce((function(e,t){return e[t]=function(){return av[t].process(ov)},e}),{}),cv=function(e){return av[e].process(ov)},dv=function e(t){nv=!1,ov.delta=tv?Xm:Math.max(Math.min(t-ov.timestamp,40),1),ov.timestamp=t,rv=!0,iv.forEach(cv),rv=!1,nv&&(tv=!1,ev(e))},fv=function(){nv=!0,tv=!0,rv||ev(dv)},pv=function(){return ov},hv=sv;function mv(e,t,n){return void 0===n&&(n=0),e-t-n}var vv=function(e){var t=function(t){var n=t.delta;return e(n)};return{start:function(){return hv.update(t,!0)},stop:function(){return lv.update(t)}}};function gv(e){var t,n,r,o,i,a=e.from,s=e.autoplay,l=void 0===s||s,u=e.driver,c=void 0===u?vv:u,d=e.elapsed,f=void 0===d?0:d,p=e.repeat,h=void 0===p?0:p,m=e.repeatType,v=void 0===m?"loop":m,g=e.repeatDelay,y=void 0===g?0:g,b=e.onPlay,w=e.onStop,k=e.onComplete,x=e.onRepeat,O=e.onUpdate,S=Ef(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]),C=S.to,j=0,D=S.duration,E=!1,A=!0,M=function(e){if(Array.isArray(e.to))return Ym;if(Zm[e.type])return Zm[e.type];var t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?Ym:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?Qh:Ym}(S);(null===(n=(t=M).needsInterpolation)||void 0===n?void 0:n.call(t,a,C))&&(i=Tm([0,100],[a,C],{clamp:!1}),a=0,C=100);var T=M(Df(Df({},S),{from:a,to:C}));function L(){j++,"reverse"===v?f=function(e,t,n,r){return void 0===n&&(n=0),void 0===r&&(r=!0),r?mv(t+-e,t,n):t-(e-t)+n}(f,D,y,A=j%2===0):(f=mv(f,D,y),"mirror"===v&&T.flipTarget()),E=!1,x&&x()}function N(e){if(A||(e=-e),f+=e,!E){var t=T.next(Math.max(0,f));o=t.value,i&&(o=i(o)),E=A?t.done:f<=0}null===O||void 0===O||O(o),E&&(0===j&&(null!==D&&void 0!==D||(D=f)),j<h?function(e,t,n,r){return r?e>=t+n:e<=-n}(f,D,y,A)&&L():(r.stop(),k&&k()))}return l&&(null===b||void 0===b||b(),(r=c(N)).start()),{stop:function(){null===w||void 0===w||w(),r.stop()}}}function yv(e,t){return t?e*(1e3/t):0}var bv=function(e){return 1e3*e},wv=function(e,t){return 1-3*t+3*e},kv=function(e,t){return 3*t-6*e},xv=function(e){return 3*e},Ov=function(e,t,n){return((wv(t,n)*e+kv(t,n))*e+xv(t))*e},Sv=function(e,t,n){return 3*wv(t,n)*e*e+2*kv(t,n)*e+xv(t)};var Cv=.1;function jv(e,t,n,r){if(e===t&&n===r)return Hm;for(var o=new Float32Array(11),i=0;i<11;++i)o[i]=Ov(i*Cv,e,n);function a(t){for(var r=0,i=1;10!==i&&o[i]<=t;++i)r+=Cv;--i;var a=r+(t-o[i])/(o[i+1]-o[i])*Cv,s=Sv(a,e,n);return s>=.001?function(e,t,n,r){for(var o=0;o<8;++o){var i=Sv(t,n,r);if(0===i)return t;t-=(Ov(t,n,r)-e)/i}return t}(t,a,e,n):0===s?a:function(e,t,n,r,o){var i,a,s=0;do{(i=Ov(a=t+(n-t)/2,r,o)-e)>0?n=a:t=a}while(Math.abs(i)>1e-7&&++s<10);return a}(t,r,r+Cv,e,n)}return function(e){return 0===e||1===e?e:Ov(a(e),t,r)}}var Dv={linear:Hm,easeIn:Fm,easeInOut:zm,easeOut:Vm,circIn:Bm,circInOut:Im,circOut:_m,backIn:$m,backInOut:Wm,backOut:qm,anticipate:Um,bounceIn:Gm,bounceInOut:function(e){return e<.5?.5*(1-Km(1-2*e)):.5*Km(2*e-1)+.5},bounceOut:Km},Ev=function(e){if(Array.isArray(e)){e.length;var t=Af(e,4);return jv(t[0],t[1],t[2],t[3])}return"string"===typeof e?Dv[e]:e},Av=function(e,t){return"zIndex"!==e&&(!("number"!==typeof t&&!Array.isArray(t))||!("string"!==typeof t||!xm.test(t)||t.startsWith("url(")))},Mv=function(){return{type:"spring",stiffness:500,damping:25,restDelta:.5,restSpeed:10}},Tv=function(e){return{type:"spring",stiffness:550,damping:0===e?2*Math.sqrt(550):30,restDelta:.01,restSpeed:10}},Lv=function(){return{type:"keyframes",ease:"linear",duration:.3}},Nv=function(e){return{type:"keyframes",duration:.8,values:e}},Pv={x:Mv,y:Mv,z:Mv,rotate:Mv,rotateX:Mv,rotateY:Mv,rotateZ:Mv,scaleX:Tv,scaleY:Tv,scale:Tv,opacity:Lv,backgroundColor:Lv,color:Lv,default:Tv},Rv=new Set(["brightness","contrast","saturate","opacity"]);function Hv(e){var t=e.slice(0,-1).split("("),n=t[0],r=t[1];if("drop-shadow"===n)return e;var o=(r.match(Op)||[])[0];if(!o)return e;var i=r.replace(o,""),a=Rv.has(n)?1:0;return o!==r&&(a*=100),n+"("+a+i+")"}var Fv=/([a-z-]*)\(.*?\)/g,Vv=Df(Df({},xm),{getAnimatableNone:function(e){var t=e.match(Fv);return t?t.map(Hv).join(" "):e}}),zv=Df(Df({},Vp),{color:mm,backgroundColor:mm,outlineColor:mm,fill:mm,stroke:mm,borderColor:mm,borderTopColor:mm,borderRightColor:mm,borderBottomColor:mm,borderLeftColor:mm,filter:Vv,WebkitFilter:Vv}),Bv=function(e){return zv[e]};function _v(e,t){var n,r=Bv(e);return r!==Vv&&(r=xm),null===(n=r.getAnimatableNone)||void 0===n?void 0:n.call(r,t)}function Iv(e){var t=e.ease,n=e.times,r=e.yoyo,o=e.flip,i=e.loop,a=Ef(e,["ease","times","yoyo","flip","loop"]),s=Df({},a);return n&&(s.offset=n),a.duration&&(s.duration=bv(a.duration)),a.repeatDelay&&(s.repeatDelay=bv(a.repeatDelay)),t&&(s.ease=function(e){return Array.isArray(e)&&"number"!==typeof e[0]}(t)?t.map(Ev):Ev(t)),"tween"===a.type&&(s.type="keyframes"),(r||i||o)&&(!0,r?s.repeatType="reverse":i?s.repeatType="loop":o&&(s.repeatType="mirror"),s.repeat=i||r||o||a.repeat),"spring"!==a.type&&(s.type="keyframes"),s}function $v(e,t,n){var r;return Array.isArray(t.to)&&(null!==(r=e.duration)&&void 0!==r||(e.duration=.8)),function(e){Array.isArray(e.to)&&null===e.to[0]&&(e.to=Mf([],Af(e.to)),e.to[0]=e.from)}(t),function(e){e.when,e.delay,e.delayChildren,e.staggerChildren,e.staggerDirection,e.repeat,e.repeatType,e.repeatDelay,e.from;var t=Ef(e,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from"]);return!!Object.keys(t).length}(e)||(e=Df(Df({},e),function(e,t){var n;return n=ch(t)?Nv:Pv[e]||Pv.default,Df({to:t},n(t))}(n,t.to))),Df(Df({},t),Iv(e))}function qv(e,t,n,r,o){var i,a=Kv(r,e),s=null!==(i=a.from)&&void 0!==i?i:t.get(),l=Av(e,n);"none"===s&&l&&"string"===typeof n?s=_v(e,n):Wv(s)&&"string"===typeof n?s=Uv(n):!Array.isArray(n)&&Wv(n)&&"string"===typeof s&&(n=Uv(s));var u=Av(e,s);return u&&l&&!1!==a.type?function(){var r={from:s,to:n,velocity:t.getVelocity(),onComplete:o,onUpdate:function(e){return t.set(e)}};return"inertia"===a.type||"decay"===a.type?function(e){var t,n=e.from,r=void 0===n?0:n,o=e.velocity,i=void 0===o?0:o,a=e.min,s=e.max,l=e.power,u=void 0===l?.8:l,c=e.timeConstant,d=void 0===c?750:c,f=e.bounceStiffness,p=void 0===f?500:f,h=e.bounceDamping,m=void 0===h?10:h,v=e.restDelta,g=void 0===v?1:v,y=e.modifyTarget,b=e.driver,w=e.onUpdate,k=e.onComplete;function x(e){return void 0!==a&&e<a||void 0!==s&&e>s}function O(e){return void 0===a?s:void 0===s||Math.abs(a-e)<Math.abs(s-e)?a:s}function S(e){null===t||void 0===t||t.stop(),t=gv(Df(Df({},e),{driver:b,onUpdate:function(t){var n;null===w||void 0===w||w(t),null===(n=e.onUpdate)||void 0===n||n.call(e,t)},onComplete:k}))}function C(e){S(Df({type:"spring",stiffness:p,damping:m,restDelta:g},e))}if(x(r))C({from:r,velocity:i,to:O(r)});else{var j=u*i+r;"undefined"!==typeof y&&(j=y(j));var D,E,A=O(j),M=A===a?-1:1;S({type:"decay",from:r,velocity:i,timeConstant:d,power:u,restDelta:g,modifyTarget:y,onUpdate:x(j)?function(e){D=E,E=e,i=yv(e-D,pv().delta),(1===M&&e>A||-1===M&&e<A)&&C({from:e,to:A,velocity:i})}:void 0})}return{stop:function(){return null===t||void 0===t?void 0:t.stop()}}}(Df(Df({},r),a)):gv(Df(Df({},$v(a,r,e)),{onUpdate:function(e){var t;r.onUpdate(e),null===(t=a.onUpdate)||void 0===t||t.call(a,e)},onComplete:function(){var e;r.onComplete(),null===(e=a.onComplete)||void 0===e||e.call(a)}}))}:function(){var e;return t.set(n),o(),null===(e=null===a||void 0===a?void 0:a.onComplete)||void 0===e||e.call(a),{stop:function(){}}}}function Wv(e){return 0===e||"string"===typeof e&&0===parseFloat(e)&&-1===e.indexOf(" ")}function Uv(e){return"number"===typeof e?0:_v("",e)}function Kv(e,t){return e[t]||e.default||e}function Gv(e,t,n,r){return void 0===r&&(r={}),t.start((function(o){var i,a,s=qv(e,t,n,r,o),l=function(e,t){var n;return null!==(n=(Kv(e,t)||{}).delay)&&void 0!==n?n:0}(r,e),u=function(){return a=s()};return l?i=setTimeout(u,bv(l)):u(),function(){clearTimeout(i),null===a||void 0===a||a.stop()}}))}function Jv(e,t){-1===e.indexOf(t)&&e.push(t)}function Yv(e,t){var n=e.indexOf(t);n>-1&&e.splice(n,1)}var Zv=function(){function e(){this.subscriptions=[]}return e.prototype.add=function(e){var t=this;return Jv(this.subscriptions,e),function(){return Yv(t.subscriptions,e)}},e.prototype.notify=function(e,t,n){var r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(var o=0;o<r;o++){var i=this.subscriptions[o];i&&i(e,t,n)}},e.prototype.getSize=function(){return this.subscriptions.length},e.prototype.clear=function(){this.subscriptions.length=0},e}(),Xv=function(){function e(e){var t,n=this;this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new Zv,this.velocityUpdateSubscribers=new Zv,this.renderSubscribers=new Zv,this.canTrackVelocity=!1,this.updateAndNotify=function(e,t){void 0===t&&(t=!0),n.prev=n.current,n.current=e;var r=pv(),o=r.delta,i=r.timestamp;n.lastUpdated!==i&&(n.timeDelta=o,n.lastUpdated=i,hv.postRender(n.scheduleVelocityCheck)),n.prev!==n.current&&n.updateSubscribers.notify(n.current),n.velocityUpdateSubscribers.getSize()&&n.velocityUpdateSubscribers.notify(n.getVelocity()),t&&n.renderSubscribers.notify(n.current)},this.scheduleVelocityCheck=function(){return hv.postRender(n.velocityCheck)},this.velocityCheck=function(e){e.timestamp!==n.lastUpdated&&(n.prev=n.current,n.velocityUpdateSubscribers.notify(n.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=(t=this.current,!isNaN(parseFloat(t)))}return e.prototype.onChange=function(e){return this.updateSubscribers.add(e)},e.prototype.clearListeners=function(){this.updateSubscribers.clear()},e.prototype.onRenderRequest=function(e){return e(this.get()),this.renderSubscribers.add(e)},e.prototype.attach=function(e){this.passiveEffect=e},e.prototype.set=function(e,t){void 0===t&&(t=!0),t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)},e.prototype.get=function(){return this.current},e.prototype.getPrevious=function(){return this.prev},e.prototype.getVelocity=function(){return this.canTrackVelocity?yv(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0},e.prototype.start=function(e){var t=this;return this.stop(),new Promise((function(n){t.hasAnimated=!0,t.stopAnimation=e(n)})).then((function(){return t.clearAnimation()}))},e.prototype.stop=function(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()},e.prototype.isAnimating=function(){return!!this.stopAnimation},e.prototype.clearAnimation=function(){this.stopAnimation=null},e.prototype.destroy=function(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()},e}();function Qv(e){return new Xv(e)}var eg=function(e){return function(t){return t.test(e)}},tg=[Pp,Mp,Ap,Ep,Lp,Tp,{test:function(e){return"auto"===e},parse:function(e){return e}}],ng=function(e){return tg.find(eg(e))},rg=Mf(Mf([],Af(tg)),[mm,xm]),og=function(e){return rg.find(eg(e))};function ig(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Qv(n))}function ag(e,t){var n=Qf(e,t),r=n?e.makeTargetAnimatable(n,!1):{},o=r.transitionEnd,i=void 0===o?{}:o;r.transition;var a,s=Ef(r,["transitionEnd","transition"]);for(var l in s=Df(Df({},s),i)){ig(e,l,(a=s[l],ch(a)?a[a.length-1]||0:a))}}function sg(e,t){Mf([],Af(t)).reverse().forEach((function(n){var r,o=e.getVariant(n);o&&ag(e,o),null===(r=e.variantChildren)||void 0===r||r.forEach((function(e){sg(e,t)}))}))}function lg(e,t){if(t)return(t[e]||t.default||t).from}function ug(e,t,n){var r;if(void 0===n&&(n={}),e.notifyAnimationStart(),Array.isArray(t)){var o=t.map((function(t){return cg(e,t,n)}));r=Promise.all(o)}else if("string"===typeof t)r=cg(e,t,n);else{var i="function"===typeof t?Qf(e,t,n.custom):t;r=dg(e,i,n)}return r.then((function(){return e.notifyAnimationComplete(t)}))}function cg(e,t,n){var r;void 0===n&&(n={});var o=Qf(e,t,n.custom),i=(o||{}).transition,a=void 0===i?e.getDefaultTransition()||{}:i;n.transitionOverride&&(a=n.transitionOverride);var s=o?function(){return dg(e,o,n)}:function(){return Promise.resolve()},l=(null===(r=e.variantChildren)||void 0===r?void 0:r.size)?function(r){void 0===r&&(r=0);var o=a.delayChildren,i=void 0===o?0:o,s=a.staggerChildren,l=a.staggerDirection;return function(e,t,n,r,o,i){void 0===n&&(n=0);void 0===r&&(r=0);void 0===o&&(o=1);var a=[],s=(e.variantChildren.size-1)*r,l=1===o?function(e){return void 0===e&&(e=0),e*r}:function(e){return void 0===e&&(e=0),s-e*r};return Array.from(e.variantChildren).sort(fg).forEach((function(e,r){a.push(cg(e,t,Df(Df({},i),{delay:n+l(r)})).then((function(){return e.notifyAnimationComplete(t)})))})),Promise.all(a)}(e,t,i+r,s,l,n)}:function(){return Promise.resolve()},u=a.when;if(u){var c=Af("beforeChildren"===u?[s,l]:[l,s],2),d=c[0],f=c[1];return d().then(f)}return Promise.all([s(),l(n.delay)])}function dg(e,t,n){var r,o=void 0===n?{}:n,i=o.delay,a=void 0===i?0:i,s=o.transitionOverride,l=o.type,u=e.makeTargetAnimatable(t),c=u.transition,d=void 0===c?e.getDefaultTransition():c,f=u.transitionEnd,p=Ef(u,["transition","transitionEnd"]);s&&(d=s);var h=[],m=l&&(null===(r=e.animationState)||void 0===r?void 0:r.getState()[l]);for(var v in p){var g=e.getValue(v),y=p[v];if(!(!g||void 0===y||m&&pg(m,v))){var b=Gv(v,g,y,Df({delay:a},d));h.push(b)}}return Promise.all(h).then((function(){f&&ag(e,f)}))}function fg(e,t){return e.sortNodePosition(t)}function pg(e,t){var n=e.protectedKeys,r=e.needsAnimating,o=n.hasOwnProperty(t)&&!0!==r[t];return r[t]=!1,o}var hg=[vh.Animate,vh.Hover,vh.Tap,vh.Drag,vh.Focus,vh.Exit],mg=Mf([],Af(hg)).reverse(),vg=hg.length;function gg(e){var t=function(e){return function(t){return Promise.all(t.map((function(t){var n=t.animation,r=t.options;return ug(e,n,r)})))}}(e),n=function(){var e;return(e={})[vh.Animate]=yg(!0),e[vh.Hover]=yg(),e[vh.Tap]=yg(),e[vh.Drag]=yg(),e[vh.Focus]=yg(),e[vh.Exit]=yg(),e}(),r={},o=!0,i=function(t,n){var r=Qf(e,n);if(r){r.transition;var o=r.transitionEnd,i=Ef(r,["transition","transitionEnd"]);t=Df(Df(Df({},t),i),o)}return t};function a(a,s){for(var l,u=e.getProps(),c=e.getVariantContext(!0)||{},d=[],f=new Set,p={},h=1/0,m=function(t){var r=mg[t],m=n[r],v=null!==(l=u[r])&&void 0!==l?l:c[r],g=Zf(v),y=r===s?m.isActive:null;!1===y&&(h=t);var b=v===c[r]&&v!==u[r]&&g;if(b&&o&&e.manuallyAnimateOnMount&&(b=!1),m.protectedKeys=Df({},p),!m.isActive&&null===y||!v&&!m.prevProp||uh(v)||"boolean"===typeof v)return"continue";var w=function(e,t){if("string"===typeof t)return t!==e;if(Yf(t))return!Wh(t,e);return!1}(m.prevProp,v)||r===s&&m.isActive&&!b&&g||t>h&&g,k=Array.isArray(v)?v:[v],x=k.reduce(i,{});!1===y&&(x={});var O=m.prevResolvedValues,S=void 0===O?{}:O,C=Df(Df({},S),x),j=function(e){w=!0,f.delete(e),m.needsAnimating[e]=!0};for(var D in C){var E=x[D],A=S[D];p.hasOwnProperty(D)||(E!==A?ch(E)&&ch(A)?Wh(E,A)?m.protectedKeys[D]=!0:j(D):void 0!==E?j(D):f.add(D):void 0!==E&&f.has(D)?j(D):m.protectedKeys[D]=!0)}m.prevProp=v,m.prevResolvedValues=x,m.isActive&&(p=Df(Df({},p),x)),o&&e.blockInitialAnimation&&(w=!1),w&&!b&&d.push.apply(d,Mf([],Af(k.map((function(e){return{animation:e,options:Df({type:r},a)}})))))},v=0;v<vg;v++)m(v);if(r=Df({},p),f.size){var g={};f.forEach((function(t){var n=e.getBaseTarget(t);void 0!==n&&(g[t]=n)})),d.push({animation:g})}var y=Boolean(d.length);return o&&!1===u.initial&&!e.manuallyAnimateOnMount&&(y=!1),o=!1,y?t(d):Promise.resolve()}return{isAnimated:function(e){return void 0!==r[e]},animateChanges:a,setActive:function(t,r,o){var i;return n[t].isActive===r?Promise.resolve():(null===(i=e.variantChildren)||void 0===i||i.forEach((function(e){var n;return null===(n=e.animationState)||void 0===n?void 0:n.setActive(t,r)})),n[t].isActive=r,a(o,t))},setAnimateFunction:function(n){t=n(e)},getState:function(){return n}}}function yg(e){return void 0===e&&(e=!1),{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}var bg={animation:$h((function(e){var t=e.visualElement,n=e.animate;t.animationState||(t.animationState=gg(t)),uh(n)&&Object(jd.useEffect)((function(){return n.subscribe(t)}),[n])})),exit:$h((function(e){var t=e.custom,n=e.visualElement,r=Af(Bf(),2),o=r[0],i=r[1],a=Object(jd.useContext)(Vf);Object(jd.useEffect)((function(){var e,r,s=null===(e=n.animationState)||void 0===e?void 0:e.setActive(vh.Exit,!o,{custom:null!==(r=null===a||void 0===a?void 0:a.custom)&&void 0!==r?r:t});!o&&(null===s||void 0===s||s.then(i))}),[o])}))},wg=function(e){return e.hasOwnProperty("x")&&e.hasOwnProperty("y")},kg=function(e){return wg(e)&&e.hasOwnProperty("z")},xg=function(e,t){return Math.abs(e-t)};function Og(e,t){if(Om(e)&&Om(t))return xg(e,t);if(wg(e)&&wg(t)){var n=xg(e.x,t.x),r=xg(e.y,t.y),o=kg(e)&&kg(t)?xg(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(o,2))}}var Sg=function(){function e(e,t,n){var r=this,o=(void 0===n?{}:n).transformPagePoint;if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=function(){if(r.lastMoveEvent&&r.lastMoveEventInfo){var e=Dg(r.lastMoveEventInfo,r.history),t=null!==r.startEvent,n=Og(e.offset,{x:0,y:0})>=3;if(t||n){var o=e.point,i=pv().timestamp;r.history.push(Df(Df({},o),{timestamp:i}));var a=r.handlers,s=a.onStart,l=a.onMove;t||(s&&s(r.lastMoveEvent,e),r.startEvent=r.lastMoveEvent),l&&l(r.lastMoveEvent,e)}}},this.handlePointerMove=function(e,t){r.lastMoveEvent=e,r.lastMoveEventInfo=Cg(t,r.transformPagePoint),kh(e)&&0===e.buttons?r.handlePointerUp(e,t):hv.update(r.updatePoint,!0)},this.handlePointerUp=function(e,t){r.end();var n=r.handlers,o=n.onEnd,i=n.onSessionEnd,a=Dg(Cg(t,r.transformPagePoint),r.history);r.startEvent&&o&&o(e,a),i&&i(e,a)},!(xh(e)&&e.touches.length>1)){this.handlers=t,this.transformPagePoint=o;var i=Cg(jh(e),this.transformPagePoint),a=i.point,s=pv().timestamp;this.history=[Df(Df({},a),{timestamp:s})];var l=t.onSessionStart;l&&l(e,Dg(i,this.history)),this.removeListeners=Ih(Th(window,"pointermove",this.handlePointerMove),Th(window,"pointerup",this.handlePointerUp),Th(window,"pointercancel",this.handlePointerUp))}}return e.prototype.updateHandlers=function(e){this.handlers=e},e.prototype.end=function(){this.removeListeners&&this.removeListeners(),lv.update(this.updatePoint)},e}();function Cg(e,t){return t?{point:t(e.point)}:e}function jg(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Dg(e,t){var n=e.point;return{point:n,delta:jg(n,Ag(t)),offset:jg(n,Eg(t)),velocity:Mg(t,.1)}}function Eg(e){return e[0]}function Ag(e){return e[e.length-1]}function Mg(e,t){if(e.length<2)return{x:0,y:0};for(var n=e.length-1,r=null,o=Ag(e);n>=0&&(r=e[n],!(o.timestamp-r.timestamp>bv(t)));)n--;if(!r)return{x:0,y:0};var i=(o.timestamp-r.timestamp)/1e3;if(0===i)return{x:0,y:0};var a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Tg(e){return e}function Lg(e){var t=e.top;return{x:{min:e.left,max:e.right},y:{min:t,max:e.bottom}}}var Ng={translate:0,scale:1,origin:0,originPoint:0};function Pg(){return{x:Df({},Ng),y:Df({},Ng)}}function Rg(e){return[e("x"),e("y")]}function Hg(e,t,n){var r=t.min,o=t.max;return void 0!==r&&e<r?e=n?nm(r,e,n.min):Math.max(e,r):void 0!==o&&e>o&&(e=n?nm(o,e,n.max):Math.min(e,o)),e}function Fg(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function Vg(e,t){var n,r=t.min-e.min,o=t.max-e.max;return t.max-t.min<e.max-e.min&&(r=(n=Af([o,r],2))[0],o=n[1]),{min:e.min+r,max:e.min+o}}function zg(e,t,n){return{min:Bg(e,t),max:Bg(e,n)}}function Bg(e,t){var n;return"number"===typeof e?e:null!==(n=e[t])&&void 0!==n?n:0}function _g(e,t){return Lg(function(e,t){var n=e.top,r=e.left,o=e.bottom,i=e.right;void 0===t&&(t=Tg);var a=t({x:r,y:n}),s=t({x:i,y:o});return{top:a.y,left:a.x,bottom:s.y,right:s.x}}(e.getBoundingClientRect(),t))}function Ig(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=.01),Og(e,t)<n}function $g(e){return e.max-e.min}function qg(e,t){var n=.5,r=$g(e),o=$g(t);return o>r?n=tm(t.min,t.max-r,e.min):r>o&&(n=tm(e.min,e.max-o,t.min)),Uh(0,1,n)}function Wg(e,t,n,r){void 0===r&&(r=.5),e.origin=r,e.originPoint=nm(t.min,t.max,e.origin),e.scale=$g(n)/$g(t),Ig(e.scale,1,1e-4)&&(e.scale=1),e.translate=nm(n.min,n.max,e.origin)-e.originPoint,Ig(e.translate)&&(e.translate=0)}function Ug(e,t,n,r){Wg(e.x,t.x,n.x,Kg(r.originX)),Wg(e.y,t.y,n.y,Kg(r.originY))}function Kg(e){return"number"===typeof e?e:.5}function Gg(e,t,n){e.min=n.min+t.min,e.max=e.min+$g(t)}var Jg=function(e,t){return e.depth-t.depth};function Yg(e){return e.projection.isEnabled||e.shouldResetTransform()}function Zg(e,t){void 0===t&&(t=[]);var n=e.parent;return n&&Zg(n,t),Yg(e)&&t.push(e),t}function Xg(e){if(!e.shouldResetTransform()){var t,n=e.getLayoutState();e.notifyBeforeLayoutMeasure(n.layout),n.isHydrated=!0,n.layout=e.measureViewportBox(),n.layoutCorrected=(t=n.layout,{x:Df({},t.x),y:Df({},t.y)}),e.notifyLayoutMeasure(n.layout,e.prevViewportBox||n.layout),hv.update((function(){return e.rebaseProjectionTarget()}))}}function Qg(e,t){return{min:t.min-e.min,max:t.max-e.min}}function ey(e,t){return{x:Qg(e.x,t.x),y:Qg(e.y,t.y)}}function ty(e,t){var n=e.getLayoutId(),r=t.getLayoutId();return n!==r||void 0===r&&e!==t}function ny(e){var t=e.getProps(),n=t.drag,r=t._dragX;return n&&!r}function ry(e,t){e.min=t.min,e.max=t.max}function oy(e,t,n){return n+t*(e-n)}function iy(e,t,n,r,o){return void 0!==o&&(e=oy(e,o,r)),oy(e,n,r)+t}function ay(e,t,n,r,o){void 0===t&&(t=0),void 0===n&&(n=1),e.min=iy(e.min,t,n,r,o),e.max=iy(e.max,t,n,r,o)}function sy(e,t){var n=t.x,r=t.y;ay(e.x,n.translate,n.scale,n.originPoint),ay(e.y,r.translate,r.scale,r.originPoint)}function ly(e,t,n,r){var o=Af(r,3),i=o[0],a=o[1],s=o[2];e.min=t.min,e.max=t.max;var l=void 0!==n[s]?n[s]:.5,u=nm(t.min,t.max,l);ay(e,n[i],n[a],u,n.scale)}var uy=["x","scaleX","originX"],cy=["y","scaleY","originY"];function dy(e,t,n){ly(e.x,t.x,n,uy),ly(e.y,t.y,n,cy)}function fy(e,t,n,r,o){return e=oy(e-=t,1/n,r),void 0!==o&&(e=oy(e,1/o,r)),e}function py(e,t,n){var r=Af(n,3),o=r[0],i=r[1],a=r[2];!function(e,t,n,r,o){void 0===t&&(t=0),void 0===n&&(n=1),void 0===r&&(r=.5);var i=nm(e.min,e.max,r)-t;e.min=fy(e.min,t,n,i,o),e.max=fy(e.max,t,n,i,o)}(e,t[o],t[i],t[a],t.scale)}function hy(e,t){py(e.x,t,uy),py(e.y,t,cy)}var my=new Set;function vy(e,t,n){e[n]||(e[n]=[]),e[n].push(t)}function gy(e){return my.add(e),function(){return my.delete(e)}}function yy(){if(my.size){var e=0,t=[[]],n=[],r=function(n){return vy(t,n,e)},o=function(t){vy(n,t,e),e++};my.forEach((function(t){t(r,o),e=0})),my.clear();for(var i=n.length,a=0;a<=i;a++)t[a]&&t[a].forEach(wy),n[a]&&n[a].forEach(wy)}}var by,wy=function(e){return e()},ky=new WeakMap,xy=function(){function e(e){var t=e.visualElement;this.isDragging=!1,this.currentDirection=null,this.constraints=!1,this.elastic={x:{min:0,max:1},y:{min:0,max:1}},this.props={},this.hasMutatedConstraints=!1,this.cursorProgress={x:.5,y:.5},this.originPoint={},this.openGlobalLock=null,this.panSession=null,this.visualElement=t,this.visualElement.enableLayoutProjection(),ky.set(t,this)}return e.prototype.start=function(e,t){var n=this,r=void 0===t?{}:t,o=r.snapToCursor,i=void 0!==o&&o,a=r.cursorProgress,s=this.props.transformPagePoint;this.panSession=new Sg(e,{onSessionStart:function(e){var t;n.stopMotion();var r=function(e){return jh(e,"client")}(e).point;null===(t=n.cancelLayout)||void 0===t||t.call(n),n.cancelLayout=gy((function(e,t){var o=Zg(n.visualElement),s=function(e){var t=[];return e.children.forEach((function e(n){Yg(n)&&t.push(n),n.children.forEach(e)})),t.sort(Jg)}(n.visualElement),l=Mf(Mf([],Af(o)),Af(s)),u=!1;n.isLayoutDrag()&&n.visualElement.lockProjectionTarget(),t((function(){l.forEach((function(e){return e.resetTransform()}))})),e((function(){Xg(n.visualElement),s.forEach(Xg)})),t((function(){l.forEach((function(e){return e.restoreTransform()})),i&&(u=n.snapToCursor(r))})),e((function(){Boolean(n.getAxisMotionValue("x")&&!n.isExternalDrag())||n.visualElement.rebaseProjectionTarget(!0,n.visualElement.measureViewportBox(!1)),n.visualElement.scheduleUpdateLayoutProjection();var e=n.visualElement.projection;Rg((function(t){if(!u){var o=e.target[t],i=o.min,s=o.max;n.cursorProgress[t]=a?a[t]:tm(i,s,r[t])}var l=n.getAxisMotionValue(t);l&&(n.originPoint[t]=l.get())}))})),t((function(){uv.update(),uv.preRender(),uv.render(),uv.postRender()})),e((function(){return n.resolveDragConstraints()}))}))},onStart:function(e,t){var r,o,i,a=n.props,s=a.drag,l=a.dragPropagation;(!s||l||(n.openGlobalLock&&n.openGlobalLock(),n.openGlobalLock=Hh(s),n.openGlobalLock))&&(yy(),n.isDragging=!0,n.currentDirection=null,null===(o=(r=n.props).onDragStart)||void 0===o||o.call(r,e,t),null===(i=n.visualElement.animationState)||void 0===i||i.setActive(vh.Drag,!0))},onMove:function(e,t){var r,o,i,a,s=n.props,l=s.dragPropagation,u=s.dragDirectionLock;if(l||n.openGlobalLock){var c=t.offset;if(u&&null===n.currentDirection)return n.currentDirection=function(e,t){void 0===t&&(t=10);var n=null;Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x");return n}(c),void(null!==n.currentDirection&&(null===(o=(r=n.props).onDirectionLock)||void 0===o||o.call(r,n.currentDirection)));n.updateAxis("x",t.point,c),n.updateAxis("y",t.point,c),null===(a=(i=n.props).onDrag)||void 0===a||a.call(i,e,t),by=e}},onSessionEnd:function(e,t){return n.stop(e,t)}},{transformPagePoint:s})},e.prototype.resolveDragConstraints=function(){var e=this,t=this.props,n=t.dragConstraints,r=t.dragElastic,o=this.visualElement.getLayoutState().layoutCorrected;this.constraints=!!n&&(Jf(n)?this.resolveRefConstraints(o,n):function(e,t){var n=t.top,r=t.left,o=t.bottom,i=t.right;return{x:Fg(e.x,r,i),y:Fg(e.y,n,o)}}(o,n)),this.elastic=function(e){return!1===e?e=0:!0===e&&(e=.35),{x:zg(e,"left","right"),y:zg(e,"top","bottom")}}(r),this.constraints&&!this.hasMutatedConstraints&&Rg((function(t){e.getAxisMotionValue(t)&&(e.constraints[t]=function(e,t){var n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(o[t],e.constraints[t]))}))},e.prototype.resolveRefConstraints=function(e,t){var n=this.props,r=n.onMeasureDragConstraints,o=n.transformPagePoint,i=t.current;this.constraintsBox=_g(i,o);var a=function(e,t){return{x:Vg(e.x,t.x),y:Vg(e.y,t.y)}}(e,this.constraintsBox);if(r){var s=r(function(e){var t=e.x,n=e.y;return{top:n.min,bottom:n.max,left:t.min,right:t.max}}(a));this.hasMutatedConstraints=!!s,s&&(a=Lg(s))}return a},e.prototype.cancelDrag=function(){var e,t;this.visualElement.unlockProjectionTarget(),null===(e=this.cancelLayout)||void 0===e||e.call(this),this.isDragging=!1,this.panSession&&this.panSession.end(),this.panSession=null,!this.props.dragPropagation&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),null===(t=this.visualElement.animationState)||void 0===t||t.setActive(vh.Drag,!1)},e.prototype.stop=function(e,t){var n,r,o;null===(n=this.panSession)||void 0===n||n.end(),this.panSession=null;var i=this.isDragging;if(this.cancelDrag(),i){var a=t.velocity;this.animateDragEnd(a),null===(o=(r=this.props).onDragEnd)||void 0===o||o.call(r,e,t)}},e.prototype.snapToCursor=function(e){var t=this;return Rg((function(n){if(Oy(n,t.props.drag,t.currentDirection)){var r=t.getAxisMotionValue(n);if(!r)return t.cursorProgress[n]=.5,!0;var o=t.visualElement.getLayoutState().layout,i=o[n].max-o[n].min,a=o[n].min+i/2,s=e[n]-a;t.originPoint[n]=e[n],r.set(s)}})).includes(!0)},e.prototype.updateAxis=function(e,t,n){if(Oy(e,this.props.drag,this.currentDirection))return this.getAxisMotionValue(e)?this.updateAxisMotionValue(e,n):this.updateVisualElementAxis(e,t)},e.prototype.updateAxisMotionValue=function(e,t){var n=this.getAxisMotionValue(e);if(t&&n){var r=this.originPoint[e]+t[e],o=this.constraints?Hg(r,this.constraints[e],this.elastic[e]):r;n.set(o)}},e.prototype.updateVisualElementAxis=function(e,t){var n,r=this.visualElement.getLayoutState().layout[e],o=r.max-r.min,i=this.cursorProgress[e],a=function(e,t,n,r,o){var i=e-t*n;return r?Hg(i,r,o):i}(t[e],o,i,null===(n=this.constraints)||void 0===n?void 0:n[e],this.elastic[e]);this.visualElement.setProjectionTargetAxis(e,a,a+o)},e.prototype.setProps=function(e){var t=e.drag,n=void 0!==t&&t,r=e.dragDirectionLock,o=void 0!==r&&r,i=e.dragPropagation,a=void 0!==i&&i,s=e.dragConstraints,l=void 0!==s&&s,u=e.dragElastic,c=void 0===u?.35:u,d=e.dragMomentum,f=void 0===d||d,p=Ef(e,["drag","dragDirectionLock","dragPropagation","dragConstraints","dragElastic","dragMomentum"]);this.props=Df({drag:n,dragDirectionLock:o,dragPropagation:a,dragConstraints:l,dragElastic:c,dragMomentum:f},p)},e.prototype.getAxisMotionValue=function(e){var t=this.props,n=t.layout,r=t.layoutId,o="_drag"+e.toUpperCase();return this.props[o]?this.props[o]:n||void 0!==r?void 0:this.visualElement.getValue(e,0)},e.prototype.isLayoutDrag=function(){return!this.getAxisMotionValue("x")},e.prototype.isExternalDrag=function(){var e=this.props,t=e._dragX,n=e._dragY;return t||n},e.prototype.animateDragEnd=function(e){var t=this,n=this.props,r=n.drag,o=n.dragMomentum,i=n.dragElastic,a=n.dragTransition,s=function(e,t){void 0===t&&(t=!0);var n,r=e.getProjectionParent();return!!r&&(t?hy(n=ey(r.projection.target,e.projection.target),r.getLatestValues()):n=ey(r.getLayoutState().layout,e.getLayoutState().layout),Rg((function(t){return e.setProjectionTargetAxis(t,n[t].min,n[t].max,!0)})),!0)}(this.visualElement,this.isLayoutDrag()&&!this.isExternalDrag()),l=this.constraints||{};if(s&&Object.keys(l).length&&this.isLayoutDrag()){var u=this.visualElement.getProjectionParent();if(u){var c=ey(u.projection.targetFinal,l);Rg((function(e){var t=c[e],n=t.min,r=t.max;l[e]={min:isNaN(n)?void 0:n,max:isNaN(r)?void 0:r}}))}}var d=Rg((function(n){var u;if(Oy(n,r,t.currentDirection)){var c=null!==(u=null===l||void 0===l?void 0:l[n])&&void 0!==u?u:{},d=i?200:1e6,f=i?40:1e7,p=Df(Df({type:"inertia",velocity:o?e[n]:0,bounceStiffness:d,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10},a),c);return t.getAxisMotionValue(n)?t.startAxisValueAnimation(n,p):t.visualElement.startLayoutAnimation(n,p,s)}}));return Promise.all(d).then((function(){var e,n;null===(n=(e=t.props).onDragTransitionEnd)||void 0===n||n.call(e)}))},e.prototype.stopMotion=function(){var e=this;Rg((function(t){var n=e.getAxisMotionValue(t);n?n.stop():e.visualElement.stopLayoutAnimation()}))},e.prototype.startAxisValueAnimation=function(e,t){var n=this.getAxisMotionValue(e);if(n){var r=n.get();return n.set(r),n.set(r),Gv(e,n,0,t)}},e.prototype.scalePoint=function(){var e=this,t=this.props,n=t.drag;if(Jf(t.dragConstraints)&&this.constraintsBox){this.stopMotion();var r={x:0,y:0};Rg((function(t){r[t]=qg(e.visualElement.projection.target[t],e.constraintsBox[t])})),this.updateConstraints((function(){Rg((function(t){if(Oy(t,n,null)){var o=function(e,t,n){var r=e.max-e.min,o=nm(t.min,t.max-r,n);return{min:o,max:o+r}}(e.visualElement.projection.target[t],e.constraintsBox[t],r[t]),i=o.min,a=o.max;e.visualElement.setProjectionTargetAxis(t,i,a)}}))})),setTimeout(yy,1)}},e.prototype.updateConstraints=function(e){var t=this;this.cancelLayout=gy((function(n,r){var o=Zg(t.visualElement);r((function(){return o.forEach((function(e){return e.resetTransform()}))})),n((function(){return Xg(t.visualElement)})),r((function(){return o.forEach((function(e){return e.restoreTransform()}))})),n((function(){t.resolveDragConstraints()})),e&&r(e)}))},e.prototype.mount=function(e){var t=this,n=Th(e.getInstance(),"pointerdown",(function(e){var n=t.props,r=n.drag,o=n.dragListener;r&&(void 0===o||o)&&t.start(e)})),r=bh(window,"resize",(function(){t.scalePoint()})),o=e.onLayoutUpdate((function(){t.isDragging&&t.resolveDragConstraints()})),i=e.prevDragCursor;return i&&this.start(by,{cursorProgress:i}),function(){null===n||void 0===n||n(),null===r||void 0===r||r(),null===o||void 0===o||o(),t.cancelDrag()}},e}();function Oy(e,t,n){return(!0===t||t===e)&&(null===n||n===e)}var Sy,Cy,jy={pan:$h((function(e){var t=e.onPan,n=e.onPanStart,r=e.onPanEnd,o=e.onPanSessionStart,i=e.visualElement,a=t||n||r||o,s=Object(jd.useRef)(null),l=Object(jd.useContext)(Hf).transformPagePoint,u={onSessionStart:o,onStart:n,onMove:t,onEnd:function(e,t){s.current=null,r&&r(e,t)}};Object(jd.useEffect)((function(){null!==s.current&&s.current.updateHandlers(u)})),Lh(i,"pointerdown",a&&function(e){s.current=new Sg(e,u,{transformPagePoint:l})}),Bh((function(){return s.current&&s.current.end()}))})),drag:$h((function(e){var t=e.dragControls,n=e.visualElement,r=Object(jd.useContext)(Hf).transformPagePoint,o=zf((function(){return new xy({visualElement:n})}));o.setProps(Df(Df({},e),{transformPagePoint:r})),Object(jd.useEffect)((function(){return t&&t.subscribe(o)}),[o]),Object(jd.useEffect)((function(){return o.mount(n)}),[])}))};function Dy(e){return"string"===typeof e&&e.startsWith("var(--")}!function(e){e[e.Entering=0]="Entering",e[e.Present=1]="Present",e[e.Exiting=2]="Exiting"}(Sy||(Sy={})),function(e){e[e.Hide=0]="Hide",e[e.Show=1]="Show"}(Cy||(Cy={}));var Ey=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Ay(e,t,n){void 0===n&&(n=1);var r=Af(function(e){var t=Ey.exec(e);if(!t)return[,];var n=Af(t,3);return[n[1],n[2]]}(e),2),o=r[0],i=r[1];if(o){var a=window.getComputedStyle(t).getPropertyValue(o);return a?a.trim():Dy(i)?Ay(i,t,n+1):i}}function My(e,t){return e/(t.max-t.min)*100}var Ty="_$css";var Ly={process:function(e,t,n){var r=n.target;if("string"===typeof e){if(!Mp.test(e))return e;e=parseFloat(e)}return My(e,r.x)+"% "+My(e,r.y)+"%"}},Ny={borderRadius:Df(Df({},Ly),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:Ly,borderTopRightRadius:Ly,borderBottomLeftRadius:Ly,borderBottomRightRadius:Ly,boxShadow:{process:function(e,t){var n=t.delta,r=t.treeScale,o=e,i=e.includes("var("),a=[];i&&(e=e.replace(Ey,(function(e){return a.push(e),Ty})));var s=xm.parse(e);if(s.length>5)return o;var l=xm.createTransformer(e),u="number"!==typeof s[0]?1:0,c=n.x.scale*r.x,d=n.y.scale*r.y;s[0+u]/=c,s[1+u]/=d;var f=nm(c,d,.5);"number"===typeof s[2+u]&&(s[2+u]/=f),"number"===typeof s[3+u]&&(s[3+u]/=f);var p=l(s);if(i){var h=0;p=p.replace(Ty,(function(){var e=a[h];return h++,e}))}return p}}},Py=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.frameTarget={x:{min:0,max:1},y:{min:0,max:1}},t.currentAnimationTarget={x:{min:0,max:1},y:{min:0,max:1}},t.isAnimating={x:!1,y:!1},t.stopAxisAnimation={x:void 0,y:void 0},t.isAnimatingTree=!1,t.animate=function(e,n,r){void 0===r&&(r={});var o=r.originBox,i=r.targetBox,a=r.visibilityAction,s=r.shouldStackAnimate,l=r.onComplete,u=r.prevParent,c=Ef(r,["originBox","targetBox","visibilityAction","shouldStackAnimate","onComplete","prevParent"]),d=t.props,f=d.visualElement,p=d.layout;if(!1===s)return t.isAnimatingTree=!1,t.safeToRemove();if(!t.isAnimatingTree||!0===s){s&&(t.isAnimatingTree=!0),n=o||n,e=i||e;var h=!1,m=f.getProjectionParent();if(m){var v=m.prevViewportBox,g=m.getLayoutState().layout;u&&(i&&(g=u.getLayoutState().layout),o&&!ty(u,m)&&u.prevViewportBox&&(v=u.prevViewportBox)),v&&By(u,o,i)&&(h=!0,n=ey(v,n),e=ey(g,e))}var y=Ry(n,e),b=Rg((function(r){var o,i;if("position"===p){var s=e[r].max-e[r].min;n[r].max=n[r].min+s}if(!f.projection.isTargetLocked)return void 0===a?y?t.animateAxis(r,e[r],n[r],Df(Df({},c),{isRelative:h})):(null===(i=(o=t.stopAxisAnimation)[r])||void 0===i||i.call(o),f.setProjectionTargetAxis(r,e[r].min,e[r].max,h)):void f.setVisibility(a===Cy.Show)}));return f.syncRender(),Promise.all(b).then((function(){t.isAnimatingTree=!1,l&&l(),f.notifyLayoutAnimationComplete()}))}},t}return jf(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props.visualElement;t.animateMotionValue=Gv,t.enableLayoutProjection(),this.unsubLayoutReady=t.onLayoutUpdate(this.animate),t.layoutSafeToRemove=function(){return e.safeToRemove()},function(e){for(var t in e)lp[t]=e[t]}(Ny)},t.prototype.componentWillUnmount=function(){var e=this;this.unsubLayoutReady(),Rg((function(t){var n,r;return null===(r=(n=e.stopAxisAnimation)[t])||void 0===r?void 0:r.call(n)}))},t.prototype.animateAxis=function(e,t,n,r){var o,i,a=this,s=void 0===r?{}:r,l=s.transition,u=s.isRelative;if(!this.isAnimating[e]||!Vy(t,this.currentAnimationTarget[e])){null===(i=(o=this.stopAxisAnimation)[e])||void 0===i||i.call(o),this.isAnimating[e]=!0;var c=this.props.visualElement,d=this.frameTarget[e],f=c.getProjectionAnimationProgress()[e];f.clearListeners(),f.set(0),f.set(0);var p=function(){var r=f.get()/1e3;!function(e,t,n,r){e.min=nm(t.min,n.min,r),e.max=nm(t.max,n.max,r)}(d,n,t,r),c.setProjectionTargetAxis(e,d.min,d.max,u)};p();var h=f.onChange(p);this.stopAxisAnimation[e]=function(){a.isAnimating[e]=!1,f.stop(),h()},this.currentAnimationTarget[e]=t;var m=l||c.getDefaultTransition()||zy;return Gv("x"===e?"layoutX":"layoutY",f,1e3,m&&Kv(m,"layout")).then(this.stopAxisAnimation[e])}},t.prototype.safeToRemove=function(){var e,t;null===(t=(e=this.props).safeToRemove)||void 0===t||t.call(e)},t.prototype.render=function(){return null},t}(jd.Component);function Ry(e,t){return!Fy(e)&&!Fy(t)&&(!Vy(e.x,t.x)||!Vy(e.y,t.y))}var Hy={min:0,max:0};function Fy(e){return Vy(e.x,Hy)&&Vy(e.y,Hy)}function Vy(e,t){return e.min===t.min&&e.max===t.max}var zy={duration:.45,ease:[.4,0,.1,1]};function By(e,t,n){return e||!e&&!(t||n)}var _y={layoutReady:function(e){return e.notifyLayoutReady()}};function Iy(){var e=new Set;return{add:function(t){return e.add(t)},flush:function(t){var n=void 0===t?_y:t,r=n.layoutReady,o=n.parent;gy((function(t,n){var i=Array.from(e).sort(Jg),a=o?Zg(o):[];n((function(){Mf(Mf([],Af(a)),Af(i)).forEach((function(e){return e.resetTransform()}))})),t((function(){i.forEach(Xg)})),n((function(){a.forEach((function(e){return e.restoreTransform()})),i.forEach(r)})),t((function(){i.forEach((function(e){e.isPresent&&(e.presence=Sy.Present)}))})),n((function(){uv.preRender(),uv.render()})),t((function(){hv.postRender((function(){return i.forEach($y)})),e.clear()}))})),yy()}}}function $y(e){e.prevViewportBox=e.projection.target}var qy=Object(jd.createContext)(Iy()),Wy=Object(jd.createContext)(Iy());function Uy(e){return!!e.forceUpdate}var Ky=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return jf(t,e),t.prototype.componentDidMount=function(){var e=this.props,t=e.syncLayout,n=e.framerSyncLayout,r=e.visualElement;Uy(t)&&t.register(r),Uy(n)&&n.register(r),r.onUnmount((function(){Uy(t)&&t.remove(r),Uy(n)&&n.remove(r)}))},t.prototype.getSnapshotBeforeUpdate=function(){var e=this.props,t=e.syncLayout,n=e.visualElement;return Uy(t)?t.syncUpdate():(!function(e){e.shouldResetTransform()||(e.prevViewportBox=e.measureViewportBox(!1),e.rebaseProjectionTarget(!1,e.prevViewportBox))}(n),t.add(n)),null},t.prototype.componentDidUpdate=function(){var e=this.props.syncLayout;Uy(e)||e.flush()},t.prototype.render=function(){return null},t}(Dd.a.Component);var Gy={measureLayout:function(e){var t=Object(jd.useContext)(qy),n=Object(jd.useContext)(Wy);return Dd.a.createElement(Ky,Df({},e,{syncLayout:t,framerSyncLayout:n}))},layoutAnimation:function(e){var t=Af(Bf(),2)[1];return jd.createElement(Py,Df({},e,{safeToRemove:t}))}};function Jy(){return{isHydrated:!1,layout:{x:{min:0,max:1},y:{min:0,max:1}},layoutCorrected:{x:{min:0,max:1},y:{min:0,max:1}},treeScale:{x:1,y:1},delta:Pg(),deltaFinal:Pg(),deltaTransform:""}}var Yy=Jy();function Zy(e,t,n){var r=e.x,o=e.y,i="translate3d("+r.translate/t.x+"px, "+o.translate/t.y+"px, 0) ";if(n){var a=n.rotate,s=n.rotateX,l=n.rotateY;a&&(i+="rotate("+a+") "),s&&(i+="rotateX("+s+") "),l&&(i+="rotateY("+l+") ")}return i+="scale("+r.scale+", "+o.scale+")",n||i!==Qy?i:""}function Xy(e){var t=e.deltaFinal;return 100*t.x.origin+"% "+100*t.y.origin+"% 0"}var Qy=Zy(Yy.delta,Yy.treeScale,{x:1,y:1}),eb=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","SetAxisTarget","Unmount"];function tb(e,t,n,r){var o,i,a=e.delta,s=e.layout,l=e.layoutCorrected,u=e.treeScale,c=t.target;i=s,ry((o=l).x,i.x),ry(o.y,i.y),function(e,t,n){var r=n.length;if(r){var o,i;t.x=t.y=1;for(var a=0;a<r;a++)i=(o=n[a]).getLayoutState().delta,t.x*=i.x.scale,t.y*=i.y.scale,sy(e,i),ny(o)&&dy(e,e,o.getLatestValues())}}(l,u,n),Ug(a,l,c,r)}var nb=function(){function e(){this.children=[],this.isDirty=!1}return e.prototype.add=function(e){Jv(this.children,e),this.isDirty=!0},e.prototype.remove=function(e){Yv(this.children,e),this.isDirty=!0},e.prototype.forEach=function(e){this.isDirty&&this.children.sort(Jg),this.isDirty=!1,this.children.forEach(e)},e}();var rb=function(e){var t=e.treeType,n=void 0===t?"":t,r=e.build,o=e.getBaseTarget,i=e.makeTargetAnimatable,a=e.measureViewportBox,s=e.render,l=e.readValueFromInstance,u=e.resetTransform,c=e.restoreTransform,d=e.removeValueFromRenderState,f=e.sortNodePosition,p=e.scrapeMotionValuesFromProps;return function(e,t){var h=e.parent,m=e.props,v=e.presenceId,g=e.blockInitialAnimation,y=e.visualState;void 0===t&&(t={});var b,w,k,x,O,S,C=y.latestValues,j=y.renderState,D=function(){var e=eb.map((function(){return new Zv})),t={},n={clearAllListeners:function(){return e.forEach((function(e){return e.clear()}))},updatePropListeners:function(e){return eb.forEach((function(r){var o;null===(o=t[r])||void 0===o||o.call(t);var i="on"+r,a=e[i];a&&(t[r]=n[i](a))}))}};return e.forEach((function(e,t){n["on"+eb[t]]=function(t){return e.add(t)},n["notify"+eb[t]]=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.notify.apply(e,Mf([],Af(t)))}})),n}(),E={isEnabled:!1,isHydrated:!1,isTargetLocked:!1,target:{x:{min:0,max:1},y:{min:0,max:1}},targetFinal:{x:{min:0,max:1},y:{min:0,max:1}}},A=E,M=C,T=Jy(),L=!1,N=new Map,P=new Map,R={},H=Df({},C);function F(){b&&(U.isProjectionReady()&&(dy(A.targetFinal,A.target,M),Ug(T.deltaFinal,T.layoutCorrected,A.targetFinal,C)),V(),s(b,j))}function V(){var e=C;if(x&&x.isActive()){var n=x.getCrossfadeState(U);n&&(e=n)}r(U,j,e,A,T,t,m)}function z(){D.notifyUpdate(C)}function B(){U.layoutTree.forEach(ib)}var _=p(m);for(var I in _){var $=_[I];void 0!==C[I]&&gp($)&&$.set(C[I],!1)}var q=ep(m),W=tp(m),U=Df(Df({treeType:n,current:null,depth:h?h.depth+1:0,parent:h,children:new Set,path:h?Mf(Mf([],Af(h.path)),[h]):[],layoutTree:h?h.layoutTree:new nb,presenceId:v,projection:E,variantChildren:W?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(null===h||void 0===h?void 0:h.isMounted()),blockInitialAnimation:g,isMounted:function(){return Boolean(b)},mount:function(e){b=U.current=e,U.pointTo(U),W&&h&&!q&&(S=null===h||void 0===h?void 0:h.addVariantChild(U)),null===h||void 0===h||h.children.add(U)},unmount:function(){lv.update(z),lv.render(F),lv.preRender(U.updateLayoutProjection),P.forEach((function(e){return e()})),U.stopLayoutAnimation(),U.layoutTree.remove(U),null===S||void 0===S||S(),null===h||void 0===h||h.children.delete(U),null===k||void 0===k||k(),D.clearAllListeners()},addVariantChild:function(e){var t,n=U.getClosestVariantNode();if(n)return null===(t=n.variantChildren)||void 0===t||t.add(e),function(){return n.variantChildren.delete(e)}},sortNodePosition:function(e){return f&&n===e.treeType?f(U.getInstance(),e.getInstance()):0},getClosestVariantNode:function(){return W?U:null===h||void 0===h?void 0:h.getClosestVariantNode()},scheduleUpdateLayoutProjection:h?h.scheduleUpdateLayoutProjection:function(){return hv.preRender(U.updateTreeLayoutProjection,!1,!0)},getLayoutId:function(){return m.layoutId},getInstance:function(){return b},getStaticValue:function(e){return C[e]},setStaticValue:function(e,t){return C[e]=t},getLatestValues:function(){return C},setVisibility:function(e){U.isVisible!==e&&(U.isVisible=e,U.scheduleRender())},makeTargetAnimatable:function(e,t){return void 0===t&&(t=!0),i(U,e,m,t)},addValue:function(e,t){U.hasValue(e)&&U.removeValue(e),N.set(e,t),C[e]=t.get(),function(e,t){var n=t.onChange((function(t){C[e]=t,m.onUpdate&&hv.update(z,!1,!0)})),r=t.onRenderRequest(U.scheduleRender);P.set(e,(function(){n(),r()}))}(e,t)},removeValue:function(e){var t;N.delete(e),null===(t=P.get(e))||void 0===t||t(),P.delete(e),delete C[e],d(e,j)},hasValue:function(e){return N.has(e)},getValue:function(e,t){var n=N.get(e);return void 0===n&&void 0!==t&&(n=Qv(t),U.addValue(e,n)),n},forEachValue:function(e){return N.forEach(e)},readValue:function(e){var n;return null!==(n=C[e])&&void 0!==n?n:l(b,e,t)},setBaseTarget:function(e,t){H[e]=t},getBaseTarget:function(e){if(o){var t=o(m,e);if(void 0!==t&&!gp(t))return t}return H[e]}},D),{build:function(){return V(),j},scheduleRender:function(){hv.render(F,!1,!0)},syncRender:F,setProps:function(e){m=e,D.updatePropListeners(e),R=function(e,t,n){var r;for(var o in t){var i=t[o],a=n[o];if(gp(i))e.addValue(o,i);else if(gp(a))e.addValue(o,Qv(i));else if(a!==i)if(e.hasValue(o)){var s=e.getValue(o);!s.hasAnimated&&s.set(i)}else e.addValue(o,Qv(null!==(r=e.getStaticValue(o))&&void 0!==r?r:i))}for(var o in n)void 0===t[o]&&e.removeValue(o);return t}(U,p(m),R)},getProps:function(){return m},getVariant:function(e){var t;return null===(t=m.variants)||void 0===t?void 0:t[e]},getDefaultTransition:function(){return m.transition},getVariantContext:function(e){if(void 0===e&&(e=!1),e)return null===h||void 0===h?void 0:h.getVariantContext();if(!q){var t=(null===h||void 0===h?void 0:h.getVariantContext())||{};return void 0!==m.initial&&(t.initial=m.initial),t}for(var n={},r=0;r<lb;r++){var o=sb[r],i=m[o];(Zf(i)||!1===i)&&(n[o]=i)}return n},enableLayoutProjection:function(){E.isEnabled=!0,U.layoutTree.add(U)},lockProjectionTarget:function(){E.isTargetLocked=!0},unlockProjectionTarget:function(){U.stopLayoutAnimation(),E.isTargetLocked=!1},getLayoutState:function(){return T},setCrossfader:function(e){x=e},isProjectionReady:function(){return E.isEnabled&&E.isHydrated&&T.isHydrated},startLayoutAnimation:function(e,t,n){void 0===n&&(n=!1);var r=U.getProjectionAnimationProgress()[e],o=n?E.relativeTarget[e]:E.target[e],i=o.min,a=o.max-i;return r.clearListeners(),r.set(i),r.set(i),r.onChange((function(t){U.setProjectionTargetAxis(e,t,t+a,n)})),U.animateMotionValue(e,r,0,t)},stopLayoutAnimation:function(){Rg((function(e){return U.getProjectionAnimationProgress()[e].stop()}))},measureViewportBox:function(e){void 0===e&&(e=!0);var n=a(b,t);return e||hy(n,C),n},getProjectionAnimationProgress:function(){return O||(O={x:Qv(0),y:Qv(0)}),O},setProjectionTargetAxis:function(e,t,n,r){var o;void 0===r&&(r=!1),r?(E.relativeTarget||(E.relativeTarget={x:{min:0,max:1},y:{min:0,max:1}}),o=E.relativeTarget[e]):(E.relativeTarget=void 0,o=E.target[e]),E.isHydrated=!0,o.min=t,o.max=n,L=!0,D.notifySetAxisTarget()},rebaseProjectionTarget:function(e,t){void 0===t&&(t=T.layout);var n=U.getProjectionAnimationProgress(),r=n.x,o=n.y,i=!E.relativeTarget&&!E.isTargetLocked&&!r.isAnimating()&&!o.isAnimating();(e||i)&&Rg((function(e){var n=t[e],r=n.min,o=n.max;U.setProjectionTargetAxis(e,r,o)}))},notifyLayoutReady:function(e){!function(e){var t=e.getProjectionParent();if(t){var n=ey(t.getLayoutState().layout,e.getLayoutState().layout);Rg((function(t){e.setProjectionTargetAxis(t,n[t].min,n[t].max,!0)}))}else e.rebaseProjectionTarget()}(U),U.notifyLayoutUpdate(T.layout,U.prevViewportBox||T.layout,e)},resetTransform:function(){return u(U,b,m)},restoreTransform:function(){return c(b,j)},updateLayoutProjection:function(){if(U.isProjectionReady()){var e=T.delta,t=T.treeScale,n=t.x,r=t.y,o=T.deltaTransform;tb(T,A,U.path,C),L&&U.notifyViewportBoxUpdate(A.target,e),L=!1;var i=Zy(e,t);i===o&&n===t.x&&r===t.y||U.scheduleRender(),T.deltaTransform=i}},updateTreeLayoutProjection:function(){U.layoutTree.forEach(ob),hv.preRender(B,!1,!0)},getProjectionParent:function(){if(void 0===w){for(var e=!1,t=U.path.length-1;t>=0;t--){var n=U.path[t];if(n.projection.isEnabled){e=n;break}}w=e}return w},resolveRelativeTargetBox:function(){var e=U.getProjectionParent();if(E.relativeTarget&&e&&(function(e,t){Gg(e.target.x,e.relativeTarget.x,t.target.x),Gg(e.target.y,e.relativeTarget.y,t.target.y)}(E,e.projection),ny(e))){var t=E.target;dy(t,t,e.getLatestValues())}},shouldResetTransform:function(){return Boolean(m._layoutResetTransform)},pointTo:function(e){A=e.projection,M=e.getLatestValues(),null===k||void 0===k||k(),k=Ih(e.onSetAxisTarget(U.scheduleUpdateLayoutProjection),e.onLayoutAnimationComplete((function(){var e;U.isPresent?U.presence=Sy.Present:null===(e=U.layoutSafeToRemove)||void 0===e||e.call(U)})))},isPresent:!0,presence:Sy.Entering});return U}};function ob(e){e.resolveRelativeTargetBox()}function ib(e){e.updateLayoutProjection()}var ab,sb=Mf(["initial"],Af(hg)),lb=sb.length,ub=new Set(["width","height","top","left","right","bottom","x","y"]),cb=function(e){return ub.has(e)},db=function(e,t){e.set(t,!1),e.set(t)},fb=function(e){return e===Pp||e===Mp};!function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"}(ab||(ab={}));var pb=function(e,t){return parseFloat(e.split(", ")[t])},hb=function(e,t){return function(n,r){var o=r.transform;if("none"===o||!o)return 0;var i=o.match(/^matrix3d\((.+)\)$/);if(i)return pb(i[1],t);var a=o.match(/^matrix\((.+)\)$/);return a?pb(a[1],e):0}},mb=new Set(["x","y","z"]),vb=cp.filter((function(e){return!mb.has(e)}));var gb={width:function(e){var t=e.x;return t.max-t.min},height:function(e){var t=e.y;return t.max-t.min},top:function(e,t){var n=t.top;return parseFloat(n)},left:function(e,t){var n=t.left;return parseFloat(n)},bottom:function(e,t){var n=e.y,r=t.top;return parseFloat(r)+(n.max-n.min)},right:function(e,t){var n=e.x,r=t.left;return parseFloat(r)+(n.max-n.min)},x:hb(4,13),y:hb(5,14)},yb=function(e,t,n,r){void 0===n&&(n={}),void 0===r&&(r={}),t=Df({},t),r=Df({},r);var o=Object.keys(t).filter(cb),i=[],a=!1,s=[];if(o.forEach((function(o){var l=e.getValue(o);if(e.hasValue(o)){var u,c=n[o],d=t[o],f=ng(c);if(ch(d))for(var p=d.length,h=null===d[0]?1:0;h<p;h++)u?ng(d[h]):(u=ng(d[h]))===f||fb(f)&&fb(u);else u=ng(d);if(f!==u)if(fb(f)&&fb(u)){var m=l.get();"string"===typeof m&&l.set(parseFloat(m)),"string"===typeof d?t[o]=parseFloat(d):Array.isArray(d)&&u===Mp&&(t[o]=d.map(parseFloat))}else(null===f||void 0===f?void 0:f.transform)&&(null===u||void 0===u?void 0:u.transform)&&(0===c||0===d)?0===c?l.set(u.transform(c)):t[o]=f.transform(d):(a||(i=function(e){var t=[];return vb.forEach((function(n){var r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))})),t.length&&e.syncRender(),t}(e),a=!0),s.push(o),r[o]=void 0!==r[o]?r[o]:t[o],db(l,d))}})),s.length){var l=function(e,t,n){var r=t.measureViewportBox(),o=t.getInstance(),i=getComputedStyle(o),a=i.display,s={top:i.top,left:i.left,bottom:i.bottom,right:i.right,transform:i.transform};"none"===a&&t.setStaticValue("display",e.display||"block"),t.syncRender();var l=t.measureViewportBox();return n.forEach((function(n){var o=t.getValue(n);db(o,gb[n](r,s)),e[n]=gb[n](l,i)})),e}(t,e,s);return i.length&&i.forEach((function(t){var n=Af(t,2),r=n[0],o=n[1];e.getValue(r).set(o)})),e.syncRender(),{target:l,transitionEnd:r}}return{target:t,transitionEnd:r}};function bb(e,t,n,r){return function(e){return Object.keys(e).some(cb)}(t)?yb(e,t,n,r):{target:t,transitionEnd:r}}var wb=function(e,t,n,r){var o=function(e,t,n){var r,o=Ef(t,[]),i=e.getInstance();if(!(i instanceof HTMLElement))return{target:o,transitionEnd:n};for(var a in n&&(n=Df({},n)),e.forEachValue((function(e){var t=e.get();if(Dy(t)){var n=Ay(t,i);n&&e.set(n)}})),o){var s=o[a];if(Dy(s)){var l=Ay(s,i);l&&(o[a]=l,n&&(null!==(r=n[a])&&void 0!==r||(n[a]=s)))}}return{target:o,transitionEnd:n}}(e,t,r);return bb(e,t=o.target,n,r=o.transitionEnd)};var kb={treeType:"dom",readValueFromInstance:function(e,t){if(pp(t)){var n=Bv(t);return n&&n.default||0}var r,o=(r=e,window.getComputedStyle(r));return(bp(t)?o.getPropertyValue(t):o[t])||0},sortNodePosition:function(e,t){return 2&e.compareDocumentPosition(t)?1:-1},getBaseTarget:function(e,t){var n;return null===(n=e.style)||void 0===n?void 0:n[t]},measureViewportBox:function(e,t){return _g(e,t.transformPagePoint)},resetTransform:function(e,t,n){var r=n.transformTemplate;t.style.transform=r?r({},""):"none",e.scheduleRender()},restoreTransform:function(e,t){e.style.transform=t.style.transform},removeValueFromRenderState:function(e,t){var n=t.vars,r=t.style;delete n[e],delete r[e]},makeTargetAnimatable:function(e,t,n,r){var o=n.transformValues;void 0===r&&(r=!0);var i=t.transition,a=t.transitionEnd,s=Ef(t,["transition","transitionEnd"]),l=function(e,t,n){var r,o,i={};for(var a in e)i[a]=null!==(r=lg(a,t))&&void 0!==r?r:null===(o=n.getValue(a))||void 0===o?void 0:o.get();return i}(s,i||{},e);if(o&&(a&&(a=o(a)),s&&(s=o(s)),l&&(l=o(l))),r){!function(e,t,n){var r,o,i,a,s=Object.keys(t).filter((function(t){return!e.hasValue(t)})),l=s.length;if(l)for(var u=0;u<l;u++){var c=s[u],d=t[c],f=null;Array.isArray(d)&&(f=d[0]),null===f&&(f=null!==(o=null!==(r=n[c])&&void 0!==r?r:e.readValue(c))&&void 0!==o?o:t[c]),void 0!==f&&null!==f&&("string"===typeof f&&/^\-?\d*\.?\d+$/.test(f)?f=parseFloat(f):!og(f)&&xm.test(d)&&(f=_v(c,d)),e.addValue(c,Qv(f)),null!==(i=(a=n)[c])&&void 0!==i||(a[c]=f),e.setBaseTarget(c,f))}}(e,s,l);var u=wb(e,s,l,a);a=u.transitionEnd,s=u.target}return Df({transition:i,transitionEnd:a},s)},scrapeMotionValuesFromProps:sh,build:function(e,t,n,r,o,i,a){void 0!==e.isVisible&&(t.style.visibility=e.isVisible?"visible":"hidden");var s=r.isEnabled&&o.isHydrated;zp(t,n,r,o,i,a.transformTemplate,s?Zy:void 0,s?Xy:void 0)},render:oh},xb=rb(kb),Ob=rb(Df(Df({},kb),{getBaseTarget:function(e,t){return e[t]},readValueFromInstance:function(e,t){var n;return pp(t)?(null===(n=Bv(t))||void 0===n?void 0:n.default)||0:(t=ih.has(t)?t:rh(t),e.getAttribute(t))},scrapeMotionValuesFromProps:lh,build:function(e,t,n,r,o,i,a){var s=r.isEnabled&&o.isHydrated;Xp(t,n,r,o,i,a.transformTemplate,s?Zy:void 0,s?Xy:void 0)},render:ah})),Sb=function(e,t){return sp(e)?Ob(t,{enableHardwareAcceleration:!1}):xb(t,{enableHardwareAcceleration:!0})},Cb=Df(Df(Df(Df({},bg),qh),jy),Gy),jb=ip((function(e,t){return yh(e,t,Cb,Sb)}));function Db(e){var t=zf((function(){return Qv(e)}));if(Object(jd.useContext)(Hf).isStatic){var n=Af(Object(jd.useState)(e),2)[1];Object(jd.useEffect)((function(){return t.onChange(n)}),[])}return t}var Eb=function(e){return function(e){return"object"===typeof e&&e.mix}(e)?e.mix:void 0};function Ab(e,t){var n=Db(t()),r=function(){return n.set(t())};return r(),function(e,t){Object(jd.useEffect)((function(){var n=e.map((function(e){return e.onChange(t)}));return function(){return n.forEach((function(e){return e()}))}}))}(e,(function(){return hv.update(r,!1,!0)})),n}function Mb(e,t,n,r){var o="function"===typeof t?t:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=!Array.isArray(e[0]),r=n?0:-1,o=e[0+r],i=e[1+r],a=e[2+r],s=e[3+r],l=Tm(i,a,Df({mixer:Eb(a[0])},s));return n?l(o):l}(t,n,r);return Array.isArray(e)?Tb(e,o):Tb([e],(function(e){var t=Af(e,1)[0];return o(t)}))}function Tb(e,t){var n=zf((function(){return[]}));return Ab(e,(function(){n.length=0;for(var r=e.length,o=0;o<r;o++)n[o]=e[o].get();return t(n)}))}function Lb(){var e=!1,t=[],n=new Set,r={subscribe:function(e){return n.add(e),function(){n.delete(e)}},start:function(r,o){if(e){var i=[];return n.forEach((function(e){i.push(ug(e,r,{transitionOverride:o}))})),Promise.all(i)}return new Promise((function(e){t.push({animation:[r,o],resolve:e})}))},set:function(e){return n.forEach((function(t){!function(e,t){Array.isArray(t)?sg(e,t):"string"===typeof t?sg(e,[t]):ag(e,t)}(t,e)}))},stop:function(){n.forEach((function(e){!function(e){e.forEachValue((function(e){return e.stop()}))}(e)}))},mount:function(){return e=!0,t.forEach((function(e){var t=e.animation,n=e.resolve;r.start.apply(r,Mf([],Af(t))).then(n)})),function(){e=!1,r.stop()}}};return r}var Nb=jb(af.Flex),Pb={type:"spring",stiffness:300,damping:30,mass:.2,duration:300};function Rb(e){var t,n=e.isOpen,r=e.title,o=e.items,i=e.onClose,a=e.blocking,s=void 0===a||a,l=e.focusOnRender,u=void 0===l||l,c=e.draggable,d=void 0===c||c,f=e.children,p=Vd(),h=Object(jd.useRef)(),m=Db(0),v=Mb(m,[0,(null===(t=h.current)||void 0===t?void 0:t.offsetHeight)||window.innerHeight],[1,0]),g=function(){var e=zf(Lb);return Object(jd.useEffect)(e.mount,[]),e}(),y=Object(jd.useCallback)((function(){var e,t=(null===(e=h.current)||void 0===e?void 0:e.offsetHeight)||window.innerHeight;setTimeout((function(){null===i||void 0===i||i()}),Pb.duration-50),g.start({transition:Pb,y:t+100})}),[g,i,h.current]),b=Object(jd.useCallback)((function(e){n&&(e.preventDefault(),y())}),[n,y]);return Object(jd.useEffect)((function(){return window.addEventListener("handleBackPress",b),function(){window.removeEventListener("handleBackPress",b)}}),[b]),n?Object(Cd.jsx)(Sf.a,Object.assign({contentRef:function(e){return h.current=e},className:"bottom-sheet-presenter",role:"menu",isOpen:n,appElement:document.body,shouldCloseOnEsc:s,shouldReturnFocusAfterClose:u,shouldCloseOnOverlayClick:s,shouldFocusAfterRender:u,ariaHideApp:s,preventScroll:s,onRequestClose:function(){return y()},portalClassName:"bottom-sheet-presenter-portal",onAfterOpen:function(){console.log("OPEGN!"),g.start({transition:Pb,y:0})},overlayElement:function(e,t){return Object(Cd.jsxs)(af.Box,Object.assign({},e,{style:Object.assign(Object.assign({},e.style),{position:s?"fixed":"sticky",zIndex:1e3,backgroundColor:s?"unset":"transparent"}),tabIndex:-1},{children:[s&&Object(Cd.jsx)(jb.div,{id:"action-sheet-overlay",style:{height:"100%",width:"100%",opacity:v,position:"absolute",backgroundColor:"var(--overlay)"},tabIndex:-1}),t]}))},contentElement:function(e,t){return Object(Cd.jsx)(af.Box,Object.assign({},e,{style:{},sx:{left:0,right:0,bottom:0,display:"flex",width:"auto",height:"fit-content",position:"fixed",backgroundColor:void 0,padding:0,zIndex:0,outline:0,isolation:"isolate"}},{children:t}))}},{children:Object(Cd.jsxs)(Nb,Object.assign({animate:g,style:{y:m},initial:{y:1e3},sx:{bg:"background",borderTopLeftRadius:15,borderTopRightRadius:15,boxShadow:(null===p||void 0===p?void 0:p.shadows.menu)||"none",flex:1,flexDirection:"column"}},{children:[d&&Object(Cd.jsx)(Nb,Object.assign({drag:"y",onDrag:function(e,t){var n=t.delta;m.set(Math.max(m.get()+n.y,0))},onDragEnd:function(e,t){if(t.velocity.y>=500)null===i||void 0===i||i();else{var n=30*h.current.offsetHeight/100;m.get()>=n?y():g.start({transition:Pb,y:0})}},dragConstraints:{top:0,bottom:0},dragMomentum:!1,dragElastic:!1,sx:{bg:"transparent",alignItems:"center",justifyContent:"center",p:2}},{children:Object(Cd.jsx)(af.Box,{id:"pill",sx:{backgroundColor:"hover",width:60,height:8,borderRadius:100}})})),Object(Cd.jsx)(Hb,Object.assign({items:o,title:r,onClose:i},{children:f}))]}))})):null}function Hb(e){var t,n=e.title,r=e.items,o=e.onClose,a=e.children,s=function(e){var t=Object(jd.useState)(e),n=Object(i.a)(t,2),r=n[0],o=n[1],a=Object(jd.useState)(!1),s=Object(i.a)(a,2),l=s[0],u=s[1],c=Object(jd.useRef)([e]);return{current:r,goBack:Object(jd.useCallback)((function(){if(l){var e=c.current.pop();o(e),c.current.length<=1&&u(!1)}}),[l]),navigate:Object(jd.useCallback)((function(e){console.log("NAVI",e),o((function(t){return t&&c.current.push(t),e})),u(!0)}),[]),canGoBack:l}}({title:n,items:r}),l=s.current,u=s.goBack,c=s.canGoBack,d=s.navigate;return Object(Cd.jsxs)(af.Flex,Object.assign({sx:{flexDirection:"column"}},{children:[c||(null===l||void 0===l?void 0:l.title)?Object(Cd.jsxs)(af.Flex,Object.assign({id:"header",sx:{alignItems:"center",mx:0,mb:1}},{children:[c&&Object(Cd.jsx)(uf,Object.assign({variant:"icon",sx:{p:1,ml:1},onClick:u},{children:Object(Cd.jsx)(mf,{path:vf.arrowLeft,size:"big"})})),(null===l||void 0===l?void 0:l.title)&&Object(Cd.jsx)(lf,Object.assign({variant:"title",sx:{ml:1,fontSize:"title"}},{children:null===l||void 0===l?void 0:l.title}))]})):null,a||(null===(t=null===l||void 0===l?void 0:l.items)||void 0===t?void 0:t.map((function(e){if(e.isHidden)return null;switch(e.type){case"separator":return Object(Cd.jsx)(xf,{},e.key);case"button":return Object(Cd.jsx)(kf,{item:e,onClick:function(t){e.menu?d(e.menu):e.onClick&&(null===o||void 0===o||o(),setTimeout((function(){var t;null===(t=e.onClick)||void 0===t||t.call(e)}),300))}},e.key);case"popup":return Object(Cd.jsx)(Dd.a.Fragment,{children:Object(Cd.jsx)(e.component,{onClick:o})},e.key)}})))]}))}var Fb={x:0,y:0,actualX:0,actualY:0};function Vb(e,t){var n=t||{},r=n.target,o=void 0===r?"mouse":r,i=n.isTargetAbsolute,a=void 0!==i&&i,s=n.location,l=void 0===s?void 0:s,u=n.yOffset,c=void 0===u?0:u,d=n.xOffset,f=void 0===d?0:d,p=n.align,h=void 0===p?"start":p,m=n.parent,v=void 0===m?document.body:m,g=n.yAnchor,y="mouse"===o?Fb:zb(o,a),b=y.x,w=y.y,k=y.width,x=y.height,O=y.actualX,S=y.actualY,C=e.offsetWidth,j=e.offsetHeight,D=v.clientWidth,E=v.clientHeight,A={top:0,left:0};if(D-O<C){var M=O-b;A.left=D-C,A.left-=M}else A.left=b;if(k&&"right"===l?A.left+=k:"left"===l&&(A.left-=C),A.top=S+j>E?E-j:w,x&&("below"===l?A.top+=x:"top"===l&&(A.top=w-j)),k&&"mouse"!==o&&"center"===h&&C>0?A.left-=(C-k)/2:k&&"mouse"!==o&&"end"===h&&C>0&&(A.left-=C-k),j>E-A.top&&(e.style.maxHeight="".concat(E-20,"px")),g){var T=zb(g,a);A.top=T.y-j}return A.top=a&&A.top<0?0:A.top,A.left=a&&A.left<0?0:A.left,A.top+="below"===l?c:-c,A.left+=f,A}function zb(e,t){var n=e.getBoundingClientRect(),r={x:e.offsetLeft,y:e.offsetTop,width:n.width,height:n.height,actualY:n.y,actualX:n.x};return t&&(r.x=r.actualX,r.y=r.actualY),r}function Bb(e,t,n){var r=Object(jd.useState)(-1),o=Object(i.a)(r,2),a=o[0],s=o[1],l=Object(jd.useState)(!1),u=Object(i.a)(l,2),c=u[0],d=u[1],f=Object(jd.useCallback)((function(t){var n=e[t];if(n){var r=document.getElementById(n.key);r&&r.scrollIntoView({behavior:"auto"})}}),[e]),p=Object(jd.useCallback)((function(r){var o=function(t){return e[t]},i=function(t){var n,r;return e&&("separator"===(null===(n=e[t])||void 0===n?void 0:n.type)||(null===(r=o(t))||void 0===r?void 0:r.isDisabled))},a=function(t){return t<e.length-1?++t:0},l=function(t){return t>0?--t:e.length-1},u=function(t){return e&&o(t).menu};s((function(e){var o=e;switch(r.key){case"ArrowUp":if(c)break;for(o=l(e);i(o);)o=l(o);break;case"ArrowDown":if(c)break;for(o=a(e);i(o);)o=a(o);break;case"ArrowRight":u(e)&&d(!0);break;case"ArrowLeft":!function(e){u(e)&&d(!1)}(e);break;case"Enter":t&&t(r);break;case"Escape":n&&n(r)}return o!==e&&f(o),o}))}),[e,c,f,t]);return Object(jd.useEffect)((function(){return window.addEventListener("keydown",p),function(){window.removeEventListener("keydown",p)}}),[p]),{focusIndex:a,setFocusIndex:s,isSubmenuOpen:c,setIsSubmenuOpen:d}}function _b(){return document.querySelector(".editor-toolbar")||void 0}function Ib(){return document.getElementById("popup-container")||void 0}window.addEventListener("mousemove",(function(e){var t=function(e){var t=0,n=0;!e&&window.event&&(e=window.event);e.pageX||e.pageY?(t=e.pageX,n=e.pageY):(e.clientX||e.clientY)&&(t=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,n=e.clientY+document.body.scrollTop+document.documentElement.scrollTop);return{x:t,y:n,actualY:n,actualX:t}}(e),n=t.x,r=t.y,o=t.actualX,i=t.actualY;Fb.x=n,Fb.y=r,Fb.actualX=o,Fb.actualY=i}));var $b=Dd.a.createContext(null),qb=Dd.a.createContext(null),Wb=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(){var e;return Object(c.a)(this,n),(e=t.apply(this,arguments)).popupContainer=null,e.state={popups:[]},e.openPopup=function(t,n){n&&e.setState((function(e){return{popups:[].concat(Object(o.a)(e.popups),[{id:t,popup:n}])}}))},e.closePopup=function(t){e.setState((function(e){var n=e.popups.findIndex((function(e){return e.id===t}));if(n<=-1)return e;var r=e.popups.slice();return r.splice(n,1),{popups:r}}))},e}return Object(d.a)(n,[{key:"render",value:function(){return Object(Cd.jsxs)($b.Provider,Object.assign({value:this},{children:[this.props.children,Object(Cd.jsxs)(qb.Provider,Object.assign({value:this.props.editor},{children:[this.state.popups.map((function(e){var t=e.id,n=e.popup;return Object(Cd.jsx)(n,{id:t},t)})),Object(Cd.jsx)("div",{id:"popup-container"})]}))]}))}}]),n}(Dd.a.Component);var Ub=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function Kb(e){var t=e.isOpen,n=e.position,r=e.onClose,o=e.blocking,i=void 0===o||o,a=e.focusOnRender,s=void 0===a||a,l=e.children,u=Fd(),c=Object(jd.useRef)(),d=Object(jd.useRef)(),f=Object(jd.useCallback)((function(){if(c.current&&n){var e=c.current,t=Vb(e,n);e.style.top=t.top+"px",e.style.left=t.left+"px"}}),[n]);Object(jd.useEffect)((function(){f()}),[n]),Object(jd.useEffect)((function(){function e(){f()}return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[]);var p=Object(jd.useCallback)((function(){if(c.current&&t){var e=c.current.querySelector(".movable");if(e){var n=c.current,r={x:0,y:0};e.addEventListener("mousedown",(function(e){r.x=e.clientX-n.offsetLeft,r.y=e.clientY-n.offsetTop,window.addEventListener("mousemove",o)})),window.addEventListener("mouseup",i)}}function o(e){e.buttons||i();var t=e.clientY-r.y,o=e.clientX-r.x;requestAnimationFrame((function(){n.style.top=t+"px",n.style.left=o+"px"}))}function i(){window.removeEventListener("mousemove",o)}}),[t]),h=Object(jd.useCallback)((function(){var e=c.current;if(e){var t=e.offsetHeight;d.current=new ResizeObserver((function(n){if(u)f();else{var r=e.getBoundingClientRect(),o=r.height,i=r.y;if(o-t>0){var a=document.body.clientHeight-20;i+o>a&&(e.style.top=a-o+"px")}t=o}})),d.current.observe(e,{box:"border-box"})}}),[u]);return Object(Cd.jsx)(Sf.a,Object.assign({contentRef:function(e){return c.current=e},className:"popup-presenter",role:"menu",isOpen:t,appElement:document.body,shouldCloseOnEsc:!0,shouldReturnFocusAfterClose:!0,shouldCloseOnOverlayClick:!0,shouldFocusAfterRender:s,ariaHideApp:i,preventScroll:i,onRequestClose:r,portalClassName:"popup-presenter-portal",onAfterOpen:function(e){e&&n&&(f(),h(),p())},onAfterClose:function(){var e;return null===(e=d.current)||void 0===e?void 0:e.disconnect()},overlayElement:function(e,t){return Object(Cd.jsx)(af.Box,Object.assign({},e,{style:Object.assign(Object.assign({},e.style),{position:i?"fixed":"initial",zIndex:1e3,backgroundColor:i?"unset":"transparent"})},{children:t}))},contentElement:function(e,t){return Object(Cd.jsx)(af.Box,Object.assign({},e,{style:{},sx:{top:0,left:0,right:0,bottom:0,display:"flex",width:"fit-content",height:"fit-content",position:"fixed",backgroundColor:void 0,padding:0,zIndex:999,outline:0,isolation:"isolate"}},{children:t}))},style:{content:{},overlay:{zIndex:999,background:"transparent"}}},{children:l}))}function Gb(e){return e.isOpen?Object(Cd.jsx)(Kb,Object.assign({},e)):null}function Jb(e){var t=e.id,n=(e.group,e.position),r=e.renderPopup,o=(e.isOpen,e.onClosed,e.autoCloseOnUnmount),i=Ub(e,["id","group","position","renderPopup","isOpen","onClosed","autoCloseOnUnmount"]),a=Object(jd.useContext)($b),s=Yb(e),l=s.closePopup,u=s.isPopupOpen;return Object(jd.useEffect)((function(){if(o)return function(){null===a||void 0===a||a.closePopup(t)}}),[o,t,a]),Object(jd.useEffect)((function(){a&&u&&a.openPopup(t,(function(e){var t=e.id,o=Rd((function(e){return!!e.openedPopups[t]}));return Object(jd.useEffect)((function(){o||a.closePopup(t)}),[o]),Object(Cd.jsx)(Gb,Object.assign({isOpen:o,onClose:function(){return l(t)},position:n,blocking:!0,focusOnRender:!0},i,{children:Object(Cd.jsx)(af.Box,Object.assign({sx:{boxShadow:"menu",borderRadius:"default",overflow:"hidden"}},{children:Object(Cd.jsx)(qb.Consumer,{children:function(){return r((function(){return a.closePopup(t)}))}})}))}),t)}))}),[a,u]),null}function Yb(e){var t=e.group,n=e.isOpen,r=e.id,o=e.onClosed,i=Rd((function(e){return!!e.openedPopups[r]})),a=Rd((function(e){return e.openPopup})),s=Rd((function(e){return e.closePopup})),l=Rd((function(e){return e.closePopupGroup}));return Rd((function(e){return"bottom"===e.toolbarLocation}))&&(t="popup"),Object(jd.useEffect)((function(){n?a({id:r,group:t}):s(r)}),[n,r,t,a,s]),Object(jd.useEffect)((function(){i||null===o||void 0===o||o()}),[i]),Object(jd.useEffect)((function(){i&&l(t,[r])}),[o,i,l,r,t]),Object(jd.useEffect)((function(){n||s(r)}),[n,r,t,s]),{isPopupOpen:i,closePopup:s}}function Zb(e){var t=e.popup,n=Ub(e,["popup"]);function r(){qd.a.unmountComponentAtNode(Ib())}return qd.a.render(Object(Cd.jsx)(Bd,{children:Object(Cd.jsx)(aw,Object.assign({isOpen:!0,position:{target:_b(),isTargetAbsolute:!0,location:"below",align:"end",yOffset:10},blocking:!0,focusOnRender:!0},n,{onClose:function(){var e;r(),null===(e=n.onClose)||void 0===e||e.call(n)}},{children:t(r)}))}),Ib()),r}var Xb=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function Qb(e){var t=e.items,n=void 0===t?[]:t,r=(e.title,e.onClose),o=Xb(e,["items","title","onClose"]),i=Object(jd.useRef)(),a=Object(jd.useCallback)((function(e,t){null===e||void 0===e||e.stopPropagation(),(null===t||void 0===t?void 0:t.onClick)&&t.onClick(),r&&r()}),[r]),s=Bb(n,(function(e){var t=n[l];t&&"button"===t.type&&a(e,t)}),(function(){return r()})),l=s.focusIndex,u=s.setFocusIndex,c=s.isSubmenuOpen,d=s.setIsSubmenuOpen,f=n[l],p=Object(jd.useRef)(null);return Object(jd.useEffect)((function(){var e=n[l];if(e&&p.current){var t=document.getElementById(e.key);if(t)if(c){var r=Vb(p.current,{target:t,location:"right"}),o=r.top,i=r.left;p.current.style.visibility="visible",p.current.style.top="".concat(o,"px"),p.current.style.left="".concat(i,"px")}else p.current.style.visibility="hidden"}}),[c,l,n]),Object(Cd.jsxs)(Cd.Fragment,{children:[Object(Cd.jsx)(ew,Object.assign({},o,{children:n.map((function(e,t){if(e.isHidden)return null;switch(e.type){case"separator":return Object(Cd.jsx)(xf,{},e.key);case"button":return Object(Cd.jsx)(kf,{item:e,onClick:function(n){e.menu?(u(t),d(!0)):a(n,e)},isFocused:l===t,onMouseEnter:function(){e.isDisabled?u(-1):(i.current&&clearTimeout(i.current),u(t),d(!1),e.menu&&(i.current=setTimeout((function(){d(!0)}),500)))},onMouseLeave:function(){i.current&&clearTimeout(i.current)}},e.key);case"popup":return Object(Cd.jsx)(e.component,{onClick:function(e){return a(e)}})}}))})),"button"===(null===f||void 0===f?void 0:f.type)&&(null===f||void 0===f?void 0:f.menu)&&c&&Object(Cd.jsx)(af.Flex,Object.assign({ref:p,style:{visibility:"hidden"},sx:{position:"absolute"}},{children:Object(Cd.jsx)(Qb,{items:f.menu.items,onClose:r})}))]})}function ew(e){var t=e.children,n=e.title,r=e.sx,o=Xb(e,["children","title","sx"]);return Object(Cd.jsxs)(af.Box,Object.assign({className:"menuContainer",as:"ul",tabIndex:-1,sx:Object.assign({bg:"background",py:1,display:"flex",flexDirection:"column",position:"relative",listStyle:"none",padding:0,margin:0,borderRadius:"default",boxShadow:"menu",border:"1px solid var(--border)",minWidth:220},r)},o,{children:[n&&Object(Cd.jsx)(lf,Object.assign({sx:{fontFamily:"body",fontSize:"subtitle",color:"primary",py:"8px",px:3,borderBottom:"1px solid",borderBottomColor:"border",wordWrap:"break-word"}},{children:n})),t]}))}function tw(e){var t=e.items,n=void 0===t?[]:t,r=Xb(e,["items"]);return Object(Cd.jsx)(Gb,Object.assign({},r,{children:e.children?e.children:Object(Cd.jsx)(Qb,Object.assign({items:n},r))}))}var nw=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function rw(e){return Fd()?e.mobile||null:e.desktop||null}function ow(e){return Object(Cd.jsx)(rw,{desktop:Object(Cd.jsx)(Cd.Fragment,{children:e.children})})}function iw(e){return Object(Cd.jsx)(rw,{mobile:Object(Cd.jsx)(Cd.Fragment,{children:e.children})})}function aw(e){var t=e.mobile,n=void 0===t?"menu":t,r=e.desktop,o=void 0===r?"menu":r,i=nw(e,["mobile","desktop"]);return Fd()&&"sheet"===n?Object(Cd.jsx)(Rb,Object.assign({},i)):"menu"===n||"menu"===o?Object(Cd.jsx)(tw,Object.assign({},i)):e.isOpen?Object(Cd.jsx)(Cd.Fragment,{children:e.children}):null}function sw(e){var t=e.title,n=e.onClose,r=e.action,o=e.children;return Object(Cd.jsxs)(Cd.Fragment,{children:[Object(Cd.jsx)(ow,{children:Object(Cd.jsxs)(af.Flex,Object.assign({sx:{overflow:"hidden",bg:"background",flexDirection:"column",borderRadius:"default",boxShadow:"menu",minWidth:200}},{children:[t&&Object(Cd.jsxs)(af.Flex,Object.assign({className:"movable",sx:{justifyContent:"space-between",alignItems:"center",p:2}},{children:[Object(Cd.jsx)(lf,Object.assign({variant:"title"},{children:t})),Object(Cd.jsx)(uf,Object.assign({variant:"tool",sx:{p:0,bg:"transparent"},onClick:n},{children:Object(Cd.jsx)(mf,{path:vf.close,size:"big"})}))]})),o,t&&r&&Object(Cd.jsx)(af.Flex,Object.assign({sx:{justifyContent:"end"},bg:"bgSecondary",p:1,px:2,mt:2},{children:Object(Cd.jsx)(uf,Object.assign({variant:"dialog",onClick:r.disabled||r.loading?void 0:r.onClick,disabled:r.disabled||r.loading},{children:r.loading?Object(Cd.jsx)(mf,{path:vf.loading,rotate:!0,size:"medium"}):r.title}))}))]}))}),Object(Cd.jsxs)(iw,{children:[o,r&&Object(Cd.jsx)(uf,Object.assign({variant:"primary",sx:{alignSelf:"stretch",mb:1,mt:2,mx:1,py:2},onClick:r.disabled||null===r||void 0===r?void 0:r.onClick,disabled:r.disabled},{children:r.loading?Object(Cd.jsx)(mf,{path:vf.loading,rotate:!0,size:"medium"}):r.title}))]})]})}var lw=n(14),uw=n.n(lw),cw=n(21),dw=n(43);function fw(){return fw=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fw.apply(this,arguments)}function pw(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var hw,mw,vw,gw,yw=[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(hw=dw.props)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(hw)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}(),["sx","variant"]),bw=new RegExp("^(".concat(yw.join("|"),")$")),ww=/^m[trblxy]?$/,kw=function(e){return function(t){var n={};for(var r in t)e(r||"")&&(n[r]=t[r]);return n}},xw=kw((function(e){return bw.test(e)})),Ow=kw((function(e){return ww.test(e)})),Sw=kw((function(e){return!ww.test(e)})),Cw=function(e){e.size;var t=pw(e,["size"]);return uw.a.createElement(cw.Box,fw({as:"svg",xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentcolor"},t))},jw=Object(lw.forwardRef)((function(e,t){return uw.a.createElement(cw.Flex,fw({ref:t,as:"label",tx:"forms",variant:"label"},e,{__css:{width:"100%"}}))})),Dw=Object(lw.forwardRef)((function(e,t){return uw.a.createElement(cw.Box,fw({ref:t,as:"input",type:"text",tx:"forms",variant:"input"},e,{__css:{display:"block",width:"100%",p:2,appearance:"none",fontSize:"inherit",lineHeight:"inherit",border:"1px solid",borderRadius:"default",color:"inherit",bg:"transparent"}}))})),Ew=function(e){return uw.a.createElement(Cw,e,uw.a.createElement("path",{d:"M7 10l5 5 5-5z"}))},Aw=(Object(lw.forwardRef)((function(e,t){return uw.a.createElement(cw.Flex,Ow(e),uw.a.createElement(cw.Box,fw({ref:t,as:"select",tx:"forms",variant:"select"},Sw(e),{__css:{display:"block",width:"100%",p:2,appearance:"none",fontSize:"inherit",lineHeight:"inherit",border:"1px solid",borderRadius:"default",color:"inherit",bg:"transparent"}})),uw.a.createElement(Ew,{sx:{ml:-28,alignSelf:"center",pointerEvents:"none"}}))})),Object(lw.forwardRef)((function(e,t){return uw.a.createElement(cw.Box,fw({ref:t,as:"textarea",tx:"forms",variant:"textarea"},e,{__css:{display:"block",width:"100%",p:2,appearance:"none",fontSize:"inherit",lineHeight:"inherit",border:"1px solid",borderRadius:"default",color:"inherit",bg:"transparent"}}))}))),Mw=function(e){return uw.a.createElement(Cw,e,uw.a.createElement("path",{d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))},Tw=function(e){return uw.a.createElement(Cw,e,uw.a.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))},Lw=function(e){return uw.a.createElement(uw.a.Fragment,null,uw.a.createElement(Mw,fw({},e,{__css:{display:"none","input:checked ~ &":{display:"block"}}})),uw.a.createElement(Tw,fw({},e,{__css:{display:"block","input:checked ~ &":{display:"none"}}})))},Nw=(Object(lw.forwardRef)((function(e,t){var n=e.className,r=e.sx,o=e.variant,i=void 0===o?"radio":o,a=pw(e,["className","sx","variant"]);return uw.a.createElement(cw.Box,null,uw.a.createElement(cw.Box,fw({ref:t,as:"input",type:"radio"},a,{sx:{position:"absolute",opacity:0,zIndex:-1,width:1,height:1,overflow:"hidden"}})),uw.a.createElement(cw.Box,fw({as:Lw,"aria-hidden":"true",tx:"forms",variant:i,className:n,sx:r},xw(a),{__css:{mr:2,borderRadius:9999,color:"gray","input:checked ~ &":{color:"primary"},"input:focus ~ &":{bg:"highlight"}}})))})),function(e){return uw.a.createElement(Cw,e,uw.a.createElement("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}))}),Pw=function(e){return uw.a.createElement(Cw,e,uw.a.createElement("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}))},Rw=function(e){return uw.a.createElement(uw.a.Fragment,null,uw.a.createElement(Nw,fw({},e,{__css:{display:"none","input:checked ~ &":{display:"block"}}})),uw.a.createElement(Pw,fw({},e,{__css:{display:"block","input:checked ~ &":{display:"none"}}})))},Hw=Object(lw.forwardRef)((function(e,t){var n=e.className,r=e.sx,o=e.variant,i=void 0===o?"checkbox":o,a=pw(e,["className","sx","variant"]);return uw.a.createElement(cw.Box,null,uw.a.createElement(cw.Box,fw({ref:t,as:"input",type:"checkbox"},a,{sx:{position:"absolute",opacity:0,zIndex:-1,width:1,height:1,overflow:"hidden"}})),uw.a.createElement(cw.Box,fw({as:Rw,"aria-hidden":"true",tx:"forms",variant:i,className:n,sx:r},xw(a),{__css:{mr:2,borderRadius:4,color:"gray","input:checked ~ &":{color:"primary"},"input:focus ~ &":{color:"primary",bg:"highlight"}}})))})),Fw=(Object(lw.forwardRef)((function(e,t){var n=fw({},e);return uw.a.createElement(cw.Box,fw({ref:t,as:"input",type:"range",tx:"forms",variant:"slider"},n,{__css:{display:"block",width:"100%",height:4,my:2,cursor:"pointer",appearance:"none",borderRadius:9999,color:"inherit",bg:"gray",":focus":{outline:"none",color:"primary"},"&::-webkit-slider-thumb":{appearance:"none",width:16,height:16,bg:"currentcolor",border:0,borderRadius:9999,variant:"forms.slider.thumb"}}}))})),Object(lw.forwardRef)((function(e,t){var n=e.checked,r=pw(e,["checked"]);return uw.a.createElement(cw.Box,fw({ref:t,as:"button",type:"button",role:"switch",tx:"forms",variant:"switch","aria-checked":n},r,{__css:{appearance:"none",m:0,p:0,width:40,height:24,color:"primary",bg:"transparent",border:"1px solid",borderColor:"primary",borderRadius:9999,"&[aria-checked=true]":{bg:"primary"},":focus":{outline:"none",boxShadow:"0 0 0 2px"}}}),uw.a.createElement(cw.Box,{"aria-hidden":!0,style:{transform:n?"translateX(16px)":"translateX(0)"},sx:{mt:"-1px",ml:"-1px",width:24,height:24,borderRadius:9999,border:"1px solid",borderColor:"primary",bg:"background",transitionProperty:"transform",transitionTimingFunction:"ease-out",transitionDuration:"0.1s",variant:"forms.switch.thumb"}}))})),/(?:(?:https?):)?(?:\/\/)?(?:embed\.|open\.)(?:spotify\.com\/)(?:(album|track|playlist)\/|\?uri=spotify:track:)((\w|-){22})/),Vw=/spotify:(?:(album|track|playlist):|\?uri=spotify:track:)((\w|-){22})/,zw=/(?:(?:https?):)?(?:\/\/)?(?:www\.|player\.)?vimeo\.com\/(?:channels\/(?:\w+\/)?|groups\/(?:[^/]*)\/videos\/|video\/|)(\d+)(?:|\/\?)/,Bw=/^(?:(?:https?):)?(?:\/\/)?(?:www\.)?(?:(?:dailymotion\.com(?:\/embed)?\/video)|dai\.ly)\/([a-zA-Z0-9]+)(?:_[\w_-]+)?(?:\?playlist=[a-zA-Z0-9]+)?$/,_w=new RegExp("^(?:(?:https?):)?(?://)?[^/]*edpuzzle.com.*[=/]media/([-\\w]+)"),Iw=new RegExp("^(?:(?:https?):)?(?://)?[^/]*loom.com.*[=/]share/([-\\w]+)"),$w=function(e){var t,n;return e&&null!=(t=null==(n=e.match(Iw))?void 0:n[1])?t:""},qw=new RegExp("^(?:(?:https?):)?(?://)?[^/]*(?:wistia.com|wi.st).*[=/](?:medias|embed)/([-\\w]+)"),Ww=function(e){var t,n;return e&&null!=(t=null==(n=e.match(qw))?void 0:n[1])?t:""};!function(e){e.YouTube="YouTube",e.Spotify="Spotify",e.Vimeo="Vimeo",e.DailyMotion="DailyMotion",e.EdPuzzle="EdPuzzle",e.Loom="Loom",e.Wistia="Wistia"}(gw||(gw={}));var Uw=((mw={})[gw.DailyMotion]=function(e){var t,n;return null!=(t=null==(n=e.match(Bw))?void 0:n[1])?t:""},mw[gw.Spotify]=function(e){var t=e.match(Fw)||e.match(Vw)||[],n=t[1];return[t[2],n]},mw[gw.Vimeo]=function(e){var t,n;return null!=(t=null==(n=e.match(zw))?void 0:n[1])?t:""},mw[gw.YouTube]=function(e){var t,n;return e&&null!=(t=null==(n=e.match("^(?:(?:https?):)?(?://)?[^/]*(?:youtube(?:-nocookie)?.com|youtu.be).*[=/]([-\\w]{11})(?:\\?|=|&|$)"))?void 0:n[1])?t:""},mw[gw.EdPuzzle]=function(e){var t,n;return e&&null!=(t=null==(n=e.match(_w))?void 0:n[1])?t:""},mw[gw.Loom]=$w,mw[gw.Wistia]=Ww,mw),Kw=((vw={})[gw.DailyMotion]=function(e){return"https://www.dailymotion.com/embed/video/"+e},vw[gw.Spotify]=function(e,t){return"https://open.spotify.com/embed/"+t+"/"+e},vw[gw.Vimeo]=function(e){return"https://player.vimeo.com/video/"+e},vw[gw.YouTube]=function(e){return"https://www.youtube.com/embed/"+e},vw[gw.EdPuzzle]=function(e){return"https://edpuzzle.com/embed/media/"+e},vw[gw.Loom]=function(e){return"https://www.loom.com/embed/"+e},vw[gw.Wistia]=function(e){return"https://fast.wistia.net/embed/iframe/"+e},vw),Gw=function(e){var t=function(e){if(e)return e.match(/dailymotion/)?gw.DailyMotion:e.match(/spotify/)?gw.Spotify:e.match(/vimeo/)?gw.Vimeo:e.match(/youtu\.?be/)?gw.YouTube:e.match(/edpuzzle.com/)?gw.EdPuzzle:Ww(e)?gw.Wistia:$w(e)?gw.Loom:void 0}(e);if(!t)return"";var n=Uw[t],r=Kw[t],o=n(e);if(Array.isArray(o)){var i=o.shift();return i?r.apply(void 0,[i].concat(o)):""}return r(o)},Jw=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function Yw(e){var t=e.label,n=e.containerProps,r=e.sx,o=Jw(e,["label","containerProps","sx"]);return Object(Cd.jsxs)(af.Flex,Object.assign({},n,{sx:Object.assign(Object.assign({flex:1},null===n||void 0===n?void 0:n.sx),{outline:"1px solid var(--border)",p:2,borderRadius:"default",":focus-within":{outlineColor:"primary",outlineWidth:"1.8px"}})},{children:[Object(Cd.jsx)(Dw,Object.assign({variant:"clean",sx:Object.assign(Object.assign({},r),{p:0})},o)),Object(Cd.jsx)(lf,Object.assign({variant:"body",sx:{flexShrink:0,color:"fontTertiary",borderLeft:"1px solid var(--border)",pl:1}},{children:t}))]}))}function Zw(e){return Object(Cd.jsx)(Cd.Fragment,{children:e.children})}function Xw(e){var t=e.activeIndex,n=e.children,r=e.containerProps,o=e.onTabChanged,a=Object(jd.useState)(t||0),s=Object(i.a)(a,2),l=s[0],u=s[1],c=Object(jd.useMemo)((function(){return jd.Children.map(n,(function(e){if(Dd.a.isValidElement(e))return{title:e.props.title,component:e}}))}),[n]);return Object(Cd.jsxs)(af.Flex,Object.assign({sx:{flexDirection:"column"}},{children:[Object(Cd.jsx)(af.Flex,Object.assign({sx:{mb:1}},{children:null===c||void 0===c?void 0:c.map((function(e,t){return Object(Cd.jsx)(uf,Object.assign({sx:{flex:1,p:0,py:1,borderRadius:0,borderTopLeftRadius:"default",borderTopRightRadius:"default",bg:l===t?"bgSecondary":"transparent",fontWeight:l===t?"bold":"normal",color:"text",":last-of-type":{mr:0},borderBottom:"2px solid",borderBottomColor:l===t?"primary":"transparent",":hover":{bg:"hover"}},onClick:function(){u(t),null===o||void 0===o||o(t)}},{children:e.title}),t.toString())}))})),Object(Cd.jsx)(af.Flex,Object.assign({},r,{children:c&&c[l].component}))]}))}function Qw(e){var t=e.onClose,n=e.onSizeChanged,r=e.title,o=e.embed,a=Object(jd.useState)((null===o||void 0===o?void 0:o.width)||300),s=Object(i.a)(a,2),l=s[0],u=s[1],c=Object(jd.useState)((null===o||void 0===o?void 0:o.height)||150),d=Object(i.a)(c,2),f=d[0],p=d[1],h=Object(jd.useState)((null===o||void 0===o?void 0:o.src)||""),m=Object(i.a)(h,2),v=m[0],g=m[1],y=Object(jd.useState)("url"),b=Object(i.a)(y,2),w=b[0],k=b[1],x=Object(jd.useState)(null),O=Object(i.a)(x,2),S=O[0],C=O[1],j=Object(jd.useCallback)((function(e,t){var r=e?{width:e,height:e*(f/l)}:t?{width:t*(l/f),height:t}:{width:0,height:0};u(r.width),p(r.height),n&&n(r)}),[l,f]);return Object(Cd.jsx)(sw,Object.assign({title:r,onClose:function(){return t()},action:{title:"Save",onClick:function(){C(null);var e=v,n=l,r=f;if("code"===w){var o=(new DOMParser).parseFromString(v,"text/html");if(o.getElementsByTagName("iframe").length<=0)return C("Embed code must include an iframe.");var i=ek(o,"src");if(!i)return C("Embed code must include an iframe with an src attribute.");e=i;var a=ek(o,"width");a&&!isNaN(parseInt(a))&&(n=parseInt(a));var s=ek(o,"height");s&&!isNaN(parseInt(s))&&(r=parseInt(s))}var u=Gw(e);u&&(e=u),t({height:r,width:n,src:e})}}},{children:Object(Cd.jsxs)(af.Flex,Object.assign({sx:{flexDirection:"column",width:["auto",300]}},{children:[S&&Object(Cd.jsxs)(lf,Object.assign({variant:"error",sx:{bg:"errorBg",color:"error",p:1,borderRadius:"default"}},{children:["Error: ",S]})),Object(Cd.jsxs)(Xw,Object.assign({activeIndex:0,containerProps:{sx:{mx:1,flexDirection:"column"}},onTabChanged:function(e){return k(0===e?"url":"code")}},{children:[Object(Cd.jsxs)(Zw,Object.assign({title:"From URL"},{children:[Object(Cd.jsx)(Dw,{placeholder:"Enter embed source URL",value:v,autoFocus:!0,onChange:function(e){return g(e.target.value)},autoCapitalize:"none",sx:{fontSize:"body"}}),Object(Cd.jsxs)(af.Flex,Object.assign({sx:{alignItems:"center",mt:1}},{children:[Object(Cd.jsx)(Yw,{containerProps:{sx:{mr:1}},label:"width",type:"number",placeholder:"Width",value:l,sx:{mr:1,fontSize:"body"},onChange:function(e){return j(e.target.valueAsNumber)}}),Object(Cd.jsx)(Yw,{label:"height",type:"number",placeholder:"Height",value:f,sx:{fontSize:"body"},onChange:function(e){return j(void 0,e.target.valueAsNumber)}})]}))]})),Object(Cd.jsx)(Zw,Object.assign({title:"From code"},{children:Object(Cd.jsx)(Aw,{autoFocus:!0,variant:"forms.input",sx:{fontSize:"subBody",fontFamily:"monospace"},minHeight:[200,100],onChange:function(e){return g(e.target.value)},placeholder:"Paste embed code here. Only iframes are supported."})}))]}))]}))}))}function ek(e,t){var n=e.querySelector("[".concat(t,"]"));return n?n.getAttribute(t):null}function tk(e){var t=Fd(),n=!t,r=t?30:15,o=e.onInsertTable,a=Object(jd.useState)({column:0,row:0}),s=Object(i.a)(a,2),l=s[0],u=s[1],c=Object(jd.useState)({columns:10,rows:6}),d=Object(i.a)(c,2),f=d[0],p=d[1];return Object(jd.useEffect)((function(){n&&p((function(e){var t=e.columns,n=e.rows,r=l.column,o=l.row,i=o===n-2||r===t-2,a=Number(o===n||o===n-2),s=Number(r===t||r===t-2);return{columns:i?Math.max(r+s,10):Math.min(e.columns+s,20),rows:i?Math.max(o+a,6):Math.min(e.rows+a,20)}}))}),[l,n]),Object(Cd.jsx)(sw,Object.assign({action:{title:l.column&&l.row?"Insert a ".concat(l.column," x ").concat(l.row," table"):"Please set a table size",disabled:!l.column||!l.row,onClick:function(){return o({columns:l.column,rows:l.row})}}},{children:Object(Cd.jsxs)(af.Flex,Object.assign({sx:{px:1,pt:1,flexDirection:"column",alignItems:"center"}},{children:[Object(Cd.jsx)(af.Box,Object.assign({sx:{display:"grid",gridTemplateColumns:"repeat(".concat(f.columns,", minmax(").concat(r,"px, 1fr))"),gap:"small",bg:"background",width:"100%"},onTouchMove:function(e){var t=e.touches.item(0),n=document.elementFromPoint(t.pageX,t.pageY);if(n){var r=n.dataset.index;r&&u(nk(parseInt(r),f))}}},{children:Array(f.columns*f.rows).fill(0).map((function(e,t){return Object(Cd.jsx)(af.Box,{"data-index":t,height:r||15,sx:{border:"1px solid var(--disabled)",borderRadius:"small",bg:rk(t,l,f)?"disabled":"transparent"},onTouchStart:function(){u(nk(t,f))},onMouseEnter:function(){u(nk(t,f))},onTouchEnd:function(e){e.preventDefault()},onClick:function(){o({columns:l.column,rows:l.row})}},t)}))})),Object(Cd.jsxs)(af.Flex,Object.assign({sx:{display:["flex","none","none"],mt:1,alignItems:"center",justifyContent:"center"}},{children:[Object(Cd.jsx)(Yw,{containerProps:{sx:{mr:1}},label:"columns",placeholder:"".concat(l.column," columns"),type:"number",value:l.column,onChange:function(e){u((function(t){return Object.assign(Object.assign({},t),{column:e.target.valueAsNumber||0})}))}}),Object(Cd.jsx)(Yw,{label:"rows",placeholder:"".concat(l.row," rows"),type:"number",value:l.row,onChange:function(e){u((function(t){return Object.assign(Object.assign({},t),{row:e.target.valueAsNumber||0})}))}})]})),Object(Cd.jsxs)(lf,Object.assign({variant:"body",sx:{mt:1,display:["none","block","block"]}},{children:[l.column," x ",l.row]}))]}))}))}function nk(e,t){var n=e+1,r=n%t.columns,o=n/t.columns,i=Math.floor(o);return o=o===i?o:i+1,{column:r||t.columns,row:o}}function rk(e,t,n){var r=nk(e,n);return r.row<=t.row&&r.column<=t.column}var ok=n(45);function ik(){ik=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(j){s=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var o=t&&t.prototype instanceof d?t:d,i=Object.create(o.prototype),a=new O(r||[]);return i._invoke=function(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return C()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=w(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=u(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===c)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}(e,n,a),i}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(j){return{type:"throw",arg:j}}}e.wrap=l;var c={};function d(){}function f(){}function p(){}var h={};s(h,o,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(S([])));v&&v!==t&&n.call(v,o)&&(h=v);var g=p.prototype=d.prototype=Object.create(h);function y(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){function r(o,i,a,s){var l=u(e[o],e,i);if("throw"!==l.type){var c=l.arg,d=c.value;return d&&"object"==Object(ok.a)(d)&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(d).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,s)}))}s(l.arg)}var o;this._invoke=function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}}function w(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return c;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=u(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,c;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,c):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,c)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:C}}function C(){return{value:void 0,done:!0}}return f.prototype=p,s(g,"constructor",p),s(p,"constructor",f),f.displayName=s(p,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,s(e,a,"GeneratorFunction")),e.prototype=Object.create(g),e},e.awrap=function(e){return{__await:e}},y(b.prototype),s(b.prototype,i,(function(){return this})),e.AsyncIterator=b,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new b(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},y(g),s(g,a,"Generator"),s(g,o,(function(){return this})),s(g,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=S,O.prototype={constructor:O,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(s&&l){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,c):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),c},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),x(n),c}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;x(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:S(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},e}var ak=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(t){i(t)}}function s(e){try{l(r.throw(e))}catch(t){i(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};function sk(e){return ak(this,void 0,void 0,ik().mark((function t(){var n,r,o,i,a;return ik().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,fetch(e);case 2:if((n=t.sent).ok){t.next=5;break}throw new Error("invalid status code ".concat(n.status));case 5:if(r=n.headers.get("Content-Type"),o=n.headers.get("Content-Length"),r&&o&&"0"!==o&&r.startsWith("image/")){t.next=9;break}throw new Error("not an image");case 9:return i=parseInt(o),t.next=12,n.blob();case 12:return a=t.sent,t.abrupt("return",{blob:a,url:URL.createObjectURL(a),type:r,size:i});case 14:case"end":return t.stop()}}),t)})))}function lk(e){return new Promise((function(t,n){var r=new FileReader;r.onload=function(e){return t(r.result)},r.onerror=function(e){return n(r.error)},r.onabort=function(e){return n(new Error("Read aborted"))},r.readAsDataURL(e)}))}function uk(e){return(null===e||void 0===e?void 0:e.startsWith("data:"))||!1}function ck(e){return ak(this,void 0,void 0,ik().mark((function t(){var n,r;return ik().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(uk(e)){t.next=2;break}return t.abrupt("return",e);case 2:return t.next=4,fetch(e);case 4:return n=t.sent,t.next=7,n.blob();case 7:return r=t.sent,t.abrupt("return",URL.createObjectURL(r));case 9:case"end":return t.stop()}}),t)})))}var dk=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(t){i(t)}}function s(e){try{l(r.throw(e))}catch(t){i(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};function fk(e){var t=this,n=e.onInsert,r=e.onClose,o=Object(jd.useState)(!1),a=Object(i.a)(o,2),s=a[0],l=a[1],u=Object(jd.useState)(),c=Object(i.a)(u,2),d=c[0],f=c[1],p=Object(jd.useState)(""),h=Object(i.a)(p,2),m=h[0],v=h[1];return Object(Cd.jsx)(sw,Object.assign({title:"Insert image from URL",onClose:r,action:{loading:s,title:"Insert image",disabled:!m,onClick:function(){return dk(t,void 0,void 0,ik().mark((function e(){var t,r,o,i;return ik().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l(!0),f(void 0),e.prev=2,e.next=5,sk(m);case 5:return t=e.sent,r=t.blob,o=t.size,i=t.type,e.t0=n,e.next=12,lk(r);case 12:e.t1=e.sent,e.t2=o,e.t3=i,e.t4={src:e.t1,size:e.t2,type:e.t3},(0,e.t0)(e.t4),e.next=22;break;case 19:e.prev=19,e.t5=e.catch(2),e.t5 instanceof Error&&f(e.t5.message);case 22:return e.prev=22,l(!1),e.finish(22);case 25:case"end":return e.stop()}}),e,null,[[2,19,22,25]])})))}}},{children:Object(Cd.jsxs)(af.Flex,Object.assign({sx:{px:1,flexDirection:"column",width:["auto",350]}},{children:[Object(Cd.jsx)(Dw,{type:"url",autoFocus:!0,placeholder:"Paste Image URL here",value:m,onChange:function(e){v(e.target.value),f(void 0)}}),d?Object(Cd.jsxs)(lf,Object.assign({variant:"error",sx:{bg:"errorBg",mt:1,p:1,borderRadius:"default"}},{children:["Failed to download image: ",d.toLowerCase(),"."]})):Object(Cd.jsx)(lf,Object.assign({variant:"subBody",sx:{bg:"shade",color:"primary",mt:1,p:1,borderRadius:"default"}},{children:"To protect your privacy, we will download the image & add it to your attachments."}))]}))}))}var pk=function(e){return{key:"hr",type:"button",title:"Horizontal rule",icon:"horizontalRule",isChecked:null===e||void 0===e?void 0:e.isActive("horizontalRule"),onClick:function(){var t;return null===(t=e.current)||void 0===t?void 0:t.chain().focus().setHorizontalRule().run()}}},hk=function(e){return{key:"codeblock",type:"button",title:"Code block",icon:"codeblock",isChecked:null===e||void 0===e?void 0:e.isActive("codeBlock"),onClick:function(){var t;return null===(t=e.current)||void 0===t?void 0:t.chain().focus().toggleCodeBlock().run()}}},mk=function(e){return{key:"blockquote",type:"button",title:"Quote",icon:"blockquote",isChecked:null===e||void 0===e?void 0:e.isActive("blockQuote"),onClick:function(){var t;return null===(t=e.current)||void 0===t?void 0:t.chain().focus().toggleBlockquote().run()}}},vk=function(e){return{key:"math",type:"button",title:"Math & formulas",icon:"mathBlock",isChecked:null===e||void 0===e?void 0:e.isActive("mathBlock"),onClick:function(){var t;return null===(t=e.current)||void 0===t?void 0:t.chain().focus().insertMathBlock().run()}}},gk=function(e,t){return{key:"image",type:"button",title:"Image",icon:"image",menu:{title:"Insert an image",items:[{key:"upload-from-disk",type:"button",title:"Upload from disk",icon:"upload",onClick:function(){var t;return null===(t=e.current)||void 0===t?void 0:t.chain().focus().openAttachmentPicker("image").run()}},{key:"camera",type:"button",title:"Take a photo using camera",icon:"camera",isHidden:!t,onClick:function(){var t;return null===(t=e.current)||void 0===t?void 0:t.chain().focus().openAttachmentPicker("camera").run()}},t?Sk(e):Ck(e)]}}},yk=function(e){return{key:"table",type:"button",title:"Table",icon:"table",menu:{title:"Insert a table",items:[{key:"table-size-selector",type:"popup",component:function(t){return Object(Cd.jsx)(tk,{onInsertTable:function(n){var r,o;null===(r=e.current)||void 0===r||r.chain().focus().insertTable({rows:n.rows,cols:n.columns}).run(),null===(o=t.onClick)||void 0===o||o.call(t)}})}}]}}},bk=function(e){return{key:"embed",type:"button",title:"Embed",icon:"embed",menu:{title:"Insert an embed",items:[{key:"embed-popup",type:"popup",component:function(t){var n=t.onClick;return Object(Cd.jsx)(Qw,{title:"Insert embed",onClose:function(t){var r;if(!t)return null===n||void 0===n?void 0:n();null===(r=e.current)||void 0===r||r.chain().insertEmbed(t).run(),null===n||void 0===n||n()}})}}]}}},wk=function(e){return{key:"embed",type:"button",title:"Embed",icon:"embed",onClick:function(){e&&Zb({popup:function(t){return Object(Cd.jsx)(Qw,{title:"Insert embed",onClose:function(n){var r;if(!n)return t();null===(r=e.current)||void 0===r||r.chain().insertEmbed(n).run(),t()}})}})}}},kk=function(e){return{key:"attachment",type:"button",title:"Attachment",icon:"attachment",isChecked:null===e||void 0===e?void 0:e.isActive("attachment"),onClick:function(){var t;return null===(t=e.current)||void 0===t?void 0:t.chain().focus().openAttachmentPicker("file").run()}}},xk=function(e){return{key:"tasklist",type:"button",title:"Task list",icon:"checkbox",isChecked:null===e||void 0===e?void 0:e.isActive("taskList"),onClick:function(){var t;return null===(t=e.current)||void 0===t?void 0:t.chain().focus().toggleTaskList().run()}}},Ok=function(e){return{key:"outlinelist",type:"button",title:"Outline list",icon:"outlineList",isChecked:null===e||void 0===e?void 0:e.isActive("outlineList"),onClick:function(){var t;return null===(t=e.current)||void 0===t?void 0:t.chain().focus().toggleOutlineList().run()}}},Sk=function(e){return{key:"upload-from-url",type:"button",title:"Attach from URL",icon:"link",menu:{title:"Attach image from URL",items:[{key:"attach-image",type:"popup",component:function(t){var n=t.onClick;return Object(Cd.jsx)(fk,{onInsert:function(t){var r;null===(r=e.requestPermission("insertImage"))||void 0===r||r.chain().focus().insertImage(t).run(),null===n||void 0===n||n()},onClose:function(){null===n||void 0===n||n()}})}}]}}},Ck=function(e){return{key:"upload-from-url",type:"button",title:"Attach from URL",icon:"link",onClick:function(){Zb({popup:function(t){return Object(Cd.jsx)(fk,{onInsert:function(n){var r;null===(r=e.requestPermission("insertImage"))||void 0===r||r.chain().focus().insertImage(n).run(),t()},onClose:t})}})}}};function jk(e){var t=e.id,n=e.group,r=e.items,o=e.selectedItem,a=e.buttonRef,s=e.menuWidth,l=Object(jd.useRef)(),u=Object(jd.useState)(!1),c=Object(i.a)(u,2),d=c[0],f=c[1],p=Hd(),h=Fd(),m="bottom"===p,v=Yb({group:n,id:t,isOpen:d,onClosed:function(){return f(!1)}}),g=v.closePopup,y=v.isPopupOpen;return Object(Cd.jsxs)(Cd.Fragment,{children:[Object(Cd.jsxs)(yf,Object.assign({ref:function(e){l.current=e,a&&(a.current=e||void 0)},sx:{p:1,m:0,bg:y?"hover":"transparent",mr:1,display:"flex",alignItems:"center",":hover":{bg:"hover"},":last-of-type":{mr:0}},onClick:function(){return f((function(e){return!e}))},onMouseDown:function(e){return e.preventDefault()}},{children:["string"===typeof o?Object(Cd.jsx)(lf,Object.assign({sx:{fontSize:"subBody",mr:1,color:"text"}},{children:o})):o,Object(Cd.jsx)(mf,{path:m?vf.chevronUp:vf.chevronDown,size:"small",color:"text"})]})),Object(Cd.jsx)(tw,{isOpen:y,items:r,onClose:function(){return g(t)},position:{target:m?_b():l.current||"mouse",isTargetAbsolute:!0,location:m?"top":"below",align:"center",yOffset:5},blocking:!h,focusOnRender:!h,sx:{minWidth:s,maxWidth:m?"95vw":"auto",flexDirection:m?"row":"column",overflowX:m?"auto":"hidden",marginRight:m?"10px":0,display:"flex",alignItems:m?"center":"unset",mr:m?0:2}})]})}var Dk=Dd.a.memo((function(e){var t=e.title,n=e.onDecrease,r=e.onIncrease,o=e.onReset,i=e.value;return Object(Cd.jsxs)(af.Flex,Object.assign({sx:{alignItems:"center",mr:1,":last-of-type":{mr:0}}},{children:[Object(Cd.jsx)(wf,{toggled:!1,title:"Decrease ".concat(t),icon:"minus",variant:"small",onClick:n}),Object(Cd.jsx)(yf,Object.assign({sx:{color:"text",bg:"transparent",px:0,fontSize:"subBody",mx:1,textAlign:"center",":hover":{bg:"transparent"}},onClick:o,title:"Reset ".concat(t)},{children:i})),Object(Cd.jsx)(wf,{toggled:!1,title:"Increase ".concat(t),icon:"plus",variant:"small",onClick:r})]}))}),(function(e,t){return e.value===t.value}));function Ek(e){var t=Object(jd.useRef)(e);return Object(jd.useEffect)((function(){t.current=e}),[e]),t}var Ak={"Sans-serif":"Open Sans",Serif:"serif",Monospace:"monospace"};var Mk=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function Tk(e){var t=e.editor,n=e.alignment,r=Mk(e,["editor","alignment"]),o=Ek(n);return Object(Cd.jsx)(wf,Object.assign({},r,{onClick:function(){var e;null===(e=t.current)||void 0===e||e.chain().focus().setTextAlign(o.current).run()},toggled:!1}))}var Lk=[1,2,3,4,5,6];var Nk=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};var Pk=Dd.a.memo((function(e){var t=e.children,n=(e.toggled,e.onOpen),r=e.sx,o=Nk(e,["children","toggled","onOpen","sx"]),i=Object(jd.useRef)(null),a=Hd();return Object(Cd.jsxs)(Cd.Fragment,{children:[Object(Cd.jsxs)(af.Flex,Object.assign({ref:i,sx:{borderRadius:"default"}},{children:[Object(Cd.jsx)(wf,Object.assign({},o,{sx:Object.assign({mr:0,":hover":{bg:"hover"}},r),toggled:!1})),Object(Cd.jsx)(yf,Object.assign({sx:{flexShrink:0,p:0,m:0,px:"3px",bg:"bgSecondary",":hover":{bg:"hover"},":last-of-type":{mr:0}},onClick:n},{children:Object(Cd.jsx)(mf,{path:"bottom"===a?vf.chevronUp:vf.chevronDown,color:"text",size:"small",sx:{flexShrink:0}})}))]})),t]})}),(function(e,t){return e.toggled===t.toggled&&JSON.stringify(e.sx)===JSON.stringify(t.sx)}));function Rk(e,t){var n,r=e.state.selection.$anchor,o=e.state.doc.nodeAt(r.pos),i=t.includes((null===o||void 0===o?void 0:o.type.name)||"")?r.pos:null===(n=mo((function(e){return t.includes(e.type.name)}))(e.state.selection))||void 0===n?void 0:n.pos;return i&&e.view.nodeDOM(i)||null}function Hk(e,t){var n,r=e.state.selection.$anchor,o=e.state.doc.nodeAt(r.pos),i=(null===o||void 0===o?void 0:o.type.name)===t?r.pos:null===(n=mo((function(e){return e.type.name===t}))(e.state.selection))||void 0===n?void 0:n.pos;return i?e.state.doc.nodeAt(i):null}function Fk(e,t){return e.marks.find((function(e){return e.type.name===t}))}function Vk(e){var t=e.selection,n=t.$from,r=t.from;return{node:e.doc.nodeAt(r)||void 0,from:r,to:r+n.node().nodeSize}}function zk(e){var t=e.isActive("taskList"),n=e.isActive("outlineList");return e.isActive("bulletList")||e.isActive("orderedList")?"listItem":n?"outlineListItem":t?"taskItem":null}var Bk=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};var _k=Dd.a.memo((function(e){var t=e.editor,n=e.onClick,r=(e.isActive,e.subTypes),o=e.type,a=Bk(e,["editor","onClick","isActive","subTypes","type"]),s="bottom"===Hd(),l=Object(jd.useState)(!1),u=Object(i.a)(l,2),c=u[0],d=u[1],f=Object(jd.useRef)();return Object(Cd.jsx)(Pk,Object.assign({},a,{buttonRef:f,onClick:n,toggled:c,sx:{mr:0},onOpen:function(){return d((function(e){return!e}))}},{children:Object(Cd.jsx)(Jb,{isOpen:c,group:"lists",id:a.title,blocking:!1,focusOnRender:!1,position:{isTargetAbsolute:!0,target:s?_b():f.current||"mouse",align:"center",location:s?"top":"below",yOffset:10},onClosed:function(){return d(!1)},renderPopup:function(){return Object(Cd.jsx)(af.Box,Object.assign({sx:{bg:"background",display:"grid",gridTemplateColumns:"1fr 1fr 1fr",p:1}},{children:r.map((function(e){return Object(Cd.jsx)(uf,Object.assign({variant:"menuitem",sx:{width:80},onClick:function(){var n,r=null===(n=t.current)||void 0===n?void 0:n.chain().focus();if(r&&t.current)return function(e){var t=e.isActive("taskList"),n=e.isActive("outlineList"),r=e.isActive("bulletList")||e.isActive("orderedList");return t||n||r}(t.current)||(r="bulletList"===o?r.toggleBulletList():r.toggleOrderedList()),r.updateAttributes(o,{listType:e.type}).run()}},{children:Object(Cd.jsx)(Ik,{listStyleType:e.type})}),e.title)}))}))}})}))}),(function(e,t){return e.isActive===t.isActive}));function Ik(e){var t=e.listStyleType;return Object(Cd.jsx)(af.Flex,Object.assign({as:"ul",sx:{flexDirection:"column",flex:1,p:0,listStyleType:t},onMouseDown:function(e){return e.preventDefault()}},{children:[0,1,2].map((function(e){return Object(Cd.jsx)(af.Box,Object.assign({as:"li",sx:{display:"list-item",color:"text",fontSize:8,mb:"1px"}},{children:Object(Cd.jsx)(af.Flex,Object.assign({sx:{alignItems:"center"}},{children:Object(Cd.jsx)(af.Box,{sx:{width:"100%",flexShrink:0,height:4,bg:"#cbcbcb",borderRadius:"small"}})}))}),e.toString())}))}))}var $k=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function qk(e){var t=e.editor,n=e.direction,r=$k(e,["editor","direction"]),o=Ek(n);return Object(Cd.jsx)(wf,Object.assign({},r,{onClick:function(){var e;return null===(e=t.current)||void 0===e?void 0:e.chain().focus().setTextDirection(o.current).run()},toggled:!1}))}var Wk=n(29),Uk=n.n(Wk);var Kk={set:function(e,t){if(!t)return window.localStorage.removeItem(e);window.localStorage.setItem(e,JSON.stringify(t))},get:function(e,t){var n=window.localStorage.getItem(e);return n?function(e){if("undefined"===e||"null"===e)return;try{return JSON.parse(e)}catch(t){return e}}(n):t}};function Gk(){return(Gk=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Jk(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(o[n]=e[n]);return o}function Yk(e){var t=Object(jd.useRef)(e),n=Object(jd.useRef)((function(e){t.current&&t.current(e)}));return t.current=e,n.current}var Zk=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e<t?t:e},Xk=function(e){return"touches"in e},Qk=function(e){return e&&e.ownerDocument.defaultView||self},ex=function(e,t,n){var r=e.getBoundingClientRect(),o=Xk(t)?function(e,t){for(var n=0;n<e.length;n++)if(e[n].identifier===t)return e[n];return e[0]}(t.touches,n):t;return{left:Zk((o.pageX-(r.left+Qk(e).pageXOffset))/r.width),top:Zk((o.pageY-(r.top+Qk(e).pageYOffset))/r.height)}},tx=function(e){!Xk(e)&&e.preventDefault()},nx=Dd.a.memo((function(e){var t=e.onMove,n=e.onKey,r=Jk(e,["onMove","onKey"]),o=Object(jd.useRef)(null),i=Yk(t),a=Yk(n),s=Object(jd.useRef)(null),l=Object(jd.useRef)(!1),u=Object(jd.useMemo)((function(){var e=function(e){tx(e),(Xk(e)?e.touches.length>0:e.buttons>0)&&o.current?i(ex(o.current,e,s.current)):n(!1)},t=function(){return n(!1)};function n(n){var r=l.current,i=Qk(o.current),a=n?i.addEventListener:i.removeEventListener;a(r?"touchmove":"mousemove",e),a(r?"touchend":"mouseup",t)}return[function(e){var t=e.nativeEvent,r=o.current;if(r&&(tx(t),!function(e,t){return t&&!Xk(e)}(t,l.current)&&r)){if(Xk(t)){l.current=!0;var a=t.changedTouches||[];a.length&&(s.current=a[0].identifier)}r.focus(),i(ex(r,t,s.current)),n(!0)}},function(e){var t=e.which||e.keyCode;t<37||t>40||(e.preventDefault(),a({left:39===t?.05:37===t?-.05:0,top:40===t?.05:38===t?-.05:0}))},n]}),[a,i]),c=u[0],d=u[1],f=u[2];return Object(jd.useEffect)((function(){return f}),[f]),Dd.a.createElement("div",Gk({},r,{onTouchStart:c,onMouseDown:c,className:"react-colorful__interactive",ref:o,onKeyDown:d,tabIndex:0,role:"slider"}))})),rx=function(e){return e.filter(Boolean).join(" ")},ox=function(e){var t=e.color,n=e.left,r=e.top,o=void 0===r?.5:r,i=rx(["react-colorful__pointer",e.className]);return Dd.a.createElement("div",{className:i,style:{top:100*o+"%",left:100*n+"%"}},Dd.a.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},ix=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n},ax=(Math.PI,function(e){return"#"===e[0]&&(e=e.substr(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:1}:{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:1}}),sx=function(e){var t=e.s,n=e.v,r=e.a,o=(200-t)*n/100;return{h:ix(e.h),s:ix(o>0&&o<200?t*n/100/(o<=100?o:200-o)*100:0),l:ix(o/2),a:ix(r,2)}},lx=function(e){var t=sx(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},ux=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var i=Math.floor(t),a=r*(1-n),s=r*(1-(t-i)*n),l=r*(1-(1-t+i)*n),u=i%6;return{r:ix(255*[r,s,a,a,l,r][u]),g:ix(255*[l,r,r,s,a,a][u]),b:ix(255*[a,a,l,r,r,s][u]),a:ix(o,2)}},cx=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},dx=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=Math.max(t,n,r),a=i-Math.min(t,n,r),s=a?i===t?(n-r)/a:i===n?2+(r-t)/a:4+(t-n)/a:0;return{h:ix(60*(s<0?s+6:s)),s:ix(i?a/i*100:0),v:ix(i/255*100),a:o}},fx=Dd.a.memo((function(e){var t=e.hue,n=e.onChange,r=rx(["react-colorful__hue",e.className]);return Dd.a.createElement("div",{className:r},Dd.a.createElement(nx,{onMove:function(e){n({h:360*e.left})},onKey:function(e){n({h:Zk(t+360*e.left,0,360)})},"aria-label":"Hue","aria-valuetext":ix(t)},Dd.a.createElement(ox,{className:"react-colorful__hue-pointer",left:t/360,color:lx({h:t,s:100,v:100,a:1})})))})),px=Dd.a.memo((function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:lx({h:t.h,s:100,v:100,a:1})};return Dd.a.createElement("div",{className:"react-colorful__saturation",style:r},Dd.a.createElement(nx,{onMove:function(e){n({s:100*e.left,v:100-100*e.top})},onKey:function(e){n({s:Zk(t.s+100*e.left,0,100),v:Zk(t.v-100*e.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+ix(t.s)+"%, Brightness "+ix(t.v)+"%"},Dd.a.createElement(ox,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:lx(t)})))})),hx=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function mx(e,t,n){var r=Yk(n),o=Object(jd.useState)((function(){return e.toHsva(t)})),i=o[0],a=o[1],s=Object(jd.useRef)({color:t,hsva:i});Object(jd.useEffect)((function(){if(!e.equal(t,s.current.color)){var n=e.toHsva(t);s.current={hsva:n,color:t},a(n)}}),[t,e]),Object(jd.useEffect)((function(){var t;hx(i,s.current.hsva)||e.equal(t=e.fromHsva(i),s.current.color)||(s.current={hsva:i,color:t},r(t))}),[i,e,r]);var l=Object(jd.useCallback)((function(e){a((function(t){return Object.assign({},t,e)}))}),[]);return[i,l]}var vx,gx="undefined"!=typeof window?jd.useLayoutEffect:jd.useEffect,yx=new Map,bx=function(e){gx((function(){var t=e.current?e.current.ownerDocument:document;if(void 0!==t&&!yx.has(t)){var r=t.createElement("style");r.innerHTML='.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url(\'data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>\')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}',yx.set(t,r);var o=vx||n.nc;o&&r.setAttribute("nonce",o),t.head.appendChild(r)}}),[])},wx=function(e){var t=e.className,n=e.colorModel,r=e.color,o=void 0===r?n.defaultColor:r,i=e.onChange,a=Jk(e,["className","colorModel","color","onChange"]),s=Object(jd.useRef)(null);bx(s);var l=mx(n,o,i),u=l[0],c=l[1],d=rx(["react-colorful",t]);return Dd.a.createElement("div",Gk({},a,{ref:s,className:d}),Dd.a.createElement(px,{hsva:u,onChange:c}),Dd.a.createElement(fx,{hue:u.h,onChange:c,className:"react-colorful__last-control"}))},kx={defaultColor:"000",toHsva:function(e){return dx(ax(e))},fromHsva:function(e){return n=(t=ux(e)).g,r=t.b,"#"+cx(t.r)+cx(n)+cx(r);var t,n,r},equal:function(e,t){return e.toLowerCase()===t.toLowerCase()||hx(ax(e),ax(t))}},xx=function(e){return Dd.a.createElement(wx,Gk({},e,{colorModel:kx}))};var Ox=["#e91e63","#9c27b0","#673ab7","#3f51b5","#2196f3","#03a9f4","#00bcd4","#009688","#4caf50","#8bc34a","#cddc39","#ffeb3b","#ffc107","#f44336"],Sx=[35,35,25];function Cx(e){var t=e.colors,n=void 0===t?Ox:t,r=e.color,o=e.onClear,a=e.onChange,s=e.title,l=e.onClose,u=e.expanded,c=Object(jd.useRef)(),d=Object(jd.useState)(u||!1),f=Object(i.a)(d,2),p=f[0],h=f[1],m=Object(jd.useState)(Uk()(r||n[0]).toHexString()),v=Object(i.a)(m,2),g=v[0],y=v[1],b=Uk()(g);Object(jd.useEffect)((function(){c.current&&p&&c.current.focus({preventScroll:!0})}),[p]);var w=Object(jd.useCallback)(function(e,t){var n;return function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];n&&clearTimeout(n),n=setTimeout((function(){return e.apply(void 0,o)}),t)}}((function(e){a(e)}),500),[a]);return Object(Cd.jsxs)(af.Flex,Object.assign({ref:c,tabIndex:-1,sx:{bg:"background",flexDirection:"column",".react-colorful":{width:"auto",height:150},".react-colorful__saturation":{borderRadius:["default",0]},width:["calc(100vw - 20px)",250]}},{children:[l&&Object(Cd.jsxs)(af.Box,Object.assign({sx:{display:["none","flex"],justifyContent:"space-between",p:2,pb:p?2:0,alignItems:"center"},onClick:l},{children:[Object(Cd.jsx)(lf,Object.assign({variant:"title"},{children:s})),Object(Cd.jsx)(yf,Object.assign({variant:"icon",sx:{p:0}},{children:Object(Cd.jsx)(mf,{path:vf.close,size:"big"})}))]})),p?Object(Cd.jsxs)(Cd.Fragment,{children:[Object(Cd.jsx)(xx,{onChange:function(e){y(e),w(e)},onTouchEnd:function(){return a(g)},onMouseUp:function(){return a(g)}}),Object(Cd.jsx)(Dw,{variant:"clean",placeholder:"#000000",spellCheck:!1,sx:{my:2,p:0,borderRadius:0,fontSize:["title","title","body"],color:"fontTertiary",textAlign:"center",letterSpacing:1.5},value:g.toUpperCase(),maxLength:7,onChange:function(e){var t=e.target.value;t&&Uk()(t,{format:"hex"}).isValid()&&(y(t),a(t))}})]}):null,Object(Cd.jsxs)(af.Flex,{children:[Object(Cd.jsxs)(af.Flex,Object.assign({className:"hide-scrollbar",sx:{flex:1,p:1,overflowX:["auto","hidden"],flexWrap:["nowrap","wrap"]}},{children:[Object(Cd.jsx)(yf,Object.assign({variant:"icon",sx:{flexShrink:0,width:Sx,height:Sx,borderRadius:50,boxShadow:"menu",p:0,ml:[2,2,1]},onClick:o},{children:Object(Cd.jsx)(mf,{path:vf.colorClear,color:"text",size:15})})),Object(Cd.jsx)(yf,Object.assign({variant:"secondary",sx:{flexShrink:0,bg:g,width:Sx,height:Sx,borderRadius:50,p:0,ml:[2,2,1],":hover":{bg:g}},onClick:function(){return h((function(e){return!e}))}},{children:Object(Cd.jsx)(mf,{path:vf.palette,color:b.isDark()?"static":"icon",size:18})})),n.map((function(e){return Object(Cd.jsx)(yf,{sx:{flex:"0 0 auto",bg:e,width:Sx,height:Sx,ml:[2,1,1],mb:[0,1,1],borderRadius:50,":hover":{bg:e}},onClick:function(){y(e),a(e)}},e)}))]})),l&&Object(Cd.jsx)(yf,Object.assign({variant:"icon",sx:{display:["block","none"],px:2},onClick:l},{children:Object(Cd.jsx)(mf,{path:vf.close,size:"big"})}))]})]}))}var jx,Dx,Ex=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function Ax(e){e.editor;var t=e.onColorChange,n=e.activeColor,r=e.title,o=e.cacheKey,a=Ex(e,["editor","onColorChange","activeColor","title","cacheKey"]),s=n||Kk.get(o),l=Uk()(s),u="bottom"===Hd(),c=Object(jd.useState)(!1),d=Object(i.a)(c,2),f=d[0],p=d[1];return Object(Cd.jsx)(Pk,Object.assign({},a,{iconColor:s&&l.isDark()?"static":"icon",sx:{mr:0,bg:s||"transparent",":hover":{bg:s?l.darken(5).toRgbString():"transparent"}},onOpen:function(){return p((function(e){return!e}))},toggled:f,onClick:function(){return t(s)}},{children:Object(Cd.jsx)(Jb,{isOpen:f,id:e.icon,group:"color",position:{isTargetAbsolute:!0,target:_b(),align:u?"center":"end",location:u?"top":"below",yOffset:10},focusOnRender:!1,blocking:!1,renderPopup:function(e){return Object(Cd.jsx)(Cx,{color:s,onClear:function(){t(),Kk.set(o,null)},onChange:function(e){t(e),Kk.set(o,e)},onClose:e,title:r})}})}))}if("undefined"!=typeof WeakMap){var Mx=new WeakMap;jx=function(e){return Mx.get(e)},Dx=function(e,t){return Mx.set(e,t),t}}else{var Tx=[],Lx=0;jx=function(e){for(var t=0;t<Tx.length;t+=2)if(Tx[t]==e)return Tx[t+1]},Dx=function(e,t){return 10==Lx&&(Lx=0),Tx[Lx++]=e,Tx[Lx++]=t}}var Nx=Object(d.a)((function e(t,n,r,o){Object(c.a)(this,e),this.left=t,this.top=n,this.right=r,this.bottom=o})),Px=function(){function e(t,n,r,o){Object(c.a)(this,e),this.width=t,this.height=n,this.map=r,this.problems=o}return Object(d.a)(e,[{key:"findCell",value:function(e){for(var t=0;t<this.map.length;t++){var n=this.map[t];if(n==e){for(var r=t%this.width,o=t/this.width|0,i=r+1,a=o+1,s=1;i<this.width&&this.map[t+s]==n;s++)i++;for(var l=1;a<this.height&&this.map[t+this.width*l]==n;l++)a++;return new Nx(r,o,i,a)}}throw new RangeError("No cell with offset "+e+" found")}},{key:"colCount",value:function(e){for(var t=0;t<this.map.length;t++)if(this.map[t]==e)return t%this.width;throw new RangeError("No cell with offset "+e+" found")}},{key:"nextCell",value:function(e,t,n){var r=this.findCell(e),o=r.left,i=r.right,a=r.top,s=r.bottom;return"horiz"==t?(n<0?0==o:i==this.width)?null:this.map[a*this.width+(n<0?o-1:i)]:(n<0?0==a:s==this.height)?null:this.map[o+this.width*(n<0?a-1:s)]}},{key:"rectBetween",value:function(e,t){var n=this.findCell(e),r=n.left,o=n.right,i=n.top,a=n.bottom,s=this.findCell(t),l=s.left,u=s.right,c=s.top,d=s.bottom;return new Nx(Math.min(r,l),Math.min(i,c),Math.max(o,u),Math.max(a,d))}},{key:"cellsInRect",value:function(e){for(var t=[],n={},r=e.top;r<e.bottom;r++)for(var o=e.left;o<e.right;o++){var i=r*this.width+o,a=this.map[i];n[a]||(n[a]=!0,o==e.left&&o&&this.map[i-1]==a||r==e.top&&r&&this.map[i-this.width]==a||t.push(a))}return t}},{key:"positionAt",value:function(e,t,n){for(var r=0,o=0;;r++){var i=o+n.child(r).nodeSize;if(r==e){for(var a=t+e*this.width,s=(e+1)*this.width;a<s&&this.map[a]<o;)a++;return a==s?i-1:this.map[a]}o=i}}}],[{key:"get",value:function(e){return jx(e)||Dx(e,function(e){if("table"!=e.type.spec.tableRole)throw new RangeError("Not a table node: "+e.type.name);for(var t=function(e){for(var t=-1,n=!1,r=0;r<e.childCount;r++){var o=e.child(r),i=0;if(n)for(var a=0;a<r;a++)for(var s=e.child(a),l=0;l<s.childCount;l++){var u=s.child(l);a+u.attrs.rowspan>r&&(i+=u.attrs.colspan)}for(var c=0;c<o.childCount;c++){var d=o.child(c);i+=d.attrs.colspan,d.attrs.rowspan>1&&(n=!0)}-1==t?t=i:t!=i&&(t=Math.max(t,i))}return t}(e),n=e.childCount,r=[],o=0,i=null,a=[],s=0,l=t*n;s<l;s++)r[s]=0;for(var u=0,c=0;u<n;u++){var d=e.child(u);c++;for(var f=0;;f++){for(;o<r.length&&0!=r[o];)o++;if(f==d.childCount)break;for(var p=d.child(f),h=p.attrs,m=h.colspan,v=h.rowspan,g=h.colwidth,y=0;y<v;y++){if(y+u>=n){(i||(i=[])).push({type:"overlong_rowspan",pos:c,n:v-y});break}for(var b=o+y*t,w=0;w<m;w++){0==r[b+w]?r[b+w]=c:(i||(i=[])).push({type:"collision",row:u,pos:c,n:m-w});var k=g&&g[w];if(k){var x=(b+w)%t*2,O=a[x];null==O||O!=k&&1==a[x+1]?(a[x]=k,a[x+1]=1):O==k&&a[x+1]++}}}o+=m,c+=p.nodeSize}for(var S=(u+1)*t,C=0;o<S;)0==r[o++]&&C++;C&&(i||(i=[])).push({type:"missing",row:u,n:C}),c++}for(var j=new Px(t,n,r,i),D=!1,E=0;!D&&E<a.length;E+=2)null!=a[E]&&a[E+1]<n&&(D=!0);D&&function(e,t,n){e.problems||(e.problems=[]);for(var r=0,o={};r<e.map.length;r++){var i=e.map[r];if(!o[i]){o[i]=!0;for(var a=n.nodeAt(i),s=null,l=0;l<a.attrs.colspan;l++){var u=t[2*((r+l)%e.width)];null==u||a.attrs.colwidth&&a.attrs.colwidth[l]==u||((s||(s=Rx(a.attrs)))[l]=u)}s&&e.problems.unshift({type:"colwidth mismatch",pos:i,colwidth:s})}}}(j,a,e);return j}(e))}}]),e}();function Rx(e){if(e.colwidth)return e.colwidth.slice();for(var t=[],n=0;n<e.colspan;n++)t.push(0);return t}function Hx(e){var t=e.cached.tableNodeTypes;if(!t)for(var n in t=e.cached.tableNodeTypes={},e.nodes){var r=e.nodes[n],o=r.spec.tableRole;o&&(t[o]=r)}return t}var Fx=new p.PluginKey("selectingCells");function Vx(e){for(var t=e.depth-1;t>0;t--)if("row"==e.node(t).type.spec.tableRole)return e.node(0).resolve(e.before(t+1));return null}function zx(e){for(var t=e.selection.$head,n=t.depth;n>0;n--)if("row"==t.node(n).type.spec.tableRole)return!0;return!1}function Bx(e){var t=e.selection;return t.$anchorCell?t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell:t.node&&"cell"==t.node.type.spec.tableRole?t.$anchor:Vx(t.$head)||function(e){for(var t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){var r=t.type.spec.tableRole;if("cell"==r||"header_cell"==r)return e.doc.resolve(n)}for(var o=e.nodeBefore,i=e.pos;o;o=o.lastChild,i--){var a=o.type.spec.tableRole;if("cell"==a||"header_cell"==a)return e.doc.resolve(i-o.nodeSize)}}(t.$head)}function _x(e){return"row"==e.parent.type.spec.tableRole&&e.nodeAfter}function Ix(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function $x(e,t,n){var r=e.start(-1),o=Px.get(e.node(-1)).nextCell(e.pos-r,t,n);return null==o?null:e.node(0).resolve(r+o)}function qx(e,t,n){var r={};for(var o in e)r[o]=e[o];return r[t]=n,r}function Wx(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=qx(e,"colspan",e.colspan-n);return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(t,n),r.colwidth.some((function(e){return e>0}))||(r.colwidth=null)),r}function Ux(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=qx(e,"colspan",e.colspan+n);if(r.colwidth){r.colwidth=r.colwidth.slice();for(var o=0;o<n;o++)r.colwidth.splice(t,0,0)}return r}var Kx=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;Object(c.a)(this,n);var i=e.node(-1),a=Px.get(i),s=e.start(-1),l=a.rectBetween(e.pos-s,o.pos-s),u=e.node(0),d=a.cellsInRect(l).filter((function(e){return e!=o.pos-s}));d.unshift(o.pos-s);var f=d.map((function(e){var t=i.nodeAt(e),n=e+s+1;return new p.SelectionRange(u.resolve(n),u.resolve(n+t.content.size))}));return(r=t.call(this,f[0].$from,f[0].$to,f)).$anchorCell=e,r.$headCell=o,r}return Object(d.a)(n,[{key:"map",value:function(e,t){var r=e.resolve(t.map(this.$anchorCell.pos)),o=e.resolve(t.map(this.$headCell.pos));if(_x(r)&&_x(o)&&Ix(r,o)){var i=this.$anchorCell.node(-1)!=r.node(-1);return i&&this.isRowSelection()?n.rowSelection(r,o):i&&this.isColSelection()?n.colSelection(r,o):new n(r,o)}return p.TextSelection.between(r,o)}},{key:"content",value:function(){for(var e=this.$anchorCell.node(-1),t=Px.get(e),n=this.$anchorCell.start(-1),r=t.rectBetween(this.$anchorCell.pos-n,this.$headCell.pos-n),o={},i=[],a=r.top;a<r.bottom;a++){for(var s=[],l=a*t.width+r.left,u=r.left;u<r.right;u++,l++){var c=t.map[l];if(!o[c]){o[c]=!0;var d=t.findCell(c),f=e.nodeAt(c),p=r.left-d.left,h=d.right-r.right;if(p>0||h>0){var m=f.attrs;p>0&&(m=Wx(m,0,p)),h>0&&(m=Wx(m,m.colspan-h,h)),f=d.left<r.left?f.type.createAndFill(m):f.type.create(m,f.content)}if(d.top<r.top||d.bottom>r.bottom){var g=qx(f.attrs,"rowspan",Math.min(d.bottom,r.bottom)-Math.max(d.top,r.top));f=d.top<r.top?f.type.createAndFill(g):f.type.create(g,f.content)}s.push(f)}}i.push(e.child(a).copy(v.Fragment.from(s)))}var y=this.isColSelection()&&this.isRowSelection()?e:i;return new v.Slice(v.Fragment.from(y),1,1)}},{key:"replace",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:v.Slice.empty,n=e.steps.length,r=this.ranges,o=0;o<r.length;o++){var i=r[o],a=i.$from,s=i.$to,l=e.mapping.slice(n);e.replace(l.map(a.pos),l.map(s.pos),o?v.Slice.empty:t)}var u=p.Selection.findFrom(e.doc.resolve(e.mapping.slice(n).map(this.to)),-1);u&&e.setSelection(u)}},{key:"replaceWith",value:function(e,t){this.replace(e,new v.Slice(v.Fragment.from(t),0,0))}},{key:"forEachCell",value:function(e){for(var t=this.$anchorCell.node(-1),n=Px.get(t),r=this.$anchorCell.start(-1),o=n.cellsInRect(n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r)),i=0;i<o.length;i++)e(t.nodeAt(o[i]),r+o[i])}},{key:"isColSelection",value:function(){var e=this.$anchorCell.index(-1),t=this.$headCell.index(-1);if(Math.min(e,t)>0)return!1;var n=e+this.$anchorCell.nodeAfter.attrs.rowspan,r=t+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(n,r)==this.$headCell.node(-1).childCount}},{key:"isRowSelection",value:function(){var e=Px.get(this.$anchorCell.node(-1)),t=this.$anchorCell.start(-1),n=e.colCount(this.$anchorCell.pos-t),r=e.colCount(this.$headCell.pos-t);if(Math.min(n,r)>0)return!1;var o=n+this.$anchorCell.nodeAfter.attrs.colspan,i=r+this.$headCell.nodeAfter.attrs.colspan;return Math.max(o,i)==e.width}},{key:"eq",value:function(e){return e instanceof n&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}},{key:"toJSON",value:function(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}},{key:"getBookmark",value:function(){return new Gx(this.$anchorCell.pos,this.$headCell.pos)}}],[{key:"colSelection",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,r=Px.get(e.node(-1)),o=e.start(-1),i=r.findCell(e.pos-o),a=r.findCell(t.pos-o),s=e.node(0);return i.top<=a.top?(i.top>0&&(e=s.resolve(o+r.map[i.left])),a.bottom<r.height&&(t=s.resolve(o+r.map[r.width*(r.height-1)+a.right-1]))):(a.top>0&&(t=s.resolve(o+r.map[a.left])),i.bottom<r.height&&(e=s.resolve(o+r.map[r.width*(r.height-1)+i.right-1]))),new n(e,t)}},{key:"rowSelection",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,r=Px.get(e.node(-1)),o=e.start(-1),i=r.findCell(e.pos-o),a=r.findCell(t.pos-o),s=e.node(0);return i.left<=a.left?(i.left>0&&(e=s.resolve(o+r.map[i.top*r.width])),a.right<r.width&&(t=s.resolve(o+r.map[r.width*(a.top+1)-1]))):(a.left>0&&(t=s.resolve(o+r.map[a.top*r.width])),i.right<r.width&&(e=s.resolve(o+r.map[r.width*(i.top+1)-1]))),new n(e,t)}},{key:"fromJSON",value:function(e,t){return new n(e.resolve(t.anchor),e.resolve(t.head))}},{key:"create",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;return new n(e.resolve(t),e.resolve(r))}}]),n}(p.Selection);Kx.prototype.visible=!1,p.Selection.jsonID("cell",Kx);var Gx=function(){function e(t,n){Object(c.a)(this,e),this.anchor=t,this.head=n}return Object(d.a)(e,[{key:"map",value:function(t){return new e(t.map(this.anchor),t.map(this.head))}},{key:"resolve",value:function(e){var t=e.resolve(this.anchor),n=e.resolve(this.head);return"row"==t.parent.type.spec.tableRole&&"row"==n.parent.type.spec.tableRole&&t.index()<t.parent.childCount&&n.index()<n.parent.childCount&&Ix(t,n)?new Kx(t,n):p.Selection.near(n,1)}}]),e}();function Jx(e){if(!(e.selection instanceof Kx))return null;var t=[];return e.selection.forEachCell((function(e,n){t.push(zu.node(n,n+e.nodeSize,{class:"selectedCell"}))})),Iu.create(e.doc,t)}function Yx(e,t,n){var r,o,i=(t||e).selection,a=(t||e).doc;if(i instanceof p.NodeSelection&&(o=i.node.type.spec.tableRole)){if("cell"==o||"header_cell"==o)r=Kx.create(a,i.from);else if("row"==o){var s=a.resolve(i.from+1);r=Kx.rowSelection(s,s)}else if(!n){var l=Px.get(i.node),u=i.from+1,c=u+l.map[l.width*l.height-1];r=Kx.create(a,u+1,c)}}else i instanceof p.TextSelection&&function(e){var t=e.$from,n=e.$to;if(t.pos==n.pos||t.pos<t.pos-6)return!1;for(var r=t.pos,o=n.pos,i=t.depth;i>=0&&!(t.after(i+1)<t.end(i));i--,r++);for(var a=n.depth;a>=0&&!(n.before(a+1)>n.start(a));a--,o--);return r==o&&/row|table/.test(t.node(i).type.spec.tableRole)}(i)?r=p.TextSelection.create(a,i.from):i instanceof p.TextSelection&&function(e){for(var t,n,r=e.$from,o=e.$to,i=r.depth;i>0;i--){var a=r.node(i);if("cell"===a.type.spec.tableRole||"header_cell"===a.type.spec.tableRole){t=a;break}}for(var s=o.depth;s>0;s--){var l=o.node(s);if("cell"===l.type.spec.tableRole||"header_cell"===l.type.spec.tableRole){n=l;break}}return t!==n&&0===o.parentOffset}(i)&&(r=p.TextSelection.create(a,i.$from.start(),i.$from.end()));return r&&(t||(t=e.tr)).setSelection(r),t}function Zx(e){if(!e.size)return null;for(var t=e.content,n=e.openStart,r=e.openEnd;1==t.childCount&&(n>0&&r>0||"table"==t.firstChild.type.spec.tableRole);)n--,r--,t=t.firstChild.content;var o=t.firstChild,i=o.type.spec.tableRole,a=o.type.schema,s=[];if("row"==i)for(var l=0;l<t.childCount;l++){var u=t.child(l).content,c=l?0:Math.max(0,n-1),d=l<t.childCount-1?0:Math.max(0,r-1);(c||d)&&(u=Xx(Hx(a).row,new v.Slice(u,c,d)).content),s.push(u)}else{if("cell"!=i&&"header_cell"!=i)return null;s.push(n||r?Xx(Hx(a).row,new v.Slice(t,n,r)).content:t)}return function(e,t){for(var n=[],r=0;r<t.length;r++)for(var o=t[r],i=o.childCount-1;i>=0;i--)for(var a=o.child(i).attrs,s=a.rowspan,l=a.colspan,u=r;u<r+s;u++)n[u]=(n[u]||0)+l;for(var c=0,d=0;d<n.length;d++)c=Math.max(c,n[d]);for(var f=0;f<n.length;f++)if(f>=t.length&&t.push(v.Fragment.empty),n[f]<c){for(var p=Hx(e).cell.createAndFill(),h=[],m=n[f];m<c;m++)h.push(p);t[f]=t[f].append(v.Fragment.from(h))}return{height:t.length,width:c,rows:t}}(a,s)}function Xx(e,t){var n=e.createAndFill();return new g.e(n).replace(0,n.content.size,t).doc}function Qx(e,t,n,r,o,i,a,s){if(0==a||a==t.height)return!1;for(var l=!1,u=o;u<i;u++){var c=a*t.width+u,d=t.map[c];if(t.map[c-t.width]==d){l=!0;var f=n.nodeAt(d),p=t.findCell(d),h=p.top,m=p.left;e.setNodeMarkup(e.mapping.slice(s).map(d+r),null,qx(f.attrs,"rowspan",a-h)),e.insert(e.mapping.slice(s).map(t.positionAt(a,m,n)),f.type.createAndFill(qx(f.attrs,"rowspan",h+f.attrs.rowspan-a))),u+=f.attrs.colspan-1}}return l}function eO(e,t,n,r,o,i,a,s){if(0==a||a==t.width)return!1;for(var l=!1,u=o;u<i;u++){var c=u*t.width+a,d=t.map[c];if(t.map[c-1]==d){l=!0;var f=n.nodeAt(d),p=t.colCount(d),h=e.mapping.slice(s).map(d+r);e.setNodeMarkup(h,null,Wx(f.attrs,a-p,f.attrs.colspan-(a-p))),e.insert(h+f.nodeSize,f.type.createAndFill(Wx(f.attrs,0,a-p))),u+=f.attrs.rowspan-1}}return l}function tO(e,t,n,r,o){var i=n?e.doc.nodeAt(n-1):e.doc,a=Px.get(i),s=r.top,l=r.left,u=l+o.width,c=s+o.height,d=e.tr,f=0;function p(){i=n?d.doc.nodeAt(n-1):d.doc,a=Px.get(i),f=d.mapping.maps.length}(function(e,t,n,r,o,i,a){var s,l,u=Hx(e.doc.type.schema);if(o>t.width)for(var c=0,d=0;c<t.height;c++){var f=n.child(c);d+=f.nodeSize;var p=[],h=void 0;h=null==f.lastChild||f.lastChild.type==u.cell?s||(s=u.cell.createAndFill()):l||(l=u.header_cell.createAndFill());for(var m=t.width;m<o;m++)p.push(h);e.insert(e.mapping.slice(a).map(d-1+r),p)}if(i>t.height){for(var g=[],y=0,b=(t.height-1)*t.width;y<Math.max(t.width,o);y++){var w=!(y>=t.width)&&n.nodeAt(t.map[b+y]).type==u.header_cell;g.push(w?l||(l=u.header_cell.createAndFill()):s||(s=u.cell.createAndFill()))}for(var k=u.row.create(null,v.Fragment.from(g)),x=[],O=t.height;O<i;O++)x.push(k);e.insert(e.mapping.slice(a).map(r+n.nodeSize-2),x)}return!(!s&&!l)})(d,a,i,n,u,c,f)&&p(),Qx(d,a,i,n,l,u,s,f)&&p(),Qx(d,a,i,n,l,u,c,f)&&p(),eO(d,a,i,n,s,c,l,f)&&p(),eO(d,a,i,n,s,c,u,f)&&p();for(var h=s;h<c;h++){var m=a.positionAt(h,l,i),g=a.positionAt(h,u,i);d.replace(d.mapping.slice(f).map(m+n),d.mapping.slice(f).map(g+n),new v.Slice(o.rows[h-s],0,0))}p(),d.setSelection(new Kx(d.doc.resolve(n+a.positionAt(s,l,i)),d.doc.resolve(n+a.positionAt(c-1,u-1,i)))),t(d)}var nO=Bn({ArrowLeft:oO("horiz",-1),ArrowRight:oO("horiz",1),ArrowUp:oO("vert",-1),ArrowDown:oO("vert",1),"Shift-ArrowLeft":iO("horiz",-1),"Shift-ArrowRight":iO("horiz",1),"Shift-ArrowUp":iO("vert",-1),"Shift-ArrowDown":iO("vert",1),Backspace:aO,"Mod-Backspace":aO,Delete:aO,"Mod-Delete":aO});function rO(e,t,n){return!n.eq(e.selection)&&(t&&t(e.tr.setSelection(n).scrollIntoView()),!0)}function oO(e,t){return function(n,r,o){var i=n.selection;if(i instanceof Kx)return rO(n,r,p.Selection.near(i.$headCell,t));if("horiz"!=e&&!i.empty)return!1;var a=cO(o,e,t);if(null==a)return!1;if("horiz"==e)return rO(n,r,p.Selection.near(n.doc.resolve(i.head+t),t));var s,l=n.doc.resolve(a),u=$x(l,e,t);return s=u?p.Selection.near(u,1):t<0?p.Selection.near(n.doc.resolve(l.before(-1)),-1):p.Selection.near(n.doc.resolve(l.after(-1)),1),rO(n,r,s)}}function iO(e,t){return function(n,r,o){var i=n.selection;if(!(i instanceof Kx)){var a=cO(o,e,t);if(null==a)return!1;i=new Kx(n.doc.resolve(a))}var s=$x(i.$headCell,e,t);return!!s&&rO(n,r,new Kx(i.$anchorCell,s))}}function aO(e,t){var n=e.selection;if(!(n instanceof Kx))return!1;if(t){var r=e.tr,o=Hx(e.schema).cell.createAndFill().content;n.forEachCell((function(e,t){e.content.eq(o)||r.replace(r.mapping.map(t+1),r.mapping.map(t+e.nodeSize-1),new v.Slice(o,0,0))})),r.docChanged&&t(r)}return!0}function sO(e,t){var n=Vx(e.state.doc.resolve(t));return!!n&&(e.dispatch(e.state.tr.setSelection(new Kx(n))),!0)}function lO(e,t,n){if(!zx(e.state))return!1;var r=Zx(n),o=e.state.selection;if(o instanceof Kx){r||(r={width:1,height:1,rows:[v.Fragment.from(Xx(Hx(e.state.schema).cell,n))]});var i=o.$anchorCell.node(-1),a=o.$anchorCell.start(-1),s=Px.get(i).rectBetween(o.$anchorCell.pos-a,o.$headCell.pos-a);return r=function(e,t,n){var r=e.width,o=e.height,i=e.rows;if(r!=t){for(var a=[],s=[],l=0;l<i.length;l++){for(var u=i[l],c=[],d=a[l]||0,f=0;d<t;f++){var p=u.child(f%u.childCount);d+p.attrs.colspan>t&&(p=p.type.create(Wx(p.attrs,p.attrs.colspan,d+p.attrs.colspan-t),p.content)),c.push(p),d+=p.attrs.colspan;for(var h=1;h<p.attrs.rowspan;h++)a[l+h]=(a[l+h]||0)+p.attrs.colspan}s.push(v.Fragment.from(c))}i=s,r=t}if(o!=n){for(var m=[],g=0,y=0;g<n;g++,y++){for(var b=[],w=i[y%o],k=0;k<w.childCount;k++){var x=w.child(k);g+x.attrs.rowspan>n&&(x=x.type.create(qx(x.attrs,"rowspan",Math.max(1,n-x.attrs.rowspan)),x.content)),b.push(x)}m.push(v.Fragment.from(b))}i=m,o=n}return{width:r,height:o,rows:i}}(r,s.right-s.left,s.bottom-s.top),tO(e.state,e.dispatch,a,s,r),!0}if(r){var l=Bx(e.state),u=l.start(-1);return tO(e.state,e.dispatch,u,Px.get(l.node(-1)).findCell(l.pos-u),r),!0}return!1}function uO(e,t){if(!t.ctrlKey&&!t.metaKey){var n,r=dO(e,t.target);if(t.shiftKey&&e.state.selection instanceof Kx)o(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&r&&null!=(n=Vx(e.state.selection.$anchor))&&fO(e,t).pos!=n.pos)o(n,t),t.preventDefault();else if(!r)return;e.root.addEventListener("mouseup",i),e.root.addEventListener("dragstart",i),e.root.addEventListener("mousemove",a)}function o(t,n){var r=fO(e,n),o=null==Fx.getState(e.state);if(!r||!Ix(t,r)){if(!o)return;r=t}var i=new Kx(t,r);if(o||!e.state.selection.eq(i)){var a=e.state.tr.setSelection(i);o&&a.setMeta(Fx,t.pos),e.dispatch(a)}}function i(){e.root.removeEventListener("mouseup",i),e.root.removeEventListener("dragstart",i),e.root.removeEventListener("mousemove",a),null!=Fx.getState(e.state)&&e.dispatch(e.state.tr.setMeta(Fx,-1))}function a(n){var a,s=Fx.getState(e.state);if(null!=s)a=e.state.doc.resolve(s);else if(dO(e,n.target)!=r&&!(a=fO(e,t)))return i();a&&o(a,n)}}function cO(e,t,n){if(!(e.state.selection instanceof p.TextSelection))return null;for(var r=e.state.selection.$head,o=r.depth-1;o>=0;o--){var i=r.node(o);if((n<0?r.index(o):r.indexAfter(o))!=(n<0?0:i.childCount))return null;if("cell"==i.type.spec.tableRole||"header_cell"==i.type.spec.tableRole){var a=r.before(o),s="vert"==t?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(s)?a:null}}return null}function dO(e,t){for(;t&&t!=e.dom;t=t.parentNode)if("TD"==t.nodeName||"TH"==t.nodeName)return t}function fO(e,t){var n=e.posAtCoords({left:t.clientX,top:t.clientY});return n&&n?Vx(e.state.doc.resolve(n.pos)):null}var pO=new p.PluginKey("fix-tables");function hO(e,t,n,r){var o=e.childCount,i=t.childCount;e:for(var a=0,s=0;a<i;a++){for(var l=t.child(a),u=s,c=Math.min(o,a+3);u<c;u++)if(e.child(u)==l){s=u+1,n+=l.nodeSize;continue e}r(l,n),s<o&&e.child(s).sameMarkup(l)?hO(e.child(s),l,n+1,r):l.nodesBetween(0,l.content.size,r,n+1),n+=l.nodeSize}}function mO(e,t){var n,r=function(t,r){"table"==t.type.spec.tableRole&&(n=function(e,t,n,r){var o=Px.get(t);if(!o.problems)return r;r||(r=e.tr);for(var i,a,s=[],l=0;l<o.height;l++)s.push(0);for(var u=0;u<o.problems.length;u++){var c=o.problems[u];if("collision"==c.type){for(var d=t.nodeAt(c.pos),f=0;f<d.attrs.rowspan;f++)s[c.row+f]+=c.n;r.setNodeMarkup(r.mapping.map(n+1+c.pos),null,Wx(d.attrs,d.attrs.colspan-c.n,c.n))}else if("missing"==c.type)s[c.row]+=c.n;else if("overlong_rowspan"==c.type){var p=t.nodeAt(c.pos);r.setNodeMarkup(r.mapping.map(n+1+c.pos),null,qx(p.attrs,"rowspan",p.attrs.rowspan-c.n))}else if("colwidth mismatch"==c.type){var h=t.nodeAt(c.pos);r.setNodeMarkup(r.mapping.map(n+1+c.pos),null,qx(h.attrs,"colwidth",c.colwidth))}}for(var m=0;m<s.length;m++)s[m]&&(null==i&&(i=m),a=m);for(var v=0,g=n+1;v<o.height;v++){var y=t.child(v),b=g+y.nodeSize,w=s[v];if(w>0){var k="cell";y.firstChild&&(k=y.firstChild.type.spec.tableRole);for(var x=[],O=0;O<w;O++)x.push(Hx(e.schema)[k].createAndFill());var S=0!=v&&i!=v-1||a!=v?b-1:g+1;r.insert(r.mapping.map(S),x)}g=b}return r.setMeta(pO,{fixTables:!0})}(e,t,r,n))};return t?t.doc!=e.doc&&hO(t.doc,e.doc,0,r):e.doc.descendants(r),n}function vO(e){var t,n=e.selection,r=Bx(e),o=r.node(-1),i=r.start(-1),a=Px.get(o);return(t=n instanceof Kx?a.rectBetween(n.$anchorCell.pos-i,n.$headCell.pos-i):a.findCell(r.pos-i)).tableStart=i,t.map=a,t.table=o,t}function gO(e,t,n){var r=t.map,o=t.tableStart,i=t.table,a=n>0?-1:0;(function(e,t,n){for(var r=Hx(t.type.schema).header_cell,o=0;o<e.height;o++)if(t.nodeAt(e.map[n+o*e.width]).type!=r)return!1;return!0})(r,i,n+a)&&(a=0==n||n==r.width?null:0);for(var s=0;s<r.height;s++){var l=s*r.width+n;if(n>0&&n<r.width&&r.map[l-1]==r.map[l]){var u=r.map[l],c=i.nodeAt(u);e.setNodeMarkup(e.mapping.map(o+u),null,Ux(c.attrs,n-r.colCount(u))),s+=c.attrs.rowspan-1}else{var d=null==a?Hx(i.type.schema).cell:i.nodeAt(r.map[l+a]).type,f=r.positionAt(s,n,i);e.insert(e.mapping.map(o+f),d.createAndFill())}}return e}function yO(e,t,n){for(var r=t.map,o=t.table,i=t.tableStart,a=e.mapping.maps.length,s=0;s<r.height;){var l=s*r.width+n,u=r.map[l],c=o.nodeAt(u);if(n>0&&r.map[l-1]==u||n<r.width-1&&r.map[l+1]==u)e.setNodeMarkup(e.mapping.slice(a).map(i+u),null,Wx(c.attrs,n-r.colCount(u)));else{var d=e.mapping.slice(a).map(i+u);e.delete(d,d+c.nodeSize)}s+=c.attrs.rowspan}}function bO(e,t,n){for(var r=t.map,o=t.tableStart,i=t.table,a=o,s=0;s<n;s++)a+=i.child(s).nodeSize;var l=[],u=n>0?-1:0;(function(e,t,n){for(var r=Hx(t.type.schema).header_cell,o=0;o<e.width;o++)if(t.nodeAt(e.map[o+n*e.width]).type!=r)return!1;return!0})(r,i,n+u)&&(u=0==n||n==r.height?null:0);for(var c=0,d=r.width*n;c<r.width;c++,d++)if(n>0&&n<r.height&&r.map[d]==r.map[d-r.width]){var f=r.map[d],p=i.nodeAt(f).attrs;e.setNodeMarkup(o+f,null,qx(p,"rowspan",p.rowspan+1)),c+=p.colspan-1}else{var h=null==u?Hx(i.type.schema).cell:i.nodeAt(r.map[d+u*r.width]).type;l.push(h.createAndFill())}return e.insert(a,Hx(i.type.schema).row.create(null,l)),e}function wO(e,t,n){for(var r=t.map,o=t.table,i=t.tableStart,a=0,s=0;s<n;s++)a+=o.child(s).nodeSize;var l=a+o.child(n).nodeSize,u=e.mapping.maps.length;e.delete(a+i,l+i);for(var c=0,d=n*r.width;c<r.width;c++,d++){var f=r.map[d];if(n>0&&f==r.map[d-r.width]){var p=o.nodeAt(f).attrs;e.setNodeMarkup(e.mapping.slice(u).map(f+i),null,qx(p,"rowspan",p.rowspan-1)),c+=p.colspan-1}else if(n<r.width&&f==r.map[d+r.width]){var h=o.nodeAt(f),m=h.type.create(qx(h.attrs,"rowspan",h.attrs.rowspan-1),h.content),v=r.positionAt(n+1,c,o);e.insert(e.mapping.slice(u).map(i+v),m),c+=h.attrs.colspan-1}}}function kO(e){var t=e.content;return 1==t.childCount&&t.firstChild.isTextblock&&0==t.firstChild.childCount}function xO(e,t){var n=e.selection;if(!(n instanceof Kx)||n.$anchorCell.pos==n.$headCell.pos)return!1;var r=vO(e),o=r.map;if(function(e,t){for(var n=e.width,r=e.height,o=e.map,i=t.top*n+t.left,a=i,s=(t.bottom-1)*n+t.left,l=i+(t.right-t.left-1),u=t.top;u<t.bottom;u++){if(t.left>0&&o[a]==o[a-1]||t.right<n&&o[l]==o[l+1])return!0;a+=n,l+=n}for(var c=t.left;c<t.right;c++){if(t.top>0&&o[i]==o[i-n]||t.bottom<r&&o[s]==o[s+n])return!0;i++,s++}return!1}(o,r))return!1;if(t){for(var i,a,s=e.tr,l={},u=v.Fragment.empty,c=r.top;c<r.bottom;c++)for(var d=r.left;d<r.right;d++){var f=o.map[c*o.width+d],p=r.table.nodeAt(f);if(!l[f])if(l[f]=!0,null==i)i=f,a=p;else{kO(p)||(u=u.append(p.content));var h=s.mapping.map(f+r.tableStart);s.delete(h,h+p.nodeSize)}}if(s.setNodeMarkup(i+r.tableStart,null,qx(Ux(a.attrs,a.attrs.colspan,r.right-r.left-a.attrs.colspan),"rowspan",r.bottom-r.top)),u.size){var m=i+1+a.content.size,g=kO(a)?i+1:m;s.replaceWith(g+r.tableStart,m+r.tableStart,u)}s.setSelection(new Kx(s.doc.resolve(i+r.tableStart))),t(s)}return!0}function OO(e,t){var n,r=Hx(e.schema);return(n=function(e){var t=e.node;return r[t.type.spec.tableRole]},function(e,t){var r,o,i=e.selection;if(i instanceof Kx){if(i.$anchorCell.pos!=i.$headCell.pos)return!1;r=i.$anchorCell.nodeAfter,o=i.$anchorCell.pos}else{if(!(r=function(e){for(var t=e.depth;t>0;t--){var n=e.node(t).type.spec.tableRole;if("cell"===n||"header_cell"===n)return e.node(t)}return null}(i.$from)))return!1;o=Vx(i.$from).pos}if(1==r.attrs.colspan&&1==r.attrs.rowspan)return!1;if(t){var a=r.attrs,s=[],l=a.colwidth;a.rowspan>1&&(a=qx(a,"rowspan",1)),a.colspan>1&&(a=qx(a,"colspan",1));for(var u,c=vO(e),d=e.tr,f=0;f<c.right-c.left;f++)s.push(l?qx(a,"colwidth",l&&l[f]?[l[f]]:null):a);for(var p=c.top;p<c.bottom;p++){var h=c.map.positionAt(p,c.left,c.table);p==c.top&&(h+=r.nodeSize);for(var m=c.left,v=0;m<c.right;m++,v++)m==c.left&&p==c.top||d.insert(u=d.mapping.map(h+c.tableStart,1),n({node:r,row:p,col:m}).createAndFill(s[v]))}d.setNodeMarkup(o,n({node:r,row:c.top,col:c.left}),s[0]),i instanceof Kx&&d.setSelection(new Kx(d.doc.resolve(i.$anchorCell.pos),u&&d.doc.resolve(u))),t(d)}return!0})(e,t)}function SO(e,t,n){for(var r=t.map.cellsInRect({left:0,top:0,right:"row"==e?t.map.width:1,bottom:"column"==e?t.map.height:1}),o=0;o<r.length;o++){var i=t.table.nodeAt(r[o]);if(i&&i.type!==n.header_cell)return!1}return!0}function CO(e,t){return(t=t||{useDeprecatedLogic:!1}).useDeprecatedLogic?function(e){return function(t,n){if(!zx(t))return!1;if(n){for(var r=Hx(t.schema),o=vO(t),i=t.tr,a=o.map.cellsInRect("column"==e?new Nx(o.left,0,o.right,o.map.height):"row"==e?new Nx(0,o.top,o.map.width,o.bottom):o),s=a.map((function(e){return o.table.nodeAt(e)})),l=0;l<a.length;l++)s[l].type==r.header_cell&&i.setNodeMarkup(o.tableStart+a[l],r.cell,s[l].attrs);if(0==i.steps.length)for(var u=0;u<a.length;u++)i.setNodeMarkup(o.tableStart+a[u],r.header_cell,s[u].attrs);n(i)}return!0}}(e):function(t,n){if(!zx(t))return!1;if(n){var r=Hx(t.schema),o=vO(t),i=t.tr,a=SO("row",o,r),s=SO("column",o,r),l=("column"===e?a:"row"===e&&s)?1:0,u="column"==e?new Nx(0,l,1,o.map.height):"row"==e?new Nx(l,0,o.map.width,1):o,c="column"==e?s?r.cell:r.header_cell:"row"==e?a?r.cell:r.header_cell:r.cell;o.map.cellsInRect(u).forEach((function(e){var t=e+o.tableStart,n=i.doc.nodeAt(t);n&&i.setNodeMarkup(t,c,n.attrs)})),n(i)}return!0}}CO("row",{useDeprecatedLogic:!0}),CO("column",{useDeprecatedLogic:!0});var jO=CO("cell",{useDeprecatedLogic:!0});function DO(e){return function(t,n){if(!zx(t))return!1;var r=function(e,t){if(t<0){var n=e.nodeBefore;if(n)return e.pos-n.nodeSize;for(var r=e.index(-1)-1,o=e.before();r>=0;r--){var i=e.node(-1).child(r);if(i.childCount)return o-1-i.lastChild.nodeSize;o-=i.nodeSize}}else{if(e.index()<e.parent.childCount-1)return e.pos+e.nodeAfter.nodeSize;for(var a=e.node(-1),s=e.indexAfter(-1),l=e.after();s<a.childCount;s++){var u=a.child(s);if(u.childCount)return l+1;l+=u.nodeSize}}}(Bx(t),e);if(null!=r){if(n){var o=t.doc.resolve(r);n(t.tr.setSelection(p.TextSelection.between(o,(i=o,i.node(0).resolve(i.pos+i.nodeAfter.nodeSize)))).scrollIntoView())}var i;return!0}}}var EO=function(){function e(t,n){Object(c.a)(this,e),this.node=t,this.cellMinWidth=n,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),AO(t,this.colgroup,this.table,n),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}return Object(d.a)(e,[{key:"update",value:function(e){return e.type==this.node.type&&(this.node=e,AO(e,this.colgroup,this.table,this.cellMinWidth),!0)}},{key:"ignoreMutation",value:function(e){return"attributes"==e.type&&(e.target==this.table||this.colgroup.contains(e.target))}}]),e}();function AO(e,t,n,r,o,i){for(var a=0,s=!0,l=t.firstChild,u=e.firstChild,c=0,d=0;c<u.childCount;c++)for(var f=u.child(c).attrs,p=f.colspan,h=f.colwidth,m=0;m<p;m++,d++){var v=o==d?i:h&&h[m],g=v?v+"px":"";a+=v||r,v||(s=!1),l?(l.style.width!=g&&(l.style.width=g),l=l.nextSibling):t.appendChild(document.createElement("col")).style.width=g}for(;l;){var y=l.nextSibling;l.parentNode.removeChild(l),l=y}s?(n.style.width=a+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=a+"px")}var MO=new p.PluginKey("tableColumnResizing");function TO(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.handleWidth,n=void 0===t?5:t,r=e.cellMinWidth,o=void 0===r?25:r,i=e.View,a=void 0===i?EO:i,s=e.lastColumnResizable,l=void 0===s||s,u=new p.Plugin({key:MO,state:{init:function(e,t){return this.spec.props.nodeViews[Hx(t.schema).table.name]=function(e,t){return new a(e,o,t)},new LO(-1,!1)},apply:function(e,t){return t.apply(e)}},props:{attributes:function(e){return MO.getState(e).activeHandle>-1?{class:"resize-cursor"}:null},handleDOMEvents:{mousemove:function(e,t){NO(e,t,n,o,l)},mouseleave:function(e){PO(e)},mousedown:function(e,t){RO(e,t,o)}},decorations:function(e){var t=MO.getState(e);if(t.activeHandle>-1)return BO(e,t.activeHandle)},nodeViews:{}}});return u}var LO=function(){function e(t,n){Object(c.a)(this,e),this.activeHandle=t,this.dragging=n}return Object(d.a)(e,[{key:"apply",value:function(t){var n=this,r=t.getMeta(MO);if(r&&null!=r.setHandle)return new e(r.setHandle,null);if(r&&void 0!==r.setDragging)return new e(n.activeHandle,r.setDragging);if(n.activeHandle>-1&&t.docChanged){var o=t.mapping.map(n.activeHandle,-1);_x(t.doc.resolve(o))||(o=null),n=new e(o,n.dragging)}return n}}]),e}();function NO(e,t,n,r,o){var i=MO.getState(e.state);if(!i.dragging){var a=function(e){for(;e&&"TD"!=e.nodeName&&"TH"!=e.nodeName;)e=e.classList.contains("ProseMirror")?null:e.parentNode;return e}(t.target),s=-1;if(a){var l=a.getBoundingClientRect(),u=l.left,c=l.right;t.clientX-u<=n?s=HO(e,t,"left"):c-t.clientX<=n&&(s=HO(e,t,"right"))}if(s!=i.activeHandle){if(!o&&-1!==s){var d=e.state.doc.resolve(s),f=d.node(-1),p=Px.get(f),h=d.start(-1);if(p.colCount(d.pos-h)+d.nodeAfter.attrs.colspan-1==p.width-1)return}VO(e,s)}}}function PO(e){var t=MO.getState(e.state);t.activeHandle>-1&&!t.dragging&&VO(e,-1)}function RO(e,t,n){var r=MO.getState(e.state);if(-1==r.activeHandle||r.dragging)return!1;var o=e.state.doc.nodeAt(r.activeHandle),i=function(e,t,n){var r=n.colspan,o=n.colwidth,i=o&&o[o.length-1];if(i)return i;var a=e.domAtPos(t),s=a.node.childNodes[a.offset].offsetWidth,l=r;if(o)for(var u=0;u<r;u++)o[u]&&(s-=o[u],l--);return s/l}(e,r.activeHandle,o.attrs);function a(t){window.removeEventListener("mouseup",a),window.removeEventListener("mousemove",s);var r=MO.getState(e.state);r.dragging&&(!function(e,t,n){for(var r=e.state.doc.resolve(t),o=r.node(-1),i=Px.get(o),a=r.start(-1),s=i.colCount(r.pos-a)+r.nodeAfter.attrs.colspan-1,l=e.state.tr,u=0;u<i.height;u++){var c=u*i.width+s;if(!u||i.map[c]!=i.map[c-i.width]){var d=i.map[c],f=o.nodeAt(d).attrs,p=1==f.colspan?0:s-i.colCount(d);if(!f.colwidth||f.colwidth[p]!=n){var h=f.colwidth?f.colwidth.slice():zO(f.colspan);h[p]=n,l.setNodeMarkup(a+d,null,qx(f,"colwidth",h))}}}l.docChanged&&e.dispatch(l)}(e,r.activeHandle,FO(r.dragging,t,n)),e.dispatch(e.state.tr.setMeta(MO,{setDragging:null})))}function s(t){if(!t.which)return a(t);var r=MO.getState(e.state),o=FO(r.dragging,t,n);!function(e,t,n,r){var o=e.state.doc.resolve(t),i=o.node(-1),a=o.start(-1),s=Px.get(i).colCount(o.pos-a)+o.nodeAfter.attrs.colspan-1,l=e.domAtPos(o.start(-1)).node;for(;"TABLE"!=l.nodeName;)l=l.parentNode;AO(i,l.firstChild,l,r,s,n)}(e,r.activeHandle,o,n)}return e.dispatch(e.state.tr.setMeta(MO,{setDragging:{startX:t.clientX,startWidth:i}})),window.addEventListener("mouseup",a),window.addEventListener("mousemove",s),t.preventDefault(),!0}function HO(e,t,n){var r=e.posAtCoords({left:t.clientX,top:t.clientY});if(!r)return-1;var o=r.pos,i=Vx(e.state.doc.resolve(o));if(!i)return-1;if("right"==n)return i.pos;var a=Px.get(i.node(-1)),s=i.start(-1),l=a.map.indexOf(i.pos-s);return l%a.width==0?-1:s+a.map[l-1]}function FO(e,t,n){var r=t.clientX-e.startX;return Math.max(n,e.startWidth+r)}function VO(e,t){e.dispatch(e.state.tr.setMeta(MO,{setHandle:t}))}function zO(e){for(var t=[],n=0;n<e;n++)t.push(0);return t}function BO(e,t){for(var n=[],r=e.doc.resolve(t),o=r.node(-1),i=Px.get(o),a=r.start(-1),s=i.colCount(r.pos-a)+r.nodeAfter.attrs.colspan,l=0;l<i.height;l++){var u=s+l*i.width-1;if((s==i.width||i.map[u]!=i.map[u+1])&&(0==l||i.map[u-1]!=i.map[u-1-i.width])){var c=i.map[u],d=a+c+o.nodeAt(c).nodeSize-1,f=document.createElement("div");f.className="column-resize-handle",n.push(zu.widget(d,f))}}return Iu.create(e.doc,n)}function _O(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.allowTableNodeSelection,n=void 0!==t&&t;return new p.Plugin({key:Fx,state:{init:function(){return null},apply:function(e,t){var n=e.getMeta(Fx);if(null!=n)return-1==n?null:n;if(null==t||!e.docChanged)return t;var r=e.mapping.mapResult(t),o=r.deleted,i=r.pos;return o?null:i}},props:{decorations:Jx,handleDOMEvents:{mousedown:uO},createSelectionBetween:function(e){if(null!=Fx.getState(e.state))return e.state.selection},handleTripleClick:sO,handleKeyDown:nO,handlePaste:lO},appendTransaction:function(e,t,r){return Yx(r,mO(r,t),n)}})}function IO(e,t,n,r){return UO(e,t,$O(t,n),$O(t,r))}function $O(e,t){for(var n=e.map,r=e.table,o=[],i=0;i<n.height;){var a=i*n.width+t;if(a>=n.map.length)break;var s=n.map[a],l=r.nodeAt(s);l&&(o.push({cell:l,pos:s}),i+=l.attrs.rowspan)}return o}function qO(e,t,n,r){return UO(e,t,WO(t,n),WO(t,r))}function WO(e,t){for(var n=e.map,r=e.table,o=[],i=0,a=t*n.width;i<n.width&&!(a>=n.map.length);i++,a++){var s=n.map[a],l=r.nodeAt(s);l&&(o.push({cell:l,pos:s}),i+=l.attrs.colspan-1)}return o}function UO(e,t,n,r){if(n.length===r.length){for(var o=e.mapping.maps.length,i=0;i<r.length;++i){var a=n[i],s=r[i],l=e.mapping.slice(o).map(t.tableStart+a.pos),u=l+a.cell.nodeSize,c=e.doc.slice(l,u),d=e.mapping.slice(o).map(t.tableStart+s.pos),f=d+s.cell.nodeSize,p=e.doc.slice(d,f);e.replace(d,f,c),u=(l=e.mapping.slice(o).map(t.tableStart+a.pos))+a.cell.nodeSize,e.replace(l,u,p)}return e}}function KO(e){var t=e.popupId,n=e.editor,r=e.tools,o=e.autoCloseOnUnmount,a="bottom"===Hd(),s=Object(jd.useRef)(),l=Object(jd.useState)(!1),u=Object(i.a)(l,2),c=u[0],d=u[1];return Object(Cd.jsxs)(Cd.Fragment,{children:[Object(Cd.jsx)(wf,Object.assign({},e,{toggled:c,buttonRef:s,onClick:function(){return d((function(e){return!e}))}})),Object(Cd.jsx)(Jb,{isOpen:c,group:"toolbarGroup",id:t,onClosed:function(){return d(!1)},position:{isTargetAbsolute:!0,target:a?_b():s.current||"mouse",align:"center",location:a?"top":"below",yOffset:10},autoCloseOnUnmount:o,focusOnRender:!1,blocking:!1,renderPopup:function(){return Object(Cd.jsx)(VS,{tools:r,editor:n,sx:{flex:1,p:"5px",boxShadow:"menu",bg:"background",borderRadius:"default",overflowX:"auto",maxWidth:"95vw"}})}})]})}function GO(e){return function(t){var n=e(t.editor);return Object(Cd.jsx)(wf,Object.assign({},t,{icon:n.icon||t.icon,toggled:n.isChecked||!1,title:n.title,onClick:n.onClick}))}}var JO={bold:{icon:"bold",title:"Bold"},italic:{icon:"italic",title:"Italic"},underline:{icon:"underline",title:"Underline"},strikethrough:{icon:"strikethrough",title:"Strikethrough"},addLink:{icon:"link",title:"Link"},editLink:{icon:"linkEdit",title:"Edit link",conditional:!0},removeLink:{icon:"linkRemove",title:"Remove link",conditional:!0},openLink:{icon:"openLink",title:"Open link",conditional:!0},linkSettings:{icon:"linkSettings",title:"Link settings",conditional:!0},code:{icon:"code",title:"Code"},codeRemove:{icon:"codeRemove",title:"Code",conditional:!0},clearformatting:{icon:"formatClear",title:"Clear all formatting"},subscript:{icon:"subscript",title:"Subscript"},superscript:{icon:"superscript",title:"Superscript"},insertBlock:{icon:"plus",title:"Insert",conditional:!0},bulletList:{icon:"bulletList",title:"Bullet list"},numberedList:{icon:"numberedList",title:"Numbered list"},fontFamily:{icon:"fontFamily",title:"Font family"},fontSize:{icon:"fontSize",title:"Font size"},headings:{icon:"heading",title:"Headings"},alignment:{icon:"alignCenter",title:"Alignment"},textDirection:{icon:"ltr",title:"Text direction"},highlight:{icon:"highlight",title:"Highlight"},textColor:{icon:"textColor",title:"Text color"},math:{icon:"math",title:"Math (inline)"},tableSettings:{icon:"tableSettings",title:"Table settings",conditional:!0},columnProperties:{icon:"columnProperties",title:"Column properties",conditional:!0},rowProperties:{icon:"rowProperties",title:"Row properties",conditional:!0},cellProperties:{icon:"cellProperties",title:"Cell properties",conditional:!0},insertColumnLeft:{icon:"insertColumnLeft",title:"Insert column left",conditional:!0},insertColumnRight:{icon:"insertColumnRight",title:"Insert column right",conditional:!0},moveColumnLeft:{icon:"moveColumnLeft",title:"Move column left",conditional:!0},moveColumnRight:{icon:"moveColumnRight",title:"Move column right",conditional:!0},deleteColumn:{icon:"deleteColumn",title:"Delete column",conditional:!0},splitCells:{icon:"splitCells",title:"Split cells",conditional:!0},mergeCells:{icon:"mergeCells",title:"Merge cells",conditional:!0},insertRowAbove:{icon:"insertRowAbove",title:"Insert row above",conditional:!0},insertRowBelow:{icon:"insertRowBelow",title:"Insert row below",conditional:!0},moveRowUp:{icon:"moveRowUp",title:"Move row up",conditional:!0},moveRowDown:{icon:"moveRowDown",title:"Move row down",conditional:!0},deleteRow:{icon:"deleteRow",title:"Delete row",conditional:!0},deleteTable:{icon:"deleteTable",title:"Delete table",conditional:!0},cellBackgroundColor:{icon:"backgroundColor",title:"Cell background color",conditional:!0},cellBorderColor:{icon:"cellBorderColor",title:"Cell border color",conditional:!0},cellTextColor:{icon:"textColor",title:"Cell text color",conditional:!0},cellBorderWidth:{icon:"none",title:"Cell border width",conditional:!0},imageSettings:{icon:"imageSettings",title:"Image settings",conditional:!0},imageAlignCenter:{icon:"alignCenter",title:"Align center",conditional:!0},imageAlignLeft:{icon:"alignLeft",title:"Align left",conditional:!0},imageAlignRight:{icon:"alignRight",title:"Align right",conditional:!0},imageProperties:{icon:"more",title:"Image properties",conditional:!0},attachmentSettings:{icon:"attachmentSettings",title:"Attachment settings",conditional:!0},downloadAttachment:{icon:"download",title:"Download attachment",conditional:!0},removeAttachment:{icon:"delete",title:"Remove attachment",conditional:!0},embedSettings:{icon:"embedSettings",title:"Embed settings",conditional:!0},embedAlignCenter:{icon:"alignCenter",title:"Align center",conditional:!0},embedAlignLeft:{icon:"alignLeft",title:"Align left",conditional:!0},embedAlignRight:{icon:"alignRight",title:"Align right",conditional:!0},embedProperties:{icon:"more",title:"Embed properties",conditional:!0},outdent:{icon:"outdent",title:"Lift list item",conditional:!0},indent:{icon:"indent",title:"Sink list item",conditional:!0}};function YO(e){return JO[e]}function ZO(){return QO}var XO=[["insertBlock","tableSettings","imageSettings","embedSettings","attachmentSettings","linkSettings","codeRemove","outdent","indent"]],QO={default:[["bold","italic","underline",["strikethrough","code","subscript","superscript","highlight","textColor","math"]],["fontSize"],["headings","fontFamily"],["numberedList","bulletList"],["addLink"],["alignment","textDirection"],["clearformatting"]],minimal:[["bold","italic","underline","strikethrough","code"],["headings","addLink"],["clearformatting"]]};function eS(e){var t=e.editor,n=e.onClose,r=t.getAttributes("tableCell");return Object(Cd.jsx)(sw,Object.assign({title:"Cell properties",onClose:n},{children:Object(Cd.jsxs)(Xw,Object.assign({activeIndex:0},{children:[Object(Cd.jsxs)(Zw,Object.assign({title:Object(Cd.jsx)(mf,{title:"Cell background color",path:vf.backgroundColor,size:16})},{children:[Object(Cd.jsx)(af.Box,{mt:2}),Object(Cd.jsx)(Cx,{expanded:!0,color:r.backgroundColor,onChange:function(e){var n;return null===(n=t.current)||void 0===n?void 0:n.commands.setCellAttribute("backgroundColor",e)},onClear:function(){var e;return null===(e=t.current)||void 0===e?void 0:e.commands.setCellAttribute("backgroundColor",void 0)}})]})),Object(Cd.jsxs)(Zw,Object.assign({title:Object(Cd.jsx)(mf,{title:"Cell text color",path:vf.textColor,size:16})},{children:[Object(Cd.jsx)(af.Box,{mt:2}),Object(Cd.jsx)(Cx,{expanded:!0,color:r.color,onChange:function(e){var n;return null===(n=t.current)||void 0===n?void 0:n.commands.setCellAttribute("color",e)},onClear:function(){var e;return null===(e=t.current)||void 0===e?void 0:e.commands.setCellAttribute("color",void 0)}})]})),Object(Cd.jsxs)(Zw,Object.assign({title:Object(Cd.jsx)(mf,{title:"Cell border color",path:vf.cellBorderColor,size:16})},{children:[Object(Cd.jsx)(af.Box,{mt:2}),Object(Cd.jsx)(Cx,{expanded:!0,color:r.borderColor,onChange:function(e){var n;return null===(n=t.current)||void 0===n?void 0:n.commands.setCellAttribute("borderColor",e)},onClear:function(){var e;return null===(e=t.current)||void 0===e?void 0:e.commands.setCellAttribute("borderColor",void 0)}})]}))]}))}))}function tS(e){var t=e.editor,n=Object(jd.useRef)(),r=Object(jd.useState)(!1),o=Object(i.a)(r,2),a=o[0],s=o[1],l=Object(jd.useMemo)((function(){return[cS(t),dS(t),fS(t),pS(t),hS(t)]}),[]);return Object(Cd.jsxs)(Cd.Fragment,{children:[Object(Cd.jsx)(wf,Object.assign({},e,{buttonRef:n,toggled:a,onClick:function(){return s(!0)}})),Object(Cd.jsx)(aw,{title:"Row properties",mobile:"sheet",desktop:"menu",isOpen:a,onClose:function(){return s(!1)},position:{target:n.current,isTargetAbsolute:!0,location:"below",yOffset:5},items:l})]})}function nS(e){var t=e.editor,n=Object(jd.useRef)(),r=Object(jd.useState)(!1),o=Object(i.a)(r,2),a=o[0],s=o[1],l=Object(jd.useMemo)((function(){return[rS(t),oS(t),iS(t),aS(t),sS(t),{type:"separator",key:"cellSeperator"},uS(t),lS(t),vS(t),{type:"separator",key:"tableSeperator"},mS(t)]}),[]);return Object(Cd.jsxs)(Cd.Fragment,{children:[Object(Cd.jsx)(wf,Object.assign({},e,{buttonRef:n,toggled:a,onClick:function(){return s(!0)}})),Object(Cd.jsx)(aw,{title:"Table properties",mobile:"sheet",desktop:"menu",isOpen:a,onClose:function(){return s(!1)},position:{target:n.current,isTargetAbsolute:!0,location:"below",yOffset:5},items:l})]})}var rS=function(e){return Object.assign(Object.assign({},YO("insertColumnLeft")),{key:"addColumnLeft",type:"button",onClick:function(){var t;return null===(t=e.current)||void 0===t?void 0:t.chain().focus().addColumnBefore().run()}})},oS=function(e){return Object.assign(Object.assign({},YO("insertColumnRight")),{key:"addColumnRight",type:"button",title:"Add column right",onClick:function(){var t;return null===(t=e.current)||void 0===t?void 0:t.chain().focus().addColumnAfter().run()},icon:"insertColumnRight"})},iS=function(e){return Object.assign(Object.assign({},YO("moveColumnLeft")),{key:"moveColumnLeft",type:"button",onClick:function(){return function(e){var t=e.state.tr,n=vO(e.state);if(0!==n.left){var r=IO(t,n,n.left,n.left-1);r&&e.view.dispatch(r)}}(e)}})},aS=function(e){return Object.assign(Object.assign({},YO("moveColumnRight")),{key:"moveColumnRight",type:"button",onClick:function(){return function(e){var t=e.state.tr,n=vO(e.state);if(n.right!==n.map.width){var r=IO(t,n,n.left,n.left+1);r&&e.view.dispatch(r)}}(e)}})},sS=function(e){return Object.assign(Object.assign({},YO("deleteColumn")),{key:"deleteColumn",type:"button",onClick:function(){var t;return null===(t=e.current)||void 0===t?void 0:t.chain().focus().deleteColumn().run()}})},lS=function(e){return Object.assign(Object.assign({},YO("splitCells")),{key:"splitCells",type:"button",onClick:function(){var t;return null===(t=e.current)||void 0===t?void 0:t.chain().focus().splitCell().run()}})},uS=function(e){return Object.assign(Object.assign({},YO("mergeCells")),{key:"mergeCells",type:"button",onClick:function(){var t;return null===(t=e.current)||void 0===t?void 0:t.chain().focus().mergeCells().run()}})},cS=function(e){return Object.assign(Object.assign({},YO("insertRowAbove")),{key:"insertRowAbove",type:"button",onClick:function(){var t;return null===(t=e.current)||void 0===t?void 0:t.chain().focus().addRowBefore().run()}})},dS=function(e){return Object.assign(Object.assign({},YO("insertRowBelow")),{key:"insertRowBelow",type:"button",onClick:function(){var t;return null===(t=e.current)||void 0===t?void 0:t.chain().focus().addRowAfter().run()}})},fS=function(e){return Object.assign(Object.assign({},YO("moveRowUp")),{key:"moveRowUp",type:"button",onClick:function(){return function(e){var t=e.state.tr,n=vO(e.state);if(0!==n.top){var r=qO(t,n,n.top,n.top-1);r&&e.view.dispatch(r)}}(e)}})},pS=function(e){return Object.assign(Object.assign({},YO("moveRowDown")),{key:"moveRowDown",type:"button",onClick:function(){return function(e){var t=e.state.tr,n=vO(e.state);if(n.top+1!==n.map.height){var r=qO(t,n,n.top,n.top+1);r&&e.view.dispatch(r)}}(e)}})},hS=function(e){return Object.assign(Object.assign({},YO("deleteRow")),{key:"deleteRow",type:"button",onClick:function(){var t;return null===(t=e.current)||void 0===t?void 0:t.chain().focus().deleteRow().run()}})},mS=function(e){return Object.assign(Object.assign({},YO("deleteTable")),{key:"deleteTable",type:"button",onClick:function(){var t;return null===(t=e.current)||void 0===t?void 0:t.chain().focus().deleteTable().run()}})},vS=function(e){return Object.assign(Object.assign({},YO("cellProperties")),{key:"cellProperties",type:"button",onClick:function(){Zb({popup:function(t){return Object(Cd.jsx)(eS,{onClose:t,editor:e})}})}})},gS=GO(rS),yS=GO(oS),bS=GO(iS),wS=GO(aS),kS=GO(sS),xS=GO(lS),OS=GO(uS),SS=GO(cS),CS=GO(dS),jS=GO(fS),DS=GO(pS),ES=GO(hS),AS=GO(mS);function MS(e){var t=e.height,n=e.width,r=e.float,o=e.editor,i=e.onClose,a=Object(jd.useCallback)((function(e,r){var i,a=e?{width:e,height:e*(t/n)}:r?{width:r*(n/t),height:r}:{width:0,height:0};null===(i=o.current)||void 0===i||i.chain().setImageSize(a).run()}),[n,t]);return Object(Cd.jsx)(sw,Object.assign({title:"Image properties",onClose:i},{children:Object(Cd.jsxs)(af.Flex,Object.assign({sx:{width:["auto",300],flexDirection:"column",p:1}},{children:[Object(Cd.jsx)(ow,{children:Object(Cd.jsxs)(jw,Object.assign({variant:"text.body",sx:{justifyContent:"space-between",alignItems:"center"}},{children:["Float image",Object(Cd.jsx)(Hw,{checked:r,onClick:function(){return o.chain().setImageAlignment({float:!r,align:"left"}).run()}})]}))}),Object(Cd.jsxs)(af.Flex,Object.assign({sx:{alignItems:"center",mt:2}},{children:[Object(Cd.jsx)(Yw,{label:"width",type:"number",value:n,containerProps:{sx:{mr:1}},onChange:function(e){return a(e.target.valueAsNumber)}}),Object(Cd.jsx)(Yw,{label:"height",type:"number",value:t,onChange:function(e){return a(void 0,e.target.valueAsNumber)}})]}))]}))}))}function TS(e){var t,n,r,o=e.link,i=e.isEditing,a=void 0!==i&&i,s=e.onDone,l=e.onClose,u=Ek(o);return Object(Cd.jsx)(sw,Object.assign({title:a?"Edit link":"Insert link",onClose:l,action:{title:a?"Save edits":"Insert link",onClick:function(){u.current&&s(u.current)}}},{children:Object(Cd.jsxs)(af.Flex,Object.assign({sx:{p:1,flexDirection:"column",width:["auto",250]}},{children:[!(null===(t=u.current)||void 0===t?void 0:t.isImage)&&Object(Cd.jsx)(Dw,{type:"text",placeholder:"Link text",value:null===(n=u.current)||void 0===n?void 0:n.text,sx:{mb:1},onChange:function(e){return u.current=Object.assign(Object.assign({},u.current),{text:e.target.value})}}),Object(Cd.jsx)(Dw,{type:"url",autoFocus:!0,placeholder:"https://example.com/",value:null===(r=u.current)||void 0===r?void 0:r.href,onChange:function(e){return u.current=Object.assign(Object.assign({},u.current),{href:e.target.value})}})]}))}))}var LS=n(26),NS=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function PS(e){var t=e.editor,n=Ek(e.selectedNode||Vk(t.state)),r=Object(jd.useCallback)((function(e){var r=e.href,o=e.text,i=(e.isImage,n.current),a=i.from,s=i.node,l=i.to;if(r&&t.current&&s){var u=Fk(s,"link");u&&t.current.chain().command((function(e){var t=e.tr;return t.removeMark(a,l,u.type),t.addMark(a,l,u.type.create({href:r})),t.insertText(o||s.textContent,a,l),Object(LS.setTextSelection)(t.mapping.map(a))(t),!0})).focus(void 0,{scrollIntoView:!0}).run()}}),[]);return Object(Cd.jsx)(RS,Object.assign({},e,{isEditing:!0,onDone:r,onClick:function(){var e=n.current.node;if(e){var t=e.textContent,r=Fk(e,"link");if(r)return{text:t,href:r.attrs.href,isImage:e.type.name===xC.name}}}}))}function RS(e){var t=e.isEditing,n=e.onClick,r=e.onDone,o=e.editor,a=NS(e,["isEditing","onClick","onDone","editor"]),s=Object(jd.useRef)(null),l=Object(jd.useState)(!1),u=Object(i.a)(l,2),c=u[0],d=u[1],f=Object(jd.useState)(),p=Object(i.a)(f,2),h=p[0],m=p[1];return Object(Cd.jsxs)(Cd.Fragment,{children:[Object(Cd.jsx)(wf,Object.assign({},a,{buttonRef:s,onClick:function(){var e=n();e&&(m(e),d(!0))},toggled:c})),Object(Cd.jsx)(aw,Object.assign({mobile:"sheet",desktop:"menu",position:{target:s.current||void 0,isTargetAbsolute:!0,location:"below",align:"center",yOffset:5},title:t?"Edit link":"Insert link",isOpen:c,items:[],onClose:function(){var e;d(!1),null===(e=o.current)||void 0===e||e.commands.focus()},focusOnRender:!1},{children:Object(Cd.jsx)(TS,{link:h,isEditing:t,onClose:function(){return d(!1)},onDone:function(e){r(e),d(!1)}})}))]})}var HS={bold:function(e){var t=e.editor;return Object(Cd.jsx)(wf,Object.assign({},e,{toggled:t.isActive("bold"),onClick:function(){var e;return null===(e=t.current)||void 0===e?void 0:e.chain().focus().toggleBold().run()}}))},italic:function(e){var t=e.editor;return Object(Cd.jsx)(wf,Object.assign({},e,{toggled:t.isActive("italic"),onClick:function(){var e;return null===(e=t.current)||void 0===e?void 0:e.chain().focus().toggleItalic().run()}}))},underline:function(e){var t=e.editor;return Object(Cd.jsx)(wf,Object.assign({},e,{toggled:t.isActive("underline"),onClick:function(){var e;return null===(e=t.current)||void 0===e?void 0:e.chain().focus().toggleUnderline().run()}}))},strikethrough:function(e){var t=e.editor;return Object(Cd.jsx)(wf,Object.assign({},e,{toggled:t.isActive("strike"),onClick:function(){var e;return null===(e=t.current)||void 0===e?void 0:e.chain().focus().toggleStrike().run()}}))},code:function(e){var t=e.editor;return Object(Cd.jsx)(wf,Object.assign({},e,{toggled:t.isActive("code"),onClick:function(){var e;return null===(e=t.current)||void 0===e?void 0:e.chain().focus().toggleCode().run()}}))},codeRemove:function(e){var t=e.editor,n="bottom"===Hd();return t.isActive("code")&&n?Object(Cd.jsx)(wf,Object.assign({},e,{toggled:!1,onClick:function(){var e;return null===(e=t.current)||void 0===e?void 0:e.chain().focus().unsetMark("code").run()}})):null},subscript:function(e){var t=e.editor;return Object(Cd.jsx)(wf,Object.assign({},e,{toggled:t.isActive("subscript"),onClick:function(){var e;return null===(e=t.current)||void 0===e?void 0:e.chain().focus().toggleSubscript().run()}}))},superscript:function(e){var t=e.editor;return Object(Cd.jsx)(wf,Object.assign({},e,{toggled:t.isActive("superscript"),onClick:function(){var e;return null===(e=t.current)||void 0===e?void 0:e.chain().focus().toggleSuperscript().run()}}))},clearformatting:function(e){var t=e.editor;return Object(Cd.jsx)(wf,Object.assign({},e,{toggled:!1,onClick:function(){var e;return null===(e=t.current)||void 0===e?void 0:e.chain().focus().clearNodes().unsetAllMarks().unsetMark("link").run()}}))},addLink:function(e){var t=e.editor,n=e.editor.isActive("link"),r=Object(jd.useCallback)((function(e){var n,r,o=e.href,i=e.text,a=e.isImage;if(o){var s=null===(n=t.current)||void 0===n?void 0:n.chain().focus();if(s){var l=!(null===(r=t.current)||void 0===r?void 0:r.state.selection.empty);s=s.extendMarkRange("link").toggleLink({href:o,target:"_blank"}),a||(s=s.insertContent(i||o)),s=s.focus(),l||a||(s=s.unsetMark("link").insertContent(" ")),s.run()}}}),[]);return n?Object(Cd.jsx)(PS,Object.assign({},e,{icon:"linkEdit"})):Object(Cd.jsx)(RS,Object.assign({},e,{onDone:r,onClick:function(){var e;if(t.current){var n=t.current.state,r=n.selection,o=r.from,i=r.to,a=(null===(e=n.doc.nodeAt(o))||void 0===e?void 0:e.type.name)===xC.name;return a?{isImage:a}:{text:n.doc.textBetween(o,i)}}}}))},editLink:PS,removeLink:function(e){var t=e.editor,n=e.selectedNode;return Object(Cd.jsx)(wf,Object.assign({},e,{toggled:!1,onClick:function(){var e,r;n&&(null===(e=t.current)||void 0===e||e.commands.setTextSelection({from:n.from,to:n.to})),null===(r=t.current)||void 0===r||r.chain().focus().unsetLink().run()}}))},linkSettings:function(e){var t=e.editor,n="bottom"===Hd();return t.isActive("link")&&n?Object(Cd.jsx)(KO,Object.assign({},e,{autoCloseOnUnmount:!0,popupId:"linkSettings",tools:["openLink","editLink","removeLink"]})):null},openLink:function(e){var t=e.editor,n=Ek(e.selectedNode||Vk(t.state)).current.node,r=n?Fk(n,"link"):null;if(!r)return null;var o=null===r||void 0===r?void 0:r.attrs.href;return Object(Cd.jsxs)(af.Flex,Object.assign({sx:{alignItems:"center"}},{children:[Object(Cd.jsx)(lf,Object.assign({as:"a",href:o,target:"_blank",variant:"body",sx:{mr:1}},{children:o})),Object(Cd.jsx)(wf,Object.assign({},e,{toggled:!1,onClick:function(){return window.open(o,"_blank")}}))]}))},insertBlock:function(e){var t=e.editor,n=Object(jd.useRef)(null),r=Object(jd.useState)(!1),o=Object(i.a)(r,2),a=o[0],s=o[1],l=Hd(),u=Fd(),c=Object(jd.useMemo)((function(){return[xk(t),Ok(t),pk(t),hk(t),vk(t),mk(t),gk(t,u),kk(t),u?bk(t):wk(t),yk(t)]}),[u]);return Object(Cd.jsxs)(Cd.Fragment,{children:[Object(Cd.jsx)(yf,Object.assign({ref:n,sx:{p:1,m:0,bg:a?"hover":"transparent",mr:1,display:"flex",alignItems:"center",":hover":{bg:"hover"},":last-of-type":{mr:0}},onMouseDown:function(e){return e.preventDefault()},onClick:function(){return s((function(e){return!e}))}},{children:Object(Cd.jsx)(mf,{path:vf.plus,size:18,color:"primary"})})),Object(Cd.jsx)(aw,{desktop:"menu",mobile:"sheet",title:"Choose a block to insert",isOpen:a,items:c,onClose:function(){return s(!1)},position:{target:n.current||void 0,isTargetAbsolute:!0,location:"bottom"===l?"top":"below",yOffset:5}})]})},numberedList:function(e){var t=e.editor,n=Object(jd.useCallback)((function(){var e;return null===(e=t.current)||void 0===e?void 0:e.chain().focus().toggleOrderedList().run()}),[]);return Object(Cd.jsx)(_k,Object.assign({},e,{type:"orderedList",isActive:t.isActive("orderedList"),onClick:n,subTypes:[{type:"decimal",title:"Decimal",items:["1","2","3"]},{type:"upper-alpha",title:"Upper alpha",items:["A","B","C"]},{type:"lower-alpha",title:"Lower alpha",items:["a","b","c"]},{type:"upper-roman",title:"Upper Roman",items:["I","II","III"]},{type:"lower-roman",title:"Lower Roman",items:["i","ii","iii"]},{type:"lower-greek",title:"Lower Greek",items:["\u03b1","\u03b2","\u03b3"]}]}))},bulletList:function(e){var t=e.editor,n=Object(jd.useCallback)((function(){var e;return null===(e=t.current)||void 0===e?void 0:e.chain().focus().toggleBulletList().run()}),[]);return Object(Cd.jsx)(_k,Object.assign({},e,{type:"bulletList",onClick:n,isActive:t.isActive("bulletList"),subTypes:[{type:"disc",title:"Decimal",items:["1","2","3"]},{type:"circle",title:"Upper alpha",items:["A","B","C"]},{type:"square",title:"Lower alpha",items:["a","b","c"]}]}))},fontSize:function(e){var t=e.editor,n=t.getAttributes("textStyle").fontSize||"16px",r=Ek(parseInt(n.replace("px",""))),o=Object(jd.useCallback)((function(){return Math.max(8,r.current-1)}),[]),i=Object(jd.useCallback)((function(){return Math.min(120,r.current+1)}),[]);return Object(Cd.jsx)(Dk,{title:"font size",onDecrease:function(){var e;return null===(e=t.current)||void 0===e?void 0:e.chain().focus().setFontSize("".concat(o(),"px")).run()},onIncrease:function(){var e;null===(e=t.current)||void 0===e||e.chain().focus().setFontSize("".concat(i(),"px")).run()},onReset:function(){var e;return null===(e=t.current)||void 0===e?void 0:e.chain().focus().setFontSize("16px").run()},value:n})},fontFamily:function(e){var t,n,r=e.editor,o=(null===(n=null===(t=Object.entries(Ak).find((function(e){var t=Object(i.a)(e,2),n=(t[0],t[1]);return r.isActive("textStyle",{fontFamily:n})})))||void 0===t?void 0:t.map((function(e){return e})))||void 0===n?void 0:n.at(0))||"Sans-serif",a=Object(jd.useMemo)((function(){return function(e,t){var n=[],r=function(r){var o=Ak[r];n.push({key:r,type:"button",title:r,isChecked:r===t,onClick:function(){var t;return null===(t=e.current)||void 0===t?void 0:t.chain().focus().setFontFamily(o).run()},styles:{fontFamily:o}})};for(var o in Ak)r(o);return n}(r,o)}),[o]);return Object(Cd.jsx)(jk,{id:"fontFamily",group:"font",selectedItem:o,items:a,menuWidth:130})},headings:function(e){var t=e.editor,n=Hd(),r=Lk.find((function(e){return t.isActive("heading",{level:e})})),i=Object(jd.useMemo)((function(){return function(e,t,n){var r=Lk.map((function(r){return{type:"button",key:"heading-".concat(r),title:"bottom"===t?"H".concat(r):"Heading ".concat(r),isChecked:r===n,onClick:function(){var t;return null===(t=e.current)||void 0===t?void 0:t.chain().focus().updateAttributes("textStyle",{fontSize:null,fontStyle:null}).setHeading({level:r}).run()}}}));return[{key:"paragraph",type:"button",title:"Paragraph",isChecked:!n,onClick:function(){var t;return null===(t=e.current)||void 0===t?void 0:t.chain().focus().setParagraph().run()}}].concat(Object(o.a)(r))}(t,n,r)}),[r]);return Object(Cd.jsx)(jk,{id:"headings",group:"headings",selectedItem:r?"Heading ".concat(r):"Paragraph",items:i,menuWidth:130})},alignment:function(e){var t=e.editor,n=Object.assign(Object.assign({},t.getAttributes("paragraph")),t.getAttributes("heading")).textAlign,r="left"===n?"center":"center"===n?"right":"right"===n?"justify":"left",o="center"===n?"alignCenter":"justify"===n?"alignJustify":"right"===n?"alignRight":"alignLeft";return Object(Cd.jsx)(Tk,Object.assign({alignment:r},e,{icon:o}))},textDirection:function(e){var t=e.editor,n=Object.assign(Object.assign({},t.getAttributes("paragraph")),t.getAttributes("heading")).textDirection,r="ltr"===n?"rtl":"ltr",o="ltr"===n?"ltr":"rtl";return Object(Cd.jsx)(qk,Object.assign({direction:r},e,{icon:o}))},textColor:function(e){var t=e.editor;return Object(Cd.jsx)(Ax,Object.assign({},e,{cacheKey:"textColor",activeColor:t.getAttributes("textStyle").color,title:"Text color",onColorChange:function(e){var n,r;return e?null===(n=t.current)||void 0===n?void 0:n.chain().focus().setColor(e).run():null===(r=t.current)||void 0===r?void 0:r.chain().focus().unsetColor().run()}}))},highlight:function(e){var t=e.editor;return Object(Cd.jsx)(Ax,Object.assign({},e,{cacheKey:"highlight",activeColor:t.getAttributes("textStyle").backgroundColor,title:"Background color",onColorChange:function(e){var n,r;return e?null===(n=t.current)||void 0===n?void 0:n.chain().focus().setHighlight(e).run():null===(r=t.current)||void 0===r?void 0:r.chain().focus().unsetHighlight().run()}}))},math:function(e){var t=e.editor;return Object(Cd.jsx)(wf,Object.assign({},e,{toggled:!1,onClick:function(){var e;return null===(e=t.current)||void 0===e?void 0:e.chain().focus().insertMathInline().run()}}))},imageSettings:function(e){var t,n,r=e.editor,o="bottom"===Hd();return r.isActive("image")&&o?Object(Cd.jsx)(KO,Object.assign({},e,{autoCloseOnUnmount:!0,popupId:"imageSettings",tools:(null===(n=null===(t=Hk(r,"image"))||void 0===t?void 0:t.attrs)||void 0===n?void 0:n.float)?["imageAlignLeft","imageAlignRight","imageProperties"]:["imageAlignLeft","imageAlignCenter","imageAlignRight","imageProperties"]})):null},imageAlignCenter:function(e){var t=e.editor;return Object(Cd.jsx)(wf,Object.assign({},e,{toggled:!1,onClick:function(){var e;return null===(e=t.current)||void 0===e?void 0:e.chain().focus().setImageAlignment({align:"center"}).run()}}))},imageAlignLeft:function(e){var t=e.editor;return Object(Cd.jsx)(wf,Object.assign({},e,{toggled:!1,onClick:function(){var e;return null===(e=t.current)||void 0===e?void 0:e.chain().focus().setImageAlignment({align:"left"}).run()}}))},imageAlignRight:function(e){var t=e.editor;return Object(Cd.jsx)(wf,Object.assign({},e,{toggled:!1,onClick:function(){var e;return null===(e=t.current)||void 0===e?void 0:e.chain().focus().setImageAlignment({align:"right"}).run()}}))},imageProperties:function(e){var t=e.editor,n=Object(jd.useState)(!1),r=Object(i.a)(n,2),o=r[0],a=r[1],s=Object(jd.useRef)(),l=Hk(t,"image"),u=(null===l||void 0===l?void 0:l.attrs)||{},c=u.float,d=u.align,f=u.width,p=u.height;return Object(Cd.jsxs)(Cd.Fragment,{children:[Object(Cd.jsx)(wf,Object.assign({buttonRef:s,toggled:o},e,{onClick:function(){return a((function(e){return!e}))}})),Object(Cd.jsx)(aw,Object.assign({isOpen:o,desktop:"menu",mobile:"sheet",onClose:function(){return a(!1)},blocking:!0,focusOnRender:!1,position:{target:s.current||"mouse",align:"start",location:"below",yOffset:10,isTargetAbsolute:!0}},{children:Object(Cd.jsx)(MS,{editor:t,height:p,width:f,align:d,float:c,onClose:function(){return a(!1)}})}))]})},embedAlignCenter:function(e){var t=e.editor;return Object(Cd.jsx)(wf,Object.assign({},e,{toggled:!1,onClick:function(){var e;return null===(e=t.current)||void 0===e?void 0:e.chain().focus().setEmbedAlignment({align:"center"}).run()}}))},embedAlignLeft:function(e){var t=e.editor;return Object(Cd.jsx)(wf,Object.assign({},e,{toggled:!1,onClick:function(){var e;return null===(e=t.current)||void 0===e?void 0:e.chain().focus().setEmbedAlignment({align:"left"}).run()}}))},embedAlignRight:function(e){var t=e.editor;return Object(Cd.jsx)(wf,Object.assign({},e,{toggled:!1,onClick:function(){var e;return null===(e=t.current)||void 0===e?void 0:e.chain().focus().setEmbedAlignment({align:"right"}).run()}}))},embedProperties:function(e){var t=e.editor,n=Object(jd.useState)(!1),r=Object(i.a)(n,2),o=r[0],a=r[1],s=Object(jd.useRef)(),l=Object(jd.useMemo)((function(){return Hk(t,"embed")}),[]),u=(null===l||void 0===l?void 0:l.attrs)||{};return Object(Cd.jsxs)(Cd.Fragment,{children:[Object(Cd.jsx)(wf,Object.assign({buttonRef:s,toggled:o},e,{onClick:function(){return a((function(e){return!e}))}})),Object(Cd.jsx)(aw,Object.assign({isOpen:o,desktop:"menu",mobile:"sheet",onClose:function(){return a(!1)},blocking:!0,focusOnRender:!1,position:{target:s.current||"mouse",align:"start",location:"below",yOffset:10,isTargetAbsolute:!0}},{children:Object(Cd.jsx)(Qw,{title:"Embed properties",onClose:function(e){var n,r;e?e.src!==u.src&&(null===(r=t.current)||void 0===r||r.commands.setEmbedSource(e.src)):null===(n=t.current)||void 0===n||n.commands.setEmbedSize(u),a(!1)},embed:u,onSizeChanged:function(e){var n;return null===(n=t.current)||void 0===n?void 0:n.commands.setEmbedSize(e)}})}))]})},embedSettings:function(e){var t=e.editor,n="bottom"===Hd();return t.isActive("embed")&&n?Object(Cd.jsx)(KO,Object.assign({},e,{autoCloseOnUnmount:!0,popupId:"embedSettings",tools:[]})):null},attachmentSettings:function(e){var t=e.editor,n="bottom"===Hd();return t.isActive("attachment")&&n?Object(Cd.jsx)(KO,Object.assign({},e,{autoCloseOnUnmount:!0,popupId:"attachmentSettings",tools:["downloadAttachment","removeAttachment"]})):null},downloadAttachment:function(e){var t=e.editor;return Object(Cd.jsx)(wf,Object.assign({},e,{toggled:!1,onClick:function(){var e,n=Hk(t,"attachment"),r=(null===n||void 0===n?void 0:n.attrs)||{};null===(e=t.current)||void 0===e||e.chain().focus().downloadAttachment(r).run()}}))},removeAttachment:function(e){var t=e.editor;return Object(Cd.jsx)(wf,Object.assign({},e,{toggled:!1,onClick:function(){var e;return null===(e=t.current)||void 0===e?void 0:e.chain().focus().removeAttachment().run()}}))},tableSettings:function(e){var t=e.editor,n="bottom"===Hd();return t.isActive("table")&&n?Object(Cd.jsx)(KO,Object.assign({},e,{autoCloseOnUnmount:!0,popupId:"tableSettings",tools:["insertColumnLeft","insertColumnRight","insertRowAbove","insertRowBelow","cellProperties","columnProperties","rowProperties","deleteRow","deleteColumn","deleteTable"]})):null},columnProperties:function(e){var t=e.editor,n=Object(jd.useRef)(),r=Object(jd.useState)(!1),o=Object(i.a)(r,2),a=o[0],s=o[1],l=Object(jd.useMemo)((function(){return[rS(t),oS(t),iS(t),aS(t),sS(t)]}),[]);return Object(Cd.jsxs)(Cd.Fragment,{children:[Object(Cd.jsx)(wf,Object.assign({},e,{buttonRef:n,toggled:a,onClick:function(){return s(!0)}})),Object(Cd.jsx)(aw,{title:"Column properties",mobile:"sheet",desktop:"menu",isOpen:a,onClose:function(){return s(!1)},position:{target:n.current,isTargetAbsolute:!0,location:"below",yOffset:5},items:l})]})},rowProperties:tS,cellProperties:function(e){return Object(Cd.jsx)(Cd.Fragment,{children:Object(Cd.jsx)(KO,Object.assign({},e,{popupId:"cellProperties",tools:["mergeCells","splitCells","cellBackgroundColor","cellTextColor","cellBorderColor","cellBorderWidth"]}))})},insertColumnLeft:gS,insertColumnRight:yS,moveColumnLeft:bS,moveColumnRight:wS,deleteColumn:kS,splitCells:xS,mergeCells:OS,cellBackgroundColor:function(e){var t,n=e.editor;return Object(Cd.jsx)(Ax,Object.assign({},e,{cacheKey:"cellBackgroundColor",activeColor:null===(t=n.current)||void 0===t?void 0:t.getAttributes("tableCell").backgroundColor,title:"Cell background color",onColorChange:function(e){var t;return null===(t=n.current)||void 0===t?void 0:t.chain().setCellAttribute("backgroundColor",e).run()}}))},cellBorderColor:function(e){var t,n=e.editor;return Object(Cd.jsx)(Ax,Object.assign({},e,{cacheKey:"cellBorderColor",activeColor:null===(t=n.current)||void 0===t?void 0:t.getAttributes("tableCell").borderColor,title:"Cell border color",onColorChange:function(e){var t;return null===(t=n.current)||void 0===t?void 0:t.chain().focus().setCellAttribute("borderColor",e).run()}}))},cellTextColor:function(e){var t,n=e.editor;return Object(Cd.jsx)(Ax,Object.assign({},e,{cacheKey:"cellTextColor",activeColor:null===(t=n.current)||void 0===t?void 0:t.getAttributes("tableCell").color,title:"Cell text color",onColorChange:function(e){var t;return null===(t=n.current)||void 0===t?void 0:t.chain().focus().setCellAttribute("color",e).run()}}))},cellBorderWidth:function(e){var t=e.editor,n=t.getAttributes("tableCell").borderWidth,r=n||1,o=Object(jd.useCallback)((function(){return Math.max(1,r-1)}),[r]),i=Object(jd.useCallback)((function(){return Math.min(10,r+1)}),[r]);return Object(Cd.jsxs)(af.Flex,Object.assign({sx:{justifyContent:"center",alignItems:"center"}},{children:[Object(Cd.jsx)(lf,Object.assign({variant:"subBody",sx:{mx:1}},{children:"Border width:"})),Object(Cd.jsx)(Dk,{title:"cell border width",onDecrease:function(){var e;return null===(e=t.current)||void 0===e?void 0:e.commands.setCellAttribute("borderWidth",o())},onIncrease:function(){var e;return null===(e=t.current)||void 0===e?void 0:e.commands.setCellAttribute("borderWidth",i())},onReset:function(){var e;return null===(e=t.current)||void 0===e?void 0:e.commands.setCellAttribute("borderWidth",1)},value:r+"px"})]}))},insertRowAbove:SS,insertRowBelow:CS,moveRowUp:jS,moveRowDown:DS,deleteRow:ES,deleteTable:AS,outdent:function(e){var t=e.editor,n=Bk(e,["editor"]),r="bottom"===Hd(),o=zk(t);return o&&r?Object(Cd.jsx)(wf,Object.assign({},n,{toggled:!1,onClick:function(){var e;return null===(e=t.current)||void 0===e?void 0:e.chain().focus().liftListItem(o).run()}})):null},indent:function(e){var t=e.editor,n=Bk(e,["editor"]),r="bottom"===Hd(),o=zk(t);return o&&r?Object(Cd.jsx)(wf,Object.assign({},n,{toggled:!1,onClick:function(){var e;return null===(e=t.current)||void 0===e?void 0:e.chain().focus().sinkListItem(o).run()}})):null}};var FS=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};function VS(e){var t=e.tools,n=e.editor,r=e.force,o=e.selectedNode,i=FS(e,["tools","editor","force","selectedNode"]);return Object(Cd.jsx)(af.Flex,Object.assign({className:"toolbar-group"},i,{children:t.map((function(e){if(Array.isArray(e))return Object(Cd.jsx)(KO,{title:"More",icon:"more",popupId:e.join(""),tools:e,editor:n},"more-tools");var t=HS[e],i=YO(e);return Object(Cd.jsx)(t,Object.assign({editor:n,force:r,selectedNode:o},i),i.title)}))}))}function zS(e){var t=e.editor,n=e.node,r=e.selected,o=n.attrs,i=(o.hash,o.filename),a=o.size,s=o.progress,l=Object(jd.useRef)();return Object(Cd.jsx)(Cd.Fragment,{children:Object(Cd.jsxs)(af.Box,Object.assign({ref:l,as:"span",contentEditable:!1,variant:"body",sx:{display:"inline-flex",position:"relative",justifyContent:"center",userSelect:"none",alignItems:"center",backgroundColor:"bgSecondary",px:1,borderRadius:"default",border:"1px solid var(--border)",cursor:"pointer",maxWidth:250,borderColor:r?"primary":"border",":hover":{bg:"hover"}},title:i},{children:[Object(Cd.jsx)(mf,{path:vf.attachment,size:14}),Object(Cd.jsx)(lf,Object.assign({as:"span",sx:{ml:"small",fontSize:"body",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden"}},{children:i})),Object(Cd.jsx)(lf,Object.assign({as:"span",sx:{ml:1,fontSize:"0.65rem",color:"fontTertiary",flexShrink:0}},{children:s?"".concat(s,"%"):BS(a)})),Object(Cd.jsx)(ow,{children:r&&Object(Cd.jsx)(VS,{editor:t,tools:["removeAttachment","downloadAttachment"],sx:{boxShadow:"menu",borderRadius:"default",bg:"background",position:"absolute",top:-35}})})]}))})}function BS(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(0===e)return"0B";var n=1024,r=t<0?0:t,o=["B","K","M","G","T","P","E","Z","Y"],i=Math.floor(Math.log(e)/Math.log(n));return parseFloat((e/Math.pow(n,i)).toFixed(r))+o[i]}var _S=Bo.create({name:"attachment",content:"inline*",marks:"",inline:!0,atom:!0,addOptions:function(){return{HTMLAttributes:{},onDownloadAttachment:function(){return!1},onOpenAttachmentPicker:function(){return!1}}},group:function(){return"inline"},draggable:!0,addAttributes:function(){return{progress:{default:0,rendered:!1},hash:IS("hash"),filename:IS("filename"),type:IS("mime"),size:IS("size")}},parseHTML:function(){return[{tag:"span[data-hash]"}]},renderHTML:function(e){var t=e.HTMLAttributes;return["span",Sr(this.options.HTMLAttributes,t)]},addNodeView:function(){return nf(zS,{shouldUpdate:function(e,t){var n=e.attrs,r=t.attrs;return n.progress!==r.progress}})},addCommands:function(){var e=this;return{insertAttachment:function(t){return function(n){return n.commands.insertContent({type:e.name,attrs:t})}},removeAttachment:function(){return function(e){var t=e.commands;e.tr;return t.deleteSelection()}},downloadAttachment:function(t){return function(n){var r=n.editor;return e.options.onDownloadAttachment(r,t)}},openAttachmentPicker:function(t){return function(n){var r=n.editor;return e.options.onOpenAttachmentPicker(r,t)}},setAttachmentProgress:function(t){return function(n){var r,o=n.state,i=n.tr,a=n.dispatch,s=t.hash,l=t.progress,u=(t.type,To(o.doc,(function(t){return(t.type.name===e.name||"image"===t.type.name)&&t.attrs.hash===s}))),c=Object(Sd.a)(u);try{for(c.s();!(r=c.n()).done;){var d=r.value;i.setNodeMarkup(d.pos,d.node.type,Object.assign(Object.assign({},d.node.attrs),{progress:100===l?null:l}))}}catch(f){c.e(f)}finally{c.f()}return i.setMeta("preventUpdate",!0),i.setMeta("addToHistory",!1),a&&a(i),!0}}}}});function IS(e,t){return{default:t,parseHTML:function(t){return t.dataset[e]},renderHTML:function(t){return t[e]?Object(u.a)({},"data-".concat(e),t[e]):{}}}}var $S=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),qS=function(){return qS=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},qS.apply(this,arguments)},WS={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},US={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},KS={width:"20px",height:"20px",position:"absolute"},GS={top:qS(qS({},WS),{top:"-5px"}),right:qS(qS({},US),{left:void 0,right:"-5px"}),bottom:qS(qS({},WS),{top:void 0,bottom:"-5px"}),left:qS(qS({},US),{left:"-5px"}),topRight:qS(qS({},KS),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:qS(qS({},KS),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:qS(qS({},KS),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:qS(qS({},KS),{left:"-10px",top:"-10px",cursor:"nw-resize"})},JS=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onMouseDown=function(e){t.props.onResizeStart(e,t.props.direction)},t.onTouchStart=function(e){t.props.onResizeStart(e,t.props.direction)},t}return $S(t,e),t.prototype.render=function(){return jd.createElement("div",{className:this.props.className||"",style:qS(qS({position:"absolute",userSelect:"none"},GS[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},t}(jd.PureComponent),YS=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ZS=function(){return ZS=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ZS.apply(this,arguments)},XS={width:"auto",height:"auto"},QS=function(e,t,n){return Math.max(Math.min(e,n),t)},eC=function(e,t){return Math.round(e/t)*t},tC=function(e,t){return new RegExp(e,"i").test(t)},nC=function(e){return Boolean(e.touches&&e.touches.length)},rC=function(e,t,n){void 0===n&&(n=0);var r=t.reduce((function(n,r,o){return Math.abs(r-e)<Math.abs(t[n]-e)?o:n}),0),o=Math.abs(t[r]-e);return 0===n||o<n?t[r]:e},oC=function(e){return"auto"===(e=e.toString())||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:e+"px"},iC=function(e,t,n,r){if(e&&"string"===typeof e){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%"))return t*(Number(e.replace("%",""))/100);if(e.endsWith("vw"))return n*(Number(e.replace("vw",""))/100);if(e.endsWith("vh"))return r*(Number(e.replace("vh",""))/100)}return e},aC=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],sC="__resizable_base__",lC=function(e){function t(t){var n=e.call(this,t)||this;return n.ratio=1,n.resizable=null,n.parentLeft=0,n.parentTop=0,n.resizableLeft=0,n.resizableRight=0,n.resizableTop=0,n.resizableBottom=0,n.targetLeft=0,n.targetTop=0,n.appendBase=function(){if(!n.resizable||!n.window)return null;var e=n.parentNode;if(!e)return null;var t=n.window.document.createElement("div");return t.style.width="100%",t.style.height="100%",t.style.position="absolute",t.style.transform="scale(0, 0)",t.style.left="0",t.style.flex="0 0 100%",t.classList?t.classList.add(sC):t.className+=sC,e.appendChild(t),t},n.removeBase=function(e){var t=n.parentNode;t&&t.removeChild(e)},n.ref=function(e){e&&(n.resizable=e)},n.state={isResizing:!1,width:"undefined"===typeof(n.propsSize&&n.propsSize.width)?"auto":n.propsSize&&n.propsSize.width,height:"undefined"===typeof(n.propsSize&&n.propsSize.height)?"auto":n.propsSize&&n.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},n.onResizeStart=n.onResizeStart.bind(n),n.onMouseMove=n.onMouseMove.bind(n),n.onMouseUp=n.onMouseUp.bind(n),n}return YS(t,e),Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return this.resizable&&this.resizable.ownerDocument?this.resizable.ownerDocument.defaultView:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||XS},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var e=0,t=0;if(this.resizable&&this.window){var n=this.resizable.offsetWidth,r=this.resizable.offsetHeight,o=this.resizable.style.position;"relative"!==o&&(this.resizable.style.position="relative"),e="auto"!==this.resizable.style.width?this.resizable.offsetWidth:n,t="auto"!==this.resizable.style.height?this.resizable.offsetHeight:r,this.resizable.style.position=o}return{width:e,height:t}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var e=this,t=this.props.size,n=function(t){if("undefined"===typeof e.state[t]||"auto"===e.state[t])return"auto";if(e.propsSize&&e.propsSize[t]&&e.propsSize[t].toString().endsWith("%")){if(e.state[t].toString().endsWith("%"))return e.state[t].toString();var n=e.getParentSize();return Number(e.state[t].toString().replace("px",""))/n[t]*100+"%"}return oC(e.state[t])};return{width:t&&"undefined"!==typeof t.width&&!this.state.isResizing?oC(t.width):n("width"),height:t&&"undefined"!==typeof t.height&&!this.state.isResizing?oC(t.height):n("height")}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var e=this.appendBase();if(!e)return{width:0,height:0};var t=!1,n=this.parentNode.style.flexWrap;"wrap"!==n&&(t=!0,this.parentNode.style.flexWrap="wrap"),e.style.position="relative",e.style.minWidth="100%",e.style.minHeight="100%";var r={width:e.offsetWidth,height:e.offsetHeight};return t&&(this.parentNode.style.flexWrap=n),this.removeBase(e),r},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(this.resizable&&this.window){var e=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==e.flexBasis?e.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(e,t){var n=this.propsSize&&this.propsSize[t];return"auto"!==this.state[t]||this.state.original[t]!==e||"undefined"!==typeof n&&"auto"!==n?e:"auto"},t.prototype.calculateNewMaxFromBoundary=function(e,t){var n,r,o=this.props.boundsByDirection,i=this.state.direction,a=o&&tC("left",i),s=o&&tC("top",i);if("parent"===this.props.bounds){var l=this.parentNode;l&&(n=a?this.resizableRight-this.parentLeft:l.offsetWidth+(this.parentLeft-this.resizableLeft),r=s?this.resizableBottom-this.parentTop:l.offsetHeight+(this.parentTop-this.resizableTop))}else"window"===this.props.bounds?this.window&&(n=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,r=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(n=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),r=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return n&&Number.isFinite(n)&&(e=e&&e<n?e:n),r&&Number.isFinite(r)&&(t=t&&t<r?t:r),{maxWidth:e,maxHeight:t}},t.prototype.calculateNewSizeFromDirection=function(e,t){var n=this.props.scale||1,r=this.props.resizeRatio||1,o=this.state,i=o.direction,a=o.original,s=this.props,l=s.lockAspectRatio,u=s.lockAspectRatioExtraHeight,c=s.lockAspectRatioExtraWidth,d=a.width,f=a.height,p=u||0,h=c||0;return tC("right",i)&&(d=a.width+(e-a.x)*r/n,l&&(f=(d-h)/this.ratio+p)),tC("left",i)&&(d=a.width-(e-a.x)*r/n,l&&(f=(d-h)/this.ratio+p)),tC("bottom",i)&&(f=a.height+(t-a.y)*r/n,l&&(d=(f-p)*this.ratio+h)),tC("top",i)&&(f=a.height-(t-a.y)*r/n,l&&(d=(f-p)*this.ratio+h)),{newWidth:d,newHeight:f}},t.prototype.calculateNewSizeFromAspectRatio=function(e,t,n,r){var o=this.props,i=o.lockAspectRatio,a=o.lockAspectRatioExtraHeight,s=o.lockAspectRatioExtraWidth,l="undefined"===typeof r.width?10:r.width,u="undefined"===typeof n.width||n.width<0?e:n.width,c="undefined"===typeof r.height?10:r.height,d="undefined"===typeof n.height||n.height<0?t:n.height,f=a||0,p=s||0;if(i){var h=(c-f)*this.ratio+p,m=(d-f)*this.ratio+p,v=(l-p)/this.ratio+f,g=(u-p)/this.ratio+f,y=Math.max(l,h),b=Math.min(u,m),w=Math.max(c,v),k=Math.min(d,g);e=QS(e,y,b),t=QS(t,w,k)}else e=QS(e,l,u),t=QS(t,c,d);return{newWidth:e,newHeight:t}},t.prototype.setBoundingClientRect=function(){if("parent"===this.props.bounds){var e=this.parentNode;if(e){var t=e.getBoundingClientRect();this.parentLeft=t.left,this.parentTop=t.top}}if(this.props.bounds&&"string"!==typeof this.props.bounds){var n=this.props.bounds.getBoundingClientRect();this.targetLeft=n.left,this.targetTop=n.top}if(this.resizable){var r=this.resizable.getBoundingClientRect(),o=r.left,i=r.top,a=r.right,s=r.bottom;this.resizableLeft=o,this.resizableRight=a,this.resizableTop=i,this.resizableBottom=s}},t.prototype.onResizeStart=function(e,t){if(this.resizable&&this.window){var n,r=0,o=0;if(e.nativeEvent&&function(e){return Boolean((e.clientX||0===e.clientX)&&(e.clientY||0===e.clientY))}(e.nativeEvent)?(r=e.nativeEvent.clientX,o=e.nativeEvent.clientY):e.nativeEvent&&nC(e.nativeEvent)&&(r=e.nativeEvent.touches[0].clientX,o=e.nativeEvent.touches[0].clientY),this.props.onResizeStart)if(this.resizable)if(!1===this.props.onResizeStart(e,t,this.resizable))return;this.props.size&&("undefined"!==typeof this.props.size.height&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),"undefined"!==typeof this.props.size.width&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio="number"===typeof this.props.lockAspectRatio?this.props.lockAspectRatio:this.size.width/this.size.height;var i=this.window.getComputedStyle(this.resizable);if("auto"!==i.flexBasis){var a=this.parentNode;if(a){var s=this.window.getComputedStyle(a).flexDirection;this.flexDir=s.startsWith("row")?"row":"column",n=i.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var l={original:{x:r,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:ZS(ZS({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(e.target).cursor||"auto"}),direction:t,flexBasis:n};this.setState(l)}},t.prototype.onMouseMove=function(e){var t=this;if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&nC(e))try{e.preventDefault(),e.stopPropagation()}catch(j){}var n=this.props,r=n.maxWidth,o=n.maxHeight,i=n.minWidth,a=n.minHeight,s=nC(e)?e.touches[0].clientX:e.clientX,l=nC(e)?e.touches[0].clientY:e.clientY,u=this.state,c=u.direction,d=u.original,f=u.width,p=u.height,h=this.getParentSize(),m=function(e,t,n,r,o,i,a){return r=iC(r,e.width,t,n),o=iC(o,e.height,t,n),i=iC(i,e.width,t,n),a=iC(a,e.height,t,n),{maxWidth:"undefined"===typeof r?void 0:Number(r),maxHeight:"undefined"===typeof o?void 0:Number(o),minWidth:"undefined"===typeof i?void 0:Number(i),minHeight:"undefined"===typeof a?void 0:Number(a)}}(h,this.window.innerWidth,this.window.innerHeight,r,o,i,a);r=m.maxWidth,o=m.maxHeight,i=m.minWidth,a=m.minHeight;var v=this.calculateNewSizeFromDirection(s,l),g=v.newHeight,y=v.newWidth,b=this.calculateNewMaxFromBoundary(r,o);this.props.snap&&this.props.snap.x&&(y=rC(y,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(g=rC(g,this.props.snap.y,this.props.snapGap));var w=this.calculateNewSizeFromAspectRatio(y,g,{width:b.maxWidth,height:b.maxHeight},{width:i,height:a});if(y=w.newWidth,g=w.newHeight,this.props.grid){var k=eC(y,this.props.grid[0]),x=eC(g,this.props.grid[1]),O=this.props.snapGap||0;y=0===O||Math.abs(k-y)<=O?k:y,g=0===O||Math.abs(x-g)<=O?x:g}var S={width:y-d.width,height:g-d.height};if(f&&"string"===typeof f)if(f.endsWith("%"))y=y/h.width*100+"%";else if(f.endsWith("vw")){y=y/this.window.innerWidth*100+"vw"}else if(f.endsWith("vh")){y=y/this.window.innerHeight*100+"vh"}if(p&&"string"===typeof p)if(p.endsWith("%"))g=g/h.height*100+"%";else if(p.endsWith("vw")){g=g/this.window.innerWidth*100+"vw"}else if(p.endsWith("vh")){g=g/this.window.innerHeight*100+"vh"}var C={width:this.createSizeForCssProperty(y,"width"),height:this.createSizeForCssProperty(g,"height")};"row"===this.flexDir?C.flexBasis=C.width:"column"===this.flexDir&&(C.flexBasis=C.height),Object($d.flushSync)((function(){t.setState(C)})),this.props.onResize&&this.props.onResize(e,c,this.resizable,S)}},t.prototype.onMouseUp=function(e){var t=this.state,n=t.isResizing,r=t.direction,o=t.original;if(n&&this.resizable){var i={width:this.size.width-o.width,height:this.size.height-o.height};this.props.onResizeStop&&this.props.onResizeStop(e,r,this.resizable,i),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:ZS(ZS({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(e){this.setState({width:e.width,height:e.height})},t.prototype.renderResizer=function(){var e=this,t=this.props,n=t.enable,r=t.handleStyles,o=t.handleClasses,i=t.handleWrapperStyle,a=t.handleWrapperClass,s=t.handleComponent;if(!n)return null;var l=Object.keys(n).map((function(t){return!1!==n[t]?jd.createElement(JS,{key:t,direction:t,onResizeStart:e.onResizeStart,replaceStyles:r&&r[t],className:o&&o[t]},s&&s[t]?s[t]:null):null}));return jd.createElement("div",{className:a,style:i},l)},t.prototype.render=function(){var e=this,t=Object.keys(this.props).reduce((function(t,n){return-1!==aC.indexOf(n)||(t[n]=e.props[n]),t}),{}),n=ZS(ZS(ZS({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(n.flexBasis=this.state.flexBasis);var r=this.props.as||"div";return jd.createElement(r,ZS({ref:this.ref,style:n,className:this.props.className},t),this.state.isResizing&&jd.createElement("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer())},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(jd.PureComponent);var uC=[{isActive:function(e){return!!e.closest("a")},popup:function(e){var t=e.editor,n=e.selectedNode,r=n.node;return!(null===r||void 0===r?void 0:r.isText)||r.marks.length<=0||!r.marks.some((function(e){return"link"===e.type.name}))?null:Object(Cd.jsx)(VS,{force:!0,tools:["openLink","editLink","removeLink"],editor:t,selectedNode:n,sx:{bg:"background",boxShadow:"menu",borderRadius:"default",p:1}})}}];function cC(e){var t=e.editor,n=Object(jd.useRef)(),r=Object(jd.useRef)();return Object(jd.useEffect)((function(){function e(e){if(e.target&&e.target instanceof HTMLElement&&!e.target.classList.contains("ProseMirror")){var o=e.target;if(r.current){var i=!o.closest(".ProseMirror"),a=o.closest(".popup-presenter-portal"),s=r.current.element===o;if(a)return;if(i||!s)return r.current.hide(),void(r.current=void 0)}clearTimeout(n.current),n.current=setTimeout((function(){var e=uC.find((function(e){return e.isActive(o)}));if(e&&t.current){var n=e.popup,i=t.current.view.posAtDOM(o,0),a=t.current.view.state.doc.nodeAt(i);if(a){var s=Zb({popup:function(){return Object(Cd.jsx)(n,{editor:t,selectedNode:{node:a,from:i,to:i+a.nodeSize}})},blocking:!1,focusOnRender:!1,position:{target:o,align:"center",location:"top",isTargetAbsolute:!0}});r.current={element:o,hide:s}}}}),500,{})}}return window.addEventListener("mouseover",e),function(){window.removeEventListener("mouseover",e)}}),[]),null}function dC(e){var t=e.editor,n=t.storage.searchreplace,r=n.selectedText,o=n.results,a=n.selectedIndex,s=Object(jd.useState)(!1),l=Object(i.a)(s,2),u=l[0],c=l[1],d=Object(jd.useState)(!1),f=Object(i.a)(d,2),p=f[0],h=f[1],m=Object(jd.useState)(!1),v=Object(i.a)(m,2),g=v[0],y=v[1],b=Object(jd.useState)(!1),w=Object(i.a)(b,2),k=w[0],x=w[1],O=Object(jd.useState)(!1),S=Object(i.a)(O,2),C=S[0],j=S[1],D=Object(jd.useRef)(""),E=Object(jd.useRef)(),A=Object(jd.useCallback)((function(e){t.commands.search(e,{matchCase:g,enableRegex:C,matchWholeWord:k})}),[g,C,k]);return Object(jd.useEffect)((function(){E.current&&A(E.current.value)}),[A,g,k,C]),Object(jd.useEffect)((function(){if(r){if(E.current){var e=E.current;setTimeout((function(){e.value=r,e.focus()}),0)}A(r)}}),[r,A]),Object(Cd.jsx)(af.Flex,Object.assign({sx:{p:1,bg:"background",flexDirection:"column",boxShadow:["none","menu"],borderRadius:[0,"default"]}},{children:Object(Cd.jsxs)(af.Flex,{children:[Object(Cd.jsxs)(af.Flex,Object.assign({sx:{flexDirection:"column",flex:1,width:["auto",300],mr:1}},{children:[Object(Cd.jsxs)(af.Flex,Object.assign({sx:{flex:1,position:"relative",alignItems:"center",outline:"1px solid var(--border)",borderRadius:"default",p:1,py:0,":focus-within":{outlineColor:"primary",outlineWidth:"1.8px"},":hover":{outlineColor:"primary"}}},{children:[Object(Cd.jsx)(Dw,{variant:"clean",defaultValue:r,ref:E,autoFocus:!0,placeholder:"Find",sx:{p:0},onChange:function(e){A(e.target.value)},onKeyDown:function(e){"Enter"===e.key&&t.commands.moveToNextResult()}}),Object(Cd.jsxs)(af.Flex,Object.assign({sx:{flexShrink:0,mr:0,alignItems:"center"}},{children:[Object(Cd.jsx)(wf,{sx:{mr:0},toggled:p,title:"Expand",id:"expand",icon:p?"chevronRight":"chevronLeft",onClick:function(){return h((function(e){return!e}))},iconSize:"medium"}),p&&Object(Cd.jsxs)(Cd.Fragment,{children:[Object(Cd.jsx)(wf,{sx:{mr:0},toggled:g,title:"Match case",id:"matchCase",icon:"caseSensitive",onClick:function(){return y((function(e){return!e}))},iconSize:"medium"}),Object(Cd.jsx)(wf,{sx:{mr:0},toggled:k,title:"Match whole word",id:"matchWholeWord",icon:"wholeWord",onClick:function(){return x((function(e){return!e}))},iconSize:"medium"}),Object(Cd.jsx)(wf,{sx:{mr:0},toggled:C,title:"Enable regex",id:"enableRegex",icon:"regex",onClick:function(){return j((function(e){return!e}))},iconSize:"medium"})]}),Object(Cd.jsx)(lf,Object.assign({variant:"subBody",sx:{flexShrink:0,borderLeft:"1px solid var(--border)",color:"fontTertiary",px:1}},{children:o?"".concat(a+1,"/").concat(o.length):""}))]}))]})),u&&Object(Cd.jsx)(Dw,{sx:{mt:1,p:"7px"},placeholder:"Replace",onChange:function(e){return D.current=e.target.value}})]})),Object(Cd.jsxs)(af.Flex,Object.assign({sx:{flexDirection:"column"}},{children:[Object(Cd.jsxs)(af.Flex,Object.assign({sx:{alignItems:"center",height:"33.2px"}},{children:[Object(Cd.jsx)(wf,{toggled:u,title:"Toggle replace",id:"toggleReplace",icon:"replace",onClick:function(){return c((function(e){return!e}))},sx:{mr:0},iconSize:"big"}),Object(Cd.jsx)(wf,{toggled:!1,title:"Previous match",id:"previousMatch",icon:"previousMatch",onClick:function(){return t.commands.moveToPreviousResult()},sx:{mr:0},iconSize:"big"}),Object(Cd.jsx)(wf,{toggled:!1,title:"Next match",id:"nextMatch",icon:"nextMatch",onClick:function(){return t.commands.moveToNextResult()},sx:{mr:0},iconSize:"big"}),Object(Cd.jsx)(wf,{toggled:!1,title:"Close",id:"close",icon:"close",onClick:function(){return t.chain().focus().endSearch().run()},sx:{mr:0},iconSize:"big"})]})),u&&Object(Cd.jsxs)(af.Flex,Object.assign({sx:{alignItems:"center",height:"33.2px",mt:1}},{children:[Object(Cd.jsx)(wf,{toggled:!1,title:"Replace",id:"replace",icon:"replaceOne",onClick:function(){return t.commands.replace(D.current)},sx:{mr:0},iconSize:18}),Object(Cd.jsx)(wf,{toggled:!1,title:"Replace all",id:"replaceAll",icon:"replaceAll",onClick:function(){return t.commands.replaceAll(D.current)},sx:{mr:0},iconSize:18})]}))]}))]})}))}function fC(e){var t=e.editor,n=t.storage.searchreplace.isSearching;return Object(Cd.jsx)(aw,Object.assign({mobile:"sheet",desktop:"menu",isOpen:n,onClose:function(){return t.commands.endSearch()},position:{target:_b(),isTargetAbsolute:!0,location:"below",align:"end",yOffset:5},blocking:!1,focusOnRender:!1,draggable:!1},{children:Object(Cd.jsx)(dC,{editor:t})}))}function pC(e){return Object(Cd.jsxs)(Cd.Fragment,{children:[Object(Cd.jsx)(fC,Object.assign({},e)),Object(Cd.jsx)(ow,{children:Object(Cd.jsx)(cC,Object.assign({},e))})]})}var hC=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};var mC=function(e){var t=e.editor,n=e.theme,r=e.location,i=e.tools,a=void 0===i?ZO().default:i,s=e.sx,l=hC(e,["editor","theme","location","tools","sx"]),u=Object(jd.useMemo)((function(){return[].concat(Object(o.a)(XO),Object(o.a)(a))}),[a]),c=Fd(),d=Rd((function(e){return e.setToolbarLocation}));return Object(jd.useEffect)((function(){d(r)}),[r]),t?Object(Cd.jsx)(Nd,Object.assign({theme:n},{children:Object(Cd.jsx)(qb.Provider,Object.assign({value:t},{children:Object(Cd.jsxs)(Wb,Object.assign({editor:t},{children:[Object(Cd.jsx)(af.Flex,Object.assign({className:"editor-toolbar",sx:Object.assign(Object.assign({},s),{flexWrap:c?"nowrap":"wrap",overflowX:c?"auto":"hidden"})},l,{children:u.map((function(e){return Object(Cd.jsx)(VS,{tools:e,editor:t,sx:{flexShrink:0,pr:2,mr:2,borderRight:"1px solid var(--border)",":last-of-type":{mr:0,pr:0,borderRight:"none"}}},e.join(""))}))})),Object(Cd.jsx)(pC,{editor:t})]}))}))})):null};function vC(e){var t=e.editor,n=e.selected,r=e.onResize,o=e.width,i=e.height,a=e.children,s=e.handleColor;return t.isEditable?Object(Cd.jsx)(lC,Object.assign({enable:{bottom:!1,left:!1,right:!1,top:!1,bottomLeft:!1,bottomRight:n,topLeft:!1,topRight:!1},size:{height:i||"auto",width:o||"auto"},maxWidth:"100%",minWidth:135,handleComponent:{bottomRight:Object(Cd.jsx)(mf,{sx:{width:25,height:25,marginLeft:-20,marginTop:-20,borderTopLeftRadius:"default",borderBottomRightRadius:"default"},path:vf.resize,size:25,color:s||"icon"})},onResizeStop:function(e,t,n,o){try{r(n.clientWidth,n.clientHeight)}catch(jM){}},lockAspectRatio:!0},{children:a})):Object(Cd.jsx)(Cd.Fragment,{children:a})}var gC=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(t){i(t)}}function s(e){try{l(r.throw(e))}catch(t){i(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};function yC(e){var t=this,n=e.editor,r=e.node,o=e.selected,a=Fd(),s=r.attrs,l=s.src,u=s.alt,c=s.title,d=s.width,f=s.height,p=s.align,h=s.float,m=Object(jd.useRef)(),v=Object(jd.useState)(),g=Object(i.a)(v,2),y=g[0],b=g[1],w=Object(jd.useState)(),k=Object(i.a)(w,2),x=k[0],O=k[1];return Object(jd.useEffect)((function(){gC(t,void 0,void 0,ik().mark((function e(){var t,r,o,i,a,s;return ik().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(l){e.next=2;break}return e.abrupt("return");case 2:if(e.prev=2,!uk(l)){e.next=11;break}return e.t0=O,e.next=7,ck(l);case 7:e.t1=e.sent,(0,e.t0)(e.t1),e.next=33;break;case 11:return e.next=13,sk(l);case 13:if(r=e.sent,o=r.url,i=r.size,a=r.blob,s=r.type,O(o),console.log(o,i,a,s),null!==(t=n.current)&&void 0!==t){e.next=24;break}e.next=33;break;case 24:return e.t2=t.commands,e.t3={src:l},e.next=28,lk(a);case 28:e.t4=e.sent,e.t5=i,e.t6=s,e.t7={src:e.t4,size:e.t5,type:e.t6},e.t2.updateImage.call(e.t2,e.t3,e.t7);case 33:e.next=39;break;case 35:e.prev=35,e.t8=e.catch(2),console.error(e.t8),e.t8 instanceof Error&&b(e.t8.message);case 39:case"end":return e.stop()}}),e,null,[[2,35]])})))}),[l,m]),a&&(h=!1),Object(Cd.jsx)(Cd.Fragment,{children:Object(Cd.jsx)(af.Box,Object.assign({sx:{display:h?"inline":"flex",ml:h&&"right"===p?2:0,mr:h&&"left"===p?2:0,float:h?p:"none",justifyContent:h?"stretch":"center"===p?"center":"left"===p?"start":"end",":hover .drag-handle, :active .drag-handle":{opacity:1}}},{children:!x||y?Object(Cd.jsxs)(af.Flex,Object.assign({width:d,maxWidth:"100%",minWidth:135,sx:{bg:"bgSecondary",border:o?"2px solid var(--primary)":"2px solid transparent",borderRadius:"default",flexDirection:"column",alignItems:"center",justifyContent:"center",py:50}},{children:[Object(Cd.jsx)(mf,{path:y?vf.imageFailed:wC(x,l)?vf.imageDownload:vf.image,size:72,color:"gray"}),Object(Cd.jsx)(lf,Object.assign({as:"span",variant:"subBody",sx:{display:"inline-block",textDecoration:"none",textAlign:"center",mx:2,mt:2}},{children:y?"There was an error loading the image: ".concat(y):wC(x,l)?"Downloading image from ".concat(bC(l)):""})),y?Object(Cd.jsx)(uf,Object.assign({variant:"secondary",sx:{mt:1},onClick:function(){O(l),b(void 0)}},{children:"Skip downloading (unsafe)"})):null]})):Object(Cd.jsxs)(vC,Object.assign({editor:n,selected:o,width:d,height:f,onResize:function(e,t){n.commands.setImageSize({width:e,height:t})}},{children:[Object(Cd.jsx)(ow,{children:o&&Object(Cd.jsx)(af.Flex,Object.assign({sx:{position:"relative",justifyContent:"end"}},{children:Object(Cd.jsx)(af.Flex,Object.assign({sx:{position:"absolute",top:-40,mb:2,alignItems:"end"}},{children:Object(Cd.jsx)(VS,{editor:n,tools:h?["imageAlignLeft","imageAlignRight","imageProperties"]:["imageAlignLeft","imageAlignCenter","imageAlignRight","imageProperties"],sx:{boxShadow:"menu",borderRadius:"default",bg:"background"}})}))}))}),o&&Object(Cd.jsx)(mf,{className:"drag-handle","data-drag-handle":!0,draggable:!0,path:vf.dragHandle,sx:{cursor:"grab",position:"absolute",top:2,left:2,zIndex:999}}),Object(Cd.jsx)(cf,Object.assign({"data-drag-image":!0,ref:m,alt:u,src:x,title:c,width:"100%",height:"100%",sx:{bg:"bgSecondary",border:o?"2px solid var(--primary)":"2px solid transparent",borderRadius:"default"}},e))]}))}))})}function bC(e){return e?new URL(e).hostname:null}function wC(e,t){return!e&&t&&!uk(t)}var kC=/(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,xC=Bo.create({name:"image",addOptions:function(){return{inline:!0,allowBase64:!0,HTMLAttributes:{}}},inline:function(){return this.options.inline},group:function(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes:function(){return{src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null},float:IS("float",!1),align:IS("align","left"),hash:IS("hash"),filename:IS("filename"),type:IS("mime"),size:IS("size")}},parseHTML:function(){return[{tag:this.options.allowBase64?"img":'img:not([src^="data:"])'}]},renderHTML:function(e){var t=e.HTMLAttributes;return["img",Sr(this.options.HTMLAttributes,t)]},addNodeView:function(){return nf(yC)},addCommands:function(){var e=this;return{insertImage:function(t){return function(n){return n.commands.insertContent({type:e.name,attrs:t})}},setImageAlignment:function(t){return function(n){var r=n.chain,o=n.tr.selection.from;return r().updateAttributes(e.name,Object.assign({},t)).setNodeSelection(o).run()}},setImageSize:function(t){return function(n){var r=n.chain,o=n.tr.selection.from;return r().updateAttributes(e.name,Object.assign({},t)).setNodeSelection(o).run()}},updateImage:function(t,n){return function(r){var o=r.state,i=r.tr,a=r.dispatch,s=t.hash?{key:"hash",value:t.hash}:t.src?{key:"src",value:t.src}:null;if(!s)return!1;var l,u=To(o.doc,(function(t){return t.type.name===e.name&&t.attrs[s.key]===s.value})),c=Object(Sd.a)(u);try{for(c.s();!(l=c.n()).done;){var d=l.value;i.setNodeMarkup(d.pos,d.node.type,Object.assign(Object.assign({},d.node.attrs),n))}}catch(f){c.e(f)}finally{c.f()}return i.setMeta("preventUpdate",n.preventUpdate||!1),i.setMeta("addToHistory",!1),a&&a(i),!0}}}},addInputRules:function(){return[Ho({find:kC,type:this.type,getAttributes:function(e){var t=Object(i.a)(e,5),n=t[2];return{src:t[3],alt:n,title:t[4]}}})]}}),OC=Bo.create({name:"taskList",addOptions:function(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content:function(){return"".concat(this.options.itemTypeName,"+")},parseHTML:function(){return[{tag:'ul[data-type="'.concat(this.name,'"]'),priority:51}]},renderHTML:function(e){var t=e.HTMLAttributes;return["ul",Sr(this.options.HTMLAttributes,t,{"data-type":this.name}),0]},addCommands:function(){var e=this;return{toggleTaskList:function(){return function(t){return t.commands.toggleList(e.name,e.options.itemTypeName)}}}},addKeyboardShortcuts:function(){var e=this;return{"Mod-Shift-9":function(){return e.editor.commands.toggleTaskList()}}}});function SC(e,t,n){var r=e.state.selection,o=r.empty,i=r.$from;if(!o||!function(e,t,n){var r=n.selection.$from,o=t||n.schema.nodes[e],i=n.schema.nodes.paragraph;return Object(LS.hasParentNodeOfType)(o)(n.selection)&&r.parent.type===i}(t,n,e.state)||0!==i.parentOffset||!function(e){var t=e.selection.$from;return!(t.depth>1)||(0===t.parentOffset||0===t.index(t.depth-1))}(e.state)||!e.can().liftListItem(n))return!1;var a=function(e,t){var n=Object(LS.findParentNodeOfType)(e)(t.selection);return!!n&&!n.node.textContent.length}(n,e.state);if(a){if(CC(n,e.state)){var s=jC(n,e.state);return!!s&&(s.childCount>1?e.commands.deleteNode(n):e.commands.deleteNode(s.type))}return e.commands.deleteNode(n)}return CC(n,e.state)?e.commands.liftListItem(n):e.chain().joinBackward().joinBackward().run()}var CC=function(e,t){var n=Object(LS.findParentNodeOfType)(e)(t.selection);if(!n)return!1;var r=n.pos,o=t.doc.resolve(r);return console.log("isFirstOfType",o),!o.nodeBefore},jC=function(e,t){var n,r=Object(LS.findParentNodeOfType)(e)(t.selection);if(r){var o=r.pos,i=t.doc.resolve(o);if(i.parent.type.spec.group&&!((null===(n=i.parent.type.spec.group)||void 0===n?void 0:n.indexOf("list"))<=-1))return i.parent}};var DC=/^\s*(\[([( |x])?\])\s$/;function EC(e){var t=e.editor,n=e.updateAttributes,r=e.getPos,o=e.forwardRef,i=e.node.attrs.checked,a=Fd(),s=Object(jd.useCallback)((function(){var e;if(!t.isEditable||!t.current)return!1;var o=t.current.state.selection,a=o.empty,s=o.from,l=o.to;if(a){n({checked:!i});var u=r(),c=null===(e=t.current)||void 0===e?void 0:e.state.doc.nodeAt(u);if(!c)return!1;t.commands.command((function(e){var t=e.tr;return AC(c,t,!i,u),!0}))}else{var d=Lo(t.current.state.doc,{from:s,to:l},(function(e){return e.type.name===MC.name}));t.current.commands.command((function(e){var t,n=e.tr,r=Object(Sd.a)(d);try{for(r.s();!(t=r.n()).done;){var o=t.value,a=o.node,s=o.pos;n.setNodeMarkup(s,null,{checked:!i}),AC(a,n,!i,s)}}catch(l){r.e(l)}finally{r.f()}return!0}))}return!0}),[t,r,i]);return Object(Cd.jsx)(Cd.Fragment,{children:Object(Cd.jsxs)(af.Flex,Object.assign({"data-drag-image":!0,sx:{bg:"background",borderRadius:"default",":hover > .dragHandle":{opacity:t.isEditable?1:0}}},{children:[t.isEditable&&Object(Cd.jsx)(mf,{className:"dragHandle",draggable:"true","data-drag-handle":!0,path:vf.dragHandle,sx:{opacity:[1,1,0],alignSelf:"start",mr:2,bg:"transparent",cursor:"grab",".icon:hover path":{fill:"var(--checked) !important"}},size:a?24:20}),Object(Cd.jsx)(mf,{path:i?vf.check:"",stroke:"1px",contentEditable:!1,tabIndex:1,sx:{border:"2px solid",borderColor:i?"checked":"icon",borderRadius:"default",alignSelf:"start",mr:2,p:"1px",cursor:t.isEditable?"pointer":"unset",":hover":{borderColor:"checked"},":hover .icon path":{fill:"var(--checked) !important"}},onMouseDown:function(e){zd.current&&e.preventDefault(),s()},onTouchEnd:function(e){(zd.current||["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document)&&(e.preventDefault(),s())},color:i?"checked":"icon",size:a?16:14}),Object(Cd.jsx)(lf,{as:"div",ref:o,sx:{"> .taskitem-content-wrapper > p":{textDecorationLine:i?"line-through":"none",opacity:i?.8:1},flex:1}})]}))})}function AC(e,t,n,r){var o,i=To(e,(function(e){return e.type.name===MC.name})),a=Object(Sd.a)(i);try{for(a.s();!(o=a.n()).done;){var s=o.value.pos+r+1;t.setNodeMarkup(s,void 0,{checked:n})}}catch(l){a.e(l)}finally{a.f()}return t}var MC=Bo.create({name:"taskItem",addOptions:function(){return{nested:!1,HTMLAttributes:{}}},content:function(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes:function(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:function(e){return"true"===e.getAttribute("data-checked")},renderHTML:function(e){return{"data-checked":e.checked}}}}},parseHTML:function(){return[{tag:'li[data-type="'.concat(this.name,'"]'),priority:51}]},renderHTML:function(e){var t=e.node,n=e.HTMLAttributes;return["li",Sr(this.options.HTMLAttributes,n,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:t.attrs.checked?"checked":null}],["span"]],["div",0]]},addKeyboardShortcuts:function(){var e=this,t={Enter:function(){return e.editor.commands.splitListItem(e.name)},"Shift-Tab":function(){return e.editor.commands.liftListItem(e.name)}};return this.options.nested?Object(f.a)(Object(f.a)({},t),{},{Tab:function(){return e.editor.commands.sinkListItem(e.name)}}):t},addNodeView:function(){var e=this;return function(t){var n=t.node,r=t.HTMLAttributes,o=t.getPos,a=t.editor,s=document.createElement("li"),l=document.createElement("label"),u=document.createElement("span"),c=document.createElement("input"),d=document.createElement("div");return l.contentEditable="false",c.type="checkbox",c.addEventListener("change",(function(t){if(a.isEditable||e.options.onReadOnlyChecked){var r=t.target.checked;a.isEditable&&"function"===typeof o&&a.chain().focus(void 0,{scrollIntoView:!1}).command((function(e){var t=e.tr,n=o(),i=t.doc.nodeAt(n);return t.setNodeMarkup(n,void 0,Object(f.a)(Object(f.a)({},null===i||void 0===i?void 0:i.attrs),{},{checked:r})),!0})).run(),!a.isEditable&&e.options.onReadOnlyChecked&&(e.options.onReadOnlyChecked(n,r)||(c.checked=!c.checked))}else c.checked=!c.checked})),Object.entries(e.options.HTMLAttributes).forEach((function(e){var t=Object(i.a)(e,2),n=t[0],r=t[1];s.setAttribute(n,r)})),s.dataset.checked=n.attrs.checked,n.attrs.checked&&c.setAttribute("checked","checked"),l.append(c,u),s.append(l,d),Object.entries(r).forEach((function(e){var t=Object(i.a)(e,2),n=t[0],r=t[1];s.setAttribute(n,r)})),{dom:s,contentDOM:d,update:function(t){return t.type===e.type&&(s.dataset.checked=t.attrs.checked,t.attrs.checked?c.setAttribute("checked","checked"):c.removeAttribute("checked"),!0)}}}},addInputRules:function(){return[Vo({find:DC,type:this.type,getAttributes:function(e){return{checked:"x"===e[e.length-1]}}})]}}).extend({draggable:!0,addAttributes:function(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:function(e){return e.classList.contains("checked")},renderHTML:function(e){return{class:e.checked?"checked":""}}}}},renderHTML:function(e){e.node;var t=e.HTMLAttributes;return["li",Sr(this.options.HTMLAttributes,t,{class:"checklist--item"}),0]},parseHTML:function(){return[{tag:"li",getAttrs:function(e){var t;return e instanceof Node&&e instanceof HTMLElement&&(!(!e.classList.contains("checklist--item")&&!(null===(t=e.parentElement)||void 0===t?void 0:t.classList.contains("checklist")))&&null)},priority:51}]},addKeyboardShortcuts:function(){var e,t=this;return Object.assign(Object.assign({},null===(e=this.parent)||void 0===e?void 0:e.call(this)),{Backspace:function(e){return SC(e.editor,t.name,t.type)}})},addNodeView:function(){return Id(EC,{contentDOMFactory:!0,wrapperFactory:function(){return document.createElement("li")},shouldUpdate:function(e,t){var n=e.attrs,r=t.attrs;return n.checked!==r.checked||n.collapsed!==r.collapsed}})}});function TC(e){var t=Fd(),n=e.editor,r=e.getPos,o=e.node,a=e.updateAttributes,s=e.forwardRef,l=Or(MC.name,n.schema),u=o.attrs,c=u.title,d=u.collapsed,f=Object(jd.useState)({checked:0,total:0,percentage:0}),p=Object(i.a)(f,2),h=p[0],m=p[1],v=Object(jd.useCallback)((function(){var e=n.state.doc.resolve(r());return Object(LS.findParentNodeOfTypeClosestToPos)(e,l)}),[]),g=Object(jd.useMemo)((function(){return!!v()}),[v]);return Object(jd.useEffect)((function(){var e=v();if(e){var t=e.node,r=e.pos,o=function(e,t,n){var r,o=To(e,(function(e){return e.type.name===MC.name})),i=Object(Sd.a)(o);try{for(i.s();!(r=i.n()).done;){var a=t+r.value.pos+1,s=n.nodeAt(a);if(!(null===s||void 0===s?void 0:s.attrs.checked))return!1}}catch(l){i.e(l)}finally{i.f()}return!0}(t,r,n.state.doc);t.attrs.checked!==o&&n.commands.command((function(e){return e.tr.setNodeMarkup(r,void 0,{checked:o}),!0}))}}),[o,o.childCount]),Object(jd.useEffect)((function(){var e=To(o,(function(e){return e.type.name===MC.name})),t=e.filter((function(e){return e.node.attrs.checked})).length,n=e.length,r=Math.round(t/n*100);m({checked:t,total:n,percentage:r})}),[g,o]),Object(Cd.jsxs)(Cd.Fragment,{children:[Object(Cd.jsx)(af.Flex,Object.assign({sx:{flexDirection:"column",":hover > div > .toggleSublist":{opacity:1}}},{children:g?Object(Cd.jsxs)(af.Flex,Object.assign({sx:{position:"absolute",top:0,right:0},contentEditable:!1},{children:[d&&Object(Cd.jsxs)(lf,Object.assign({variant:"body",sx:{color:"fontTertiary",mr:35}},{children:[h.checked,"/",h.total]})),Object(Cd.jsx)(mf,{className:"toggleSublist",path:d?vf.chevronDown:vf.chevronUp,sx:{opacity:t||d?1:0,position:"absolute",right:0,alignSelf:"start",mr:2,cursor:"pointer",".icon:hover path":{fill:"var(--checked) !important"}},size:t?24:20,onClick:function(){a({collapsed:!d},{addToHistory:!1,preventUpdate:!0})}})]})):Object(Cd.jsxs)(af.Flex,Object.assign({sx:{position:"relative",bg:"bgSecondary",py:1,borderRadius:"default",mb:2,alignItems:"center",justifyContent:"end",overflow:"hidden"},contentEditable:!1},{children:[Object(Cd.jsx)(af.Box,{sx:{height:"100%",width:"".concat(h.percentage,"%"),position:"absolute",bg:"border",zIndex:0,left:0,transition:"width 250ms ease-out"}}),Object(Cd.jsx)(Dw,{readOnly:!n.isEditable,value:c||"",variant:"clean",sx:{p:0,px:2,zIndex:1,color:"fontTertiary",fontSize:"body"},placeholder:"Untitled",onChange:function(e){a({title:e.target.value},{addToHistory:!0,preventUpdate:!1})}}),Object(Cd.jsxs)(af.Flex,Object.assign({sx:{flexShrink:0,pr:2}},{children:[Object(Cd.jsx)(mf,{path:vf.checkbox,size:15,color:"fontTertiary"}),Object(Cd.jsxs)(lf,Object.assign({variant:"body",sx:{ml:1,color:"fontTertiary"}},{children:[h.checked,"/",h.total]}))]}))]}))})),Object(Cd.jsx)(lf,{as:"div",ref:s,sx:{ul:{display:d?"none":"block",paddingInlineStart:0,marginBlockStart:g?10:0,marginBlockEnd:0,marginLeft:g?n.isEditable?-35:-10:0},li:{listStyleType:"none",position:"relative",marginBottom:g?[1,"3px"]:[2,"7px"]}}})]})}var LC=OC.extend({addAttributes:function(){return{collapsed:{default:!1,keepOnSplit:!1,parseHTML:function(e){return"true"===e.dataset.collapsed},renderHTML:function(e){return{"data-collapsed":!0===e.collapsed}}},title:{default:null,keepOnSplit:!1,parseHTML:function(e){return e.dataset.title},renderHTML:function(e){return!e.title||e.nested?{}:{"data-title":e.title}}}}},parseHTML:function(){return[{tag:"ul",getAttrs:function(e){return e instanceof Node&&e instanceof HTMLElement&&(e.classList.contains("checklist")&&null)},priority:51}]},renderHTML:function(e){var t=e.HTMLAttributes;return["ul",Sr(this.options.HTMLAttributes,t,{class:"checklist"}),0]},addCommands:function(){var e=this;return{toggleTaskList:function(){return function(t){var n=t.editor,r=t.commands,o=t.state,i=t.tr,a=o.selection,s=a.$from,l=a.$to;r.toggleList(e.name,e.options.itemTypeName);var u={from:i.mapping.map(s.pos),to:i.mapping.map(l.pos)};return setTimeout((function(){return n.commands.setTextSelection(u)}),0),!0}}}},addNodeView:function(){var e=this;return Id(TC,{contentDOMFactory:function(){var t=document.createElement("ul");return t.classList.add("".concat(e.name.toLowerCase(),"-content-wrapper")),t.style.whiteSpace="inherit",{dom:t}}})}});function NC(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new p.Plugin({view:function(t){return new PC(t,e)}})}var PC=function(){function e(t,n){var r=this;Object(c.a)(this,e),this.editorView=t,this.width=n.width||1,this.color=n.color||"black",this.class=n.class||"",this.cursorPos=null,this.element=null,this.timeout=null,this.handlers=["dragover","dragend","drop","dragleave"].map((function(e){var n=function(t){return r[e](t)};return t.dom.addEventListener(e,n),{name:e,handler:n}}))}return Object(d.a)(e,[{key:"destroy",value:function(){var e=this;this.handlers.forEach((function(t){var n=t.name,r=t.handler;return e.editorView.dom.removeEventListener(n,r)}))}},{key:"update",value:function(e,t){null!=this.cursorPos&&t.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}},{key:"setCursor",value:function(e){e!=this.cursorPos&&(this.cursorPos=e,null==e&&this.element&&this.element.parentNode?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}},{key:"updateOverlay",value:function(){if(this.cursorPos){var e,t=this.editorView.state.doc.resolve(this.cursorPos);if(!t.parent.inlineContent){var n=t.nodeBefore,r=t.nodeAfter;if(n||r){var o=this.editorView.nodeDOM(this.cursorPos-(n?n.nodeSize:0));if(!o)return;var i=o.getBoundingClientRect(),a=n?i.bottom:i.top;if(n&&r){var s=this.editorView.nodeDOM(this.cursorPos);if(!s)return;a=(a+s.getBoundingClientRect().top)/2}e={left:i.left,right:i.right,top:a-this.width/2,bottom:a+this.width/2}}}if(!e){var l=this.editorView.coordsAtPos(this.cursorPos);e={left:l.left-this.width/2,right:l.left+this.width/2,top:l.top,bottom:l.bottom}}var u,c,d=this.editorView.dom.offsetParent;if(!this.element&&d&&(this.element=d.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none; background-color: "+this.color),!d||d==document.body&&"static"==getComputedStyle(d).position)u=-pageXOffset,c=-pageYOffset;else{var f=d.getBoundingClientRect();u=f.left-d.scrollLeft,c=f.top-d.scrollTop}this.element&&(this.element.style.left=e.left-u+"px",this.element.style.top=e.top-c+"px",this.element.style.width=e.right-e.left+"px",this.element.style.height=e.bottom-e.top+"px")}}},{key:"scheduleRemoval",value:function(e){var t=this;clearTimeout(this.timeout||void 0),this.timeout=setTimeout((function(){return t.setCursor(null)}),e)}},{key:"dragover",value:function(e){if(this.editorView.editable){var t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),n=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),r=n&&n.type.spec.disableDropCursor,o="function"==typeof r?r(this.editorView,t):r;if(t&&!o){var i=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){var a=Object(g.h)(this.editorView.state.doc,i,this.editorView.dragging.slice);if(!a)return this.setCursor(null);i=a}this.setCursor(i),this.scheduleRemoval(5e3)}}}},{key:"dragend",value:function(){this.scheduleRemoval(20)}},{key:"drop",value:function(){this.scheduleRemoval(20)}},{key:"dragleave",value:function(e){e.target!=this.editorView.dom&&this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}]),e}(),RC=Ir.create({name:"dropCursor",addOptions:function(){return{color:"currentColor",width:1,class:null}},addProseMirrorPlugins:function(){return[NC(this.options)]}}),HC=function(e,t){e.tr&&(e.tr.setMeta("forceUpdate",!0),t(e.tr))};var FC=Ir.create({name:"searchreplace",addOptions:function(){return{searchResultClass:"search-result"}},addCommands:function(){var e=this;return{startSearch:function(){return function(t){var n=t.state;return e.storage.isSearching=!0,n.selection.empty||(e.storage.selectedText=n.doc.textBetween(n.selection.$from.pos,n.selection.$to.pos)),!0}},endSearch:function(){return function(t){var n=t.state,r=t.dispatch,o=t.editor;return e.storage.isSearching=!1,e.storage.selectedText=void 0,e.storage.searchTerm="",o.commands.focus(),HC(n,r),!0}},search:function(t,n){return function(r){var o=r.state,i=r.dispatch;return e.storage.selectedIndex=0,e.storage.searchTerm=t,e.storage.enableRegex=(null===n||void 0===n?void 0:n.enableRegex)||!1,e.storage.matchCase=(null===n||void 0===n?void 0:n.matchCase)||!1,e.storage.matchWholeWord=(null===n||void 0===n?void 0:n.matchWholeWord)||!1,e.storage.results=[],HC(o,i),!0}},moveToNextResult:function(){return function(t){var n=t.state,r=t.dispatch,o=t.commands,i=e.storage,a=i.selectedIndex,s=i.results;if(!s||s.length<=0)return!1;var l=a+1;(isNaN(l)||l>=s.length)&&(l=0);var u=s[l],c=u.from,d=u.to;return o.setTextSelection({from:c,to:d}),VC(e.editor,c),e.storage.selectedIndex=l,HC(n,r),!0}},moveToPreviousResult:function(){return function(t){var n=t.state,r=t.dispatch,o=t.commands,i=e.storage,a=i.selectedIndex,s=i.results;if(!s||s.length<=0)return!1;var l=a-1;(isNaN(l)||l<0)&&(l=s.length-1);var u=s[l],c=u.from,d=u.to;return o.setTextSelection({from:c,to:d}),VC(e.editor,c),e.storage.selectedIndex=l,HC(n,r),!0}},replace:function(t){return function(n){var r=n.commands,o=n.tr,i=n.dispatch,a=e.storage,s=a.selectedIndex,l=a.results;if(!i||!l||l.length<=0)return!1;var u=void 0===s?0:s,c=l[u],d=c.from,f=c.to;if(o.insertText(t,d,f),u+1<l.length){var h=l[u+1],m=h.from,v=h.to,g=l[u+1]={from:o.mapping.map(m),to:o.mapping.map(v)};r.focus(),o.setSelection(new p.TextSelection(o.doc.resolve(g.from),o.doc.resolve(g.to)))}return i(o),l.splice(u,1),!0}},replaceAll:function(t){return function(n){n.state;var r=n.tr,o=n.dispatch;if(!o)return!1;var i=e.storage.results;return!(!o||!i||i.length<=0)&&(o(function(e,t,n){if(t.length){for(var r=n.mapping,o=0;o<t.length;o+=1){var i=t[o],a=i.from,s=i.to;if(n.insertText(e,a,s),o+1<t.length){var l=t[o+1],u=l.from,c=l.to;t[o+1]={from:r.map(u),to:r.map(c)}}}return n}}(t,i,r)),!0)}}}},addKeyboardShortcuts:function(){return{"Mod-f":function(e){return e.editor.commands.startSearch()},Escape:function(e){return e.editor.commands.endSearch()}}},addProseMirrorPlugins:function(){var e=this,t=new p.PluginKey("searchreplace");return[new p.Plugin({key:t,state:{init:function(){return Iu.empty},apply:function(t,n){var r=t.docChanged,o=t.getMeta("forceUpdate"),i=e.storage,a=i.searchTerm,s=i.enableRegex,l=i.matchCase,u=i.matchWholeWord,c=i.selectedIndex,d=i.isSearching;if(r||o){var f=e.options.searchResultClass,p=a?function(e,t){var n=t.enableRegex,r=t.matchCase,o=t.matchWholeWord?"\\b":"";return console.log(o),RegExp(o+(n?e:e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"))+o,r?"gu":"gui")}(a,{enableRegex:s,matchCase:l,matchWholeWord:u}):void 0,h=function(e,t,n,r){if(!n)return{decorationSet:Iu.empty,results:[],startIndex:r||0};var o=e.doc,i=[],a=[],s=0,l=[];null===o||void 0===o||o.descendants((function(e,t){e.isText?l[s]?l[s]={text:l[s].text+e.text,pos:l[s].pos}:l[s]={text:e.text||"",pos:t}:s+=1})),l=l.filter(Boolean);var u,c=Object(Sd.a)(l);try{for(c.s();!(u=c.n()).done;){var d,f=u.value,p=f.text,h=f.pos,m=p.matchAll(n),v=Object(Sd.a)(m);try{for(v.s();!(d=v.n()).done;){var g=d.value;if(""===g[0])break;void 0!==g.index&&a.push({from:h+g.index,to:h+g.index+g[0].length})}}catch(M){v.e(M)}finally{v.f()}}}catch(M){c.e(M)}finally{c.f()}for(var y=e.selection,b=y.from,w=y.to,k=0;k<a.length;k++){var x=a[k],O=x.from,S=x.to;if(b===O&&S===w||O>=b){r=k;break}}for(var C=0;C<a.length;C++){var j=a[C],D=j.from,E=j.to,A=C===r?"".concat(t," selected"):t;i.push(zu.inline(D,E,{class:A}))}return{startIndex:r||0,decorationSet:Iu.create(o,i),results:a}}(t,f,p,c),m=h.decorationSet,v=h.results,g=h.startIndex;return e.storage.results=v,e.storage.selectedIndex=g,m}return d?n:Iu.empty}},props:{decorations:function(e){return t.getState(e)}}})]}});function VC(e,t){var n=e.view.domAtPos(t).node;n.nodeType===Node.TEXT_NODE&&n.parentNode&&(n=n.parentNode),n instanceof HTMLElement&&n.scrollIntoView({behavior:"smooth",block:"nearest"})}function zC(e){var t=e.editor,n=e.updateAttributes,r=e.selected,o=e.node,a=Object(jd.useState)(!0),s=Object(i.a)(a,2),l=s[0],u=s[1],c=Object(jd.useRef)(),d=o.attrs,f=d.src,p=d.width,h=d.height,m=d.align;return Object(Cd.jsx)(Cd.Fragment,{children:Object(Cd.jsx)(af.Box,Object.assign({sx:{display:"flex",flexDirection:"column",justifyContent:"center"===m?"center":"left"===m?"start":"end",position:"relative"}},{children:Object(Cd.jsxs)(vC,Object.assign({handleColor:"primary",editor:t,selected:r,width:p,height:h,onResize:function(e,t){n({width:e,height:t},{addToHistory:!0,preventUpdate:!1})}},{children:[Object(Cd.jsxs)(af.Box,Object.assign({width:"100%",sx:{display:t.isEditable?"flex":"none",position:"absolute",top:-24,justifyContent:"end",p:"small",bg:t.isEditable?"bgSecondary":"transparent",borderTopLeftRadius:"default",borderTopRightRadius:"default",borderColor:r?"border":"bgSecondary",cursor:"pointer",":hover":{borderColor:"border"}}},{children:[Object(Cd.jsx)(mf,{path:vf.dragHandle,size:"big"}),Object(Cd.jsx)(ow,{children:r&&Object(Cd.jsx)(af.Flex,Object.assign({sx:{position:"relative",justifyContent:"end"}},{children:Object(Cd.jsx)(af.Flex,Object.assign({sx:{position:"absolute",top:-10,mb:2,alignItems:"end"}},{children:Object(Cd.jsx)(VS,{editor:t,tools:["embedAlignLeft","embedAlignCenter","embedAlignRight","embedProperties"],sx:{boxShadow:"menu",borderRadius:"default",bg:"background"}})}))}))})]})),Object(Cd.jsx)(af.Box,Object.assign({as:"iframe",ref:c,src:f,width:"100%",height:"100%",sx:{bg:"bgSecondary",border:r?"2px solid var(--primary)":"2px solid transparent",borderRadius:"default"},onLoad:function(){return u(!1)}},e)),l&&Object(Cd.jsx)(af.Flex,Object.assign({sx:{position:"absolute",bottom:0,width:"100%",height:"calc(100% - 20px)",alignItems:"center",justifyContent:"center"}},{children:Object(Cd.jsx)(mf,{path:vf.loading,rotate:!0,size:32,color:"disabled"})}))]}))}))})}var BC=Bo.create({name:"embed",content:"",marks:"",draggable:!0,addOptions:function(){return{HTMLAttributes:{}}},group:function(){return"block"},addAttributes:function(){return{src:{default:null},width:{default:null},height:{default:null},align:{default:"left"}}},parseHTML:function(){return[{tag:"iframe[src]"}]},renderHTML:function(e){var t=e.HTMLAttributes;return["iframe",Sr(this.options.HTMLAttributes,t)]},addNodeView:function(){return nf(zC)},addCommands:function(){var e=this;return{insertEmbed:function(t){return function(n){return n.commands.insertContent({type:e.name,attrs:t})}},setEmbedAlignment:function(t){return function(n){return n.commands.updateAttributes(e.name,Object.assign({},t))}},setEmbedSize:function(t){return function(n){return n.commands.updateAttributes(e.name,Object.assign({},t))}},setEmbedSource:function(t){return function(n){return n.commands.updateAttributes(e.name,{src:t})}}}}}),_C=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(t){i(t)}}function s(e){try{l(r.throw(e))}catch(t){i(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},IC={};function $C(e){return _C(this,void 0,void 0,ik().mark((function t(){var n,r;return ik().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!IC[e]){t.next=2;break}return t.abrupt("return",IC[e]);case 2:return n="https://esm.sh/[email protected]/lang/".concat(e,".js?bundle=true"),t.next=5,qC(e,n);case 5:return r=t.sent,IC[e]=r,t.abrupt("return",r);case 8:case"end":return t.stop()}}),t)})))}function qC(e,t){return _C(this,void 0,void 0,ik().mark((function n(){return ik().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",new Promise((function(n,r){var o="on".concat(e,"Loaded"),i=document.createElement("script");i.type="module",i.innerHTML='\n import LanguageDefinition from "'.concat(t,'";\n if (window["').concat(o,'"]) {\n window["').concat(o,'"](LanguageDefinition)\n }\n'),window[o]=function(e){i.remove(),window[o]=null,n(e)},document.head.appendChild(i)})));case 1:case"end":return n.stop()}}),n)})))}var WC=Object(d.a)((function e(t,n,r){Object(c.a)(this,e),this.property=t,this.normal=n,r&&(this.space=r)}));function UC(e,t){for(var n={},r={},o=-1;++o<e.length;)Object.assign(n,e[o].property),Object.assign(r,e[o].normal);return new WC(n,r,t)}function KC(e){return e.toLowerCase()}WC.prototype.property={},WC.prototype.normal={},WC.prototype.space=null;var GC=Object(d.a)((function e(t,n){Object(c.a)(this,e),this.property=t,this.attribute=n}));GC.prototype.space=null,GC.prototype.boolean=!1,GC.prototype.booleanish=!1,GC.prototype.overloadedBoolean=!1,GC.prototype.number=!1,GC.prototype.commaSeparated=!1,GC.prototype.spaceSeparated=!1,GC.prototype.commaOrSpaceSeparated=!1,GC.prototype.mustUseProperty=!1,GC.prototype.defined=!1;var JC=0,YC=rj(),ZC=rj(),XC=rj(),QC=rj(),ej=rj(),tj=rj(),nj=rj();function rj(){return Math.pow(2,++JC)}var oj=Object.keys(r),ij=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e,o,i,s){var l;Object(c.a)(this,n);var u=-1;if(l=t.call(this,e,o),aj(Object(a.a)(l),"space",s),"number"===typeof i)for(;++u<oj.length;){var d=oj[u];aj(Object(a.a)(l),oj[u],(i&r[d])===r[d])}return l}return Object(d.a)(n)}(GC);function aj(e,t,n){n&&(e[t]=n)}ij.prototype.defined=!0;var sj={}.hasOwnProperty;function lj(e){var t,n={},r={};for(t in e.properties)if(sj.call(e.properties,t)){var o=e.properties[t],i=new ij(t,e.transform(e.attributes||{},t),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(t)&&(i.mustUseProperty=!0),n[t]=i,r[KC(t)]=t,r[KC(i.attribute)]=t}return new WC(n,r,e.space)}var uj=lj({space:"xlink",transform:function(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),cj=lj({space:"xml",transform:function(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function dj(e,t){return t in e?e[t]:t}function fj(e,t){return dj(e,t.toLowerCase())}var pj=lj({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:fj,properties:{xmlns:null,xmlnsXLink:null}}),hj=lj({transform:function(e,t){return"role"===t?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:ZC,ariaAutoComplete:null,ariaBusy:ZC,ariaChecked:ZC,ariaColCount:QC,ariaColIndex:QC,ariaColSpan:QC,ariaControls:ej,ariaCurrent:null,ariaDescribedBy:ej,ariaDetails:null,ariaDisabled:ZC,ariaDropEffect:ej,ariaErrorMessage:null,ariaExpanded:ZC,ariaFlowTo:ej,ariaGrabbed:ZC,ariaHasPopup:null,ariaHidden:ZC,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ej,ariaLevel:QC,ariaLive:null,ariaModal:ZC,ariaMultiLine:ZC,ariaMultiSelectable:ZC,ariaOrientation:null,ariaOwns:ej,ariaPlaceholder:null,ariaPosInSet:QC,ariaPressed:ZC,ariaReadOnly:ZC,ariaRelevant:null,ariaRequired:ZC,ariaRoleDescription:ej,ariaRowCount:QC,ariaRowIndex:QC,ariaRowSpan:QC,ariaSelected:ZC,ariaSetSize:QC,ariaSort:null,ariaValueMax:QC,ariaValueMin:QC,ariaValueNow:QC,ariaValueText:null,role:null}}),mj=lj({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:fj,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:tj,acceptCharset:ej,accessKey:ej,action:null,allow:null,allowFullScreen:YC,allowPaymentRequest:YC,allowUserMedia:YC,alt:null,as:null,async:YC,autoCapitalize:null,autoComplete:ej,autoFocus:YC,autoPlay:YC,capture:YC,charSet:null,checked:YC,cite:null,className:ej,cols:QC,colSpan:null,content:null,contentEditable:ZC,controls:YC,controlsList:ej,coords:QC|tj,crossOrigin:null,data:null,dateTime:null,decoding:null,default:YC,defer:YC,dir:null,dirName:null,disabled:YC,download:XC,draggable:ZC,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:YC,formTarget:null,headers:ej,height:QC,hidden:YC,high:QC,href:null,hrefLang:null,htmlFor:ej,httpEquiv:ej,id:null,imageSizes:null,imageSrcSet:null,inputMode:null,integrity:null,is:null,isMap:YC,itemId:null,itemProp:ej,itemRef:ej,itemScope:YC,itemType:ej,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:YC,low:QC,manifest:null,max:null,maxLength:QC,media:null,method:null,min:null,minLength:QC,multiple:YC,muted:YC,name:null,nonce:null,noModule:YC,noValidate:YC,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforePrint:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:YC,optimum:QC,pattern:null,ping:ej,placeholder:null,playsInline:YC,poster:null,preload:null,readOnly:YC,referrerPolicy:null,rel:ej,required:YC,reversed:YC,rows:QC,rowSpan:QC,sandbox:ej,scope:null,scoped:YC,seamless:YC,selected:YC,shape:null,size:QC,sizes:null,slot:null,span:QC,spellCheck:ZC,src:null,srcDoc:null,srcLang:null,srcSet:null,start:QC,step:null,style:null,tabIndex:QC,target:null,title:null,translate:null,type:null,typeMustMatch:YC,useMap:null,value:ZC,width:QC,wrap:null,align:null,aLink:null,archive:ej,axis:null,background:null,bgColor:null,border:QC,borderColor:null,bottomMargin:QC,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:YC,declare:YC,event:null,face:null,frame:null,frameBorder:null,hSpace:QC,leftMargin:QC,link:null,longDesc:null,lowSrc:null,marginHeight:QC,marginWidth:QC,noResize:YC,noHref:YC,noShade:YC,noWrap:YC,object:null,profile:null,prompt:null,rev:null,rightMargin:QC,rules:null,scheme:null,scrolling:ZC,standby:null,summary:null,text:null,topMargin:QC,valueType:null,version:null,vAlign:null,vLink:null,vSpace:QC,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:YC,disableRemotePlayback:YC,prefix:null,property:null,results:QC,security:null,unselectable:null}}),vj=lj({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:dj,properties:{about:nj,accentHeight:QC,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:QC,amplitude:QC,arabicForm:null,ascent:QC,attributeName:null,attributeType:null,azimuth:QC,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:QC,by:null,calcMode:null,capHeight:QC,className:ej,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:QC,diffuseConstant:QC,direction:null,display:null,dur:null,divisor:QC,dominantBaseline:null,download:YC,dx:null,dy:null,edgeMode:null,editable:null,elevation:QC,enableBackground:null,end:null,event:null,exponent:QC,externalResourcesRequired:null,fill:null,fillOpacity:QC,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:tj,g2:tj,glyphName:tj,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:QC,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:QC,horizOriginX:QC,horizOriginY:QC,id:null,ideographic:QC,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:QC,k:QC,k1:QC,k2:QC,k3:QC,k4:QC,kernelMatrix:nj,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:QC,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:QC,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:QC,overlineThickness:QC,paintOrder:null,panose1:null,path:null,pathLength:QC,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ej,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:QC,pointsAtY:QC,pointsAtZ:QC,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:nj,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:nj,rev:nj,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:nj,requiredFeatures:nj,requiredFonts:nj,requiredFormats:nj,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:QC,specularExponent:QC,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:QC,strikethroughThickness:QC,string:null,stroke:null,strokeDashArray:nj,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:QC,strokeOpacity:QC,strokeWidth:null,style:null,surfaceScale:QC,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:nj,tabIndex:QC,tableValues:null,target:null,targetX:QC,targetY:QC,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:nj,to:null,transform:null,u1:null,u2:null,underlinePosition:QC,underlineThickness:QC,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:QC,values:null,vAlphabetic:QC,vMathematical:QC,vectorEffect:null,vHanging:QC,vIdeographic:QC,version:null,vertAdvY:QC,vertOriginX:QC,vertOriginY:QC,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:QC,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),gj=UC([cj,uj,pj,hj,mj],"html"),yj=(UC([cj,uj,pj,hj,vj],"svg"),/^data[-\w.:]+$/i),bj=/-[a-z]/g,wj=/[A-Z]/g;function kj(e){return"-"+e.toLowerCase()}function xj(e){return e.charAt(1).toUpperCase()}var Oj=/[#.]/g,Sj=function(e){for(var t,n,r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"div",i=e||"",a={},s=0;s<i.length;)Oj.lastIndex=s,r=Oj.exec(i),(t=i.slice(s,r?r.index:i.length))&&(n?"#"===n?a.id=t:Array.isArray(a.className)?a.className.push(t):a.className=[t]:o=t,s+=t.length),r&&(n=r[0],s++);return{type:"element",tagName:o,properties:a,children:[]}};function Cj(e){var t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function jj(e){for(var t,n,r=[],o=String(e||""),i=o.indexOf(","),a=0;!t;)-1===i&&(i=o.length,t=!0),!(n=o.slice(a,i).trim())&&t||r.push(n),a=i+1,i=o.indexOf(",",a);return r}var Dj=new Set(["menu","submit","reset","button"]),Ej={}.hasOwnProperty;function Aj(e,t){return null!==e&&void 0!==e&&"object"===typeof e&&!Array.isArray(e)&&("input"===t||!e.type||"string"!==typeof e.type||(!("children"in e)||!Array.isArray(e.children))&&("button"===t?Dj.has(e.type.toLowerCase()):!("value"in e)))}function Mj(e,t,n,r){var o,i=function(e,t){var n=KC(t),r=t,o=GC;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&yj.test(t)){if("-"===t.charAt(4)){var i=t.slice(5).replace(bj,xj);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{var a=t.slice(4);if(!bj.test(a)){var s=a.replace(wj,kj);"-"!==s.charAt(0)&&(s="-"+s),t="data"+s}}o=ij}return new o(r,t)}(e,n),a=-1;if(void 0!==r&&null!==r){if("number"===typeof r){if(Number.isNaN(r))return;o=r}else o="boolean"===typeof r?r:"string"===typeof r?i.spaceSeparated?Cj(r):i.commaSeparated?jj(r):i.commaOrSpaceSeparated?Cj(jj(r).join(" ")):Lj(i,i.property,r):Array.isArray(r)?r.concat():"style"===i.property?function(e){var t,n=[];for(t in e)Ej.call(e,t)&&n.push([t,e[t]].join(": "));return n.join("; ")}(r):String(r);if(Array.isArray(o)){for(var s=[];++a<o.length;)s[a]=Lj(i,i.property,o[a]);o=s}"className"===i.property&&Array.isArray(t.className)&&(o=t.className.concat(o)),t[i.property]=o}}function Tj(e,t){var n=-1;if(void 0===t||null===t);else if("string"===typeof t||"number"===typeof t)e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(;++n<t.length;)Tj(e,t[n]);else{if("object"!==typeof t||!("type"in t))throw new Error("Expected node, nodes, or string, got `"+t+"`");"root"===t.type?Tj(e,t.children):e.push(t)}}function Lj(e,t,n){if("string"===typeof n){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(""===n||KC(n)===KC(t)))return!0}return n}var Nj=function(e,t,n){var r=n&&function(e){var t={},n=-1;for(;++n<e.length;)t[e[n].toLowerCase()]=e[n];return t}(n);return function(n,o){for(var i,a,s=-1,l=arguments.length,u=new Array(l>2?l-2:0),c=2;c<l;c++)u[c-2]=arguments[c];if(void 0===n||null===n)i={type:"root",children:[]},u.unshift(o);else if((i=Sj(n,t)).tagName=i.tagName.toLowerCase(),r&&Ej.call(r,i.tagName)&&(i.tagName=r[i.tagName]),Aj(o,i.tagName))for(a in o)Ej.call(o,a)&&Mj(e,i.properties,a,o[a]);else u.unshift(o);for(;++s<u.length;)Tj(i.children,u[s]);return"element"===i.type&&"template"===i.tagName&&(i.content={type:"root",children:i.children},i.children=[]),i}}(gj,"div"),Pj=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],Rj={0:"\ufffd",128:"\u20ac",130:"\u201a",131:"\u0192",132:"\u201e",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02c6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017d",145:"\u2018",146:"\u2019",147:"\u201c",148:"\u201d",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02dc",153:"\u2122",154:"\u0161",155:"\u203a",156:"\u0153",158:"\u017e",159:"\u0178"};function Hj(e){var t="string"===typeof e?e.charCodeAt(0):e;return t>=48&&t<=57}function Fj(e){var t="string"===typeof e?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function Vj(e){return function(e){var t="string"===typeof e?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}(e)||Hj(e)}var zj={AElig:"\xc6",AMP:"&",Aacute:"\xc1",Abreve:"\u0102",Acirc:"\xc2",Acy:"\u0410",Afr:"\ud835\udd04",Agrave:"\xc0",Alpha:"\u0391",Amacr:"\u0100",And:"\u2a53",Aogon:"\u0104",Aopf:"\ud835\udd38",ApplyFunction:"\u2061",Aring:"\xc5",Ascr:"\ud835\udc9c",Assign:"\u2254",Atilde:"\xc3",Auml:"\xc4",Backslash:"\u2216",Barv:"\u2ae7",Barwed:"\u2306",Bcy:"\u0411",Because:"\u2235",Bernoullis:"\u212c",Beta:"\u0392",Bfr:"\ud835\udd05",Bopf:"\ud835\udd39",Breve:"\u02d8",Bscr:"\u212c",Bumpeq:"\u224e",CHcy:"\u0427",COPY:"\xa9",Cacute:"\u0106",Cap:"\u22d2",CapitalDifferentialD:"\u2145",Cayleys:"\u212d",Ccaron:"\u010c",Ccedil:"\xc7",Ccirc:"\u0108",Cconint:"\u2230",Cdot:"\u010a",Cedilla:"\xb8",CenterDot:"\xb7",Cfr:"\u212d",Chi:"\u03a7",CircleDot:"\u2299",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201d",CloseCurlyQuote:"\u2019",Colon:"\u2237",Colone:"\u2a74",Congruent:"\u2261",Conint:"\u222f",ContourIntegral:"\u222e",Copf:"\u2102",Coproduct:"\u2210",CounterClockwiseContourIntegral:"\u2233",Cross:"\u2a2f",Cscr:"\ud835\udc9e",Cup:"\u22d3",CupCap:"\u224d",DD:"\u2145",DDotrahd:"\u2911",DJcy:"\u0402",DScy:"\u0405",DZcy:"\u040f",Dagger:"\u2021",Darr:"\u21a1",Dashv:"\u2ae4",Dcaron:"\u010e",Dcy:"\u0414",Del:"\u2207",Delta:"\u0394",Dfr:"\ud835\udd07",DiacriticalAcute:"\xb4",DiacriticalDot:"\u02d9",DiacriticalDoubleAcute:"\u02dd",DiacriticalGrave:"`",DiacriticalTilde:"\u02dc",Diamond:"\u22c4",DifferentialD:"\u2146",Dopf:"\ud835\udd3b",Dot:"\xa8",DotDot:"\u20dc",DotEqual:"\u2250",DoubleContourIntegral:"\u222f",DoubleDot:"\xa8",DoubleDownArrow:"\u21d3",DoubleLeftArrow:"\u21d0",DoubleLeftRightArrow:"\u21d4",DoubleLeftTee:"\u2ae4",DoubleLongLeftArrow:"\u27f8",DoubleLongLeftRightArrow:"\u27fa",DoubleLongRightArrow:"\u27f9",DoubleRightArrow:"\u21d2",DoubleRightTee:"\u22a8",DoubleUpArrow:"\u21d1",DoubleUpDownArrow:"\u21d5",DoubleVerticalBar:"\u2225",DownArrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21f5",DownBreve:"\u0311",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295e",DownLeftVector:"\u21bd",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295f",DownRightVector:"\u21c1",DownRightVectorBar:"\u2957",DownTee:"\u22a4",DownTeeArrow:"\u21a7",Downarrow:"\u21d3",Dscr:"\ud835\udc9f",Dstrok:"\u0110",ENG:"\u014a",ETH:"\xd0",Eacute:"\xc9",Ecaron:"\u011a",Ecirc:"\xca",Ecy:"\u042d",Edot:"\u0116",Efr:"\ud835\udd08",Egrave:"\xc8",Element:"\u2208",Emacr:"\u0112",EmptySmallSquare:"\u25fb",EmptyVerySmallSquare:"\u25ab",Eogon:"\u0118",Eopf:"\ud835\udd3c",Epsilon:"\u0395",Equal:"\u2a75",EqualTilde:"\u2242",Equilibrium:"\u21cc",Escr:"\u2130",Esim:"\u2a73",Eta:"\u0397",Euml:"\xcb",Exists:"\u2203",ExponentialE:"\u2147",Fcy:"\u0424",Ffr:"\ud835\udd09",FilledSmallSquare:"\u25fc",FilledVerySmallSquare:"\u25aa",Fopf:"\ud835\udd3d",ForAll:"\u2200",Fouriertrf:"\u2131",Fscr:"\u2131",GJcy:"\u0403",GT:">",Gamma:"\u0393",Gammad:"\u03dc",Gbreve:"\u011e",Gcedil:"\u0122",Gcirc:"\u011c",Gcy:"\u0413",Gdot:"\u0120",Gfr:"\ud835\udd0a",Gg:"\u22d9",Gopf:"\ud835\udd3e",GreaterEqual:"\u2265",GreaterEqualLess:"\u22db",GreaterFullEqual:"\u2267",GreaterGreater:"\u2aa2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2a7e",GreaterTilde:"\u2273",Gscr:"\ud835\udca2",Gt:"\u226b",HARDcy:"\u042a",Hacek:"\u02c7",Hat:"^",Hcirc:"\u0124",Hfr:"\u210c",HilbertSpace:"\u210b",Hopf:"\u210d",HorizontalLine:"\u2500",Hscr:"\u210b",Hstrok:"\u0126",HumpDownHump:"\u224e",HumpEqual:"\u224f",IEcy:"\u0415",IJlig:"\u0132",IOcy:"\u0401",Iacute:"\xcd",Icirc:"\xce",Icy:"\u0418",Idot:"\u0130",Ifr:"\u2111",Igrave:"\xcc",Im:"\u2111",Imacr:"\u012a",ImaginaryI:"\u2148",Implies:"\u21d2",Int:"\u222c",Integral:"\u222b",Intersection:"\u22c2",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",Iogon:"\u012e",Iopf:"\ud835\udd40",Iota:"\u0399",Iscr:"\u2110",Itilde:"\u0128",Iukcy:"\u0406",Iuml:"\xcf",Jcirc:"\u0134",Jcy:"\u0419",Jfr:"\ud835\udd0d",Jopf:"\ud835\udd41",Jscr:"\ud835\udca5",Jsercy:"\u0408",Jukcy:"\u0404",KHcy:"\u0425",KJcy:"\u040c",Kappa:"\u039a",Kcedil:"\u0136",Kcy:"\u041a",Kfr:"\ud835\udd0e",Kopf:"\ud835\udd42",Kscr:"\ud835\udca6",LJcy:"\u0409",LT:"<",Lacute:"\u0139",Lambda:"\u039b",Lang:"\u27ea",Laplacetrf:"\u2112",Larr:"\u219e",Lcaron:"\u013d",Lcedil:"\u013b",Lcy:"\u041b",LeftAngleBracket:"\u27e8",LeftArrow:"\u2190",LeftArrowBar:"\u21e4",LeftArrowRightArrow:"\u21c6",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27e6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21c3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230a",LeftRightArrow:"\u2194",LeftRightVector:"\u294e",LeftTee:"\u22a3",LeftTeeArrow:"\u21a4",LeftTeeVector:"\u295a",LeftTriangle:"\u22b2",LeftTriangleBar:"\u29cf",LeftTriangleEqual:"\u22b4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21bf",LeftUpVectorBar:"\u2958",LeftVector:"\u21bc",LeftVectorBar:"\u2952",Leftarrow:"\u21d0",Leftrightarrow:"\u21d4",LessEqualGreater:"\u22da",LessFullEqual:"\u2266",LessGreater:"\u2276",LessLess:"\u2aa1",LessSlantEqual:"\u2a7d",LessTilde:"\u2272",Lfr:"\ud835\udd0f",Ll:"\u22d8",Lleftarrow:"\u21da",Lmidot:"\u013f",LongLeftArrow:"\u27f5",LongLeftRightArrow:"\u27f7",LongRightArrow:"\u27f6",Longleftarrow:"\u27f8",Longleftrightarrow:"\u27fa",Longrightarrow:"\u27f9",Lopf:"\ud835\udd43",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",Lscr:"\u2112",Lsh:"\u21b0",Lstrok:"\u0141",Lt:"\u226a",Map:"\u2905",Mcy:"\u041c",MediumSpace:"\u205f",Mellintrf:"\u2133",Mfr:"\ud835\udd10",MinusPlus:"\u2213",Mopf:"\ud835\udd44",Mscr:"\u2133",Mu:"\u039c",NJcy:"\u040a",Nacute:"\u0143",Ncaron:"\u0147",Ncedil:"\u0145",Ncy:"\u041d",NegativeMediumSpace:"\u200b",NegativeThickSpace:"\u200b",NegativeThinSpace:"\u200b",NegativeVeryThinSpace:"\u200b",NestedGreaterGreater:"\u226b",NestedLessLess:"\u226a",NewLine:"\n",Nfr:"\ud835\udd11",NoBreak:"\u2060",NonBreakingSpace:"\xa0",Nopf:"\u2115",Not:"\u2aec",NotCongruent:"\u2262",NotCupCap:"\u226d",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226f",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226b\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2a7e\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224e\u0338",NotHumpEqual:"\u224f\u0338",NotLeftTriangle:"\u22ea",NotLeftTriangleBar:"\u29cf\u0338",NotLeftTriangleEqual:"\u22ec",NotLess:"\u226e",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226a\u0338",NotLessSlantEqual:"\u2a7d\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2aa2\u0338",NotNestedLessLess:"\u2aa1\u0338",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2aaf\u0338",NotPrecedesSlantEqual:"\u22e0",NotReverseElement:"\u220c",NotRightTriangle:"\u22eb",NotRightTriangleBar:"\u29d0\u0338",NotRightTriangleEqual:"\u22ed",NotSquareSubset:"\u228f\u0338",NotSquareSubsetEqual:"\u22e2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22e3",NotSubset:"\u2282\u20d2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2ab0\u0338",NotSucceedsSlantEqual:"\u22e1",NotSucceedsTilde:"\u227f\u0338",NotSuperset:"\u2283\u20d2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",Nscr:"\ud835\udca9",Ntilde:"\xd1",Nu:"\u039d",OElig:"\u0152",Oacute:"\xd3",Ocirc:"\xd4",Ocy:"\u041e",Odblac:"\u0150",Ofr:"\ud835\udd12",Ograve:"\xd2",Omacr:"\u014c",Omega:"\u03a9",Omicron:"\u039f",Oopf:"\ud835\udd46",OpenCurlyDoubleQuote:"\u201c",OpenCurlyQuote:"\u2018",Or:"\u2a54",Oscr:"\ud835\udcaa",Oslash:"\xd8",Otilde:"\xd5",Otimes:"\u2a37",Ouml:"\xd6",OverBar:"\u203e",OverBrace:"\u23de",OverBracket:"\u23b4",OverParenthesis:"\u23dc",PartialD:"\u2202",Pcy:"\u041f",Pfr:"\ud835\udd13",Phi:"\u03a6",Pi:"\u03a0",PlusMinus:"\xb1",Poincareplane:"\u210c",Popf:"\u2119",Pr:"\u2abb",Precedes:"\u227a",PrecedesEqual:"\u2aaf",PrecedesSlantEqual:"\u227c",PrecedesTilde:"\u227e",Prime:"\u2033",Product:"\u220f",Proportion:"\u2237",Proportional:"\u221d",Pscr:"\ud835\udcab",Psi:"\u03a8",QUOT:'"',Qfr:"\ud835\udd14",Qopf:"\u211a",Qscr:"\ud835\udcac",RBarr:"\u2910",REG:"\xae",Racute:"\u0154",Rang:"\u27eb",Rarr:"\u21a0",Rarrtl:"\u2916",Rcaron:"\u0158",Rcedil:"\u0156",Rcy:"\u0420",Re:"\u211c",ReverseElement:"\u220b",ReverseEquilibrium:"\u21cb",ReverseUpEquilibrium:"\u296f",Rfr:"\u211c",Rho:"\u03a1",RightAngleBracket:"\u27e9",RightArrow:"\u2192",RightArrowBar:"\u21e5",RightArrowLeftArrow:"\u21c4",RightCeiling:"\u2309",RightDoubleBracket:"\u27e7",RightDownTeeVector:"\u295d",RightDownVector:"\u21c2",RightDownVectorBar:"\u2955",RightFloor:"\u230b",RightTee:"\u22a2",RightTeeArrow:"\u21a6",RightTeeVector:"\u295b",RightTriangle:"\u22b3",RightTriangleBar:"\u29d0",RightTriangleEqual:"\u22b5",RightUpDownVector:"\u294f",RightUpTeeVector:"\u295c",RightUpVector:"\u21be",RightUpVectorBar:"\u2954",RightVector:"\u21c0",RightVectorBar:"\u2953",Rightarrow:"\u21d2",Ropf:"\u211d",RoundImplies:"\u2970",Rrightarrow:"\u21db",Rscr:"\u211b",Rsh:"\u21b1",RuleDelayed:"\u29f4",SHCHcy:"\u0429",SHcy:"\u0428",SOFTcy:"\u042c",Sacute:"\u015a",Sc:"\u2abc",Scaron:"\u0160",Scedil:"\u015e",Scirc:"\u015c",Scy:"\u0421",Sfr:"\ud835\udd16",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",Sigma:"\u03a3",SmallCircle:"\u2218",Sopf:"\ud835\udd4a",Sqrt:"\u221a",Square:"\u25a1",SquareIntersection:"\u2293",SquareSubset:"\u228f",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",Sscr:"\ud835\udcae",Star:"\u22c6",Sub:"\u22d0",Subset:"\u22d0",SubsetEqual:"\u2286",Succeeds:"\u227b",SucceedsEqual:"\u2ab0",SucceedsSlantEqual:"\u227d",SucceedsTilde:"\u227f",SuchThat:"\u220b",Sum:"\u2211",Sup:"\u22d1",Superset:"\u2283",SupersetEqual:"\u2287",Supset:"\u22d1",THORN:"\xde",TRADE:"\u2122",TSHcy:"\u040b",TScy:"\u0426",Tab:"\t",Tau:"\u03a4",Tcaron:"\u0164",Tcedil:"\u0162",Tcy:"\u0422",Tfr:"\ud835\udd17",Therefore:"\u2234",Theta:"\u0398",ThickSpace:"\u205f\u200a",ThinSpace:"\u2009",Tilde:"\u223c",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",Topf:"\ud835\udd4b",TripleDot:"\u20db",Tscr:"\ud835\udcaf",Tstrok:"\u0166",Uacute:"\xda",Uarr:"\u219f",Uarrocir:"\u2949",Ubrcy:"\u040e",Ubreve:"\u016c",Ucirc:"\xdb",Ucy:"\u0423",Udblac:"\u0170",Ufr:"\ud835\udd18",Ugrave:"\xd9",Umacr:"\u016a",UnderBar:"_",UnderBrace:"\u23df",UnderBracket:"\u23b5",UnderParenthesis:"\u23dd",Union:"\u22c3",UnionPlus:"\u228e",Uogon:"\u0172",Uopf:"\ud835\udd4c",UpArrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21c5",UpDownArrow:"\u2195",UpEquilibrium:"\u296e",UpTee:"\u22a5",UpTeeArrow:"\u21a5",Uparrow:"\u21d1",Updownarrow:"\u21d5",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",Upsi:"\u03d2",Upsilon:"\u03a5",Uring:"\u016e",Uscr:"\ud835\udcb0",Utilde:"\u0168",Uuml:"\xdc",VDash:"\u22ab",Vbar:"\u2aeb",Vcy:"\u0412",Vdash:"\u22a9",Vdashl:"\u2ae6",Vee:"\u22c1",Verbar:"\u2016",Vert:"\u2016",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200a",Vfr:"\ud835\udd19",Vopf:"\ud835\udd4d",Vscr:"\ud835\udcb1",Vvdash:"\u22aa",Wcirc:"\u0174",Wedge:"\u22c0",Wfr:"\ud835\udd1a",Wopf:"\ud835\udd4e",Wscr:"\ud835\udcb2",Xfr:"\ud835\udd1b",Xi:"\u039e",Xopf:"\ud835\udd4f",Xscr:"\ud835\udcb3",YAcy:"\u042f",YIcy:"\u0407",YUcy:"\u042e",Yacute:"\xdd",Ycirc:"\u0176",Ycy:"\u042b",Yfr:"\ud835\udd1c",Yopf:"\ud835\udd50",Yscr:"\ud835\udcb4",Yuml:"\u0178",ZHcy:"\u0416",Zacute:"\u0179",Zcaron:"\u017d",Zcy:"\u0417",Zdot:"\u017b",ZeroWidthSpace:"\u200b",Zeta:"\u0396",Zfr:"\u2128",Zopf:"\u2124",Zscr:"\ud835\udcb5",aacute:"\xe1",abreve:"\u0103",ac:"\u223e",acE:"\u223e\u0333",acd:"\u223f",acirc:"\xe2",acute:"\xb4",acy:"\u0430",aelig:"\xe6",af:"\u2061",afr:"\ud835\udd1e",agrave:"\xe0",alefsym:"\u2135",aleph:"\u2135",alpha:"\u03b1",amacr:"\u0101",amalg:"\u2a3f",amp:"&",and:"\u2227",andand:"\u2a55",andd:"\u2a5c",andslope:"\u2a58",andv:"\u2a5a",ang:"\u2220",ange:"\u29a4",angle:"\u2220",angmsd:"\u2221",angmsdaa:"\u29a8",angmsdab:"\u29a9",angmsdac:"\u29aa",angmsdad:"\u29ab",angmsdae:"\u29ac",angmsdaf:"\u29ad",angmsdag:"\u29ae",angmsdah:"\u29af",angrt:"\u221f",angrtvb:"\u22be",angrtvbd:"\u299d",angsph:"\u2222",angst:"\xc5",angzarr:"\u237c",aogon:"\u0105",aopf:"\ud835\udd52",ap:"\u2248",apE:"\u2a70",apacir:"\u2a6f",ape:"\u224a",apid:"\u224b",apos:"'",approx:"\u2248",approxeq:"\u224a",aring:"\xe5",ascr:"\ud835\udcb6",ast:"*",asymp:"\u2248",asympeq:"\u224d",atilde:"\xe3",auml:"\xe4",awconint:"\u2233",awint:"\u2a11",bNot:"\u2aed",backcong:"\u224c",backepsilon:"\u03f6",backprime:"\u2035",backsim:"\u223d",backsimeq:"\u22cd",barvee:"\u22bd",barwed:"\u2305",barwedge:"\u2305",bbrk:"\u23b5",bbrktbrk:"\u23b6",bcong:"\u224c",bcy:"\u0431",bdquo:"\u201e",becaus:"\u2235",because:"\u2235",bemptyv:"\u29b0",bepsi:"\u03f6",bernou:"\u212c",beta:"\u03b2",beth:"\u2136",between:"\u226c",bfr:"\ud835\udd1f",bigcap:"\u22c2",bigcirc:"\u25ef",bigcup:"\u22c3",bigodot:"\u2a00",bigoplus:"\u2a01",bigotimes:"\u2a02",bigsqcup:"\u2a06",bigstar:"\u2605",bigtriangledown:"\u25bd",bigtriangleup:"\u25b3",biguplus:"\u2a04",bigvee:"\u22c1",bigwedge:"\u22c0",bkarow:"\u290d",blacklozenge:"\u29eb",blacksquare:"\u25aa",blacktriangle:"\u25b4",blacktriangledown:"\u25be",blacktriangleleft:"\u25c2",blacktriangleright:"\u25b8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20e5",bnequiv:"\u2261\u20e5",bnot:"\u2310",bopf:"\ud835\udd53",bot:"\u22a5",bottom:"\u22a5",bowtie:"\u22c8",boxDL:"\u2557",boxDR:"\u2554",boxDl:"\u2556",boxDr:"\u2553",boxH:"\u2550",boxHD:"\u2566",boxHU:"\u2569",boxHd:"\u2564",boxHu:"\u2567",boxUL:"\u255d",boxUR:"\u255a",boxUl:"\u255c",boxUr:"\u2559",boxV:"\u2551",boxVH:"\u256c",boxVL:"\u2563",boxVR:"\u2560",boxVh:"\u256b",boxVl:"\u2562",boxVr:"\u255f",boxbox:"\u29c9",boxdL:"\u2555",boxdR:"\u2552",boxdl:"\u2510",boxdr:"\u250c",boxh:"\u2500",boxhD:"\u2565",boxhU:"\u2568",boxhd:"\u252c",boxhu:"\u2534",boxminus:"\u229f",boxplus:"\u229e",boxtimes:"\u22a0",boxuL:"\u255b",boxuR:"\u2558",boxul:"\u2518",boxur:"\u2514",boxv:"\u2502",boxvH:"\u256a",boxvL:"\u2561",boxvR:"\u255e",boxvh:"\u253c",boxvl:"\u2524",boxvr:"\u251c",bprime:"\u2035",breve:"\u02d8",brvbar:"\xa6",bscr:"\ud835\udcb7",bsemi:"\u204f",bsim:"\u223d",bsime:"\u22cd",bsol:"\\",bsolb:"\u29c5",bsolhsub:"\u27c8",bull:"\u2022",bullet:"\u2022",bump:"\u224e",bumpE:"\u2aae",bumpe:"\u224f",bumpeq:"\u224f",cacute:"\u0107",cap:"\u2229",capand:"\u2a44",capbrcup:"\u2a49",capcap:"\u2a4b",capcup:"\u2a47",capdot:"\u2a40",caps:"\u2229\ufe00",caret:"\u2041",caron:"\u02c7",ccaps:"\u2a4d",ccaron:"\u010d",ccedil:"\xe7",ccirc:"\u0109",ccups:"\u2a4c",ccupssm:"\u2a50",cdot:"\u010b",cedil:"\xb8",cemptyv:"\u29b2",cent:"\xa2",centerdot:"\xb7",cfr:"\ud835\udd20",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",chi:"\u03c7",cir:"\u25cb",cirE:"\u29c3",circ:"\u02c6",circeq:"\u2257",circlearrowleft:"\u21ba",circlearrowright:"\u21bb",circledR:"\xae",circledS:"\u24c8",circledast:"\u229b",circledcirc:"\u229a",circleddash:"\u229d",cire:"\u2257",cirfnint:"\u2a10",cirmid:"\u2aef",cirscir:"\u29c2",clubs:"\u2663",clubsuit:"\u2663",colon:":",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2a6d",conint:"\u222e",copf:"\ud835\udd54",coprod:"\u2210",copy:"\xa9",copysr:"\u2117",crarr:"\u21b5",cross:"\u2717",cscr:"\ud835\udcb8",csub:"\u2acf",csube:"\u2ad1",csup:"\u2ad0",csupe:"\u2ad2",ctdot:"\u22ef",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22de",cuesc:"\u22df",cularr:"\u21b6",cularrp:"\u293d",cup:"\u222a",cupbrcap:"\u2a48",cupcap:"\u2a46",cupcup:"\u2a4a",cupdot:"\u228d",cupor:"\u2a45",cups:"\u222a\ufe00",curarr:"\u21b7",curarrm:"\u293c",curlyeqprec:"\u22de",curlyeqsucc:"\u22df",curlyvee:"\u22ce",curlywedge:"\u22cf",curren:"\xa4",curvearrowleft:"\u21b6",curvearrowright:"\u21b7",cuvee:"\u22ce",cuwed:"\u22cf",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232d",dArr:"\u21d3",dHar:"\u2965",dagger:"\u2020",daleth:"\u2138",darr:"\u2193",dash:"\u2010",dashv:"\u22a3",dbkarow:"\u290f",dblac:"\u02dd",dcaron:"\u010f",dcy:"\u0434",dd:"\u2146",ddagger:"\u2021",ddarr:"\u21ca",ddotseq:"\u2a77",deg:"\xb0",delta:"\u03b4",demptyv:"\u29b1",dfisht:"\u297f",dfr:"\ud835\udd21",dharl:"\u21c3",dharr:"\u21c2",diam:"\u22c4",diamond:"\u22c4",diamondsuit:"\u2666",diams:"\u2666",die:"\xa8",digamma:"\u03dd",disin:"\u22f2",div:"\xf7",divide:"\xf7",divideontimes:"\u22c7",divonx:"\u22c7",djcy:"\u0452",dlcorn:"\u231e",dlcrop:"\u230d",dollar:"$",dopf:"\ud835\udd55",dot:"\u02d9",doteq:"\u2250",doteqdot:"\u2251",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22a1",doublebarwedge:"\u2306",downarrow:"\u2193",downdownarrows:"\u21ca",downharpoonleft:"\u21c3",downharpoonright:"\u21c2",drbkarow:"\u2910",drcorn:"\u231f",drcrop:"\u230c",dscr:"\ud835\udcb9",dscy:"\u0455",dsol:"\u29f6",dstrok:"\u0111",dtdot:"\u22f1",dtri:"\u25bf",dtrif:"\u25be",duarr:"\u21f5",duhar:"\u296f",dwangle:"\u29a6",dzcy:"\u045f",dzigrarr:"\u27ff",eDDot:"\u2a77",eDot:"\u2251",eacute:"\xe9",easter:"\u2a6e",ecaron:"\u011b",ecir:"\u2256",ecirc:"\xea",ecolon:"\u2255",ecy:"\u044d",edot:"\u0117",ee:"\u2147",efDot:"\u2252",efr:"\ud835\udd22",eg:"\u2a9a",egrave:"\xe8",egs:"\u2a96",egsdot:"\u2a98",el:"\u2a99",elinters:"\u23e7",ell:"\u2113",els:"\u2a95",elsdot:"\u2a97",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",emptyv:"\u2205",emsp13:"\u2004",emsp14:"\u2005",emsp:"\u2003",eng:"\u014b",ensp:"\u2002",eogon:"\u0119",eopf:"\ud835\udd56",epar:"\u22d5",eparsl:"\u29e3",eplus:"\u2a71",epsi:"\u03b5",epsilon:"\u03b5",epsiv:"\u03f5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2a96",eqslantless:"\u2a95",equals:"=",equest:"\u225f",equiv:"\u2261",equivDD:"\u2a78",eqvparsl:"\u29e5",erDot:"\u2253",erarr:"\u2971",escr:"\u212f",esdot:"\u2250",esim:"\u2242",eta:"\u03b7",eth:"\xf0",euml:"\xeb",euro:"\u20ac",excl:"!",exist:"\u2203",expectation:"\u2130",exponentiale:"\u2147",fallingdotseq:"\u2252",fcy:"\u0444",female:"\u2640",ffilig:"\ufb03",fflig:"\ufb00",ffllig:"\ufb04",ffr:"\ud835\udd23",filig:"\ufb01",fjlig:"fj",flat:"\u266d",fllig:"\ufb02",fltns:"\u25b1",fnof:"\u0192",fopf:"\ud835\udd57",forall:"\u2200",fork:"\u22d4",forkv:"\u2ad9",fpartint:"\u2a0d",frac12:"\xbd",frac13:"\u2153",frac14:"\xbc",frac15:"\u2155",frac16:"\u2159",frac18:"\u215b",frac23:"\u2154",frac25:"\u2156",frac34:"\xbe",frac35:"\u2157",frac38:"\u215c",frac45:"\u2158",frac56:"\u215a",frac58:"\u215d",frac78:"\u215e",frasl:"\u2044",frown:"\u2322",fscr:"\ud835\udcbb",gE:"\u2267",gEl:"\u2a8c",gacute:"\u01f5",gamma:"\u03b3",gammad:"\u03dd",gap:"\u2a86",gbreve:"\u011f",gcirc:"\u011d",gcy:"\u0433",gdot:"\u0121",ge:"\u2265",gel:"\u22db",geq:"\u2265",geqq:"\u2267",geqslant:"\u2a7e",ges:"\u2a7e",gescc:"\u2aa9",gesdot:"\u2a80",gesdoto:"\u2a82",gesdotol:"\u2a84",gesl:"\u22db\ufe00",gesles:"\u2a94",gfr:"\ud835\udd24",gg:"\u226b",ggg:"\u22d9",gimel:"\u2137",gjcy:"\u0453",gl:"\u2277",glE:"\u2a92",gla:"\u2aa5",glj:"\u2aa4",gnE:"\u2269",gnap:"\u2a8a",gnapprox:"\u2a8a",gne:"\u2a88",gneq:"\u2a88",gneqq:"\u2269",gnsim:"\u22e7",gopf:"\ud835\udd58",grave:"`",gscr:"\u210a",gsim:"\u2273",gsime:"\u2a8e",gsiml:"\u2a90",gt:">",gtcc:"\u2aa7",gtcir:"\u2a7a",gtdot:"\u22d7",gtlPar:"\u2995",gtquest:"\u2a7c",gtrapprox:"\u2a86",gtrarr:"\u2978",gtrdot:"\u22d7",gtreqless:"\u22db",gtreqqless:"\u2a8c",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\ufe00",gvnE:"\u2269\ufe00",hArr:"\u21d4",hairsp:"\u200a",half:"\xbd",hamilt:"\u210b",hardcy:"\u044a",harr:"\u2194",harrcir:"\u2948",harrw:"\u21ad",hbar:"\u210f",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22b9",hfr:"\ud835\udd25",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21ff",homtht:"\u223b",hookleftarrow:"\u21a9",hookrightarrow:"\u21aa",hopf:"\ud835\udd59",horbar:"\u2015",hscr:"\ud835\udcbd",hslash:"\u210f",hstrok:"\u0127",hybull:"\u2043",hyphen:"\u2010",iacute:"\xed",ic:"\u2063",icirc:"\xee",icy:"\u0438",iecy:"\u0435",iexcl:"\xa1",iff:"\u21d4",ifr:"\ud835\udd26",igrave:"\xec",ii:"\u2148",iiiint:"\u2a0c",iiint:"\u222d",iinfin:"\u29dc",iiota:"\u2129",ijlig:"\u0133",imacr:"\u012b",image:"\u2111",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",imof:"\u22b7",imped:"\u01b5",in:"\u2208",incare:"\u2105",infin:"\u221e",infintie:"\u29dd",inodot:"\u0131",int:"\u222b",intcal:"\u22ba",integers:"\u2124",intercal:"\u22ba",intlarhk:"\u2a17",intprod:"\u2a3c",iocy:"\u0451",iogon:"\u012f",iopf:"\ud835\udd5a",iota:"\u03b9",iprod:"\u2a3c",iquest:"\xbf",iscr:"\ud835\udcbe",isin:"\u2208",isinE:"\u22f9",isindot:"\u22f5",isins:"\u22f4",isinsv:"\u22f3",isinv:"\u2208",it:"\u2062",itilde:"\u0129",iukcy:"\u0456",iuml:"\xef",jcirc:"\u0135",jcy:"\u0439",jfr:"\ud835\udd27",jmath:"\u0237",jopf:"\ud835\udd5b",jscr:"\ud835\udcbf",jsercy:"\u0458",jukcy:"\u0454",kappa:"\u03ba",kappav:"\u03f0",kcedil:"\u0137",kcy:"\u043a",kfr:"\ud835\udd28",kgreen:"\u0138",khcy:"\u0445",kjcy:"\u045c",kopf:"\ud835\udd5c",kscr:"\ud835\udcc0",lAarr:"\u21da",lArr:"\u21d0",lAtail:"\u291b",lBarr:"\u290e",lE:"\u2266",lEg:"\u2a8b",lHar:"\u2962",lacute:"\u013a",laemptyv:"\u29b4",lagran:"\u2112",lambda:"\u03bb",lang:"\u27e8",langd:"\u2991",langle:"\u27e8",lap:"\u2a85",laquo:"\xab",larr:"\u2190",larrb:"\u21e4",larrbfs:"\u291f",larrfs:"\u291d",larrhk:"\u21a9",larrlp:"\u21ab",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21a2",lat:"\u2aab",latail:"\u2919",late:"\u2aad",lates:"\u2aad\ufe00",lbarr:"\u290c",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298b",lbrksld:"\u298f",lbrkslu:"\u298d",lcaron:"\u013e",lcedil:"\u013c",lceil:"\u2308",lcub:"{",lcy:"\u043b",ldca:"\u2936",ldquo:"\u201c",ldquor:"\u201e",ldrdhar:"\u2967",ldrushar:"\u294b",ldsh:"\u21b2",le:"\u2264",leftarrow:"\u2190",leftarrowtail:"\u21a2",leftharpoondown:"\u21bd",leftharpoonup:"\u21bc",leftleftarrows:"\u21c7",leftrightarrow:"\u2194",leftrightarrows:"\u21c6",leftrightharpoons:"\u21cb",leftrightsquigarrow:"\u21ad",leftthreetimes:"\u22cb",leg:"\u22da",leq:"\u2264",leqq:"\u2266",leqslant:"\u2a7d",les:"\u2a7d",lescc:"\u2aa8",lesdot:"\u2a7f",lesdoto:"\u2a81",lesdotor:"\u2a83",lesg:"\u22da\ufe00",lesges:"\u2a93",lessapprox:"\u2a85",lessdot:"\u22d6",lesseqgtr:"\u22da",lesseqqgtr:"\u2a8b",lessgtr:"\u2276",lesssim:"\u2272",lfisht:"\u297c",lfloor:"\u230a",lfr:"\ud835\udd29",lg:"\u2276",lgE:"\u2a91",lhard:"\u21bd",lharu:"\u21bc",lharul:"\u296a",lhblk:"\u2584",ljcy:"\u0459",ll:"\u226a",llarr:"\u21c7",llcorner:"\u231e",llhard:"\u296b",lltri:"\u25fa",lmidot:"\u0140",lmoust:"\u23b0",lmoustache:"\u23b0",lnE:"\u2268",lnap:"\u2a89",lnapprox:"\u2a89",lne:"\u2a87",lneq:"\u2a87",lneqq:"\u2268",lnsim:"\u22e6",loang:"\u27ec",loarr:"\u21fd",lobrk:"\u27e6",longleftarrow:"\u27f5",longleftrightarrow:"\u27f7",longmapsto:"\u27fc",longrightarrow:"\u27f6",looparrowleft:"\u21ab",looparrowright:"\u21ac",lopar:"\u2985",lopf:"\ud835\udd5d",loplus:"\u2a2d",lotimes:"\u2a34",lowast:"\u2217",lowbar:"_",loz:"\u25ca",lozenge:"\u25ca",lozf:"\u29eb",lpar:"(",lparlt:"\u2993",lrarr:"\u21c6",lrcorner:"\u231f",lrhar:"\u21cb",lrhard:"\u296d",lrm:"\u200e",lrtri:"\u22bf",lsaquo:"\u2039",lscr:"\ud835\udcc1",lsh:"\u21b0",lsim:"\u2272",lsime:"\u2a8d",lsimg:"\u2a8f",lsqb:"[",lsquo:"\u2018",lsquor:"\u201a",lstrok:"\u0142",lt:"<",ltcc:"\u2aa6",ltcir:"\u2a79",ltdot:"\u22d6",lthree:"\u22cb",ltimes:"\u22c9",ltlarr:"\u2976",ltquest:"\u2a7b",ltrPar:"\u2996",ltri:"\u25c3",ltrie:"\u22b4",ltrif:"\u25c2",lurdshar:"\u294a",luruhar:"\u2966",lvertneqq:"\u2268\ufe00",lvnE:"\u2268\ufe00",mDDot:"\u223a",macr:"\xaf",male:"\u2642",malt:"\u2720",maltese:"\u2720",map:"\u21a6",mapsto:"\u21a6",mapstodown:"\u21a7",mapstoleft:"\u21a4",mapstoup:"\u21a5",marker:"\u25ae",mcomma:"\u2a29",mcy:"\u043c",mdash:"\u2014",measuredangle:"\u2221",mfr:"\ud835\udd2a",mho:"\u2127",micro:"\xb5",mid:"\u2223",midast:"*",midcir:"\u2af0",middot:"\xb7",minus:"\u2212",minusb:"\u229f",minusd:"\u2238",minusdu:"\u2a2a",mlcp:"\u2adb",mldr:"\u2026",mnplus:"\u2213",models:"\u22a7",mopf:"\ud835\udd5e",mp:"\u2213",mscr:"\ud835\udcc2",mstpos:"\u223e",mu:"\u03bc",multimap:"\u22b8",mumap:"\u22b8",nGg:"\u22d9\u0338",nGt:"\u226b\u20d2",nGtv:"\u226b\u0338",nLeftarrow:"\u21cd",nLeftrightarrow:"\u21ce",nLl:"\u22d8\u0338",nLt:"\u226a\u20d2",nLtv:"\u226a\u0338",nRightarrow:"\u21cf",nVDash:"\u22af",nVdash:"\u22ae",nabla:"\u2207",nacute:"\u0144",nang:"\u2220\u20d2",nap:"\u2249",napE:"\u2a70\u0338",napid:"\u224b\u0338",napos:"\u0149",napprox:"\u2249",natur:"\u266e",natural:"\u266e",naturals:"\u2115",nbsp:"\xa0",nbump:"\u224e\u0338",nbumpe:"\u224f\u0338",ncap:"\u2a43",ncaron:"\u0148",ncedil:"\u0146",ncong:"\u2247",ncongdot:"\u2a6d\u0338",ncup:"\u2a42",ncy:"\u043d",ndash:"\u2013",ne:"\u2260",neArr:"\u21d7",nearhk:"\u2924",nearr:"\u2197",nearrow:"\u2197",nedot:"\u2250\u0338",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",nexist:"\u2204",nexists:"\u2204",nfr:"\ud835\udd2b",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2a7e\u0338",nges:"\u2a7e\u0338",ngsim:"\u2275",ngt:"\u226f",ngtr:"\u226f",nhArr:"\u21ce",nharr:"\u21ae",nhpar:"\u2af2",ni:"\u220b",nis:"\u22fc",nisd:"\u22fa",niv:"\u220b",njcy:"\u045a",nlArr:"\u21cd",nlE:"\u2266\u0338",nlarr:"\u219a",nldr:"\u2025",nle:"\u2270",nleftarrow:"\u219a",nleftrightarrow:"\u21ae",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2a7d\u0338",nles:"\u2a7d\u0338",nless:"\u226e",nlsim:"\u2274",nlt:"\u226e",nltri:"\u22ea",nltrie:"\u22ec",nmid:"\u2224",nopf:"\ud835\udd5f",not:"\xac",notin:"\u2209",notinE:"\u22f9\u0338",notindot:"\u22f5\u0338",notinva:"\u2209",notinvb:"\u22f7",notinvc:"\u22f6",notni:"\u220c",notniva:"\u220c",notnivb:"\u22fe",notnivc:"\u22fd",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2afd\u20e5",npart:"\u2202\u0338",npolint:"\u2a14",npr:"\u2280",nprcue:"\u22e0",npre:"\u2aaf\u0338",nprec:"\u2280",npreceq:"\u2aaf\u0338",nrArr:"\u21cf",nrarr:"\u219b",nrarrc:"\u2933\u0338",nrarrw:"\u219d\u0338",nrightarrow:"\u219b",nrtri:"\u22eb",nrtrie:"\u22ed",nsc:"\u2281",nsccue:"\u22e1",nsce:"\u2ab0\u0338",nscr:"\ud835\udcc3",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22e2",nsqsupe:"\u22e3",nsub:"\u2284",nsubE:"\u2ac5\u0338",nsube:"\u2288",nsubset:"\u2282\u20d2",nsubseteq:"\u2288",nsubseteqq:"\u2ac5\u0338",nsucc:"\u2281",nsucceq:"\u2ab0\u0338",nsup:"\u2285",nsupE:"\u2ac6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20d2",nsupseteq:"\u2289",nsupseteqq:"\u2ac6\u0338",ntgl:"\u2279",ntilde:"\xf1",ntlg:"\u2278",ntriangleleft:"\u22ea",ntrianglelefteq:"\u22ec",ntriangleright:"\u22eb",ntrianglerighteq:"\u22ed",nu:"\u03bd",num:"#",numero:"\u2116",numsp:"\u2007",nvDash:"\u22ad",nvHarr:"\u2904",nvap:"\u224d\u20d2",nvdash:"\u22ac",nvge:"\u2265\u20d2",nvgt:">\u20d2",nvinfin:"\u29de",nvlArr:"\u2902",nvle:"\u2264\u20d2",nvlt:"<\u20d2",nvltrie:"\u22b4\u20d2",nvrArr:"\u2903",nvrtrie:"\u22b5\u20d2",nvsim:"\u223c\u20d2",nwArr:"\u21d6",nwarhk:"\u2923",nwarr:"\u2196",nwarrow:"\u2196",nwnear:"\u2927",oS:"\u24c8",oacute:"\xf3",oast:"\u229b",ocir:"\u229a",ocirc:"\xf4",ocy:"\u043e",odash:"\u229d",odblac:"\u0151",odiv:"\u2a38",odot:"\u2299",odsold:"\u29bc",oelig:"\u0153",ofcir:"\u29bf",ofr:"\ud835\udd2c",ogon:"\u02db",ograve:"\xf2",ogt:"\u29c1",ohbar:"\u29b5",ohm:"\u03a9",oint:"\u222e",olarr:"\u21ba",olcir:"\u29be",olcross:"\u29bb",oline:"\u203e",olt:"\u29c0",omacr:"\u014d",omega:"\u03c9",omicron:"\u03bf",omid:"\u29b6",ominus:"\u2296",oopf:"\ud835\udd60",opar:"\u29b7",operp:"\u29b9",oplus:"\u2295",or:"\u2228",orarr:"\u21bb",ord:"\u2a5d",order:"\u2134",orderof:"\u2134",ordf:"\xaa",ordm:"\xba",origof:"\u22b6",oror:"\u2a56",orslope:"\u2a57",orv:"\u2a5b",oscr:"\u2134",oslash:"\xf8",osol:"\u2298",otilde:"\xf5",otimes:"\u2297",otimesas:"\u2a36",ouml:"\xf6",ovbar:"\u233d",par:"\u2225",para:"\xb6",parallel:"\u2225",parsim:"\u2af3",parsl:"\u2afd",part:"\u2202",pcy:"\u043f",percnt:"%",period:".",permil:"\u2030",perp:"\u22a5",pertenk:"\u2031",pfr:"\ud835\udd2d",phi:"\u03c6",phiv:"\u03d5",phmmat:"\u2133",phone:"\u260e",pi:"\u03c0",pitchfork:"\u22d4",piv:"\u03d6",planck:"\u210f",planckh:"\u210e",plankv:"\u210f",plus:"+",plusacir:"\u2a23",plusb:"\u229e",pluscir:"\u2a22",plusdo:"\u2214",plusdu:"\u2a25",pluse:"\u2a72",plusmn:"\xb1",plussim:"\u2a26",plustwo:"\u2a27",pm:"\xb1",pointint:"\u2a15",popf:"\ud835\udd61",pound:"\xa3",pr:"\u227a",prE:"\u2ab3",prap:"\u2ab7",prcue:"\u227c",pre:"\u2aaf",prec:"\u227a",precapprox:"\u2ab7",preccurlyeq:"\u227c",preceq:"\u2aaf",precnapprox:"\u2ab9",precneqq:"\u2ab5",precnsim:"\u22e8",precsim:"\u227e",prime:"\u2032",primes:"\u2119",prnE:"\u2ab5",prnap:"\u2ab9",prnsim:"\u22e8",prod:"\u220f",profalar:"\u232e",profline:"\u2312",profsurf:"\u2313",prop:"\u221d",propto:"\u221d",prsim:"\u227e",prurel:"\u22b0",pscr:"\ud835\udcc5",psi:"\u03c8",puncsp:"\u2008",qfr:"\ud835\udd2e",qint:"\u2a0c",qopf:"\ud835\udd62",qprime:"\u2057",qscr:"\ud835\udcc6",quaternions:"\u210d",quatint:"\u2a16",quest:"?",questeq:"\u225f",quot:'"',rAarr:"\u21db",rArr:"\u21d2",rAtail:"\u291c",rBarr:"\u290f",rHar:"\u2964",race:"\u223d\u0331",racute:"\u0155",radic:"\u221a",raemptyv:"\u29b3",rang:"\u27e9",rangd:"\u2992",range:"\u29a5",rangle:"\u27e9",raquo:"\xbb",rarr:"\u2192",rarrap:"\u2975",rarrb:"\u21e5",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291e",rarrhk:"\u21aa",rarrlp:"\u21ac",rarrpl:"\u2945",rarrsim:"\u2974",rarrtl:"\u21a3",rarrw:"\u219d",ratail:"\u291a",ratio:"\u2236",rationals:"\u211a",rbarr:"\u290d",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298c",rbrksld:"\u298e",rbrkslu:"\u2990",rcaron:"\u0159",rcedil:"\u0157",rceil:"\u2309",rcub:"}",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201d",rdquor:"\u201d",rdsh:"\u21b3",real:"\u211c",realine:"\u211b",realpart:"\u211c",reals:"\u211d",rect:"\u25ad",reg:"\xae",rfisht:"\u297d",rfloor:"\u230b",rfr:"\ud835\udd2f",rhard:"\u21c1",rharu:"\u21c0",rharul:"\u296c",rho:"\u03c1",rhov:"\u03f1",rightarrow:"\u2192",rightarrowtail:"\u21a3",rightharpoondown:"\u21c1",rightharpoonup:"\u21c0",rightleftarrows:"\u21c4",rightleftharpoons:"\u21cc",rightrightarrows:"\u21c9",rightsquigarrow:"\u219d",rightthreetimes:"\u22cc",ring:"\u02da",risingdotseq:"\u2253",rlarr:"\u21c4",rlhar:"\u21cc",rlm:"\u200f",rmoust:"\u23b1",rmoustache:"\u23b1",rnmid:"\u2aee",roang:"\u27ed",roarr:"\u21fe",robrk:"\u27e7",ropar:"\u2986",ropf:"\ud835\udd63",roplus:"\u2a2e",rotimes:"\u2a35",rpar:")",rpargt:"\u2994",rppolint:"\u2a12",rrarr:"\u21c9",rsaquo:"\u203a",rscr:"\ud835\udcc7",rsh:"\u21b1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22cc",rtimes:"\u22ca",rtri:"\u25b9",rtrie:"\u22b5",rtrif:"\u25b8",rtriltri:"\u29ce",ruluhar:"\u2968",rx:"\u211e",sacute:"\u015b",sbquo:"\u201a",sc:"\u227b",scE:"\u2ab4",scap:"\u2ab8",scaron:"\u0161",sccue:"\u227d",sce:"\u2ab0",scedil:"\u015f",scirc:"\u015d",scnE:"\u2ab6",scnap:"\u2aba",scnsim:"\u22e9",scpolint:"\u2a13",scsim:"\u227f",scy:"\u0441",sdot:"\u22c5",sdotb:"\u22a1",sdote:"\u2a66",seArr:"\u21d8",searhk:"\u2925",searr:"\u2198",searrow:"\u2198",sect:"\xa7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",sfr:"\ud835\udd30",sfrown:"\u2322",sharp:"\u266f",shchcy:"\u0449",shcy:"\u0448",shortmid:"\u2223",shortparallel:"\u2225",shy:"\xad",sigma:"\u03c3",sigmaf:"\u03c2",sigmav:"\u03c2",sim:"\u223c",simdot:"\u2a6a",sime:"\u2243",simeq:"\u2243",simg:"\u2a9e",simgE:"\u2aa0",siml:"\u2a9d",simlE:"\u2a9f",simne:"\u2246",simplus:"\u2a24",simrarr:"\u2972",slarr:"\u2190",smallsetminus:"\u2216",smashp:"\u2a33",smeparsl:"\u29e4",smid:"\u2223",smile:"\u2323",smt:"\u2aaa",smte:"\u2aac",smtes:"\u2aac\ufe00",softcy:"\u044c",sol:"/",solb:"\u29c4",solbar:"\u233f",sopf:"\ud835\udd64",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\ufe00",sqcup:"\u2294",sqcups:"\u2294\ufe00",sqsub:"\u228f",sqsube:"\u2291",sqsubset:"\u228f",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",squ:"\u25a1",square:"\u25a1",squarf:"\u25aa",squf:"\u25aa",srarr:"\u2192",sscr:"\ud835\udcc8",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22c6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03f5",straightphi:"\u03d5",strns:"\xaf",sub:"\u2282",subE:"\u2ac5",subdot:"\u2abd",sube:"\u2286",subedot:"\u2ac3",submult:"\u2ac1",subnE:"\u2acb",subne:"\u228a",subplus:"\u2abf",subrarr:"\u2979",subset:"\u2282",subseteq:"\u2286",subseteqq:"\u2ac5",subsetneq:"\u228a",subsetneqq:"\u2acb",subsim:"\u2ac7",subsub:"\u2ad5",subsup:"\u2ad3",succ:"\u227b",succapprox:"\u2ab8",succcurlyeq:"\u227d",succeq:"\u2ab0",succnapprox:"\u2aba",succneqq:"\u2ab6",succnsim:"\u22e9",succsim:"\u227f",sum:"\u2211",sung:"\u266a",sup1:"\xb9",sup2:"\xb2",sup3:"\xb3",sup:"\u2283",supE:"\u2ac6",supdot:"\u2abe",supdsub:"\u2ad8",supe:"\u2287",supedot:"\u2ac4",suphsol:"\u27c9",suphsub:"\u2ad7",suplarr:"\u297b",supmult:"\u2ac2",supnE:"\u2acc",supne:"\u228b",supplus:"\u2ac0",supset:"\u2283",supseteq:"\u2287",supseteqq:"\u2ac6",supsetneq:"\u228b",supsetneqq:"\u2acc",supsim:"\u2ac8",supsub:"\u2ad4",supsup:"\u2ad6",swArr:"\u21d9",swarhk:"\u2926",swarr:"\u2199",swarrow:"\u2199",swnwar:"\u292a",szlig:"\xdf",target:"\u2316",tau:"\u03c4",tbrk:"\u23b4",tcaron:"\u0165",tcedil:"\u0163",tcy:"\u0442",tdot:"\u20db",telrec:"\u2315",tfr:"\ud835\udd31",there4:"\u2234",therefore:"\u2234",theta:"\u03b8",thetasym:"\u03d1",thetav:"\u03d1",thickapprox:"\u2248",thicksim:"\u223c",thinsp:"\u2009",thkap:"\u2248",thksim:"\u223c",thorn:"\xfe",tilde:"\u02dc",times:"\xd7",timesb:"\u22a0",timesbar:"\u2a31",timesd:"\u2a30",tint:"\u222d",toea:"\u2928",top:"\u22a4",topbot:"\u2336",topcir:"\u2af1",topf:"\ud835\udd65",topfork:"\u2ada",tosa:"\u2929",tprime:"\u2034",trade:"\u2122",triangle:"\u25b5",triangledown:"\u25bf",triangleleft:"\u25c3",trianglelefteq:"\u22b4",triangleq:"\u225c",triangleright:"\u25b9",trianglerighteq:"\u22b5",tridot:"\u25ec",trie:"\u225c",triminus:"\u2a3a",triplus:"\u2a39",trisb:"\u29cd",tritime:"\u2a3b",trpezium:"\u23e2",tscr:"\ud835\udcc9",tscy:"\u0446",tshcy:"\u045b",tstrok:"\u0167",twixt:"\u226c",twoheadleftarrow:"\u219e",twoheadrightarrow:"\u21a0",uArr:"\u21d1",uHar:"\u2963",uacute:"\xfa",uarr:"\u2191",ubrcy:"\u045e",ubreve:"\u016d",ucirc:"\xfb",ucy:"\u0443",udarr:"\u21c5",udblac:"\u0171",udhar:"\u296e",ufisht:"\u297e",ufr:"\ud835\udd32",ugrave:"\xf9",uharl:"\u21bf",uharr:"\u21be",uhblk:"\u2580",ulcorn:"\u231c",ulcorner:"\u231c",ulcrop:"\u230f",ultri:"\u25f8",umacr:"\u016b",uml:"\xa8",uogon:"\u0173",uopf:"\ud835\udd66",uparrow:"\u2191",updownarrow:"\u2195",upharpoonleft:"\u21bf",upharpoonright:"\u21be",uplus:"\u228e",upsi:"\u03c5",upsih:"\u03d2",upsilon:"\u03c5",upuparrows:"\u21c8",urcorn:"\u231d",urcorner:"\u231d",urcrop:"\u230e",uring:"\u016f",urtri:"\u25f9",uscr:"\ud835\udcca",utdot:"\u22f0",utilde:"\u0169",utri:"\u25b5",utrif:"\u25b4",uuarr:"\u21c8",uuml:"\xfc",uwangle:"\u29a7",vArr:"\u21d5",vBar:"\u2ae8",vBarv:"\u2ae9",vDash:"\u22a8",vangrt:"\u299c",varepsilon:"\u03f5",varkappa:"\u03f0",varnothing:"\u2205",varphi:"\u03d5",varpi:"\u03d6",varpropto:"\u221d",varr:"\u2195",varrho:"\u03f1",varsigma:"\u03c2",varsubsetneq:"\u228a\ufe00",varsubsetneqq:"\u2acb\ufe00",varsupsetneq:"\u228b\ufe00",varsupsetneqq:"\u2acc\ufe00",vartheta:"\u03d1",vartriangleleft:"\u22b2",vartriangleright:"\u22b3",vcy:"\u0432",vdash:"\u22a2",vee:"\u2228",veebar:"\u22bb",veeeq:"\u225a",vellip:"\u22ee",verbar:"|",vert:"|",vfr:"\ud835\udd33",vltri:"\u22b2",vnsub:"\u2282\u20d2",vnsup:"\u2283\u20d2",vopf:"\ud835\udd67",vprop:"\u221d",vrtri:"\u22b3",vscr:"\ud835\udccb",vsubnE:"\u2acb\ufe00",vsubne:"\u228a\ufe00",vsupnE:"\u2acc\ufe00",vsupne:"\u228b\ufe00",vzigzag:"\u299a",wcirc:"\u0175",wedbar:"\u2a5f",wedge:"\u2227",wedgeq:"\u2259",weierp:"\u2118",wfr:"\ud835\udd34",wopf:"\ud835\udd68",wp:"\u2118",wr:"\u2240",wreath:"\u2240",wscr:"\ud835\udccc",xcap:"\u22c2",xcirc:"\u25ef",xcup:"\u22c3",xdtri:"\u25bd",xfr:"\ud835\udd35",xhArr:"\u27fa",xharr:"\u27f7",xi:"\u03be",xlArr:"\u27f8",xlarr:"\u27f5",xmap:"\u27fc",xnis:"\u22fb",xodot:"\u2a00",xopf:"\ud835\udd69",xoplus:"\u2a01",xotime:"\u2a02",xrArr:"\u27f9",xrarr:"\u27f6",xscr:"\ud835\udccd",xsqcup:"\u2a06",xuplus:"\u2a04",xutri:"\u25b3",xvee:"\u22c1",xwedge:"\u22c0",yacute:"\xfd",yacy:"\u044f",ycirc:"\u0177",ycy:"\u044b",yen:"\xa5",yfr:"\ud835\udd36",yicy:"\u0457",yopf:"\ud835\udd6a",yscr:"\ud835\udcce",yucy:"\u044e",yuml:"\xff",zacute:"\u017a",zcaron:"\u017e",zcy:"\u0437",zdot:"\u017c",zeetrf:"\u2128",zeta:"\u03b6",zfr:"\ud835\udd37",zhcy:"\u0436",zigrarr:"\u21dd",zopf:"\ud835\udd6b",zscr:"\ud835\udccf",zwj:"\u200d",zwnj:"\u200c"},Bj={}.hasOwnProperty;function _j(e){return!!Bj.call(zj,e)&&zj[e]}var Ij=String.fromCharCode,$j=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function qj(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o="string"===typeof r.additional?r.additional.charCodeAt(0):r.additional,i=[],a=0,s=-1,l="";r.position&&("start"in r.position||"indent"in r.position?(n=r.position.indent,t=r.position.start):t=r.position);var u,c=(t?t.line:0)||1,d=(t?t.column:0)||1,f=N();for(a--;++a<=e.length;)if(10===u&&(d=(n?n[s]:0)||1),38===(u=e.charCodeAt(a))){var p=e.charCodeAt(a+1);if(9===p||10===p||12===p||32===p||38===p||60===p||Number.isNaN(p)||o&&p===o){l+=Ij(u),d++;continue}var h=a+1,m=h,v=h,g=void 0;if(35===p){v=++m;var y=e.charCodeAt(v);88===y||120===y?(g="hexadecimal",v=++m):g="decimal"}else g="named";var b="",w="",k="",x="named"===g?Vj:"decimal"===g?Hj:Fj;for(v--;++v<=e.length;){var O=e.charCodeAt(v);if(!x(O))break;k+=Ij(O),"named"===g&&Pj.includes(k)&&(b=k,w=_j(k))}var S=59===e.charCodeAt(v);if(S){v++;var C="named"===g&&_j(k);C&&(b=k,w=C)}var j=1+v-h,D="";if(S||!1!==r.nonTerminated)if(k)if("named"===g){if(S&&!w)P(5,1);else if(b!==k&&(j=1+(v=m+b.length)-m,S=!1),!S){var E=b?1:3;if(r.attribute){var A=e.charCodeAt(v);61===A?(P(E,j),w=""):Vj(A)?w="":P(E,j)}else P(E,j)}D=w}else{S||P(2,j);var M=Number.parseInt(k,"hexadecimal"===g?16:10);if(Wj(M))P(7,j),D=Ij(65533);else if(M in Rj)P(6,j),D=Rj[M];else{var T="";Uj(M)&&P(6,j),M>65535&&(T+=Ij((M-=65536)>>>10|55296),M=56320|1023&M),D=T+Ij(M)}}else"named"!==g&&P(4,j);else;if(D){R(),f=N(),a=v-1,d+=v-h+1,i.push(D);var L=N();L.offset++,r.reference&&r.reference.call(r.referenceContext,D,{start:f,end:L},e.slice(h-1,v)),f=L}else k=e.slice(h-1,v),l+=k,d+=k.length,a=v-1}else 10===u&&(c++,s++,d=0),Number.isNaN(u)?R():(l+=Ij(u),d++);return i.join("");function N(){return{line:c,column:d,offset:a+((t?t.offset:0)||0)}}function P(e,t){var n;r.warning&&((n=N()).column+=t,n.offset+=t,r.warning.call(r.warningContext,$j[e],n,e))}function R(){l&&(i.push(l),r.text&&r.text.call(r.textContext,l,{start:f,end:N()}),l="")}}function Wj(e){return e>=55296&&e<=57343||e>1114111}function Uj(e){return e>=1&&e<=8||11===e||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||65535===(65535&e)||65534===(65535&e)}var Kj=0,Gj={},Jj={util:{type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++Kj}),e.__id},clone:function e(t,n){var r,o;switch(n=n||{},Jj.util.type(t)){case"Object":if(o=Jj.util.objId(t),n[o])return n[o];for(var i in r={},n[o]=r,t)t.hasOwnProperty(i)&&(r[i]=e(t[i],n));return r;case"Array":return o=Jj.util.objId(t),n[o]?n[o]:(r=[],n[o]=r,t.forEach((function(t,o){r[o]=e(t,n)})),r);default:return t}}},languages:{plain:Gj,plaintext:Gj,text:Gj,txt:Gj,extend:function(e,t){var n=Jj.util.clone(Jj.languages[e]);for(var r in t)n[r]=t[r];return n},insertBefore:function(e,t,n,r){var o=(r=r||Jj.languages)[e],i={};for(var a in o)if(o.hasOwnProperty(a)){if(a==t)for(var s in n)n.hasOwnProperty(s)&&(i[s]=n[s]);n.hasOwnProperty(a)||(i[a]=o[a])}var l=r[e];return r[e]=i,Jj.languages.DFS(Jj.languages,(function(t,n){n===l&&t!=e&&(this[t]=i)})),i},DFS:function e(t,n,r,o){o=o||{};var i=Jj.util.objId;for(var a in t)if(t.hasOwnProperty(a)){n.call(t,a,t[a],r||a);var s=t[a],l=Jj.util.type(s);"Object"!==l||o[i(s)]?"Array"!==l||o[i(s)]||(o[i(s)]=!0,e(s,n,a,o)):(o[i(s)]=!0,e(s,n,null,o))}}},plugins:{},highlight:function(e,t,n){var r={code:e,grammar:t,language:n};if(Jj.hooks.run("before-tokenize",r),!r.grammar)throw new Error('The language "'+r.language+'" has no grammar.');return r.tokens=Jj.tokenize(r.code,r.grammar),Jj.hooks.run("after-tokenize",r),Yj.stringify(Jj.util.encode(r.tokens),r.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var o=new Qj;return eD(o,o.head,e),Xj(e,o,t,o.head,0),function(e){var t=[],n=e.head.next;for(;n!==e.tail;)t.push(n.value),n=n.next;return t}(o)},hooks:{all:{},add:function(e,t){var n=Jj.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=Jj.hooks.all[e];if(n&&n.length)for(var r,o=0;r=n[o++];)r(t)}},Token:Yj};function Yj(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length}function Zj(e,t,n,r){e.lastIndex=t;var o=e.exec(n);if(o&&r&&o[1]){var i=o[1].length;o.index+=i,o[0]=o[0].slice(i)}return o}function Xj(e,t,n,r,o,i){for(var a in n)if(n.hasOwnProperty(a)&&n[a]){var s=n[a];s=Array.isArray(s)?s:[s];for(var l=0;l<s.length;++l){if(i&&i.cause==a+","+l)return;var u=s[l],c=u.inside,d=!!u.lookbehind,f=!!u.greedy,p=u.alias;if(f&&!u.pattern.global){var h=u.pattern.toString().match(/[imsuy]*$/)[0];u.pattern=RegExp(u.pattern.source,h+"g")}for(var m=u.pattern||u,v=r.next,g=o;v!==t.tail&&!(i&&g>=i.reach);g+=v.value.length,v=v.next){var y=v.value;if(t.length>e.length)return;if(!(y instanceof Yj)){var b,w=1;if(f){if(!(b=Zj(m,g,e,d))||b.index>=e.length)break;var k=b.index,x=b.index+b[0].length,O=g;for(O+=v.value.length;k>=O;)O+=(v=v.next).value.length;if(g=O-=v.value.length,v.value instanceof Yj)continue;for(var S=v;S!==t.tail&&(O<x||"string"===typeof S.value);S=S.next)w++,O+=S.value.length;w--,y=e.slice(g,O),b.index-=g}else if(!(b=Zj(m,0,y,d)))continue;k=b.index;var C=b[0],j=y.slice(0,k),D=y.slice(k+C.length),E=g+y.length;i&&E>i.reach&&(i.reach=E);var A=v.prev;if(j&&(A=eD(t,A,j),g+=j.length),tD(t,A,w),v=eD(t,A,new Yj(a,c?Jj.tokenize(C,c):C,p,C)),D&&eD(t,v,D),w>1){var M={cause:a+","+l,reach:E};Xj(e,t,n,v.prev,g,M),i&&M.reach>i.reach&&(i.reach=M.reach)}}}}}}function Qj(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function eD(e,t,n){var r=t.next,o={value:n,prev:t,next:r};return t.next=o,r.prev=o,e.length++,o}function tD(e,t,n){for(var r=t.next,o=0;o<n&&r!==e.tail;o++)r=r.next;t.next=r,r.prev=t,e.length-=o}var nD=Jj,rD={}.hasOwnProperty;function oD(){}oD.prototype=nD;var iD=new oD;iD.highlight=function(e,t){if("string"!==typeof e)throw new TypeError("Expected `string` for `value`, got `"+e+"`");var n,r;if(t&&"object"===typeof t)n=t;else{if("string"!==typeof(r=t))throw new TypeError("Expected `string` for `name`, got `"+r+"`");if(!rD.call(iD.languages,r))throw new Error("Unknown language: `"+r+"` is not registered");n=iD.languages[r]}return{type:"root",children:nD.highlight.call(iD,e,n,r)}},iD.register=function(e){if("function"!==typeof e||!e.displayName)throw new Error("Expected `function` for `syntax`, got `"+e+"`");rD.call(iD.languages,e.displayName)||e(iD)},iD.alias=function(e,t){var n,r=iD.languages,o={};"string"===typeof e?t&&(o[e]=t):o=e;for(n in o)if(rD.call(o,n))for(var i=o[n],a="string"===typeof i?[i]:i,s=-1;++s<a.length;)r[a[s]]=r[n]},iD.registered=function(e){if("string"!==typeof e)throw new TypeError("Expected `string` for `aliasOrLanguage`, got `"+e+"`");return rD.call(iD.languages,e)},iD.listLanguages=function(){var e,t=iD.languages,n=[];for(e in t)rD.call(t,e)&&"object"===typeof t[e]&&n.push(e);return n},iD.util.encode=function(e){return e},iD.Token.stringify=function e(t,n){if("string"===typeof t)return{type:"text",value:t};if(Array.isArray(t)){for(var r=[],i=-1;++i<t.length;)""!==t[i]&&null!==t[i]&&void 0!==t[i]&&r.push(e(t[i],n));return r}var a,s={type:t.type,content:e(t.content,n),tag:"span",classes:["token",t.type],attributes:{},language:n};t.alias&&(a=s.classes).push.apply(a,Object(o.a)("string"===typeof t.alias?[t.alias]:t.alias));return iD.hooks.run("wrap",s),Nj(s.tag+"."+s.classes.join("."),function(e){var t;for(t in e)rD.call(e,t)&&(e[t]=qj(e[t]));return e}(s.attributes),s.content)};var aD=n(41),sD=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(t){i(t)}}function s(e){try{l(r.throw(e))}catch(t){i(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};function lD(e){var t=e.editor,n=e.updateAttributes,r=e.node,o=e.forwardRef,a=null===r||void 0===r?void 0:r.attrs,s=a.language,l=a.indentLength,u=a.indentType,c=a.caretPosition,d=Object(jd.useState)(!1),f=Object(i.a)(d,2),p=f[0],h=f[1],m=Object(jd.useRef)(null),v=aD.find((function(e){var t;return e.filename===s||(null===(t=e.alias)||void 0===t?void 0:t.some((function(e){return e===s})))}));return Object(jd.useEffect)((function(){!function(){sD(this,void 0,void 0,ik().mark((function e(){var t,r;return ik().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s&&v&&!IC[s]){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,$C(v.filename);case 4:if(t=e.sent){e.next=7;break}return e.abrupt("return");case 7:iD.register(t),r=s===v.filename,n({language:v.filename},{preventUpdate:r,addToHistory:!1});case 10:case"end":return e.stop()}}),e)})))}()}),[s]),Object(Cd.jsxs)(Cd.Fragment,{children:[Object(Cd.jsxs)(af.Flex,Object.assign({sx:{flexDirection:"column",borderRadius:"default",overflow:"hidden"}},{children:[Object(Cd.jsx)(lf,{ref:o,as:"pre",autoCorrect:"off",autoCapitalize:"none",sx:{"div, span.token, span.line-number-widget, span.line-number::before":{fontFamily:"monospace",fontSize:"code",whiteSpace:"pre !important",tabSize:1},position:"relative",lineHeight:"20px",bg:"codeBg",color:"static",overflowX:"auto",display:"flex",px:2,pt:2,pb:1},spellCheck:!1}),Object(Cd.jsxs)(af.Flex,Object.assign({ref:m,contentEditable:!1,sx:{bg:"codeBg",alignItems:"center",justifyContent:"flex-end",borderTop:"1px solid var(--codeBorder)"}},{children:[c?Object(Cd.jsxs)(lf,Object.assign({variant:"subBody",sx:{mr:2,color:"codeFg"}},{children:["Line ",c.line,", Column ",c.column," ",c.selected?"(".concat(c.selected," selected)"):""]})):null,Object(Cd.jsx)(yf,Object.assign({variant:"icon",sx:{p:1,mr:1,opacity:"1 !important",":hover":{bg:"codeSelection"}},title:"Toggle indentation mode",disabled:!t.isEditable,onClick:function(){t.isEditable&&t.commands.changeCodeBlockIndentation({type:"space"===u?"tab":"space",amount:l})}},{children:Object(Cd.jsxs)(lf,Object.assign({variant:"subBody",sx:{color:"codeFg"}},{children:["space"===u?"Spaces":"Tabs",": ",l]}))})),Object(Cd.jsx)(yf,Object.assign({variant:"icon",sx:{opacity:"1 !important",p:1,mr:1,bg:p?"codeSelection":"transparent",":hover":{bg:"codeSelection"}},disabled:!t.isEditable,onClick:function(){t.isEditable&&h(!0)},title:"Change language"},{children:Object(Cd.jsx)(lf,Object.assign({variant:"subBody",spellCheck:!1,sx:{color:"codeFg"}},{children:(null===v||void 0===v?void 0:v.title)||"Plaintext"}))}))]}))]})),Object(Cd.jsx)(aw,Object.assign({isOpen:p,onClose:function(){h(!1),t.commands.focus()},focusOnRender:!1,mobile:"sheet",desktop:"menu",position:{target:m.current||void 0,align:"end",isTargetAbsolute:!0,location:"top",yOffset:5},title:"Change code block language"},{children:Object(Cd.jsx)(uD,{selectedLanguage:(null===v||void 0===v?void 0:v.filename)||"Plaintext",onLanguageSelected:function(e){n({language:e},{addToHistory:!0,preventUpdate:!1}),h(!1)},onClose:function(){return h(!1)}})}))]})}function uD(e){var t=e.onLanguageSelected,n=e.selectedLanguage,r=e.onClose,o=Object(jd.useState)(aD),a=Object(i.a)(o,2),s=a[0],l=a[1];return Object(Cd.jsx)(sw,Object.assign({title:"Select language",onClose:r},{children:Object(Cd.jsxs)(af.Flex,Object.assign({sx:{flexDirection:"column",height:200,width:["auto",300],overflowY:"auto",bg:"background"}},{children:[Object(Cd.jsx)(Dw,{onFocus:function(){console.log("EHLLO!")},autoFocus:!0,placeholder:"Search languages",sx:{width:"auto",position:"sticky",top:0,bg:"background",mx:2,p:"7px",zIndex:999},onChange:function(e){if(!e.target.value)return l(aD);var t=e.target.value.toLowerCase();l(aD.filter((function(e){var n;return e.title.toLowerCase().indexOf(t)>-1||(null===(n=e.alias)||void 0===n?void 0:n.some((function(e){return e.toLowerCase().indexOf(t)>-1})))})))}}),Object(Cd.jsx)(af.Flex,Object.assign({sx:{flexDirection:"column",pt:1,mt:1}},{children:s.map((function(e){return Object(Cd.jsxs)(yf,Object.assign({variant:"menuitem",sx:{textAlign:"left",py:1,display:"flex",justifyContent:"space-between",alignItems:"center"},onClick:function(){return t(e.filename)}},{children:[Object(Cd.jsx)(lf,Object.assign({variant:"body"},{children:e.title})),n===e.filename?Object(Cd.jsx)(mf,{path:vf.check,size:"small"}):e.alias?Object(Cd.jsx)(lf,Object.assign({variant:"subBody",sx:{fontSize:"10px"}},{children:e.alias.slice(0,3).join(", ")})):null]}),e.title)}))}))]}))}))}function cD(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e.reduce((function(e,n){if("comment"===n.type||"doctype"===n.type)return e;var r=Object(o.a)(t);return"element"===n.type&&n.properties&&r.push.apply(r,Object(o.a)(n.properties.className)),"element"===n.type?e.push.apply(e,Object(o.a)(cD(n.children,r))):e.push({classes:r,text:n.value}),e}),[])}function dD(e){var t=e.block,n=e.defaultLanguage,r=[],o=iD.listLanguages(),i=t.node,a=t.pos,s=i.textContent,l=i.attrs.language||n,u=o.includes(l)?iD.highlight(s,l).children||[]:null;if(u){var c=a+1;return cD(u).forEach((function(e){var t=c+e.text.length;if(e.classes.length){var n=zu.inline(c,t,{class:e.classes.join(" ")});r.push(n)}c=t})),r}}function fD(e){var t=e.name,n=e.defaultLanguage,r=new p.PluginKey("highlighter");return new p.Plugin({key:r,state:{init:function(e,r){var i=[];return To(r.doc,(function(e){return e.type.name===t})).forEach((function(e){i.push.apply(i,Object(o.a)(dD({block:e,defaultLanguage:n})||[]))})),Iu.create(r.doc,i)},apply:function(e,r,o,i){var a=o.selection.$head.parent.type.name,s=i.selection.$head.parent.type.name,l=a===t||s===t;if(e.docChanged&&l){var u=ho(i.selection.$head,(function(e){return e.type.name===t}));if(!u)return r.map(e.mapping,e.doc);var c=dD({block:u,defaultLanguage:n});return c?r.map(e.mapping,e.doc).add(e.doc,c):r.map(e.mapping,e.doc)}return r.map(e.mapping,e.doc)}},props:{decorations:function(e){return r.getState(e)}},appendTransaction:function(e,n,r){var o,i=n.selection.$head.parent.type.name,a=r.selection.$head.parent.type.name,s=e.some((function(e){return e.docChanged})),l=(i===t||a===t)&&!n.selection.eq(r.selection);if(s||l){var u=ho(r.selection.$head,(function(e){return e.type.name===t}));if(!u)return null;var c=r.tr,d=u.node,f=u.pos,p=Object.assign({},d.attrs);if(s||!(null===(o=p.lines)||void 0===o?void 0:o.length)){var h=jD(d.textContent,f);p.lines=h.slice()}if(s){var m=function(e,t){var n=e.$from,r=e.$to,o=e.$head;if(n.parent.type.name!==CD.name)return;t=t||function(e){return e.attrs.lines||[]}(n.parent);var i,a=Object(Sd.a)(t);try{for(a.s();!(i=a.n()).done;){var s=i.value;if(o.pos>=s.from&&o.pos<=s.to){var l=s.length+1;return{line:s.index+1,column:l-(s.to-o.pos),selected:r.pos-n.pos,total:t.length,from:s.from}}}}catch(u){a.e(u)}finally{a.f()}return}(r.selection,s?jD(d.textContent,f):void 0);p.caretPosition=m}return(s||l)&&c.setNodeMarkup(f,d.type,p),c}}})}var pD=/^(?:( )+|\t+)/,hD="space";function mD(e,t){var n,r,o,i=new Map,a=0,s=Object(Sd.a)(e.split(/\n/g));try{for(s.s();!(o=s.n()).done;){var l=o.value;if(l){var u=void 0,c=void 0,d=void 0,f=void 0,p=l.match(pD);if(null===p)a=0,n="";else{if(u=p[0].length,c=p[1]?hD:"tab",t&&c===hD&&1===u)continue;c!==n&&(a=0),n=c,d=0;var h=u-a;if(a=u,0===h)d++;else r=vD(c,h>0?h:-h);f=void 0===(f=i.get(r))?[1,0]:[++f[0],f[1]+d],i.set(r,f)}}}}catch(m){s.e(m)}finally{s.f()}return i}function vD(e,t){return(e===hD?"s":"t")+String(t)}function gD(e){if("string"!==typeof e)throw new TypeError("Expected a string");var t=mD(e,!0);0===t.size&&(t=mD(e,!1));var n,r,o=function(e){var t,n,r=0,o=0,a=Object(Sd.a)(e);try{for(a.s();!(n=a.n()).done;){var s=Object(i.a)(n.value,2),l=s[0],u=Object(i.a)(s[1],2),c=u[0],d=u[1];(c>r||c===r&&d>o)&&(r=c,o=d,t=l)}}catch(f){a.e(f)}finally{a.f()}return t}(t),a=0,s="";if(void 0!==o){var l={type:"s"===(r=o)[0]?hD:"tab",amount:Number(r.slice(1))};s=function(e,t){return(e===hD?" ":"\t").repeat(t)}(n=l.type,a=l.amount)}return{amount:a,type:n,indent:s}}var yD=n(62),bD=n.n(yD);function wD(e){var t=bD()(e);if(0===t)return e;var n=new RegExp("^[ \\t]{".concat(t,"}"),"gm");return e.replace(n,"")}function kD(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.indent,o=void 0===r?" ":r,i=n.includeEmptyLines,a=void 0!==i&&i;if("string"!==typeof e)throw new TypeError("Expected `input` to be a `string`, got `".concat(typeof e,"`"));if("number"!==typeof t)throw new TypeError("Expected `count` to be a `number`, got `".concat(typeof t,"`"));if(t<0)throw new RangeError("Expected `count` to be at least 0, got `".concat(t,"`"));if("string"!==typeof o)throw new TypeError("Expected `options.indent` to be a `string`, got `".concat(typeof o,"`"));if(0===t)return e;var s=a?/^/gm:/^(?!\s*$)/gm;return e.replace(s,o.repeat(t))}function xD(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return kD(wD(e),t,n)}var OD=/^```([a-z]+)?[\s\n]$/,SD=/^~~~([a-z]+)?[\s\n]$/,CD=Bo.create({name:"codeblock",addOptions:function(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,exitOnArrowUp:!0,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes:function(){var e=this;return{caretPosition:{default:void 0,rendered:!1},lines:{default:[],rendered:!1},indentType:{default:"space",parseHTML:function(e){return e.dataset.indentType},renderHTML:function(e){return e.indentType?{"data-indent-type":e.indentType}:{}}},indentLength:{default:2,parseHTML:function(e){return e.dataset.indentLength},renderHTML:function(e){return e.indentLength?{"data-indent-length":e.indentLength}:{}}},language:{default:null,parseHTML:function(t){var n,r=e.options.languageClassPrefix,i=[].concat(Object(o.a)(t.classList||[]),Object(o.a)((null===(n=null===t||void 0===t?void 0:t.firstElementChild)||void 0===n?void 0:n.classList)||[])).filter((function(e){return e.startsWith(r)})).map((function(e){return e.replace(r,"")}))[0];return i||null},renderHTML:function(e){return e.language?{class:"language-".concat(e.language)}:{}}}}},parseHTML:function(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML:function(e){var t=e.HTMLAttributes;return["pre",Sr(this.options.HTMLAttributes,t),["code",{},0]]},addCommands:function(){var e=this;return{setCodeBlock:function(t){return function(n){return n.commands.setNode(e.name,t)}},toggleCodeBlock:function(t){return function(n){var r=n.commands;return console.log("TOGGLING!"),r.toggleNode(e.name,"paragraph",t)}},changeCodeBlockIndentation:function(t){return function(n){var r=n.editor,o=n.tr,i=n.commands,a=r.state.selection.$from;if(a.parent.type!==e.type)return!1;var s,l=a.parent.attrs.lines,u=Object(Sd.a)(l);try{for(u.s();!(s=u.n()).done;){var c=s.value,d=c.text(),f=d.length-d.trimStart().length;if(f){var p=f,h=MD({type:t.type,amount:p});o.insertText(h,o.mapping.map(c.from),o.mapping.map(c.from+f))}}}catch(m){u.e(m)}finally{u.f()}return i.updateAttributes(e.type,{indentType:t.type,indentLength:t.amount}),!0}}}},addKeyboardShortcuts:function(){var e=this;return{"Mod-Alt-c":function(){return e.editor.commands.toggleCodeBlock()},"Mod-a":function(t){var n=t.editor,r=e.editor.state.selection.$anchor;if(r.parent.type.name!==e.name)return!1;var o=ho(r,(function(t){return t.type.name===e.type.name}));return!!o&&n.commands.setTextSelection({from:o.pos+1,to:o.pos+o.node.nodeSize-1})},Backspace:function(t){var n=t.editor,r=n.state.selection,o=r.empty,i=r.$anchor,a=i.parent,s=n.state.doc.nodeAt(i.pos+1),l=function(t){return t&&t.type.name===e.name},u=1===i.pos;return!!o&&(u||l(a)&&!a.textContent.length?e.editor.commands.deleteNode(e.type):!(!s||!l(s)||s.textContent.length)&&e.editor.commands.command((function(e){return e.tr.delete(i.pos+1,i.pos+1+s.nodeSize),!0})))},Enter:function(t){var n=t.editor,r=n.state.selection,o=r.$from;if(!r.empty||o.parent.type!==e.type)return!1;var i=ED(o.parent);return e.options.exitOnTripleEnter&&function(e,t){var n=t.parentOffset===t.parent.nodeSize-2,r=t.parent.textContent.endsWith("\n\n");if(!n||!r)return!1;return e.chain().command((function(e){return e.tr.delete(t.pos-2,t.pos),!0})).exitCode().run()}(n,o)||function(e,t,n){var r=function(e,t){var n=function(e,t){return e.find((function(e){return t>=e.from&&t<=e.to}))}(e.parent.attrs.lines,e.pos);if(!n)return!1;var r=n.text(),o=r.length-r.trimStart().length;return{newline:"\n",indentation:MD({amount:o,type:t.type})}}(t,n)||{},o=r.indentation,i=r.newline;return!!i&&e.chain().insertContent("".concat(i).concat(o),{parseOptions:{preserveWhitespace:"full"}}).focus().run()}(n,o,i)},ArrowUp:function(t){var n=t.editor;if(!e.options.exitOnArrowUp)return!1;var r=n.state.selection,o=r.$anchor;return!(!r.empty||o.parent.type!==e.type)&&(!(1!==o.pos)&&n.commands.insertContentAt(0,"<p></p>"))},ArrowDown:function(t){var n=t.editor;if(!e.options.exitOnArrowDown)return!1;var r=n.state,o=r.selection,i=r.doc,a=o.$from;if(!o.empty||a.parent.type!==e.type)return!1;if(!(a.parentOffset===a.parent.nodeSize-2))return!1;var s=a.after();return void 0!==s&&(i.nodeAt(s)?(n.commands.setNodeSelection(a.before()),!1):n.commands.exitCode())},"Shift-Tab":function(t){var n=t.editor,r=n.state.selection,o=r.$from;if(o.parent.type!==e.type)return!1;var i=ED(o.parent),a=MD(i),s=DD(o.parent.attrs.lines,r);return n.chain().command((function(e){return TD(e.tr,(function(e){var t,n=Object(Sd.a)(s);try{for(n.s();!(t=n.n()).done;){var r=t.value;r.text(a.length)===a&&e.delete(e.mapping.map(r.from),e.mapping.map(r.from+i.amount))}}catch(o){n.e(o)}finally{n.f()}}))})).run()},Tab:function(t){var n=t.editor,r=n.state.selection,o=r.$from;if(o.parent.type!==e.type)return!1;var i=DD(o.parent.attrs.lines,r);return n.chain().command((function(e){return TD(e.tr,(function(e){var t=MD(ED(o.parent));if(1===i.length)return e.insertText(t,o.pos);var n,r=Object(Sd.a)(i);try{for(r.s();!(n=r.n()).done;){var a=n.value;e.insertText(t,e.mapping.map(a.from))}}catch(s){r.e(s)}finally{r.f()}}))})).run()}}},addInputRules:function(){return[Fo({find:OD,type:this.type,getAttributes:function(e){return{language:e[1]}}}),Fo({find:SD,type:this.type,getAttributes:function(e){return{language:e[1]}}})]},addProseMirrorPlugins:function(){var e=this;return[new p.Plugin({key:new p.PluginKey("codeBlockVSCodeHandler"),props:{handlePaste:function(t,n){if(!n.clipboardData)return!1;var r=n.clipboardData.getData("text/plain"),o=n.clipboardData.getData("vscode-editor-data"),i=o?JSON.parse(o):void 0,a=null===i||void 0===i?void 0:i.mode;if(!r||!a)return!1;var s=function(e,t){var n=t||gD(e),r=n.amount,o=n.type,i=void 0===o?"space":o;return{code:wD(xD(e,r,{includeEmptyLines:!1,indent:"space"===i?" ":"\t"})),amount:r,type:i}}(r,ED(t.state.selection.$from.parent)),l=t.state.tr;return e.editor.isActive(e.type.name)||l.replaceSelectionWith(e.type.create({language:a,indentType:s.type,indentLength:s.amount})),l.insertText(s.code.replace(/\r\n?/g,"\n")),l.setMeta("paste",!0),t.dispatch(l),!0}}}),fD({name:this.name,defaultLanguage:"txt"})]},addNodeView:function(){return Id(lD,{contentDOMFactory:function(){var e=document.createElement("div");return e.classList.add("node-content-wrapper"),e.style.whiteSpace="inherit",e.style.minWidth="20px",{dom:e}},shouldUpdate:function(e,t){var n=e.attrs,r=t.attrs;return function(e,t){return void 0===t||(null===e||void 0===e?void 0:e.column)!==(null===t||void 0===t?void 0:t.column)||(null===e||void 0===e?void 0:e.line)!==(null===t||void 0===t?void 0:t.line)}(n.caretPosition,r.caretPosition)||n.language!==r.language||n.indentType!==r.indentType}})}});function jD(e,t){for(var n=[],r=0,o=t+1,i=0,a=function(){var t=e.indexOf("\n",r);t<=-1&&(t=e.length);var a=t-r,s=o+a,l=r;n.push({index:i,length:a,from:o,to:s,text:function(t){return e.slice(l,t?l+t:l+a)}}),o=s+1,r=t+1,++i};r<=e.length;)a();return n}function DD(e,t){var n=t.$from,r=t.$to;return e.filter((function(e){return AD(e.from,n.pos,r.pos)||AD(e.to,n.pos,r.pos)||AD(n.pos,e.from,e.to)}))}function ED(e){if(e.type.name===CD.name){var t=e.attrs,n=t.indentType,r=t.indentLength;return{type:n,amount:parseInt(r)}}}function AD(e,t,n){return e>=t&&e<=n}function MD(e){return("space"===e.type?" ":"\t").repeat(e.amount)}function TD(e,t){var n=e.selection,r=n.$anchor,o=n.$head;return t(e),e.setSelection(new p.TextSelection(e.doc.resolve(e.mapping.map(r.pos)),e.doc.resolve(e.mapping.map(o.pos)))),!0}var LD=Qc.extend({addKeyboardShortcuts:function(){var e,t=this;return Object.assign(Object.assign({},null===(e=this.parent)||void 0===e?void 0:e.call(this)),{Tab:function(e){var n,r;return"codeblock"!==e.editor.state.selection.$from.parent.type.name&&((null===(r=null===(n=t.parent)||void 0===n?void 0:n.call(t))||void 0===r?void 0:r.Tab(e))||!1)},Backspace:function(e){return SC(e.editor,t.name,t.type)}})}});function ND(e){var t,n,r=e.editor,o=(e.updateAttributes,e.node),a=e.getPos,s=e.forwardRef,l=Fd(),u=(null===(t=o.lastChild)||void 0===t?void 0:t.type.name)===VD.name,c=u&&(null===(n=o.lastChild)||void 0===n?void 0:n.attrs.collapsed),d=Object(jd.useCallback)((function(){var e,t=To(o,(function(e){return e.type.name===VD.name})),n=Object(i.a)(t,1)[0];if(n){var s=n.pos;null===(e=r.current)||void 0===e||e.commands.toggleOutlineCollapse(s+a()+1,!c)}}),[]);return Object(Cd.jsxs)(af.Flex,{children:[Object(Cd.jsxs)(af.Flex,Object.assign({className:"outline",sx:{flexDirection:"column",alignItems:"center",mt:l?"0px":"3px"}},{children:[u?Object(Cd.jsx)(mf,{path:c?vf.chevronRight:vf.chevronDown,title:c?"Click to uncollapse list":"Click to collapse list",sx:{cursor:"pointer",transition:"all .2s ease-in-out",":hover":{transform:["unset","scale(1.3)"]},":active":{transform:["scale(1.3)","unset"]},".icon:hover path":{fill:"var(--checked) !important"}},size:l?24:18,onMouseDown:function(e){return e.preventDefault()},onTouchEnd:function(e){e.preventDefault(),d()},onClick:d}):Object(Cd.jsx)(mf,{path:vf.circle,size:l?24:18,sx:{transform:"scale(0.4)"}}),u&&!c&&Object(Cd.jsx)(af.Box,{sx:{flex:1,width:1,mt:2,backgroundColor:"border",borderRadius:50,flexShrink:0,cursor:"pointer",transition:"all .2s ease-in-out",":hover":{backgroundColor:"fontTertiary",width:4}},contentEditable:!1})]})),Object(Cd.jsx)(lf,{ref:s,sx:{pl:1,listStyleType:"none",flex:1}})]})}var PD=Bo.create({name:"outlineListItem",addOptions:function(){return{HTMLAttributes:{}}},content:"heading* paragraph block*",defining:!0,parseHTML:function(){return[{tag:'li[data-type="'.concat(this.name,'"]')}]},renderHTML:function(e){var t=e.HTMLAttributes;return["li",Sr(this.options.HTMLAttributes,t,{"data-type":this.name}),0]},addKeyboardShortcuts:function(){var e=this;return{"Mod-Space":function(t){var n=function(e,t){var n,r,o=e.state.selection.$from,a=Object(LS.findParentNodeOfTypeClosestToPos)(o,t);if(!a)return!1;var s=To(a.node,(function(e){return e.type.name===VD.name})),l=Object(i.a)(s,1)[0];if(!l)return!1;var u=(null===(n=null===l||void 0===l?void 0:l.node)||void 0===n?void 0:n.type.name)===VD.name,c=null===(r=null===l||void 0===l?void 0:l.node)||void 0===r?void 0:r.attrs.collapsed,d=a.pos+l.pos+1;return{isCollapsed:c,isNested:u,subListPos:d}}(t.editor,e.type);if(!n)return!1;var r=n.isCollapsed,o=n.subListPos;return e.editor.commands.toggleOutlineCollapse(o,!r)},Enter:function(t){t.editor;return e.editor.commands.splitListItem(e.name)},Tab:function(){return e.editor.commands.sinkListItem(e.name)},"Shift-Tab":function(){return e.editor.commands.liftListItem(e.name)},Backspace:function(t){return SC(t.editor,e.name,e.type)}}},addCommands:function(){return{toggleOutlineCollapse:function(e,t){return function(n){return n.tr.setNodeMarkup(e,void 0,{collapsed:t}),!0}}}},addNodeView:function(){return Id(ND,{contentDOMFactory:!0,wrapperFactory:function(){return document.createElement("li")}})}});function RD(e){var t=e.editor,n=e.getPos,r=e.node,o=(e.updateAttributes,e.forwardRef),i=r.attrs.collapsed,a=Object(jd.useMemo)((function(){var e;return(null===(e=t.state.doc.resolve(n()).parent)||void 0===e?void 0:e.type.name)===PD.name}),[]);return Object(Cd.jsx)(Cd.Fragment,{children:Object(Cd.jsx)(lf,{className:"outline-list",as:"div",ref:o,sx:{ul:{display:i?"none":"block",paddingInlineStart:0,paddingLeft:0,marginBlockStart:a?5:0,marginBlockEnd:0},li:{listStyleType:"none"}}})})}var HD=/^\s*(-o)\s$/,FD="outlineListItem",VD=Bo.create({name:"outlineList",addOptions:function(){return{HTMLAttributes:{}}},addAttributes:function(){return{collapsed:{default:!1,keepOnSplit:!1,parseHTML:function(e){return"true"===e.dataset.collapsed},renderHTML:function(e){return{"data-collapsed":!0===e.collapsed}}}}},group:"block list",content:"".concat(FD,"+"),parseHTML:function(){return[{tag:'ul[data-type="'.concat(this.name,'"]'),priority:52}]},renderHTML:function(e){var t=e.HTMLAttributes;return["ul",Sr(this.options.HTMLAttributes,t,{"data-type":this.name}),0]},addCommands:function(){var e=this;return{toggleOutlineList:function(){return function(t){return t.commands.toggleList(e.name,FD)}}}},addKeyboardShortcuts:function(){var e=this;return{"Mod-Shift-O":function(){return e.editor.commands.toggleOutlineList()}}},addInputRules:function(){return[Vo({find:HD,type:this.type})]},addNodeView:function(){var e=this;return Id(RD,{contentDOMFactory:function(){var t=document.createElement("ul");return t.classList.add("".concat(e.name.toLowerCase(),"-content-wrapper")),t.style.whiteSpace="inherit",{dom:t}}})}});function zD(e,t,n,r,o,i){for(var a=0,s=!0,l=t.firstChild,u=e.firstChild,c=0,d=0;c<u.childCount;c+=1)for(var f=u.child(c).attrs,p=f.colspan,h=f.colwidth,m=0;m<p;m+=1,d+=1){var v=o===d?i:h&&h[m],g=v?"".concat(v,"px"):"";a+=v||r,v||(s=!1),l?(l.style.width!==g&&(l.style.width=g),l=l.nextSibling):t.appendChild(document.createElement("col")).style.width=g}for(;l;){var y=l.nextSibling;l.parentNode.removeChild(l),l=y}s?(n.style.width="".concat(a,"px"),n.style.minWidth=""):(n.style.width="",n.style.minWidth="".concat(a,"px"))}var BD=function(){function e(t,n){Object(c.a)(this,e),this.node=t,this.cellMinWidth=n,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),zD(t,this.colgroup,this.table,n),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}return Object(d.a)(e,[{key:"update",value:function(e){return e.type===this.node.type&&(this.node=e,zD(e,this.colgroup,this.table,this.cellMinWidth),!0)}},{key:"ignoreMutation",value:function(e){return"attributes"===e.type&&(e.target===this.table||this.colgroup.contains(e.target))}}]),e}();function _D(e,t){return t?e.createChecked(null,t):e.createAndFill()}function ID(e,t,n,r,o){for(var i=function(e){if(e.cached.tableNodeTypes)return e.cached.tableNodeTypes;var t={};return Object.keys(e.nodes).forEach((function(n){var r=e.nodes[n];r.spec.tableRole&&(t[r.spec.tableRole]=r)})),e.cached.tableNodeTypes=t,t}(e),a=[],s=[],l=0;l<n;l+=1){var u=_D(i.cell,o);if(u&&s.push(u),r){var c=_D(i.header_cell,o);c&&a.push(c)}}for(var d=[],f=0;f<t;f+=1)d.push(i.row.createChecked(null,r&&0===f?a:s));return i.table.createChecked(null,d)}var $D=function(e){var t=e.editor,n=t.state.selection;if(!(n instanceof Kx))return!1;var r=0,o=ho(n.ranges[0].$from,(function(e){return"table"===e.type.name}));return null===o||void 0===o||o.node.descendants((function(e){if("table"===e.type.name)return!1;["tableCell","tableHeader"].includes(e.type.name)&&(r+=1)})),r===n.ranges.length&&(t.commands.deleteTable(),!0)},qD=Bo.create({name:"table",addOptions:function(){return{HTMLAttributes:{},resizable:!1,handleWidth:5,cellMinWidth:25,View:BD,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML:function(){return[{tag:"table"}]},renderHTML:function(e){var t=e.HTMLAttributes;return["table",Sr(this.options.HTMLAttributes,t),["tbody",0]]},addCommands:function(){return{insertTable:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.rows,n=void 0===t?3:t,r=e.cols,o=void 0===r?3:r,i=e.withHeaderRow,a=void 0===i||i;return function(e){var t=e.tr,r=e.dispatch,i=ID(e.editor.schema,n,o,a);if(r){var s=t.selection.anchor+1;t.replaceSelectionWith(i).scrollIntoView().setSelection(p.TextSelection.near(t.doc.resolve(s)))}return!0}},addColumnBefore:function(){return function(e){return function(e,t){if(!zx(e))return!1;if(t){var n=vO(e);t(gO(e.tr,n,n.left))}return!0}(e.state,e.dispatch)}},addColumnAfter:function(){return function(e){return function(e,t){if(!zx(e))return!1;if(t){var n=vO(e);t(gO(e.tr,n,n.right))}return!0}(e.state,e.dispatch)}},deleteColumn:function(){return function(e){return function(e,t){if(!zx(e))return!1;if(t){var n=vO(e),r=e.tr;if(0==n.left&&n.right==n.map.width)return!1;for(var o=n.right-1;yO(r,n,o),o!=n.left;o--)n.table=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc,n.map=Px.get(n.table);t(r)}return!0}(e.state,e.dispatch)}},addRowBefore:function(){return function(e){return function(e,t){if(!zx(e))return!1;if(t){var n=vO(e);t(bO(e.tr,n,n.top))}return!0}(e.state,e.dispatch)}},addRowAfter:function(){return function(e){return function(e,t){if(!zx(e))return!1;if(t){var n=vO(e);t(bO(e.tr,n,n.bottom))}return!0}(e.state,e.dispatch)}},deleteRow:function(){return function(e){return function(e,t){if(!zx(e))return!1;if(t){var n=vO(e),r=e.tr;if(0==n.top&&n.bottom==n.map.height)return!1;for(var o=n.bottom-1;wO(r,n,o),o!=n.top;o--)n.table=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc,n.map=Px.get(n.table);t(r)}return!0}(e.state,e.dispatch)}},deleteTable:function(){return function(e){return function(e,t){for(var n=e.selection.$anchor,r=n.depth;r>0;r--)if("table"==n.node(r).type.spec.tableRole)return t&&t(e.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1}(e.state,e.dispatch)}},mergeCells:function(){return function(e){return xO(e.state,e.dispatch)}},splitCell:function(){return function(e){return OO(e.state,e.dispatch)}},toggleHeaderColumn:function(){return function(e){var t=e.state,n=e.dispatch;return CO("column")(t,n)}},toggleHeaderRow:function(){return function(e){var t=e.state,n=e.dispatch;return CO("row")(t,n)}},toggleHeaderCell:function(){return function(e){var t=e.state,n=e.dispatch;return jO(t,n)}},mergeOrSplit:function(){return function(e){var t=e.state,n=e.dispatch;return!!xO(t,n)||OO(t,n)}},setCellAttribute:function(e,t){return function(n){var r=n.state,o=n.dispatch;return function(e,t){return function(n,r){if(!zx(n))return!1;var o=Bx(n);if(o.nodeAfter.attrs[e]===t)return!1;if(r){var i=n.tr;n.selection instanceof Kx?n.selection.forEachCell((function(n,r){n.attrs[e]!==t&&i.setNodeMarkup(r,null,qx(n.attrs,e,t))})):i.setNodeMarkup(o.pos,null,qx(o.nodeAfter.attrs,e,t)),r(i)}return!0}}(e,t)(r,o)}},goToNextCell:function(){return function(e){var t=e.state,n=e.dispatch;return DO(1)(t,n)}},goToPreviousCell:function(){return function(e){var t=e.state,n=e.dispatch;return DO(-1)(t,n)}},fixTables:function(){return function(e){var t=e.state;return e.dispatch&&mO(t),!0}},setCellSelection:function(e){return function(t){var n=t.tr;if(t.dispatch){var r=Kx.create(n.doc,e.anchorCell,e.headCell);n.setSelection(r)}return!0}}}},addKeyboardShortcuts:function(){var e=this;return{Tab:function(){return!!e.editor.commands.goToNextCell()||!!e.editor.can().addRowAfter()&&e.editor.chain().addRowAfter().goToNextCell().run()},"Shift-Tab":function(){return e.editor.commands.goToPreviousCell()},Backspace:$D,"Mod-Backspace":$D,Delete:$D,"Mod-Delete":$D}},addProseMirrorPlugins:function(){var e=this.options.resizable&&this.editor.isEditable;return[].concat(Object(o.a)(e?[TO({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[]),[_O({allowTableNodeSelection:this.options.allowTableNodeSelection})])},extendNodeSchema:function(e){return{tableRole:Dr(wr(e,"tableRole",{name:e.name,options:e.options,storage:e.storage}))}}});function WD(e){var t=e.editor,n=e.node,r=e.forwardRef,o=Object(jd.useRef)(null),i=Object(jd.useRef)(),a=t.isActive("table");return Object(jd.useEffect)((function(){o.current&&i.current&&AO(n,o.current,i.current,50)}),[n]),Object(Cd.jsxs)(Cd.Fragment,{children:[Object(Cd.jsx)(ow,{children:a&&Object(Cd.jsxs)(Cd.Fragment,{children:[Object(Cd.jsx)(UD,{editor:t,table:i.current}),Object(Cd.jsx)(KD,{editor:t,table:i.current})]})}),Object(Cd.jsx)("div",Object.assign({className:"tableWrapper"},{children:Object(Cd.jsx)("table",Object.assign({ref:function(e){null===r||void 0===r||r(e),i.current=e||void 0}},{children:Object(Cd.jsx)("colgroup",{ref:o})}))}))]})}function UD(e){var t=e.editor,n=Object(jd.useRef)(null);return Object(jd.useEffect)((function(){if(n.current){var e=Rk(t,["tableRow"]);if(e){var r=Vb(n.current,{location:"left",target:e,align:"start",xOffset:-5,yOffset:-3});n.current.style.top="".concat(r.top,"px"),n.current.style.left="".concat(r.left,"px")}}}),[t.state.selection,n.current]),Object(Cd.jsxs)(af.Flex,Object.assign({ref:n,sx:{zIndex:999,top:0,left:0,position:"absolute",bg:"background",flexWrap:"nowrap",borderRadius:"default",opacity:.3,":hover":{opacity:1}}},{children:[Object(Cd.jsx)(tS,Object.assign({},YO("rowProperties"),{icon:"more",variant:"small",editor:t})),Object(Cd.jsx)(CS,Object.assign({},YO("insertRowBelow"),{editor:t,variant:"small"}))]}))}function KD(e){var t=e.editor,n=e.table,r=Object(jd.useRef)(null);return Object(jd.useEffect)((function(){if(r.current&&n){var e=Rk(t,["tableCell","tableHeader"]);if(e){var o=Vb(r.current,{location:"top",align:"center",target:e,yAnchor:n,yOffset:2});r.current.style.left="".concat(o.left,"px"),r.current.style.top="".concat(o.top,"px")}}}),[t.state.selection,r.current,n]),Object(Cd.jsxs)(af.Flex,Object.assign({ref:r,sx:{zIndex:999,top:0,left:0,position:"absolute",bg:"background",flexWrap:"nowrap",borderRadius:"default",opacity:.3,":hover":{opacity:1}}},{children:[Object(Cd.jsx)(nS,{editor:t,title:"tableProperties",icon:"more",variant:"small"}),Object(Cd.jsx)(yS,Object.assign({},YO("insertColumnRight"),{editor:t,variant:"small",icon:"plus"}))]}))}var GD=qD.extend({addProseMirrorPlugins:function(){var e,t=this.options.resizable&&this.editor.isEditable;return[].concat(Object(o.a)(t?[TO({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,View:(e=this.editor,function(t){Object(s.a)(r,t);var n=Object(l.a)(r);function r(t,o){var i,s;return Object(c.a)(this,r),s=n.call(this,t,e,(function(){return 0}),{component:WD,shouldUpdate:function(e,t){return e.type===t.type},contentDOMFactory:function(){return{dom:document.createElement("tbody")}},wrapperFactory:function(){var e=document.createElement("div");return e.style.position="relative",e}}),Object(h.a)((i=Object(a.a)(s),Object(m.a)(r.prototype)),"init",i).call(i),s}return Object(d.a)(r)}(tf)),lastColumnResizable:this.options.lastColumnResizable})]:[]),[_O({allowTableNodeSelection:this.options.allowTableNodeSelection})])}});function JD(e){this.j={},this.jr=[],this.jd=null,this.t=e}JD.prototype={accepts:function(){return!!this.t},tt:function(e,t){if(t&&t.j)return this.j[e]=t,t;var n=t,r=this.j[e];if(r)return n&&(r.t=n),r;r=YD();var o=eE(this,e);return o?(Object.assign(r.j,o.j),r.jr.append(o.jr),r.jr=o.jd,r.t=n||o.t):r.t=n,this.j[e]=r,r}};var YD=function(){return new JD},ZD=function(e){return new JD(e)},XD=function(e,t,n){e.j[t]||(e.j[t]=n)},QD=function(e,t,n){e.jr.push([t,n])},eE=function(e,t){var n=e.j[t];if(n)return n;for(var r=0;r<e.jr.length;r++){var o=e.jr[r][0],i=e.jr[r][1];if(o.test(t))return i}return e.jd},tE=function(e,t,n){for(var r=0;r<t.length;r++)XD(e,t[r],n)},nE=function(e,t){for(var n=0;n<t.length;n++){var r=t[n][0],o=t[n][1];XD(e,r,o)}},rE=function(e,t,n,r){for(var o,i=0,a=t.length;i<a&&(o=e.j[t[i]]);)e=o,i++;if(i>=a)return[];for(;i<a-1;)o=r(),XD(e,t[i],o),e=o,i++;XD(e,t[a-1],n)},oE="DOMAIN",iE="LOCALHOST",aE="TLD",sE="NUM",lE="PROTOCOL",uE="MAILTO",cE="WS",dE="NL",fE="OPENBRACE",pE="OPENBRACKET",hE="OPENANGLEBRACKET",mE="OPENPAREN",vE="CLOSEBRACE",gE="CLOSEBRACKET",yE="CLOSEANGLEBRACKET",bE="CLOSEPAREN",wE="AMPERSAND",kE="APOSTROPHE",xE="ASTERISK",OE="AT",SE="BACKSLASH",CE="BACKTICK",jE="CARET",DE="COLON",EE="COMMA",AE="DOLLAR",ME="DOT",TE="EQUALS",LE="EXCLAMATION",NE="HYPHEN",PE="PERCENT",RE="PIPE",HE="PLUS",FE="POUND",VE="QUERY",zE="QUOTE",BE="SEMI",_E="SLASH",IE="TILDE",$E="UNDERSCORE",qE="SYM",WE=Object.freeze({__proto__:null,DOMAIN:oE,LOCALHOST:iE,TLD:aE,NUM:sE,PROTOCOL:lE,MAILTO:uE,WS:cE,NL:dE,OPENBRACE:fE,OPENBRACKET:pE,OPENANGLEBRACKET:hE,OPENPAREN:mE,CLOSEBRACE:vE,CLOSEBRACKET:gE,CLOSEANGLEBRACKET:yE,CLOSEPAREN:bE,AMPERSAND:wE,APOSTROPHE:kE,ASTERISK:xE,AT:OE,BACKSLASH:SE,BACKTICK:CE,CARET:jE,COLON:DE,COMMA:EE,DOLLAR:AE,DOT:ME,EQUALS:TE,EXCLAMATION:LE,HYPHEN:NE,PERCENT:PE,PIPE:RE,PLUS:HE,POUND:FE,QUERY:VE,QUOTE:zE,SEMI:BE,SLASH:_E,TILDE:IE,UNDERSCORE:$E,SYM:qE}),UE="aaa aarp abarth abb abbott abbvie abc able abogado abudhabi ac academy accenture accountant accountants aco actor ad adac ads adult ae aeg aero aetna af afamilycompany afl africa ag agakhan agency ai aig airbus airforce airtel akdn al alfaromeo alibaba alipay allfinanz allstate ally alsace alstom am amazon americanexpress americanfamily amex amfam amica amsterdam analytics android anquan anz ao aol apartments app apple aq aquarelle ar arab aramco archi army arpa art arte as asda asia associates at athleta attorney au auction audi audible audio auspost author auto autos avianca aw aws ax axa az azure ba baby baidu banamex bananarepublic band bank bar barcelona barclaycard barclays barefoot bargains baseball basketball bauhaus bayern bb bbc bbt bbva bcg bcn bd be beats beauty beer bentley berlin best bestbuy bet bf bg bh bharti bi bible bid bike bing bingo bio biz bj black blackfriday blockbuster blog bloomberg blue bm bms bmw bn bnpparibas bo boats boehringer bofa bom bond boo book booking bosch bostik boston bot boutique box br bradesco bridgestone broadway broker brother brussels bs bt budapest bugatti build builders business buy buzz bv bw by bz bzh ca cab cafe cal call calvinklein cam camera camp cancerresearch canon capetown capital capitalone car caravan cards care career careers cars casa case cash casino cat catering catholic cba cbn cbre cbs cc cd center ceo cern cf cfa cfd cg ch chanel channel charity chase chat cheap chintai christmas chrome church ci cipriani circle cisco citadel citi citic city cityeats ck cl claims cleaning click clinic clinique clothing cloud club clubmed cm cn co coach codes coffee college cologne com comcast commbank community company compare computer comsec condos construction consulting contact contractors cooking cookingchannel cool coop corsica country coupon coupons courses cpa cr credit creditcard creditunion cricket crown crs cruise cruises csc cu cuisinella cv cw cx cy cymru cyou cz dabur dad dance data date dating datsun day dclk dds de deal dealer deals degree delivery dell deloitte delta democrat dental dentist desi design dev dhl diamonds diet digital direct directory discount discover dish diy dj dk dm dnp do docs doctor dog domains dot download drive dtv dubai duck dunlop dupont durban dvag dvr dz earth eat ec eco edeka edu education ee eg email emerck energy engineer engineering enterprises epson equipment er ericsson erni es esq estate et etisalat eu eurovision eus events exchange expert exposed express extraspace fage fail fairwinds faith family fan fans farm farmers fashion fast fedex feedback ferrari ferrero fi fiat fidelity fido film final finance financial fire firestone firmdale fish fishing fit fitness fj fk flickr flights flir florist flowers fly fm fo foo food foodnetwork football ford forex forsale forum foundation fox fr free fresenius frl frogans frontdoor frontier ftr fujitsu fujixerox fun fund furniture futbol fyi ga gal gallery gallo gallup game games gap garden gay gb gbiz gd gdn ge gea gent genting george gf gg ggee gh gi gift gifts gives giving gl glade glass gle global globo gm gmail gmbh gmo gmx gn godaddy gold goldpoint golf goo goodyear goog google gop got gov gp gq gr grainger graphics gratis green gripe grocery group gs gt gu guardian gucci guge guide guitars guru gw gy hair hamburg hangout haus hbo hdfc hdfcbank health healthcare help helsinki here hermes hgtv hiphop hisamitsu hitachi hiv hk hkt hm hn hockey holdings holiday homedepot homegoods homes homesense honda horse hospital host hosting hot hoteles hotels hotmail house how hr hsbc ht hu hughes hyatt hyundai ibm icbc ice icu id ie ieee ifm ikano il im imamat imdb immo immobilien in inc industries infiniti info ing ink institute insurance insure int international intuit investments io ipiranga iq ir irish is ismaili ist istanbul it itau itv iveco jaguar java jcb je jeep jetzt jewelry jio jll jm jmp jnj jo jobs joburg jot joy jp jpmorgan jprs juegos juniper kaufen kddi ke kerryhotels kerrylogistics kerryproperties kfh kg kh ki kia kim kinder kindle kitchen kiwi km kn koeln komatsu kosher kp kpmg kpn kr krd kred kuokgroup kw ky kyoto kz la lacaixa lamborghini lamer lancaster lancia land landrover lanxess lasalle lat latino latrobe law lawyer lb lc lds lease leclerc lefrak legal lego lexus lgbt li lidl life lifeinsurance lifestyle lighting like lilly limited limo lincoln linde link lipsy live living lixil lk llc llp loan loans locker locus loft lol london lotte lotto love lpl lplfinancial lr ls lt ltd ltda lu lundbeck luxe luxury lv ly ma macys madrid maif maison makeup man management mango map market marketing markets marriott marshalls maserati mattel mba mc mckinsey md me med media meet melbourne meme memorial men menu merckmsd mg mh miami microsoft mil mini mint mit mitsubishi mk ml mlb mls mm mma mn mo mobi mobile moda moe moi mom monash money monster mormon mortgage moscow moto motorcycles mov movie mp mq mr ms msd mt mtn mtr mu museum mutual mv mw mx my mz na nab nagoya name nationwide natura navy nba nc ne nec net netbank netflix network neustar new news next nextdirect nexus nf nfl ng ngo nhk ni nico nike nikon ninja nissan nissay nl no nokia northwesternmutual norton now nowruz nowtv np nr nra nrw ntt nu nyc nz obi observer off office okinawa olayan olayangroup oldnavy ollo om omega one ong onl online onyourside ooo open oracle orange org organic origins osaka otsuka ott ovh pa page panasonic paris pars partners parts party passagens pay pccw pe pet pf pfizer pg ph pharmacy phd philips phone photo photography photos physio pics pictet pictures pid pin ping pink pioneer pizza pk pl place play playstation plumbing plus pm pn pnc pohl poker politie porn post pr pramerica praxi press prime pro prod productions prof progressive promo properties property protection pru prudential ps pt pub pw pwc py qa qpon quebec quest qvc racing radio raid re read realestate realtor realty recipes red redstone redumbrella rehab reise reisen reit reliance ren rent rentals repair report republican rest restaurant review reviews rexroth rich richardli ricoh ril rio rip rmit ro rocher rocks rodeo rogers room rs rsvp ru rugby ruhr run rw rwe ryukyu sa saarland safe safety sakura sale salon samsclub samsung sandvik sandvikcoromant sanofi sap sarl sas save saxo sb sbi sbs sc sca scb schaeffler schmidt scholarships school schule schwarz science scjohnson scot sd se search seat secure security seek select sener services ses seven sew sex sexy sfr sg sh shangrila sharp shaw shell shia shiksha shoes shop shopping shouji show showtime si silk sina singles site sj sk ski skin sky skype sl sling sm smart smile sn sncf so soccer social softbank software sohu solar solutions song sony soy spa space sport spot spreadbetting sr srl ss st stada staples star statebank statefarm stc stcgroup stockholm storage store stream studio study style su sucks supplies supply support surf surgery suzuki sv swatch swiftcover swiss sx sy sydney systems sz tab taipei talk taobao target tatamotors tatar tattoo tax taxi tc tci td tdk team tech technology tel temasek tennis teva tf tg th thd theater theatre tiaa tickets tienda tiffany tips tires tirol tj tjmaxx tjx tk tkmaxx tl tm tmall tn to today tokyo tools top toray toshiba total tours town toyota toys tr trade trading training travel travelchannel travelers travelersinsurance trust trv tt tube tui tunes tushu tv tvs tw tz ua ubank ubs ug uk unicom university uno uol ups us uy uz va vacations vana vanguard vc ve vegas ventures verisign versicherung vet vg vi viajes video vig viking villas vin vip virgin visa vision viva vivo vlaanderen vn vodka volkswagen volvo vote voting voto voyage vu vuelos wales walmart walter wang wanggou watch watches weather weatherchannel webcam weber website wed wedding weibo weir wf whoswho wien wiki williamhill win windows wine winners wme wolterskluwer woodside work works world wow ws wtc wtf xbox xerox xfinity xihuan xin xxx xyz yachts yahoo yamaxun yandex ye yodobashi yoga yokohama you youtube yt yun za zappos zara zero zip zm zone zuerich zw verm\xf6gensberater-ctb verm\xf6gensberatung-pwb \u03b5\u03bb \u03b5\u03c5 \u0431\u0433 \u0431\u0435\u043b \u0434\u0435\u0442\u0438 \u0435\u044e \u043a\u0430\u0442\u043e\u043b\u0438\u043a \u043a\u043e\u043c \u049b\u0430\u0437 \u043c\u043a\u0434 \u043c\u043e\u043d \u043c\u043e\u0441\u043a\u0432\u0430 \u043e\u043d\u043b\u0430\u0439\u043d \u043e\u0440\u0433 \u0440\u0443\u0441 \u0440\u0444 \u0441\u0430\u0439\u0442 \u0441\u0440\u0431 \u0443\u043a\u0440 \u10d2\u10d4 \u0570\u0561\u0575 \u05d9\u05e9\u05e8\u05d0\u05dc \u05e7\u05d5\u05dd \u0627\u0628\u0648\u0638\u0628\u064a \u0627\u062a\u0635\u0627\u0644\u0627\u062a \u0627\u0631\u0627\u0645\u0643\u0648 \u0627\u0644\u0627\u0631\u062f\u0646 \u0627\u0644\u0628\u062d\u0631\u064a\u0646 \u0627\u0644\u062c\u0632\u0627\u0626\u0631 \u0627\u0644\u0633\u0639\u0648\u062f\u064a\u0629 \u0627\u0644\u0639\u0644\u064a\u0627\u0646 \u0627\u0644\u0645\u063a\u0631\u0628 \u0627\u0645\u0627\u0631\u0627\u062a \u0627\u06cc\u0631\u0627\u0646 \u0628\u0627\u0631\u062a \u0628\u0627\u0632\u0627\u0631 \u0628\u06be\u0627\u0631\u062a \u0628\u064a\u062a\u0643 \u067e\u0627\u06a9\u0633\u062a\u0627\u0646 \u0680\u0627\u0631\u062a \u062a\u0648\u0646\u0633 \u0633\u0648\u062f\u0627\u0646 \u0633\u0648\u0631\u064a\u0629 \u0634\u0628\u0643\u0629 \u0639\u0631\u0627\u0642 \u0639\u0631\u0628 \u0639\u0645\u0627\u0646 \u0641\u0644\u0633\u0637\u064a\u0646 \u0642\u0637\u0631 \u0643\u0627\u062b\u0648\u0644\u064a\u0643 \u0643\u0648\u0645 \u0645\u0635\u0631 \u0645\u0644\u064a\u0633\u064a\u0627 \u0645\u0648\u0631\u064a\u062a\u0627\u0646\u064a\u0627 \u0645\u0648\u0642\u0639 \u0647\u0645\u0631\u0627\u0647 \u0915\u0949\u092e \u0928\u0947\u091f \u092d\u093e\u0930\u0924 \u092d\u093e\u0930\u0924\u092e\u094d \u092d\u093e\u0930\u094b\u0924 \u0938\u0902\u0917\u0920\u0928 \u09ac\u09be\u0982\u09b2\u09be \u09ad\u09be\u09b0\u09a4 \u09ad\u09be\u09f0\u09a4 \u0a2d\u0a3e\u0a30\u0a24 \u0aad\u0abe\u0ab0\u0aa4 \u0b2d\u0b3e\u0b30\u0b24 \u0b87\u0ba8\u0bcd\u0ba4\u0bbf\u0baf\u0bbe \u0b87\u0bb2\u0b99\u0bcd\u0b95\u0bc8 \u0b9a\u0bbf\u0b99\u0bcd\u0b95\u0baa\u0bcd\u0baa\u0bc2\u0bb0\u0bcd \u0c2d\u0c3e\u0c30\u0c24\u0c4d \u0cad\u0cbe\u0cb0\u0ca4 \u0d2d\u0d3e\u0d30\u0d24\u0d02 \u0dbd\u0d82\u0d9a\u0dcf \u0e04\u0e2d\u0e21 \u0e44\u0e17\u0e22 \u0ea5\u0eb2\u0ea7 \ub2f7\ub137 \ub2f7\ucef4 \uc0bc\uc131 \ud55c\uad6d \u30a2\u30de\u30be\u30f3 \u30b0\u30fc\u30b0\u30eb \u30af\u30e9\u30a6\u30c9 \u30b3\u30e0 \u30b9\u30c8\u30a2 \u30bb\u30fc\u30eb \u30d5\u30a1\u30c3\u30b7\u30e7\u30f3 \u30dd\u30a4\u30f3\u30c8 \u307f\u3093\u306a \u4e16\u754c \u4e2d\u4fe1 \u4e2d\u56fd \u4e2d\u570b \u4e2d\u6587\u7f51 \u4e9a\u9a6c\u900a \u4f01\u4e1a \u4f5b\u5c71 \u4fe1\u606f \u5065\u5eb7 \u516b\u5366 \u516c\u53f8 \u516c\u76ca \u53f0\u6e7e \u53f0\u7063 \u5546\u57ce \u5546\u5e97 \u5546\u6807 \u5609\u91cc \u5609\u91cc\u5927\u9152\u5e97 \u5728\u7ebf \u5927\u4f17\u6c7d\u8f66 \u5927\u62ff \u5929\u4e3b\u6559 \u5a31\u4e50 \u5bb6\u96fb \u5e7f\u4e1c \u5fae\u535a \u6148\u5584 \u6211\u7231\u4f60 \u624b\u673a \u62db\u8058 \u653f\u52a1 \u653f\u5e9c \u65b0\u52a0\u5761 \u65b0\u95fb \u65f6\u5c1a \u66f8\u7c4d \u673a\u6784 \u6de1\u9a6c\u9521 \u6e38\u620f \u6fb3\u9580 \u70b9\u770b \u79fb\u52a8 \u7ec4\u7ec7\u673a\u6784 \u7f51\u5740 \u7f51\u5e97 \u7f51\u7ad9 \u7f51\u7edc \u8054\u901a \u8bfa\u57fa\u4e9a \u8c37\u6b4c \u8d2d\u7269 \u901a\u8ca9 \u96c6\u56e2 \u96fb\u8a0a\u76c8\u79d1 \u98de\u5229\u6d66 \u98df\u54c1 \u9910\u5385 \u9999\u683c\u91cc\u62c9 \u9999\u6e2f".split(" "),KE=/(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/,GE=/(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEDD-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDDFF\uDE70-\uDE74\uDE78-\uDE7C\uDE80-\uDE86\uDE90-\uDEAC\uDEB0-\uDEBA\uDEC0-\uDEC5\uDED0-\uDED9\uDEE0-\uDEE7\uDEF0-\uDEF6])/,JE=/\uFE0F/,YE=/\d/,ZE=/\s/;function XE(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=YD(),n=ZD(sE),r=ZD(oE),o=YD(),i=ZD(cE),a=[[YE,r],[KE,r],[GE,r],[JE,r]],s=function(){var e=ZD(oE);return e.j={"-":o},e.jr=[].concat(a),e},l=function(e){var t=s();return t.t=e,t};nE(t,[["'",ZD(kE)],["{",ZD(fE)],["[",ZD(pE)],["<",ZD(hE)],["(",ZD(mE)],["}",ZD(vE)],["]",ZD(gE)],[">",ZD(yE)],[")",ZD(bE)],["&",ZD(wE)],["*",ZD(xE)],["@",ZD(OE)],["`",ZD(CE)],["^",ZD(jE)],[":",ZD(DE)],[",",ZD(EE)],["$",ZD(AE)],[".",ZD(ME)],["=",ZD(TE)],["!",ZD(LE)],["-",ZD(NE)],["%",ZD(PE)],["|",ZD(RE)],["+",ZD(HE)],["#",ZD(FE)],["?",ZD(VE)],['"',ZD(zE)],["/",ZD(_E)],[";",ZD(BE)],["~",ZD(IE)],["_",ZD($E)],["\\",ZD(SE)]]),XD(t,"\n",ZD(dE)),QD(t,ZE,i),XD(i,"\n",YD()),QD(i,ZE,i);for(var u=0;u<UE.length;u++)rE(t,UE[u],l(aE),s);var c=s(),d=s(),f=s(),p=s();rE(t,"file",c,s),rE(t,"ftp",d,s),rE(t,"http",f,s),rE(t,"mailto",p,s);var h=s(),m=ZD(lE),v=ZD(uE);XD(d,"s",h),XD(d,":",m),XD(f,"s",h),XD(f,":",m),XD(c,":",m),XD(h,":",m),XD(p,":",v);for(var g=s(),y=0;y<e.length;y++)rE(t,e[y],g,s);return XD(g,":",m),rE(t,"localhost",l(iE),s),QD(t,YE,n),QD(t,KE,r),QD(t,GE,r),QD(t,JE,r),QD(n,YE,n),QD(n,KE,r),QD(n,GE,r),QD(n,JE,r),XD(n,"-",o),XD(r,"-",o),XD(o,"-",o),QD(r,YE,r),QD(r,KE,r),QD(r,GE,r),QD(r,JE,r),QD(o,YE,r),QD(o,KE,r),QD(o,GE,r),QD(o,JE,r),t.jd=ZD(qE),t}function QE(e){return QE="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},QE(e)}var eA={defaultProtocol:"http",events:null,format:nA,formatHref:nA,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:0,className:null,attributes:null,ignoreTags:[]};function tA(e){e=e||{},this.defaultProtocol="defaultProtocol"in e?e.defaultProtocol:eA.defaultProtocol,this.events="events"in e?e.events:eA.events,this.format="format"in e?e.format:eA.format,this.formatHref="formatHref"in e?e.formatHref:eA.formatHref,this.nl2br="nl2br"in e?e.nl2br:eA.nl2br,this.tagName="tagName"in e?e.tagName:eA.tagName,this.target="target"in e?e.target:eA.target,this.rel="rel"in e?e.rel:eA.rel,this.validate="validate"in e?e.validate:eA.validate,this.truncate="truncate"in e?e.truncate:eA.truncate,this.className="className"in e?e.className:eA.className,this.attributes=e.attributes||eA.attributes,this.ignoreTags=[];for(var t=("ignoreTags"in e?e.ignoreTags:eA.ignoreTags),n=0;n<t.length;n++)this.ignoreTags.push(t[n].toUpperCase())}function nA(e){return e}tA.prototype={resolve:function(e){var t=e.toHref(this.defaultProtocol);return{formatted:this.get("format",e.toString(),e),formattedHref:this.get("formatHref",t,e),tagName:this.get("tagName",t,e),className:this.get("className",t,e),target:this.get("target",t,e),rel:this.get("rel",t,e),events:this.getObject("events",t,e),attributes:this.getObject("attributes",t,e),truncate:this.get("truncate",t,e)}},check:function(e){return this.get("validate",e.toString(),e)},get:function(e,t,n){var r,o=this[e];if(!o)return o;switch(QE(o)){case"function":return o(t,n.t);case"object":return"function"===typeof(r=n.t in o?o[n.t]:eA[e])?r(t,n.t):r}return o},getObject:function(e,t,n){var r=this[e];return"function"===typeof r?r(t,n.t):r}};function rA(){}function oA(e,t){function n(t,n){this.t=e,this.v=t,this.tk=n}return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Object.create(e.prototype);for(var o in n)r[o]=n[o];r.constructor=t,t.prototype=r}(rA,n,t),n}rA.prototype={t:"token",isLink:!1,toString:function(){return this.v},toHref:function(){return this.toString()},startIndex:function(){return this.tk[0].s},endIndex:function(){return this.tk[this.tk.length-1].e},toObject:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:eA.defaultProtocol;return{type:this.t,value:this.v,isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}}};var iA=oA("email",{isLink:!0}),aA=oA("email",{isLink:!0,toHref:function(){return"mailto:"+this.toString()}}),sA=oA("text"),lA=oA("nl"),uA=oA("url",{isLink:!0,toHref:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:eA.defaultProtocol,t=this.tk,n=!1,r=!1,o=[],i=0;t[i].t===lE;)n=!0,o.push(t[i].v),i++;for(;t[i].t===_E;)r=!0,o.push(t[i].v),i++;for(;i<t.length;i++)o.push(t[i].v);return o=o.join(""),n||r||(o="".concat(e,"://").concat(o)),o},hasProtocol:function(){return this.tk[0].t===lE}}),cA=Object.freeze({__proto__:null,MultiToken:rA,Base:rA,createTokenClass:oA,MailtoEmail:iA,Email:aA,Text:sA,Nl:lA,Url:uA});function dA(){var e=YD(),t=YD(),n=YD(),r=YD(),o=YD(),i=YD(),a=YD(),s=ZD(uA),l=YD(),u=ZD(uA),c=ZD(uA),d=YD(),f=YD(),p=YD(),h=YD(),m=YD(),v=ZD(uA),g=ZD(uA),y=ZD(uA),b=ZD(uA),w=YD(),k=YD(),x=YD(),O=YD(),S=YD(),C=YD(),j=ZD(aA),D=YD(),E=ZD(aA),A=ZD(iA),M=YD(),T=YD(),L=YD(),N=YD(),P=ZD(lA);XD(e,dE,P),XD(e,lE,t),XD(e,uE,n),XD(t,_E,r),XD(r,_E,o),XD(e,aE,i),XD(e,oE,i),XD(e,iE,s),XD(e,sE,i),XD(o,aE,c),XD(o,oE,c),XD(o,sE,c),XD(o,iE,c),XD(i,ME,a),XD(S,ME,C),XD(a,aE,s),XD(a,oE,i),XD(a,sE,i),XD(a,iE,i),XD(C,aE,j),XD(C,oE,S),XD(C,sE,S),XD(C,iE,S),XD(s,ME,a),XD(j,ME,C),XD(s,DE,l),XD(s,_E,c),XD(l,sE,u),XD(u,_E,c),XD(j,DE,D),XD(D,sE,E);var R=[wE,xE,OE,SE,CE,jE,AE,oE,TE,NE,iE,sE,PE,RE,HE,FE,lE,_E,qE,IE,aE,$E],H=[kE,yE,vE,gE,bE,DE,EE,ME,LE,hE,fE,pE,mE,VE,zE,BE];XD(c,fE,f),XD(c,pE,p),XD(c,hE,h),XD(c,mE,m),XD(d,fE,f),XD(d,pE,p),XD(d,hE,h),XD(d,mE,m),XD(f,vE,c),XD(p,gE,c),XD(h,yE,c),XD(m,bE,c),XD(v,vE,c),XD(g,gE,c),XD(y,yE,c),XD(b,bE,c),XD(w,vE,c),XD(k,gE,c),XD(x,yE,c),XD(O,bE,c),tE(f,R,v),tE(p,R,g),tE(h,R,y),tE(m,R,b),tE(f,H,w),tE(p,H,k),tE(h,H,x),tE(m,H,O),tE(v,R,v),tE(g,R,g),tE(y,R,y),tE(b,R,b),tE(v,H,v),tE(g,H,g),tE(y,H,y),tE(b,H,b),tE(w,R,v),tE(k,R,g),tE(x,R,y),tE(O,R,b),tE(w,H,w),tE(k,H,k),tE(x,H,x),tE(O,H,O),tE(c,R,c),tE(d,R,c),tE(c,H,d),tE(d,H,d),XD(n,aE,A),XD(n,oE,A),XD(n,sE,A),XD(n,iE,A),tE(A,R,A),tE(A,H,M),tE(M,R,A),tE(M,H,M);var F=[wE,kE,xE,SE,CE,jE,vE,AE,oE,TE,NE,sE,fE,PE,RE,HE,FE,VE,_E,qE,IE,aE,$E];return tE(i,F,T),XD(i,OE,L),tE(s,F,T),XD(s,OE,L),tE(a,F,T),tE(T,F,T),XD(T,OE,L),XD(T,ME,N),tE(N,F,T),XD(L,aE,S),XD(L,oE,S),XD(L,sE,S),XD(L,iE,j),e}function fA(e,t,n){var r=n[0].s,o=n[n.length-1].e;return new e(t.substr(r,o-r),n)}var pA="undefined"!==typeof console&&console&&console.warn||function(){},hA={scanner:null,parser:null,pluginQueue:[],customProtocols:[],initialized:!1};function mA(e){if(hA.initialized&&pA('linkifyjs: already initialized - will not register custom protocol "'.concat(e,'" until you manually call linkify.init(). To avoid this warning, please register all custom protocols before invoking linkify the first time.')),!/^[a-z-]+$/.test(e))throw Error("linkifyjs: protocols containing characters other than a-z or - (hyphen) are not supported");hA.customProtocols.push(e)}function vA(e){return hA.initialized||function(){hA.scanner={start:XE(hA.customProtocols),tokens:WE},hA.parser={start:dA(),tokens:cA};for(var e={createTokenClass:oA},t=0;t<hA.pluginQueue.length;t++)hA.pluginQueue[t][1]({scanner:hA.scanner,parser:hA.parser,utils:e});hA.initialized=!0}(),function(e,t,n){for(var r=n.length,o=0,i=[],a=[];o<r;){for(var s=e,l=null,u=null,c=0,d=null,f=-1;o<r&&!(l=eE(s,n[o].t));)a.push(n[o++]);for(;o<r&&(u=l||eE(s,n[o].t));)l=null,(s=u).accepts()?(f=0,d=s):f>=0&&f++,o++,c++;if(f<0)for(var p=o-c;p<o;p++)a.push(n[p]);else{a.length>0&&(i.push(fA(sA,t,a)),a=[]),o-=f,c-=f;var h=d.t,m=n.slice(o-c,o);i.push(fA(h,t,m))}}return a.length>0&&i.push(fA(sA,t,a)),i}(hA.parser.start,e,function(e,t){for(var n=function(e){for(var t=[],n=e.length,r=0;r<n;){var o=e.charCodeAt(r),i=void 0,a=o<55296||o>56319||r+1===n||(i=e.charCodeAt(r+1))<56320||i>57343?e[r]:e.slice(r,r+2);t.push(a),r+=a.length}return t}(t.replace(/[A-Z]/g,(function(e){return e.toLowerCase()}))),r=n.length,o=[],i=0,a=0;a<r;){for(var s=e,l=null,u=0,c=null,d=-1,f=-1;a<r&&(l=eE(s,n[a]));)(s=l).accepts()?(d=0,f=0,c=s):d>=0&&(d+=n[a].length,f++),u+=n[a].length,i+=n[a].length,a++;i-=d,a-=f,u-=d,o.push({t:c.t,v:t.substr(i-u,u),s:i-u,e:i})}return o}(hA.scanner.start,e))}function gA(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=vA(e),r=[],o=0;o<n.length;o++){var i=n[o];!i.isLink||t&&i.t!==t||r.push(i.toObject())}return r}function yA(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=vA(e);return 1===n.length&&n[0].isLink&&(!t||n[0].t===t)}function bA(e){return new p.Plugin({key:new p.PluginKey("autolink"),appendTransaction:function(t,n,r){var i=t.some((function(e){return e.docChanged}))&&!n.doc.eq(r.doc),a=t.some((function(e){return e.getMeta("preventAutolink")}));if(i&&!a){var s=r.tr,l=function(e,t){var n=new g.e(e);return t.forEach((function(e){e.steps.forEach((function(e){n.step(e)}))})),n}(n.doc,Object(o.a)(t)),u=l.mapping,c=function(e){var t=e.mapping,n=e.steps,r=[];return t.maps.forEach((function(e,o){var i=[];if(e.ranges.length)e.forEach((function(e,t){i.push({from:e,to:t})}));else{var a=n[o],s=a.from,l=a.to;if(void 0===s||void 0===l)return;i.push({from:s,to:l})}i.forEach((function(e){var n=e.from,i=e.to,a=t.slice(o).map(n,-1),s=t.slice(o).map(i),l=t.invert().map(a,-1),u=t.invert().map(s);r.push({oldRange:{from:l,to:u},newRange:{from:a,to:s}})}))})),No(r)}(l);if(c.forEach((function(t){var o=t.oldRange,i=t.newRange;Po(o.from,o.to,n.doc).filter((function(t){return t.mark.type===e.type})).forEach((function(t){var o=Po(u.map(t.from),u.map(t.to),r.doc).filter((function(t){return t.mark.type===e.type}));if(o.length){var i=o[0],a=n.doc.textBetween(t.from,t.to,void 0," "),l=r.doc.textBetween(i.from,i.to,void 0," "),c=yA(a),d=yA(l);c&&!d&&s.removeMark(i.from,i.to,e.type)}})),Lo(r.doc,i,(function(e){return e.isTextblock})).forEach((function(t){gA(r.doc.textBetween(t.pos,t.pos+t.node.nodeSize,void 0," ")).filter((function(e){return e.isLink})).filter((function(t){return!e.validate||e.validate(t.value)})).map((function(e){return Object(f.a)(Object(f.a)({},e),{},{from:t.pos+e.start+1,to:t.pos+e.end+1})})).filter((function(e){var t=i.from>=e.from&&i.from<=e.to,n=i.to>=e.from&&i.to<=e.to;return t||n})).forEach((function(t){s.addMark(t.from,t.to,e.type.create({href:t.href}))}))}))})),s.steps.length)return s}}})}var wA=zo.create({name:"link",priority:1e3,keepOnSplit:!1,onCreate:function(){this.options.protocols.forEach(mA)},inclusive:function(){return this.options.autolink},addOptions:function(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:void 0}},addAttributes:function(){return{href:{default:null},target:{default:this.options.HTMLAttributes.target},class:{default:this.options.HTMLAttributes.class}}},parseHTML:function(){return[{tag:'a[href]:not([href *= "javascript:" i])'}]},renderHTML:function(e){var t=e.HTMLAttributes;return["a",Sr(this.options.HTMLAttributes,t),0]},addCommands:function(){var e=this;return{setLink:function(t){return function(n){return(0,n.chain)().setMark(e.name,t).setMeta("preventAutolink",!0).run()}},toggleLink:function(t){return function(n){return(0,n.chain)().toggleMark(e.name,t,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},unsetLink:function(){return function(t){return(0,t.chain)().unsetMark(e.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}}}},addPasteRules:function(){var e=this;return[_o({find:function(t){return gA(t).filter((function(t){return!e.options.validate||e.options.validate(t.value)})).filter((function(e){return e.isLink})).map((function(e){return{text:e.value,index:e.start,data:e}}))},type:this.type,getAttributes:function(e){var t;return{href:null===(t=e.data)||void 0===t?void 0:t.href}}})]},addProseMirrorPlugins:function(){var e,t=[];return this.options.autolink&&t.push(bA({type:this.type,validate:this.options.validate})),this.options.openOnClick&&t.push((e={type:this.type},new p.Plugin({key:new p.PluginKey("handleClickLink"),props:{handleClick:function(t,n,r){var o,i=Do(t.state,e.type.name);return!(!(null===(o=r.target)||void 0===o?void 0:o.closest("a"))||!i.href)&&(window.open(i.href,i.target),!0)}}}))),this.options.linkOnPaste&&t.push(function(e){return new p.Plugin({key:new p.PluginKey("handlePasteLink"),props:{handlePaste:function(t,n,r){if(t.state.selection.empty)return!1;var o="";r.content.forEach((function(e){o+=e.textContent}));var i=gA(o).find((function(e){return e.isLink&&e.value===o}));return!(!o||!i)&&(e.editor.commands.setMark(e.type,{href:i.href}),!0)}}})}({editor:this.editor,type:this.type})),t}}),kA=new p.PluginKey("codemark");function xA(e,t){var n,r;return"schema"in e?null!==(n=null===t||void 0===t?void 0:t.markType)&&void 0!==n?n:e.schema.marks.code:null!==(r=null===t||void 0===t?void 0:t.markType)&&void 0!==r?r:e.state.schema.marks.code}function OA(e,t){return e.resolve(Math.min(Math.max(1,t),e.nodeSize-2))}function SA(e,t,n,r){var o,i=e.isInSet(null!==(o=t.state.storedMarks)&&void 0!==o?o:t.state.doc.resolve(n).marks()),a=t.state.doc.rangeHasMark(n,r,e);return!(!i&&!a)}var CA={match:/`((?:[^`\w]|[\w])+)`$/,handler:function(e,t,n,r,o,i,a){if(SA(e,t,o,i))return!1;var s=r[1],l=e.create(),u=o+s.length,c=t.state.tr.delete(o,i).insertText(s).addMark(o,u,l),d=c.setSelection(p.TextSelection.create(c.doc,u)).removeStoredMark(e),f=d.setMeta(a.input,{transform:d,from:o,to:i,text:"`".concat(s).concat(n)});return t.dispatch(f),!0}},jA={match:/^`((?:[^`\w]|[\w])+)`/,handler:function(e,t,n,r,o,i,a){if(SA(e,t,o,i))return!1;var s=e.create(),l=r[1],u=o,c=t.state.tr.delete(o,i).insertText(l).addMark(o,o+l.length,s),d=c.setSelection(p.TextSelection.create(c.doc,u)).addStoredMark(e.create()),f=d.setMeta(a.input,{transform:d,from:o,to:i,text:"`".concat(l).concat(n)});return t.dispatch(f),!0}};function DA(e,t){var n=new p.Plugin({isInputRules:!0,state:{init:function(){return null},apply:function(e,t){var r=e.getMeta(n);return r||(e.selectionSet||e.docChanged?null:t)}},props:{handleTextInput:function(r,o,i,a){return function(e,t,n,r,o,i){if(t.composing)return!1;var a=t.state.doc.resolve(n);if(a.parent.type.spec.code)return!1;var s=a.parent.textBetween(Math.max(0,a.parentOffset-100),a.parentOffset,void 0,"\ufffc")+o,l=o+a.parent.textBetween(a.parentOffset,Math.min(a.parent.nodeSize-2,a.parentOffset+100),void 0,"\ufffc"),u=CA.match.exec(s),c=jA.match.exec(l);if(u){var d=CA.handler(e,t,o,u,n-u[0].length+o.length,r,i);if(d)return d}return!!c&&jA.handler(e,t,o,c,n,r+c[0].length-o.length,i)}(xA(r,t),r,o,i,a,{input:n,cursor:e})}}});return n}function EA(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"next",r={action:n};return e.dispatch(e.state.tr.setMeta(t,r)),!1}function AA(e,t,n,r){var o=function(e,t,n,r){var o;if(n.metaKey)return EA(e,t);if(n.shiftKey||n.altKey||n.ctrlKey)return!1;var i=e.state,a=i.selection,s=i.doc;if(!a.empty)return!1;var l=t.getState(e.state),u=a.$from,c=!!r.isInSet(u.marks()),d=!!r.isInSet(null!==(o=u.marksAcross(OA(s,a.from+1)))&&void 0!==o?o:[]);return u.pos===e.state.doc.nodeSize-3&&u.parentOffset===u.parent.nodeSize-2&&(null===l||void 0===l?void 0:l.active)?(e.dispatch(e.state.tr.removeStoredMark(r)),!0):(c!==d||0===u.parentOffset)&&(!c||(null===l||void 0===l?void 0:l.active)&&-1!==l.side||0===u.parentOffset?!(!d||-1!==(null===l||void 0===l?void 0:l.side))&&(e.dispatch(e.state.tr.addStoredMark(r.create())),!0):(e.dispatch(e.state.tr.removeStoredMark(r)),!0))}(e,t,n,r);if(o)return!0;var i=e.state.selection,a=i.$from;return!(!i.empty||a.parentOffset!==a.parent.nodeSize-2)&&EA(e,t)}function MA(e,t,n,r){var o=function(e,t,n,r){var o;if(n.metaKey)return EA(e,t);if(n.shiftKey||n.altKey||n.ctrlKey)return!1;var i=e.state,a=i.selection,s=i.doc,l=t.getState(e.state),u=!!r.isInSet(a.$from.marks()),c=!!r.isInSet(null!==(o=OA(s,a.empty?a.from-1:a.from+1).marks())&&void 0!==o?o:[]);if(u&&-1===(null===l||void 0===l?void 0:l.side)&&0===a.$from.parentOffset)return!1;if(0===(null===l||void 0===l?void 0:l.side)&&0===a.$from.parentOffset)return e.dispatch(e.state.tr.removeStoredMark(r)),!0;if(u&&c&&0===(null===l||void 0===l?void 0:l.side))return e.dispatch(e.state.tr.addStoredMark(r.create())),!0;if(u&&!c&&(null===l||void 0===l?void 0:l.active)&&0===a.$from.parentOffset)return e.dispatch(e.state.tr.removeStoredMark(r)),!0;if(!u&&(null===l||void 0===l?void 0:l.active)&&0===(null===l||void 0===l?void 0:l.side))return e.dispatch(e.state.tr.removeStoredMark(r)),!0;if(u===c)return!1;if(c||!a.empty&&u){var d=a.empty?a.from-1:a.from,f=e.state.tr.setSelection(p.TextSelection.create(s,d));return!a.empty&&c?e.dispatch(f.addStoredMark(r.create())):e.dispatch(f.removeStoredMark(r)),!0}if((c||!a.empty&&u)&&!(null===l||void 0===l?void 0:l.active)){var h=a.empty?a.from-1:a.from;return e.dispatch(e.state.tr.setSelection(p.TextSelection.create(s,h)).removeStoredMark(r)),!0}if(u&&!(null===l||void 0===l?void 0:l.active)&&a.$from.parentOffset>0)return e.dispatch(e.state.tr.setSelection(p.TextSelection.create(s,a.from-1)).addStoredMark(r.create())),!0;if(u&&!c&&(null===l||void 0===l?void 0:l.active)&&-1!==l.side)return e.dispatch(e.state.tr.addStoredMark(r.create())),!0;if(u&&!c&&(null===l||void 0===l?void 0:l.active)){var m=a.from-1;return e.dispatch(e.state.tr.setSelection(p.TextSelection.create(s,m)).addStoredMark(r.create())),!0}return!1}(e,t,n,r);if(o)return!0;var i=e.state.selection,a=i.$from,s=t.getState(e.state);return 1===a.pos&&0===a.parentOffset&&-1===(null===s||void 0===s?void 0:s.side)||!(!i.empty||0!==a.parentOffset)&&EA(e,t)}function TA(){var e=document.createElement("span");return e.classList.add("fake-cursor"),e}function LA(e){var t=new p.Plugin({key:kA,appendTransaction:function(n,r,o){var i,a=t.getState(r),s=null===(i=n[0])||void 0===i?void 0:i.getMeta(t);return(null===a||void 0===a?void 0:a.next)||"click"===(null===s||void 0===s?void 0:s.action)?function(e,t){var n,r;if(!e)return null;var o=e.selection,i=e.doc;if(!o.empty)return null;var a=!!t.isInSet(null!==(n=e.storedMarks)&&void 0!==n?n:[]),s=!!t.isInSet(o.$from.marks()),l=!!t.isInSet(null!==(r=OA(i,o.from+1).marks())&&void 0!==r?r:[]),u=0===o.$from.parentOffset;return s!==l||!s&&a!==s||s&&u?e.tr.removeStoredMark(t):null}(o,xA(o,e)):null},state:{init:function(){return null},apply:function(n,r,o,i){var a,s=n.getMeta(t);if("next"===(null===s||void 0===s?void 0:s.action))return{next:!0};var l=xA(i,e),u=l.isInSet(null!==(a=i.storedMarks)&&void 0!==a?a:i.doc.resolve(n.selection.from).marks()),c=l.isInSet(i.doc.resolve(n.selection.from).marks()),d=l.isInSet(OA(i.doc,n.selection.from+1).marks()),f=0===n.selection.$from.parentOffset;return n.selection.empty?u||!d||c&&!f?(!u||c&&!f)&&(u||!c||d)?u&&c&&!d?{active:!0,side:-1}:null:{active:!0,side:0}:{active:!0,side:-1}:null}},props:{attributes:function(e){var n,r=(null!==(n=t.getState(e))&&void 0!==n?n:{}).active,o=void 0!==r&&r;return Object.assign({},o?{class:"no-cursor"}:{})},decorations:function(e){var n,r=null!==(n=t.getState(e))&&void 0!==n?n:{},o=r.active,i=r.side;if(!o)return Iu.empty;var a=zu.widget(e.selection.from,TA,{side:i});return Iu.create(e.doc,[a])},handleKeyDown:function(n,r){switch(r.key){case"`":return function(e,t,n,r){if(e.state.selection.empty)return!1;if(n.metaKey||n.shiftKey||n.altKey||n.ctrlKey)return!1;var o=e.state.selection,i=o.from,a=o.to;if(a-i>=100||e.state.doc.rangeHasMark(i,a,r))return!1;var s=e.state.tr.addMark(i,a,r.create()),l=s.setSelection(p.TextSelection.create(s.doc,a)).removeStoredMark(r);return e.dispatch(l),!0}(n,0,r,xA(n,e));case"ArrowRight":return AA(n,t,r,xA(n,e));case"ArrowLeft":return MA(n,t,r,xA(n,e));case"Backspace":return function(e,t,n,r){if(n.metaKey||n.shiftKey||n.altKey||n.ctrlKey)return!1;var o=e.state,i=o.selection,a=o.doc,s=OA(a,i.from-1),l=!!r.isInSet(s.marks()),u=0===s.parentOffset,c=!!r.isInSet(OA(a,i.to+1).marks());if((!l||u)&&!c)return EA(e,t);var d=t.getState(e.state);if(i.empty&&-1===(null===d||void 0===d?void 0:d.side)){var f=e.state.tr.delete(i.from-1,i.from);return e.dispatch(f),!0}return!1}(n,t,r,xA(n,e));case"Delete":return function(e,t,n,r){if(n.metaKey||n.shiftKey||n.altKey||n.ctrlKey)return!1;var o=e.state,i=o.selection,a=o.doc,s=!!r.isInSet(i.$from.marks()),l=0===i.$from.parentOffset,u=!!r.isInSet(OA(a,i.to+2).marks());return!(s&&!l||u)&&EA(e,t)}(n,t,r,xA(n,e));case"ArrowUp":case"ArrowDown":case"Home":case"End":return EA(n,t);case"e":case"a":return!!r.ctrlKey&&EA(n,t);default:return!1}},handleClick:function(e){return EA(e,t,"click")}}});return t}var NA=function(e){var t=LA(e);return[t,DA(t,e)]},PA=Ir.create({name:"codemarkPlugin",addProseMirrorPlugins:function(){return NA({markType:this.editor.schema.marks.code})}}),RA=Object(d.a)((function e(t,n){var r;Object(c.a)(this,e),this.match=t,this.match=t,this.handler="string"==typeof n?(r=n,function(e,t,n,o){var i=r;if(t[1]){var a=t[0].lastIndexOf(t[1]);i+=t[0].slice(a+t[1].length);var s=(n+=a)-o;s>0&&(i=t[0].slice(a-s,a)+i,n=o)}return e.tr.insertText(i,n,o)}):n}));function HA(e){var t=e.rules,n=new p.Plugin({state:{init:function(){return null},apply:function(e,t){var n=e.getMeta(this);return n||(e.selectionSet||e.docChanged?null:t)}},props:{handleTextInput:function(e,r,o,i){return FA(e,r,o,i,t,n)},handleDOMEvents:{compositionend:function(e){setTimeout((function(){var r=e.state.selection.$cursor;r&&FA(e,r.pos,r.pos,"",t,n)}))}}},isInputRules:!0});return n}function FA(e,t,n,r,o,i){if(e.composing)return!1;var a=e.state,s=a.doc.resolve(t);if(s.parent.type.spec.code)return!1;for(var l=s.parent.textBetween(Math.max(0,s.parentOffset-500),s.parentOffset,null,"\ufffc")+r,u=0;u<o.length;u++){var c=o[u].match.exec(l),d=c&&o[u].handler(a,c,t-(c[0].length-r.length),n);if(d)return e.dispatch(d.setMeta(i,{transform:d,from:t,to:n,text:r})),!0}return!1}new RA(/--$/,"\u2014"),new RA(/\.\.\.$/,"\u2026"),new RA(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"\u201c"),new RA(/"$/,"\u201d"),new RA(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"\u2018"),new RA(/'$/,"\u2019");function VA(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return function(o,i){var a=e.state,s=a.selection,l=s.to,u=s.from,c=o.selection,d=c.to,f=c.from;if(r&&d!==f)return!1;var h=t>0?d:f;if(n){var m=o.doc.nodeSize-2;if(t>0&&h<m)return!1;if(t<0&&h>0)return!1}if(i){var v=t>0?l:u;e.dispatch(a.tr.setSelection(p.TextSelection.create(a.doc,v))),e.focus()}return!0}}var zA=function(){function e(t,n,r,o,i,a){var s=this;Object(c.a)(this,e),this.options=o,this._node=t,this._outerView=n,this._getPos=r,this._mathPluginKey=i,this.cursorSide="start",this._isEditing=!1,this._tagName=o.tagName||this._node.type.name.replace("_","-"),this.dom=document.createElement(this._tagName),o.className&&this.dom.classList.add(o.className),this.dom.classList.add("math-node"),this._mathRenderElt=document.createElement("span"),this._mathRenderElt.textContent="",this._mathRenderElt.classList.add("math-render"),this.dom.appendChild(this._mathRenderElt),this._mathSrcElt=document.createElement("span"),this._mathSrcElt.classList.add("math-src"),this.dom.appendChild(this._mathSrcElt),this.dom.addEventListener("click",(function(){return s.ensureFocus()})),this.renderMath()}return Object(d.a)(e,[{key:"destroy",value:function(){this.closeEditor(!1),this._mathRenderElt&&(this._mathRenderElt.remove(),delete this._mathRenderElt),this._mathSrcElt&&(this._mathSrcElt.remove(),delete this._mathSrcElt),this.dom.remove()}},{key:"ensureFocus",value:function(){this._innerView&&this._outerView.hasFocus()&&this._innerView.focus()}},{key:"update",value:function(e,t,n){if(!e.sameMarkup(this._node))return!1;if(this._node=e,this._innerView){var r=this._innerView.state,o=e.content.findDiffStart(r.doc.content);if(null!=o){var i=e.content.findDiffEnd(r.doc.content);if(i){var a=i.a,s=i.b,l=o-Math.min(a,s);l>0&&(a+=l,s+=l),this._innerView.dispatch(r.tr.replace(o,s,e.slice(o,a)).setMeta("fromOutside",!0))}}}return this._isEditing||this.renderMath(),!0}},{key:"updateCursorPos",value:function(e){var t=this._getPos(),n=this._node.nodeSize;e.selection.from<t+n&&t<e.selection.to||(this.cursorSide=t<e.selection.from?"end":"start")}},{key:"selectNode",value:function(){this._outerView.editable&&(this.dom.classList.add("ProseMirror-selectednode"),this._isEditing||this.openEditor())}},{key:"deselectNode",value:function(){this.dom.classList.remove("ProseMirror-selectednode"),this._isEditing&&this.closeEditor()}},{key:"stopEvent",value:function(e){return void 0!==this._innerView&&void 0!==e.target&&this._innerView.dom.contains(e.target)}},{key:"ignoreMutation",value:function(){return!0}},{key:"renderMath",value:function(){if(this._mathRenderElt){var e=this._node.content.content,t="";if(e.length>0&&null!==e[0].textContent&&(t=e[0].textContent.trim()),t.length<1)for(this.dom.classList.add("empty-math");this._mathRenderElt.firstChild;)this._mathRenderElt.firstChild.remove();else{this.dom.classList.remove("empty-math");try{this.options.renderer(t,this._mathRenderElt),this._mathRenderElt.classList.remove("parse-error"),this.dom.setAttribute("title","")}catch(n){n instanceof Error&&(console.error(n),this._mathRenderElt.classList.add("parse-error"),this.dom.setAttribute("title",n.toString()))}}}}},{key:"dispatchInner",value:function(e){if(this._innerView){var t=this._innerView.state.applyTransaction(e),n=t.state,r=t.transactions;if(this._innerView.updateState(n),!e.getMeta("fromOutside")){for(var o=this._outerView.state.tr,i=g.d.offset(this._getPos()+1),a=0;a<r.length;a++)for(var s=r[a].steps,l=0;l<s.length;l++){var u=s[l].map(i);if(!u)throw Error("step discarded!");o.step(u)}o.docChanged&&this._outerView.dispatch(o)}}}},{key:"openEditor",value:function(){var e,t=this;if(this._innerView)throw Error("inner view should not exist!");if(!this._mathSrcElt)throw new Error("_mathSrcElt does not exist!");this._innerView=new uc(this._mathSrcElt,{state:p.EditorState.create({doc:this._node,plugins:[zn({Tab:function(e,t){return t&&t(e.tr.insertText("\t")),!0},Backspace:lr(_n,(function(e,n,r){return!!e.selection.empty&&(!(t._node.textContent.length>0)&&(t._outerView.dispatch(t._outerView.state.tr.insertText("")),t._outerView.focus(),!0))})),Enter:lr(Yn,VA(this._outerView,1,!1)),"Ctrl-Enter":VA(this._outerView,1,!1),ArrowLeft:VA(this._outerView,-1,!0),ArrowRight:VA(this._outerView,1,!0),ArrowUp:VA(this._outerView,-1,!0),ArrowDown:VA(this._outerView,1,!0)})]}),dispatchTransaction:this.dispatchInner.bind(this)});var n=this._innerView.state;this._innerView.focus();var r=null===(e=this._mathPluginKey.getState(this._outerView.state))||void 0===e?void 0:e.prevCursorPos;null!==r&&void 0!==r||console.error("[prosemirror-math] Error: Unable to fetch math plugin state from key.");var o=(null!==r&&void 0!==r?r:0)<=this._getPos()?0:this._node.nodeSize-2;setTimeout((function(){t._innerView&&(t._innerView.focus(),t._innerView.dispatch(n.tr.setSelection(p.TextSelection.create(n.doc,o))))})),this._isEditing=!0}},{key:"closeEditor",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this._innerView&&(this._innerView.destroy(),this._innerView=void 0),e&&this.renderMath(),this._isEditing=!1}}]),e}(),BA=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(t){i(t)}}function s(e){try{l(r.throw(e))}catch(t){i(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};function _A(){return BA(this,void 0,void 0,ik().mark((function e(){var t,r;return ik().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.e(0).then(n.t.bind(null,127,7));case 2:return t=e.sent,r=t.default,e.next=6,Promise.all([n.e(0),n.e(4)]).then(n.bind(null,128));case 6:return e.abrupt("return",r);case 7:case"end":return e.stop()}}),e)})))}var IA={inline:function(e,t){_A().then((function(n){n.render(e,t,{displayMode:!1,globalGroup:!0,throwOnError:!1})}))},block:function(e,t){_A().then((function(n){n.render(e,t,{displayMode:!0,globalGroup:!0,throwOnError:!1})}))}},$A=new p.PluginKey("prosemirror-math");function qA(e){return function(t,n,r){var o=$A.getState(n.state);if(!o)throw new Error("no math plugin!");var i=o.activeNodeViews,a=new zA(t,n,r,{className:e?"math-inline":"math-block",renderer:e?IA.inline:IA.block,tagName:e?"span":"div"},$A,(function(){i.splice(i.indexOf(a))}));return i.push(a),a}}var WA={key:$A,state:{init:function(e,t){return{macros:{},activeNodeViews:[],prevCursorPos:0}},apply:function(e,t,n,r){var o=r.selection.from,i=n.selection.from;return{activeNodeViews:t.activeNodeViews,macros:t.macros,prevCursorPos:i!==o?i:t.prevCursorPos}}},props:{nodeViews:{mathInline:qA(!0),mathBlock:qA(!1)}}},UA=new p.Plugin(WA);function KA(e,t){return v.Fragment.from(t.text(e))}function GA(e){var t,n=e.querySelector("img.mwe-math-fallback-image-inline[alt]");return null!==(t=null===n||void 0===n?void 0:n.getAttribute("alt"))&&void 0!==t&&t}function JA(e){var t,n=e.querySelector("math[alttext]");return null!==(t=null===n||void 0===n?void 0:n.getAttribute("alttext"))&&void 0!==t&&t}function YA(e){var t,n=e.querySelector("math annotation[encoding='application/x-tex'");return null!==(t=null===n||void 0===n?void 0:n.textContent)&&void 0!==t&&t}function ZA(e){var t=function(e,t){var n,r=Object(Sd.a)(t);try{for(r.s();!(n=r.n()).done;){var o=(0,n.value)(e);if(!1!==o)return o}}catch(i){r.e(i)}finally{r.f()}return!1}(e,[GA,JA,YA]);return t}var XA=[{tag:"span",getAttrs:function(e){return!!e.classList.contains("mwe-math-element")&&null},getContent:function(e,t){return KA(ZA(e)||"\\text{\\color{red}(paste error)}",t)}}],QA=[{tag:"dl",getAttrs:function(e){var t=e;if(1!==t.childElementCount)return!1;var n=t.firstChild;return"DD"===n.tagName&&(1===n.childElementCount&&(!!n.firstChild.classList.contains("mwe-math-element")&&null))},getContent:function(e,t){return KA(ZA(e)||"\\text{\\color{red}(paste error)}",t)}}];[{tag:"math-inline"}].concat(Object(o.a)(XA)),[{tag:"math-display"}].concat(Object(o.a)(QA));var eM=/\$\$(.+)\$\$/,tM=(function(){try{new RegExp("(?<!\\\\)\\$(.+)(?<!\\\\)\\$")}catch(e){return eM}}(),/\$\$\$\s+$/);var nM=function(e){var t=e.selection,n=t.from,r=(t.to,e.selection.content().content),o=[];return r.descendants((function(e,t,r){return"text"!=e.type.name&&(!e.type.name.startsWith("math_")||(o.push({start:Math.max(n+t-1,0),end:n+t+e.nodeSize-1}),!1))})),Iu.create(e.doc,o.map((function(e){var t=e.start,n=e.end;return zu.node(t,n,{class:"math-select"})})))},rM=new p.Plugin({state:{init:function(e,t){return nM(t)},apply:function(e,t,n,r){return e.selection&&e.selectionSet?nM(e):n}},props:{decorations:function(e){return rM.getState(e)}}});new(function(){function e(t,n){Object(c.a)(this,e),this.nodes=Object.assign(Object.assign({},null===n||void 0===n?void 0:n.nodes),t.nodes),this.marks=Object.assign(Object.assign({},null===n||void 0===n?void 0:n.marks),t.marks)}return Object(d.a)(e,[{key:"serializeFragment",value:function(e){var t=this,n="\n\n",r="",o=!0,i=e.size;return e.nodesBetween(0,i,(function(e,a){var s,l=t.serializeNode(e);if(null!==l)return r+=l,!1;e.isText?(r+=(null===(s=e.text)||void 0===s?void 0:s.slice(Math.max(0,a)-a,i-a))||"",o=!1):(e.isLeaf,!o&&e.isBlock&&(r+=n,o=!0))}),0),r}},{key:"serializeSlice",value:function(e){return this.serializeFragment(e.content)}},{key:"serializeNode",value:function(e){var t=this.nodes[e.type.name];return void 0!==t?t(e):null}}]),e}())({nodes:{math_inline:function(e){return"$".concat(e.textContent,"$")},math_display:function(e){return"\n\n$$\n".concat(e.textContent,"\n$$")}}});var oM=Bo.create({name:"mathInline",group:"inline math",content:"text*",inline:!0,atom:!0,code:!0,parseHTML:function(){return[{tag:"span[class*='math-inline']"}]},renderHTML:function(e){return["span",Sr({class:"math-inline math-node"},e.HTMLAttributes),0]},addCommands:function(){var e=this;return{insertMathInline:function(){return function(t){var n=t.chain,r=t.tr.selection.$from;return n().insertContent({type:e.name,attrs:{}}).setNodeSelection(r.pos).run()}}}},addProseMirrorPlugins:function(){var e,t,n,r=HA({rules:[(e=eM,t=this.type,new RA(e,(function(e,r,o,i){var a=e.doc.resolve(o),s=a.index(),l=e.doc.resolve(i),u=n instanceof Function?n(r):n;return a.parent.canReplaceWith(s,l.index(),t)?e.tr.replaceRangeWith(o,i,t.create(u,t.schema.text(r[1]))):null})))]});return[UA,r]}}),iM=Bo.create({name:"mathBlock",group:"block math",content:"text*",atom:!0,code:!0,parseHTML:function(){return[{tag:"div[class*='math-block']"}]},renderHTML:function(e){return["div",Sr({class:"math-block math-node"},e.HTMLAttributes),0]},addCommands:function(){var e=this;return{insertMathBlock:function(){return function(t){var n=t.state,r=t.dispatch,o=t.view;return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return function(n,r){var o=n.selection,i=o.$from,a=o.empty,s=i.index();if(!a&&!i.parent.canReplaceWith(s,s,e))return!1;if(r){var l=e.create({},t?n.schema.text(t):null),u=n.tr.replaceSelectionWith(l);r(u=a?u.setSelection(p.TextSelection.create(u.doc,i.pos+1)):u.setSelection(p.NodeSelection.create(u.doc,i.pos)))}return!0}}(e.type)(n,r,o)}}}},addProseMirrorPlugins:function(){var e,t,n;return[HA({rules:[(e=tM,t=this.type,new RA(e,(function(e,r,o,i){var a=e.doc.resolve(o),s=n instanceof Function?n(r):n;if(!a.node(-1).canReplaceWith(a.index(-1),a.indexAfter(-1),t))return null;var l=e.tr.delete(o,i).setBlockType(o,o,t,s);return l.setSelection(p.NodeSelection.create(l.doc,l.mapping.map(a.pos-1)))})))]})]}}),aM=void 0,sM=Ir.create({name:"keepinview",onCreate:function(){var e=this;aM=function(){lM(e.editor)},window.addEventListener("resize",aM)},onDestroy:function(){aM&&(window.removeEventListener("resize",aM),aM=void 0)},addKeyboardShortcuts:function(){return{Enter:function(e){var t=e.editor;return setTimeout((function(){lM(t)})),!1}}}});function lM(e){var t=e.state.selection.$from,n=function(e,t,n){var r=e.state.doc.content.size,o=Qr(t,0,r),i=Qr(n,0,r),a=e.coordsAtPos(o),s=e.coordsAtPos(i,-1),l=Math.min(a.top,s.top),u=Math.max(a.bottom,s.bottom),c=Math.min(a.left,s.left),d=Math.max(a.right,s.right),p={top:l,bottom:u,left:c,right:d,width:d-c,height:u-l,x:c,y:l};return Object(f.a)(Object(f.a)({},p),{},{toJSON:function(){return p}})}(e.view,t.pos,t.pos+1),r=n.top;if(window.innerHeight-r<100){var o=e.view.domAtPos(t.pos).node;if(o.nodeType===Node.TEXT_NODE&&o.parentNode&&(o=o.parentNode),o instanceof HTMLElement){var i=uM(o);i?i.scrollBy({top:100,behavior:"smooth"}):o.scrollIntoView({behavior:"smooth",block:"center"})}}}var uM=function(e){if(e){for(var t=e.parentElement;t;){var n=t.style,r=n.overflow,o=n.overflowY;if(cM(r)||cM(o))return t;t=t.parentElement}return document.documentElement}};function cM(e){return e.split(" ").every((function(e){return"auto"===e||"scroll"===e}))}var dM=new p.PluginKey("selection-persist-key"),fM=Ir.create({name:"selection-persist",addProseMirrorPlugins:function(){var e=!1,t=this.editor;return[new p.Plugin({key:dM,props:{decorations:function(e){return dM.getState(e)}},state:{init:function(){return Iu.empty},apply:function(n,r,o,i){if((t.storage.searchreplace||{}).isSearching)return Iu.empty;var a=!!n.getMeta("blur");!!n.getMeta("focus")&&(e=!1,!0),a&&(e=!0,!1);var s=o.selection,l=s.from,u=s.to;return e?Iu.create(n.doc,[zu.inline(l,u,{style:"background-color: var(--dimPrimary)"})]):Iu.empty}}})]}}),pM=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(){return Object(c.a)(this,n),t.apply(this,arguments)}return Object(d.a)(n,[{key:"requestPermission",value:function(e){var t=new CustomEvent("permissionrequest",{detail:{id:e},cancelable:!0});if(window.dispatchEvent(t))return this.current}}]),n}(Mo);function hM(){var e=Object(jd.useState)(0),t=Object(i.a)(e,2)[1];return function(){return t((function(e){return e+1}))}}var mM=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=Object(jd.useState)(null),r=Object(i.a)(n,2),o=r[0],a=r[1],s=hM(),l=Object(jd.useRef)(o);return Object(jd.useEffect)((function(){var t=!0,n=new pM(e);return a(n),n.on("transaction",(function(){requestAnimationFrame((function(){requestAnimationFrame((function(){t&&s()}))}))})),function(){n.destroy(),t=!1}}),t),Object(jd.useEffect)((function(){l.current=o,o&&(o.current||Object.defineProperty(o,"current",{get:function(){return l.current}}))}),[o]),Object(jd.useEffect)((function(){function e(e){if(null===o||void 0===o?void 0:o.view.dragging)return e.preventDefault(),!0}return null===o||void 0===o||o.view.dom.addEventListener("dragenter",e),function(){null===o||void 0===o||o.view.dom.removeEventListener("dragenter",e)}}),[null===o||void 0===o?void 0:o.view.dom]),o},vM={premium:["insertImage"]};function gM(e){var t=e.claims,n=e.onPermissionDenied;Object(jd.useEffect)((function(){function e(e){var r=e.detail.id;for(var o in vM){var i=o;if(!(vM[i].indexOf(r)<=-1)&&!t[i]){n(i,r),e.preventDefault();break}}e.preventDefault()}return window.addEventListener("permissionrequest",e),function(){window.removeEventListener("permissionrequest",e)}}),[t,n])}var yM=Ir.create({name:"highlight",addOptions:function(){return{types:["textStyle"],HTMLAttributes:{}}},addGlobalAttributes:function(){return[{types:this.options.types,attributes:{backgroundColor:{default:null,parseHTML:function(e){var t;return null===(t=e.style.backgroundColor)||void 0===t?void 0:t.replace(/['"]+/g,"")},renderHTML:function(e){return e.backgroundColor?{style:"background-color: ".concat(e.backgroundColor)}:{}}}}}]},addCommands:function(){return{setHighlight:function(e){return function(t){return t.commands.setMark("textStyle",{backgroundColor:e})}},toggleHighlight:function(e){return function(t){return t.commands.toggleMark("textStyle",{backgroundColor:e})}},unsetHighlight:function(){return function(e){return(0,e.chain)().setMark("textStyle",{backgroundColor:null}).removeEmptyTextStyle().run()}}}}}),bM=Bo.create({name:"paragraph",priority:1e3,addOptions:function(){return{HTMLAttributes:{},doubleSpaced:!0}},group:"block",content:"inline*",addAttributes:function(){return{spacing:{keepOnSplit:!1,default:wM(this.options.doubleSpaced),parseHTML:function(e){return e.dataset.spacing},renderHTML:function(e){if(e.spacing)return{"data-spacing":e.spacing}}}}},parseHTML:function(){return[{tag:"p"}]},renderHTML:function(e){var t=e.HTMLAttributes;return["p",Sr(this.options.HTMLAttributes,t),0]},addCommands:function(){var e=this;return{setParagraph:function(){return function(t){return t.commands.setNode(e.name)}}}},addKeyboardShortcuts:function(){var e=this;return{Enter:function(t){var n=t.editor;if(e.options.doubleSpaced)return!1;var r=n.state.selection,o=r.$from;return!(!r.empty||o.parent.type!==e.type||o.depth>1)&&(!(null!==o.nodeBefore)&&(kM(n,e.type,!0,!1),!0))},"Mod-Enter":function(t){return kM(t.editor,e.type,!1,!0)},"Shift-Enter":function(t){return kM(t.editor,e.type,!1,!0)},"Mod-Alt-0":function(){return e.editor.commands.setParagraph()}}}});function wM(e){return e?"double":"single"}function kM(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return e.chain().command((function(e){var n=e.tr,o=n.selection.from,i=n.doc.nodeAt(o-1);return(null===i||void 0===i?void 0:i.type)!==t||"double"===i.attrs.spacing||r&&2===i.nodeSize||n.delete(o-1,o),!0})).splitBlock({keepMarks:!0}).updateAttributes(t,{spacing:wM(n)}).run()}var xM=Ir.create({name:"clipboardTextSerializer",addProseMirrorPlugins:function(){var e=this;return[new p.Plugin({key:new p.PluginKey("clipboardTextSerializer"),props:{clipboardTextSerializer:function(t){return function(e,t){var n={from:0,to:e.size},r=n.from,o=n.to,i=function(e){return"single"===e.attrs.spacing?"\n":"\n\n"},a="",s=!0;return e.content.nodesBetween(0,e.size,(function(e,l,u,c){var d,f,p=null===(d=t.nodes[e.type.name])||void 0===d?void 0:d.spec.toText;p?(e.isBlock&&!s&&(a+=i(e),s=!0),u&&(a+=p({node:e,pos:l,parent:u,index:c,range:n}))):e.isText?(a+=null===(f=null===e||void 0===e?void 0:e.text)||void 0===f?void 0:f.slice(Math.max(r,l)-l,o-l),s=!1):e.isBlock&&!s&&(a+=i(e),s=!0)})),a}(t,e.editor.schema)}}})]}});var OM=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},SM=Object.entries(jo).filter((function(e){return"ClipboardTextSerializer"!==Object(i.a)(e,1)[0]})).map((function(e){return Object(i.a)(e,2)[1]}));uc.prototype.updateState=function(e){this.docView&&this.updateStateInner(e,this.state.plugins!=e.plugins)};var CM=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=e.theme,r=e.doubleSpacedLines,i=void 0===r||r,a=e.isMobile,s=e.isKeyboardOpen,l=e.onDownloadAttachment,u=e.onOpenAttachmentPicker,c=e.onBeforeCreate,d=OM(e,["theme","doubleSpacedLines","isMobile","isKeyboardOpen","onDownloadAttachment","onOpenAttachmentPicker","onBeforeCreate"]),f=Gd(),p=Rd((function(e){return e.setIsMobile})),h=Rd((function(e){return e.setTheme})),m=Rd((function(e){return e.setIsKeyboardOpen}));Object(jd.useEffect)((function(){p(a||!1),h(n),m(s||!1)}),[a,n,s]);var v=Object(jd.useMemo)((function(){return{enableCoreExtensions:!1,extensions:[].concat(Object(o.a)(SM),[xM,ef,FC,pd,bM.configure({doubleSpaced:i}),ud.configure({code:!1,dropcursor:!1,codeBlock:!1,listItem:!1,orderedList:!1,bulletList:!1,paragraph:!1,hardBreak:!1,history:{depth:200,newGroupDelay:1e3}}),RC.configure({class:"drop-cursor"}),Io,Ba,dd,fd,hd,md,vd,gd,yd,MC.configure({nested:!0}),LC,wA.configure({openOnClick:!a,validate:function(){return!1}}),GD.configure({resizable:!0,allowTableNodeSelection:!0,cellMinWidth:50}),wd,xd,Od,yM,CD,bd,cd.configure({types:["heading","paragraph"],alignments:["left","right","center","justify"],defaultAlignment:"left"}),za.configure({placeholder:"Start writing your note..."}),xC.configure({allowBase64:!0}),BC,_S.configure({onDownloadAttachment:l,onOpenAttachmentPicker:u}),PD,VD,LD,Xa.extend({excludes:""}),PA,oM,iM,sM,fM]),onBeforeCreate:function(e){var t=e.editor;t.storage.portalProviderAPI=f,c&&c({editor:t})},injectCSS:!1}}),[l,u,f,c]),g=mM(Object.assign(Object.assign({},v),d),t);return g}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(39);function o(e,t){if(e){if("string"===typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},function(e,t,n){"use strict";t.a=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}},function(e,t,n){"use strict";n.r(t);var r=n(37),o=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|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|download|draggable|encType|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|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|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|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)-.*))$/,i=Object(r.a)((function(e){return o.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}));t.default=i},function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",(function(){return r}))},,function(e){e.exports=JSON.parse('[{"filename":"markup","title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"]},{"filename":"css","title":"CSS"},{"filename":"clike","title":"C-like"},{"filename":"javascript","title":"JavaScript","alias":["js"]},{"filename":"abap","title":"ABAP"},{"filename":"abnf","title":"ABNF"},{"filename":"actionscript","title":"ActionScript"},{"filename":"ada","title":"Ada"},{"filename":"agda","title":"Agda"},{"filename":"al","title":"AL"},{"filename":"antlr4","title":"ANTLR4","alias":["g4"]},{"filename":"apacheconf","title":"Apache Configuration"},{"filename":"apex","title":"Apex"},{"filename":"apl","title":"APL"},{"filename":"applescript","title":"AppleScript"},{"filename":"aql","title":"AQL"},{"filename":"arduino","title":"Arduino","alias":["ino"]},{"filename":"arff","title":"ARFF"},{"filename":"armasm","title":"ARM Assembly","alias":["arm-asm"]},{"filename":"arturo","title":"Arturo","alias":["art"]},{"filename":"asciidoc","title":"AsciiDoc","alias":["adoc"]},{"filename":"aspnet","title":"ASP.NET (C#)"},{"filename":"asm6502","title":"6502 Assembly"},{"filename":"asmatmel","title":"Atmel AVR Assembly"},{"filename":"autohotkey","title":"AutoHotkey"},{"filename":"autoit","title":"AutoIt"},{"filename":"avisynth","title":"AviSynth","alias":["avs"]},{"filename":"avro-idl","title":"Avro IDL","alias":["avdl"]},{"filename":"awk","title":"AWK","alias":["gawk"]},{"filename":"bash","title":"Bash","alias":["shell"]},{"filename":"basic","title":"BASIC"},{"filename":"batch","title":"Batch"},{"filename":"bbcode","title":"BBcode","alias":["shortcode"]},{"filename":"bicep","title":"Bicep"},{"filename":"birb","title":"Birb"},{"filename":"bison","title":"Bison"},{"filename":"bnf","title":"BNF","alias":["rbnf"]},{"filename":"brainfuck","title":"Brainfuck"},{"filename":"brightscript","title":"BrightScript"},{"filename":"bro","title":"Bro"},{"filename":"bsl","title":"BSL (1C:Enterprise)","alias":["oscript"]},{"filename":"c","title":"C"},{"filename":"csharp","title":"C#","alias":["cs","dotnet"]},{"filename":"cpp","title":"C++"},{"filename":"cfscript","title":"CFScript","alias":["cfc"]},{"filename":"chaiscript","title":"ChaiScript"},{"filename":"cil","title":"CIL"},{"filename":"clojure","title":"Clojure"},{"filename":"cmake","title":"CMake"},{"filename":"cobol","title":"COBOL"},{"filename":"coffeescript","title":"CoffeeScript","alias":["coffee"]},{"filename":"concurnas","title":"Concurnas","alias":["conc"]},{"filename":"csp","title":"Content-Security-Policy"},{"filename":"cooklang","title":"Cooklang"},{"filename":"coq","title":"Coq"},{"filename":"crystal","title":"Crystal"},{"filename":"css-extras","title":"CSS Extras"},{"filename":"csv","title":"CSV"},{"filename":"cue","title":"CUE"},{"filename":"cypher","title":"Cypher"},{"filename":"d","title":"D"},{"filename":"dart","title":"Dart"},{"filename":"dataweave","title":"DataWeave"},{"filename":"dax","title":"DAX"},{"filename":"dhall","title":"Dhall"},{"filename":"diff","title":"Diff"},{"filename":"django","title":"Django/Jinja2","alias":["jinja2"]},{"filename":"dns-zone-file","title":"DNS zone file","alias":["dns-zone"]},{"filename":"docker","title":"Docker","alias":["dockerfile"]},{"filename":"dot","title":"DOT (Graphviz)","alias":["gv"]},{"filename":"ebnf","title":"EBNF"},{"filename":"editorconfig","title":"EditorConfig"},{"filename":"eiffel","title":"Eiffel"},{"filename":"ejs","title":"EJS","alias":["eta"]},{"filename":"elixir","title":"Elixir"},{"filename":"elm","title":"Elm"},{"filename":"etlua","title":"Embedded Lua templating"},{"filename":"erb","title":"ERB"},{"filename":"erlang","title":"Erlang"},{"filename":"excel-formula","title":"Excel Formula","alias":["xlsx","xls"]},{"filename":"fsharp","title":"F#"},{"filename":"factor","title":"Factor"},{"filename":"false","title":"False"},{"filename":"firestore-security-rules","title":"Firestore security rules"},{"filename":"flow","title":"Flow"},{"filename":"fortran","title":"Fortran"},{"filename":"ftl","title":"FreeMarker Template Language"},{"filename":"gml","title":"GameMaker Language","alias":["gamemakerlanguage"]},{"filename":"gap","title":"GAP (CAS)"},{"filename":"gcode","title":"G-code"},{"filename":"gdscript","title":"GDScript"},{"filename":"gedcom","title":"GEDCOM"},{"filename":"gettext","title":"gettext","alias":["po"]},{"filename":"gherkin","title":"Gherkin"},{"filename":"git","title":"Git"},{"filename":"glsl","title":"GLSL"},{"filename":"gn","title":"GN","alias":["gni"]},{"filename":"linker-script","title":"GNU Linker Script","alias":["ld"]},{"filename":"go","title":"Go"},{"filename":"go-module","title":"Go module","alias":["go-mod"]},{"filename":"gradle","title":"Gradle"},{"filename":"graphql","title":"GraphQL"},{"filename":"groovy","title":"Groovy"},{"filename":"haml","title":"Haml"},{"filename":"handlebars","title":"Handlebars","alias":["hbs","mustache"]},{"filename":"haskell","title":"Haskell","alias":["hs"]},{"filename":"haxe","title":"Haxe"},{"filename":"hcl","title":"HCL"},{"filename":"hlsl","title":"HLSL"},{"filename":"hoon","title":"Hoon"},{"filename":"http","title":"HTTP"},{"filename":"hpkp","title":"HTTP Public-Key-Pins"},{"filename":"hsts","title":"HTTP Strict-Transport-Security"},{"filename":"ichigojam","title":"IchigoJam"},{"filename":"icon","title":"Icon"},{"filename":"icu-message-format","title":"ICU Message Format"},{"filename":"idris","title":"Idris","alias":["idr"]},{"filename":"ignore","title":".ignore","alias":["gitignore","hgignore","npmignore"]},{"filename":"inform7","title":"Inform 7"},{"filename":"ini","title":"Ini"},{"filename":"io","title":"Io"},{"filename":"j","title":"J"},{"filename":"java","title":"Java"},{"filename":"javadoc","title":"JavaDoc"},{"filename":"javadoclike","title":"JavaDoc-like"},{"filename":"javastacktrace","title":"Java stack trace"},{"filename":"jexl","title":"Jexl"},{"filename":"jolie","title":"Jolie"},{"filename":"jq","title":"JQ"},{"filename":"jsdoc","title":"JSDoc"},{"filename":"js-extras","title":"JS Extras"},{"filename":"json","title":"JSON","alias":["webmanifest"]},{"filename":"json5","title":"JSON5"},{"filename":"jsonp","title":"JSONP"},{"filename":"jsstacktrace","title":"JS stack trace"},{"filename":"js-templates","title":"JS Templates"},{"filename":"julia","title":"Julia"},{"filename":"keepalived","title":"Keepalived Configure"},{"filename":"keyman","title":"Keyman"},{"filename":"kotlin","title":"Kotlin","alias":["kt","kts"]},{"filename":"kumir","title":"KuMir (\u041a\u0443\u041c\u0438\u0440)","alias":["kum"]},{"filename":"kusto","title":"Kusto"},{"filename":"latex","title":"LaTeX","alias":["tex","context"]},{"filename":"latte","title":"Latte"},{"filename":"less","title":"Less"},{"filename":"lilypond","title":"LilyPond","alias":["ly"]},{"filename":"liquid","title":"Liquid"},{"filename":"lisp","title":"Lisp","alias":["emacs","elisp","emacs-lisp"]},{"filename":"livescript","title":"LiveScript"},{"filename":"llvm","title":"LLVM IR"},{"filename":"log","title":"Log file"},{"filename":"lolcode","title":"LOLCODE"},{"filename":"lua","title":"Lua"},{"filename":"magma","title":"Magma (CAS)"},{"filename":"makefile","title":"Makefile"},{"filename":"markdown","title":"Markdown","alias":["md"]},{"filename":"markup-templating","title":"Markup templating"},{"filename":"mata","title":"Mata"},{"filename":"matlab","title":"MATLAB"},{"filename":"maxscript","title":"MAXScript"},{"filename":"mel","title":"MEL"},{"filename":"mermaid","title":"Mermaid"},{"filename":"mizar","title":"Mizar"},{"filename":"mongodb","title":"MongoDB"},{"filename":"monkey","title":"Monkey"},{"filename":"moonscript","title":"MoonScript","alias":["moon"]},{"filename":"n1ql","title":"N1QL"},{"filename":"n4js","title":"N4JS","alias":["n4jsd"]},{"filename":"nand2tetris-hdl","title":"Nand To Tetris HDL"},{"filename":"naniscript","title":"Naninovel Script","alias":["nani"]},{"filename":"nasm","title":"NASM"},{"filename":"neon","title":"NEON"},{"filename":"nevod","title":"Nevod"},{"filename":"nginx","title":"nginx"},{"filename":"nim","title":"Nim"},{"filename":"nix","title":"Nix"},{"filename":"nsis","title":"NSIS"},{"filename":"objectivec","title":"Objective-C","alias":["objc"]},{"filename":"ocaml","title":"OCaml"},{"filename":"odin","title":"Odin"},{"filename":"opencl","title":"OpenCL"},{"filename":"openqasm","title":"OpenQasm","alias":["qasm"]},{"filename":"oz","title":"Oz"},{"filename":"parigp","title":"PARI/GP"},{"filename":"parser","title":"Parser"},{"filename":"pascal","title":"Pascal","alias":["objectpascal"]},{"filename":"pascaligo","title":"Pascaligo"},{"filename":"psl","title":"PATROL Scripting Language"},{"filename":"pcaxis","title":"PC-Axis","alias":["px"]},{"filename":"peoplecode","title":"PeopleCode","alias":["pcode"]},{"filename":"perl","title":"Perl"},{"filename":"php","title":"PHP"},{"filename":"phpdoc","title":"PHPDoc"},{"filename":"php-extras","title":"PHP Extras"},{"filename":"plant-uml","title":"PlantUML","alias":["plantuml"]},{"filename":"plsql","title":"PL/SQL"},{"filename":"powerquery","title":"PowerQuery","alias":["pq","mscript"]},{"filename":"powershell","title":"PowerShell"},{"filename":"processing","title":"Processing"},{"filename":"prolog","title":"Prolog"},{"filename":"promql","title":"PromQL"},{"filename":"properties","title":".properties"},{"filename":"protobuf","title":"Protocol Buffers"},{"filename":"pug","title":"Pug"},{"filename":"puppet","title":"Puppet"},{"filename":"pure","title":"Pure"},{"filename":"purebasic","title":"PureBasic","alias":["pbfasm"]},{"filename":"purescript","title":"PureScript","alias":["purs"]},{"filename":"python","title":"Python","alias":["py"]},{"filename":"qsharp","title":"Q#","alias":["qs"]},{"filename":"q","title":"Q (kdb+ database)"},{"filename":"qml","title":"QML"},{"filename":"qore","title":"Qore"},{"filename":"r","title":"R"},{"filename":"racket","title":"Racket","alias":["rkt"]},{"filename":"cshtml","title":"Razor C#","alias":["razor"]},{"filename":"jsx","title":"React JSX"},{"filename":"tsx","title":"React TSX"},{"filename":"reason","title":"Reason"},{"filename":"regex","title":"Regex"},{"filename":"rego","title":"Rego"},{"filename":"renpy","title":"Ren\'py","alias":["rpy"]},{"filename":"rescript","title":"ReScript","alias":["res"]},{"filename":"rest","title":"reST (reStructuredText)"},{"filename":"rip","title":"Rip"},{"filename":"roboconf","title":"Roboconf"},{"filename":"robotframework","title":"Robot Framework","alias":["robot"]},{"filename":"ruby","title":"Ruby","alias":["rb"]},{"filename":"rust","title":"Rust"},{"filename":"sas","title":"SAS"},{"filename":"sass","title":"Sass (Sass)"},{"filename":"scss","title":"Sass (Scss)"},{"filename":"scala","title":"Scala"},{"filename":"scheme","title":"Scheme"},{"filename":"shell-session","title":"Shell session","alias":["sh-session","shellsession"]},{"filename":"smali","title":"Smali"},{"filename":"smalltalk","title":"Smalltalk"},{"filename":"smarty","title":"Smarty"},{"filename":"sml","title":"SML","alias":["smlnj"]},{"filename":"solidity","title":"Solidity (Ethereum)","alias":["sol"]},{"filename":"solution-file","title":"Solution file","alias":["sln"]},{"filename":"soy","title":"Soy (Closure Template)"},{"filename":"sparql","title":"SPARQL","alias":["rq"]},{"filename":"splunk-spl","title":"Splunk SPL"},{"filename":"sqf","title":"SQF: Status Quo Function (Arma 3)"},{"filename":"sql","title":"SQL"},{"filename":"squirrel","title":"Squirrel"},{"filename":"stan","title":"Stan"},{"filename":"stata","title":"Stata Ado"},{"filename":"iecst","title":"Structured Text (IEC 61131-3)"},{"filename":"stylus","title":"Stylus"},{"filename":"supercollider","title":"SuperCollider","alias":["sclang"]},{"filename":"swift","title":"Swift"},{"filename":"systemd","title":"Systemd configuration file"},{"filename":"t4-templating","title":"T4 templating"},{"filename":"t4-cs","title":"T4 Text Templates (C#)","alias":["t4"]},{"filename":"t4-vb","title":"T4 Text Templates (VB)"},{"filename":"tap","title":"TAP"},{"filename":"tcl","title":"Tcl"},{"filename":"tt2","title":"Template Toolkit 2"},{"filename":"textile","title":"Textile"},{"filename":"toml","title":"TOML"},{"filename":"tremor","title":"Tremor","alias":["trickle","troy"]},{"filename":"turtle","title":"Turtle","alias":["trig"]},{"filename":"twig","title":"Twig"},{"filename":"typescript","title":"TypeScript","alias":["ts"]},{"filename":"typoscript","title":"TypoScript","alias":["tsconfig"]},{"filename":"unrealscript","title":"UnrealScript","alias":["uscript","uc"]},{"filename":"uorazor","title":"UO Razor Script"},{"filename":"uri","title":"URI","alias":["url"]},{"filename":"v","title":"V"},{"filename":"vala","title":"Vala"},{"filename":"vbnet","title":"VB.Net"},{"filename":"velocity","title":"Velocity"},{"filename":"verilog","title":"Verilog"},{"filename":"vhdl","title":"VHDL"},{"filename":"vim","title":"vim"},{"filename":"visual-basic","title":"Visual Basic","alias":["vb","vba"]},{"filename":"warpscript","title":"WarpScript"},{"filename":"wasm","title":"WebAssembly"},{"filename":"web-idl","title":"Web IDL","alias":["webidl"]},{"filename":"wgsl","title":"WGSL"},{"filename":"wiki","title":"Wiki markup"},{"filename":"wolfram","title":"Wolfram language","alias":["mathematica","nb","wl"]},{"filename":"wren","title":"Wren"},{"filename":"xeora","title":"Xeora","alias":["xeoracube"]},{"filename":"xml-doc","title":"XML doc (.net)"},{"filename":"xojo","title":"Xojo (REALbasic)"},{"filename":"xquery","title":"XQuery"},{"filename":"yaml","title":"YAML","alias":["yml"]},{"filename":"yang","title":"YANG"},{"filename":"zig","title":"Zig"}]')},function(e,t,n){"use strict";function r(){return r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}n.r(t),n.d(t,"get",(function(){return o})),n.d(t,"responsive",(function(){return f})),n.d(t,"css",(function(){return p}));var o=function(e,t,n,r,o){for(t=t&&t.split?t.split("."):[t],r=0;r<t.length;r++)e=e?e[t[r]]:o;return e===o?n:e},i=[40,52,64].map((function(e){return e+"em"})),a={space:[0,4,8,16,32,64,128,256,512],fontSizes:[12,14,16,20,24,32,48,64,72]},s={bg:"backgroundColor",m:"margin",mt:"marginTop",mr:"marginRight",mb:"marginBottom",ml:"marginLeft",mx:"marginX",my:"marginY",p:"padding",pt:"paddingTop",pr:"paddingRight",pb:"paddingBottom",pl:"paddingLeft",px:"paddingX",py:"paddingY"},l={marginX:["marginLeft","marginRight"],marginY:["marginTop","marginBottom"],paddingX:["paddingLeft","paddingRight"],paddingY:["paddingTop","paddingBottom"],size:["width","height"]},u={color:"colors",backgroundColor:"colors",borderColor:"colors",margin:"space",marginTop:"space",marginRight:"space",marginBottom:"space",marginLeft:"space",marginX:"space",marginY:"space",padding:"space",paddingTop:"space",paddingRight:"space",paddingBottom:"space",paddingLeft:"space",paddingX:"space",paddingY:"space",top:"space",right:"space",bottom:"space",left:"space",gridGap:"space",gridColumnGap:"space",gridRowGap:"space",gap:"space",columnGap:"space",rowGap:"space",fontFamily:"fonts",fontSize:"fontSizes",fontWeight:"fontWeights",lineHeight:"lineHeights",letterSpacing:"letterSpacings",border:"borders",borderTop:"borders",borderRight:"borders",borderBottom:"borders",borderLeft:"borders",borderWidth:"borderWidths",borderStyle:"borderStyles",borderRadius:"radii",borderTopRightRadius:"radii",borderTopLeftRadius:"radii",borderBottomRightRadius:"radii",borderBottomLeftRadius:"radii",borderTopWidth:"borderWidths",borderTopColor:"colors",borderTopStyle:"borderStyles",borderBottomWidth:"borderWidths",borderBottomColor:"colors",borderBottomStyle:"borderStyles",borderLeftWidth:"borderWidths",borderLeftColor:"colors",borderLeftStyle:"borderStyles",borderRightWidth:"borderWidths",borderRightColor:"colors",borderRightStyle:"borderStyles",outlineColor:"colors",boxShadow:"shadows",textShadow:"shadows",zIndex:"zIndices",width:"sizes",minWidth:"sizes",maxWidth:"sizes",height:"sizes",minHeight:"sizes",maxHeight:"sizes",flexBasis:"sizes",size:"sizes",fill:"colors",stroke:"colors"},c=function(e,t){if("number"!==typeof t||t>=0)return o(e,t,t);var n=Math.abs(t),r=o(e,n,n);return"string"===typeof r?"-"+r:-1*r},d=["margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","top","bottom","left","right"].reduce((function(e,t){var n;return r({},e,((n={})[t]=c,n))}),{}),f=function(e){return function(t){var n={},r=o(t,"breakpoints",i),a=[null].concat(r.map((function(e){return"@media screen and (min-width: "+e+")"})));for(var s in e){var l="function"===typeof e[s]?e[s](t):e[s];if(null!=l)if(Array.isArray(l))for(var u=0;u<l.slice(0,a.length).length;u++){var c=a[u];c?(n[c]=n[c]||{},null!=l[u]&&(n[c][s]=l[u])):n[s]=l[u]}else n[s]=l}return n}},p=function e(t){return function(n){void 0===n&&(n={});var i=r({},a,{},n.theme||n),c={},p="function"===typeof t?t(i):t,h=f(p)(i);for(var m in h){var v=h[m],g="function"===typeof v?v(i):v;if("variant"!==m)if(g&&"object"===typeof g)c[m]=e(g)(i);else{var y=o(s,m,m),b=o(u,y),w=o(i,b,o(i,y,{})),k=o(d,y,o)(w,g,g);if(l[y])for(var x=l[y],O=0;O<x.length;O++)c[x[O]]=k;else c[y]=k}else c=r({},c,{},e(o(i,g))(i))}return c}};t.default=p},function(e,t,n){"use strict";n.r(t),n.d(t,"props",(function(){return a})),n.d(t,"createShouldForwardProp",(function(){return s}));var r=n(37),o=n(38),i=n(20),a=Object(i.compose)(i.space,i.typography,i.color,i.layout,i.flexbox,i.border,i.background,i.position,i.grid,i.shadow,i.buttonStyle,i.textStyle,i.colorStyle).propNames,s=function(e){var t=new RegExp("^("+e.join("|")+")$");return Object(r.a)((function(e){return Object(o.default)(e)&&!t.test(e)}))};t.default=s(a)},function(e,t,n){"use strict";function r(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";t.a=function(e){var t=new WeakMap;return function(n){if(t.has(n))return t.get(n);var r=e(n);return t.set(n,r),r}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);function o(e){var t,n=new Set,r=function(e,r){var o="function"===typeof e?e(t):e;if(o!==t){var i=t;t=r?o:Object.assign({},t,o),n.forEach((function(e){return e(t,i)}))}},o=function(){return t},i={setState:r,getState:o,subscribe:function(e,r,i){return r||i?function(e,r,i){void 0===r&&(r=o),void 0===i&&(i=Object.is),console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");var a=r(t);function s(){var n=r(t);if(!i(a,n)){var o=a;e(a=n,o)}}return n.add(s),function(){return n.delete(s)}}(e,r,i):(n.add(e),function(){return n.delete(e)})},destroy:function(){return n.clear()}};return t=e(r,o,i),i}var i="undefined"===typeof window||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent)?r.useEffect:r.useLayoutEffect;t.default=function(e){var t="function"===typeof e?o(e):e,n=function(e,n){void 0===e&&(e=t.getState),void 0===n&&(n=Object.is);var o,a=r.useReducer((function(e){return e+1}),0)[1],s=t.getState(),l=r.useRef(s),u=r.useRef(e),c=r.useRef(n),d=r.useRef(!1),f=r.useRef();void 0===f.current&&(f.current=e(s));var p=!1;(l.current!==s||u.current!==e||c.current!==n||d.current)&&(o=e(s),p=!n(f.current,o)),i((function(){p&&(f.current=o),l.current=s,u.current=e,c.current=n,d.current=!1}));var h=r.useRef(s);i((function(){var e=function(){try{var e=t.getState(),n=u.current(e);c.current(f.current,n)||(l.current=e,f.current=n,a())}catch(r){d.current=!0,a()}},n=t.subscribe(e);return t.getState()!==h.current&&e(),n}),[]);var m=p?o:f.current;return r.useDebugValue(m),m};return Object.assign(n,t),n[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");var e=[n,t];return{next:function(){var t=e.length<=0;return{value:e.shift(),done:t}}}},n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=n(93),i=(r=o)&&r.__esModule?r:{default:r};t.default=i.default,e.exports=t.default},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(12),o=n(31);var i=n(44);function a(e,t,n){return a=Object(i.a)()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&Object(o.a)(i,n.prototype),i},a.apply(null,arguments)}function s(e){var t="function"===typeof Map?new Map:void 0;return s=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,i)}function i(){return a(e,arguments,Object(r.a)(this).constructor)}return i.prototype=Object.create(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),Object(o.a)(i,e)},s(e)}},function(e,t,n){e.exports=n(91)()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canUseDOM=t.SafeNodeList=t.SafeHTMLCollection=void 0;var r,o=n(98);var i=((r=o)&&r.__esModule?r:{default:r}).default,a=i.canUseDOM?window.HTMLElement:{};t.SafeHTMLCollection=i.canUseDOM?window.HTMLCollection:{},t.SafeNodeList=i.canUseDOM?window.NodeList:{},t.canUseDOM=i.canUseDOM;t.default=a},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(103),t),o(n(104),t),o(n(56),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){var n=[].slice.call(t.querySelectorAll("*"),0).reduce((function(t,n){return t.concat(n.shadowRoot?e(n.shadowRoot):[n])}),[]);return n.filter(a)};var r=/input|select|textarea|button|object|iframe/;function o(e){var t=e.offsetWidth<=0&&e.offsetHeight<=0;if(t&&!e.innerHTML)return!0;try{var n=window.getComputedStyle(e);return t?"visible"!==n.getPropertyValue("overflow")||e.scrollWidth<=0&&e.scrollHeight<=0:"none"==n.getPropertyValue("display")}catch(r){return console.warn("Failed to inspect element style"),!1}}function i(e,t){var n=e.nodeName.toLowerCase();return(r.test(n)&&!e.disabled||"a"===n&&e.href||t)&&function(e){for(var t=e,n=e.getRootNode&&e.getRootNode();t&&t!==document.body;){if(n&&t===n&&(t=n.host.parentNode),o(t))return!1;t=t.parentNode}return!0}(e)}function a(e){var t=e.getAttribute("tabindex");null===t&&(t=void 0);var n=isNaN(t);return(n||t>=0)&&i(e,!n)}e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){s&&(s.removeAttribute?s.removeAttribute("aria-hidden"):null!=s.length?s.forEach((function(e){return e.removeAttribute("aria-hidden")})):document.querySelectorAll(s).forEach((function(e){return e.removeAttribute("aria-hidden")})));s=null},t.log=function(){0},t.assertNodeList=l,t.setElement=function(e){var t=e;if("string"===typeof t&&a.canUseDOM){var n=document.querySelectorAll(t);l(n,t),t=n}return s=t||s},t.validateElement=u,t.hide=function(e){var t=!0,n=!1,r=void 0;try{for(var o,i=u(e)[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){o.value.setAttribute("aria-hidden","true")}}catch(a){n=!0,r=a}finally{try{!t&&i.return&&i.return()}finally{if(n)throw r}}},t.show=function(e){var t=!0,n=!1,r=void 0;try{for(var o,i=u(e)[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){o.value.removeAttribute("aria-hidden")}}catch(a){n=!0,r=a}finally{try{!t&&i.return&&i.return()}finally{if(n)throw r}}},t.documentNotReadyOrSSRTesting=function(){s=null};var r,o=n(97),i=(r=o)&&r.__esModule?r:{default:r},a=n(51);var s=null;function l(e,t){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+t+".")}function u(e){var t=e||s;return t?Array.isArray(t)||t instanceof HTMLCollection||t instanceof NodeList?t:[t]:((0,i.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),[])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.log=function(){console.log("portalOpenInstances ----------"),console.log(o.openInstances.length),o.openInstances.forEach((function(e){return console.log(e)})),console.log("end portalOpenInstances ----------")},t.resetState=function(){o=new r};var r=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.register=function(e){-1===t.openInstances.indexOf(e)&&(t.openInstances.push(e),t.emit("register"))},this.deregister=function(e){var n=t.openInstances.indexOf(e);-1!==n&&(t.openInstances.splice(n,1),t.emit("deregister"))},this.subscribe=function(e){t.subscribers.push(e)},this.emit=function(e){t.subscribers.forEach((function(n){return n(e,t.openInstances.slice())}))},this.openInstances=[],this.subscribers=[]},o=new r;t.default=o},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=n(105),i=n(108),a=n(113),s=n(115),l=function(){function e(){}return e.prototype.transform=function(e,t){return(new s.TransformerFactory).construct(e,t)},e.prototype.construct=function(e){var t=r(r({breakpoints:["480px","1000px","1000px"],space:[0,5,10,15,20,25,30,35],sizes:{full:"100%",half:"50%"},radii:{none:0,default:5,dialog:10,small:2.5},iconSizes:{big:18,medium:16,small:14},colors:(0,o.getColors)(e.theme,e.accent),shadows:"dark"===e.theme?{menu:"0px 0px 10px 0px #00000078"}:{menu:"0px 0px 10px 0px #00000022"}},(0,a.getFontConfig)(e.scale)),i.variants);return t.space.small=3,t},e}();t.default=l},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getStaticColors=void 0;var o=r(n(29));t.getStaticColors=function(e){return{shade:(0,o.default)(e).setAlpha(.1).toRgbString(),textSelection:(0,o.default)(e).setAlpha(.2).toRgbString(),dimPrimary:(0,o.default)(e).setAlpha(.7).toRgbString(),transparent:"transparent",static:"white",error:"#E53935",errorBg:"#E5393520",success:"#4F8A10",warn:"#FF5722",warnBg:"#FF572220",favorite:"#ffd700",codeBg:"#282a36",codeFg:"#6c7393",codeHighlight:"#50fa7b",codeSelectionFg:"#f8f8f2",codeSelectionBg:"#44475a",codeBorder:"#6c7393",codeSelection:"#9580ff1a"}}},function(e,t,n){"use strict";n.r(t);var r=n(18),o=n(1),i=n(38),a=n(32),s=n(28),l=n(27),u=i.default,c=function(e){return"theme"!==e&&"innerRef"!==e},d=function(e){return"string"===typeof e&&e.charCodeAt(0)>96?u:c};function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var h=function(){return null},m=function e(t,n){var r,i,u;void 0!==n&&(r=n.label,u=n.target,i=t.__emotion_forwardProp&&n.shouldForwardProp?function(e){return t.__emotion_forwardProp(e)&&n.shouldForwardProp(e)}:n.shouldForwardProp);var c=t.__emotion_real===t,f=c&&t.__emotion_base||t;"function"!==typeof i&&c&&(i=t.__emotion_forwardProp);var m=i||d(f),v=!m("as");return function(){var g=arguments,y=c&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==r&&y.push("label:"+r+";"),null==g[0]||void 0===g[0].raw)y.push.apply(y,g);else{0,y.push(g[0][0]);for(var b=g.length,w=1;w<b;w++)y.push(g[w],g[0][w])}var k=Object(a.b)((function(e,t,n){return Object(o.createElement)(a.a.Consumer,null,(function(r){var a=v&&e.as||f,c="",p=[],g=e;if(null==e.theme){for(var b in g={},e)g[b]=e[b];g.theme=r}"string"===typeof e.className?c=Object(s.a)(t.registered,p,e.className):null!=e.className&&(c=e.className+" ");var w=Object(l.a)(y.concat(p),t.registered,g);Object(s.b)(t,w,"string"===typeof a);c+=t.key+"-"+w.name,void 0!==u&&(c+=" "+u);var k=v&&void 0===i?d(a):m,x={};for(var O in e)v&&"as"===O||k(O)&&(x[O]=e[O]);x.className=c,x.ref=n||e.innerRef;var S=Object(o.createElement)(a,x),C=Object(o.createElement)(h,null);return Object(o.createElement)(o.Fragment,null,C,S)}))}));return k.displayName=void 0!==r?r:"Styled("+("string"===typeof f?f:f.displayName||f.name||"Component")+")",k.defaultProps=t.defaultProps,k.__emotion_real=k,k.__emotion_base=f,k.__emotion_styles=y,k.__emotion_forwardProp=i,Object.defineProperty(k,"toString",{value:function(){return"."+u}}),k.withComponent=function(t,r){return e(t,void 0!==r?p({},n||{},{},r):n).apply(void 0,y)},k}},v=m.bind();["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"].forEach((function(e){v[e]=v(e)}));t.default=v},,function(e,t,n){"use strict";var r=n(88),o={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,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?a:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var u=Object.defineProperty,c=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(h){var o=p(n);o&&o!==h&&e(t,o,r)}var a=c(n);d&&(a=a.concat(d(n)));for(var s=l(t),m=l(n),v=0;v<a.length;++v){var g=a[v];if(!i[g]&&(!r||!r[g])&&(!m||!m[g])&&(!s||!s[g])){var y=f(n,g);try{u(t,g,y)}catch(b){}}}}return t}},function(e,t,n){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=2)}([function(e,t){e.exports=n(50)},function(e,t){e.exports=n(1)},function(e,t,n){"use strict";n.r(t);var r=n(1),o=n(0),i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},a=0,s=r.forwardRef((function(e,t){var n=e.title,o=void 0===n?null:n,s=e.description,l=void 0===s?null:s,u=e.size,c=void 0===u?null:u,d=e.color,f=void 0===d?"currentColor":d,p=e.horizontal,h=void 0===p?null:p,m=e.vertical,v=void 0===m?null:m,g=e.rotate,y=void 0===g?null:g,b=e.spin,w=void 0===b?null:b,k=e.style,x=void 0===k?{}:k,O=e.children,S=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["title","description","size","color","horizontal","vertical","rotate","spin","style","children"]);a++;var C,j=null!==w&&w,D=r.Children.map(O,(function(e){var t=e;!0!==j&&(j=!0===(null===w?t.props.spin:w));var n=t.props.size;"number"==typeof c&&"number"==typeof t.props.size&&(n=t.props.size/c);var o={size:n,color:null===f?t.props.color:f,horizontal:null===h?t.props.horizontal:h,vertical:null===v?t.props.vertical:v,rotate:null===y?t.props.rotate:y,spin:null===w?t.props.spin:w,inStack:!0};return r.cloneElement(t,o)}));null!==c&&(x.width="string"==typeof c?c:1.5*c+"rem");var E,A="stack_labelledby_"+a,M="stack_describedby_"+a;if(o)C=l?A+" "+M:A;else if(E="presentation",l)throw new Error("title attribute required when description is set");return r.createElement("svg",i({ref:t,viewBox:"0 0 24 24",style:x,role:E,"aria-labelledby":C},S),o&&r.createElement("title",{id:A},o),l&&r.createElement("desc",{id:M},l),j&&r.createElement("style",null,"@keyframes spin { to { transform: rotate(360deg) } }","@keyframes spin-inverse { to { transform: rotate(-360deg) } }"),D)}));s.displayName="Stack",s.propTypes={size:o.oneOfType([o.number,o.string]),color:o.string,horizontal:o.bool,vertical:o.bool,rotate:o.number,spin:o.oneOfType([o.bool,o.number]),children:o.oneOfType([o.arrayOf(o.node),o.node]).isRequired,className:o.string,style:o.object},s.defaultProps={size:null,color:null,horizontal:null,vertical:null,rotate:null,spin:null};var l=s;n.d(t,"Icon",(function(){return d})),n.d(t,"Stack",(function(){return l}));var u=function(){return(u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},c=0,d=r.forwardRef((function(e,t){var n=e.path,o=e.id,i=void 0===o?++c:o,a=e.title,s=void 0===a?null:a,l=e.description,d=void 0===l?null:l,f=e.size,p=void 0===f?null:f,h=e.color,m=void 0===h?"currentColor":h,v=e.horizontal,g=void 0!==v&&v,y=e.vertical,b=void 0!==y&&y,w=e.rotate,k=void 0===w?0:w,x=e.spin,O=void 0!==x&&x,S=e.style,C=void 0===S?{}:S,j=e.inStack,D=void 0!==j&&j,E=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["path","id","title","description","size","color","horizontal","vertical","rotate","spin","style","inStack"]),A={},M=[];null!==p&&(D?M.push("scale("+p+")"):(C.width="string"==typeof p?p:1.5*p+"rem",C.height=C.width)),g&&M.push("scaleX(-1)"),b&&M.push("scaleY(-1)"),0!==k&&M.push("rotate("+k+"deg)"),null!==m&&(A.fill=m);var T=r.createElement("path",u({d:n,style:A},D?E:{})),L=T;M.length>0&&(C.transform=M.join(" "),C.transformOrigin="center",D&&(L=r.createElement("g",{style:C},T,r.createElement("rect",{width:"24",height:"24",fill:"transparent"}))));var N,P=L,R=!0===O||"number"!=typeof O?2:O,H=!D&&(g||b);if(R<0&&(H=!H),O&&(P=r.createElement("g",{style:{animation:"spin"+(H?"-inverse":"")+" linear "+Math.abs(R)+"s infinite",transformOrigin:"center"}},L,!(g||b||0!==k)&&r.createElement("rect",{width:"24",height:"24",fill:"transparent"}))),D)return P;var F,V="icon_labelledby_"+i,z="icon_describedby_"+i;if(s)N=d?V+" "+z:V;else if(F="presentation",d)throw new Error("title attribute required when description is set");return r.createElement("svg",u({ref:t,viewBox:"0 0 24 24",style:C,role:F,"aria-labelledby":N},E),s&&r.createElement("title",{id:V},s),d&&r.createElement("desc",{id:z},d),!D&&O&&(H?r.createElement("style",null,"@keyframes spin-inverse { to { transform: rotate(-360deg) } }"):r.createElement("style",null,"@keyframes spin { to { transform: rotate(360deg) } }")),P)}));d.displayName="Icon",d.propTypes={path:o.string.isRequired,size:o.oneOfType([o.number,o.string]),color:o.string,horizontal:o.bool,vertical:o.bool,rotate:o.number,spin:o.oneOfType([o.bool,o.number]),style:o.object,inStack:o.bool,className:o.string},d.defaultProps={size:null,color:"currentColor",horizontal:!1,vertical:!1,rotate:0,spin:!1},t.default=d}])},function(e,t,n){"use strict";e.exports=function(e){var t=e.match(/^[ \t]*(?=\S)/gm);return t?t.reduce((function(e,t){return Math.min(e,t.length)}),1/0):0}},,,,function(e,t,n){"use strict";var r,o=(r=n(1))&&"object"===typeof r&&"default"in r?r.default:r,i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=function(e){var t=e.color,n=void 0===t?"currentColor":t,r=e.size,a=void 0===r?24:r,s=(e.children,function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["color","size","children"])),l="mdi-icon "+(s.className||"");return o.createElement("svg",i({},s,{className:l,width:a,height:a,fill:n,viewBox:"0 0 24 24"}),o.createElement("path",{d:"M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z"}))},s=o.memo?o.memo(a):a;e.exports=s},function(e,t,n){"use strict";var r,o=(r=n(1))&&"object"===typeof r&&"default"in r?r.default:r,i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=function(e){var t=e.color,n=void 0===t?"currentColor":t,r=e.size,a=void 0===r?24:r,s=(e.children,function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["color","size","children"])),l="mdi-icon "+(s.className||"");return o.createElement("svg",i({},s,{className:l,width:a,height:a,fill:n,viewBox:"0 0 24 24"}),o.createElement("path",{d:"M19.35,10.04C18.67,6.59 15.64,4 12,4C9.11,4 6.6,5.64 5.35,8.04C2.34,8.36 0,10.91 0,14A6,6 0 0,0 6,20H19A5,5 0 0,0 24,15C24,12.36 21.95,10.22 19.35,10.04M19,18H6A4,4 0 0,1 2,14C2,11.95 3.53,10.24 5.56,10.03L6.63,9.92L7.13,8.97C8.08,7.14 9.94,6 12,6C14.62,6 16.88,7.86 17.39,10.43L17.69,11.93L19.22,12.04C20.78,12.14 22,13.45 22,15A3,3 0 0,1 19,18M8,13H10.55V16H13.45V13H16L12,9L8,13Z"}))},s=o.memo?o.memo(a):a;e.exports=s},function(e,t,n){"use strict";var r,o=(r=n(1))&&"object"===typeof r&&"default"in r?r.default:r,i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=function(e){var t=e.color,n=void 0===t?"currentColor":t,r=e.size,a=void 0===r?24:r,s=(e.children,function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["color","size","children"])),l="mdi-icon "+(s.className||"");return o.createElement("svg",i({},s,{className:l,width:a,height:a,fill:n,viewBox:"0 0 24 24"}),o.createElement("path",{d:"M5 16L3 5L8.5 10L12 4L15.5 10L21 5L19 16H5M19 19C19 19.6 18.6 20 18 20H6C5.4 20 5 19.6 5 19V18H19V19Z"}))},s=o.memo?o.memo(a):a;e.exports=s},function(e,t,n){"use strict";var r,o=(r=n(1))&&"object"===typeof r&&"default"in r?r.default:r,i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=function(e){var t=e.color,n=void 0===t?"currentColor":t,r=e.size,a=void 0===r?24:r,s=(e.children,function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["color","size","children"])),l="mdi-icon "+(s.className||"");return o.createElement("svg",i({},s,{className:l,width:a,height:a,fill:n,viewBox:"0 0 24 24"}),o.createElement("path",{d:"M16,12A2,2 0 0,1 18,10A2,2 0 0,1 20,12A2,2 0 0,1 18,14A2,2 0 0,1 16,12M10,12A2,2 0 0,1 12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12M4,12A2,2 0 0,1 6,10A2,2 0 0,1 8,12A2,2 0 0,1 6,14A2,2 0 0,1 4,12Z"}))},s=o.memo?o.memo(a):a;e.exports=s},function(e,t,n){"use strict";var r,o=(r=n(1))&&"object"===typeof r&&"default"in r?r.default:r,i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=function(e){var t=e.color,n=void 0===t?"currentColor":t,r=e.size,a=void 0===r?24:r,s=(e.children,function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["color","size","children"])),l="mdi-icon "+(s.className||"");return o.createElement("svg",i({},s,{className:l,width:a,height:a,fill:n,viewBox:"0 0 24 24"}),o.createElement("path",{d:"M20 13.5C20 17.09 17.09 20 13.5 20H6V18H13.5C16 18 18 16 18 13.5S16 9 13.5 9H7.83L10.91 12.09L9.5 13.5L4 8L9.5 2.5L10.92 3.91L7.83 7H13.5C17.09 7 20 9.91 20 13.5Z"}))},s=o.memo?o.memo(a):a;e.exports=s},function(e,t,n){"use strict";var r,o=(r=n(1))&&"object"===typeof r&&"default"in r?r.default:r,i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=function(e){var t=e.color,n=void 0===t?"currentColor":t,r=e.size,a=void 0===r?24:r,s=(e.children,function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["color","size","children"])),l="mdi-icon "+(s.className||"");return o.createElement("svg",i({},s,{className:l,width:a,height:a,fill:n,viewBox:"0 0 24 24"}),o.createElement("path",{d:"M10.5 18H18V20H10.5C6.91 20 4 17.09 4 13.5S6.91 7 10.5 7H16.17L13.08 3.91L14.5 2.5L20 8L14.5 13.5L13.09 12.09L16.17 9H10.5C8 9 6 11 6 13.5S8 18 10.5 18Z"}))},s=o.memo?o.memo(a):a;e.exports=s},function(e,t,n){"use strict";var r,o=(r=n(1))&&"object"===typeof r&&"default"in r?r.default:r,i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=function(e){var t=e.color,n=void 0===t?"currentColor":t,r=e.size,a=void 0===r?24:r,s=(e.children,function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["color","size","children"])),l="mdi-icon "+(s.className||"");return o.createElement("svg",i({},s,{className:l,width:a,height:a,fill:n,viewBox:"0 0 24 24"}),o.createElement("path",{d:"M5,5H10V7H7V10H5V5M14,5H19V10H17V7H14V5M17,14H19V19H14V17H17V14M10,17V19H5V14H7V17H10Z"}))},s=o.memo?o.memo(a):a;e.exports=s},function(e,t,n){"use strict";var r,o=(r=n(1))&&"object"===typeof r&&"default"in r?r.default:r,i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=function(e){var t=e.color,n=void 0===t?"currentColor":t,r=e.size,a=void 0===r?24:r,s=(e.children,function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["color","size","children"])),l="mdi-icon "+(s.className||"");return o.createElement("svg",i({},s,{className:l,width:a,height:a,fill:n,viewBox:"0 0 24 24"}),o.createElement("path",{d:"M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z"}))},s=o.memo?o.memo(a):a;e.exports=s},,,,,,function(e,t,n){"use strict";var r=n(19),o=60103,i=60106;t.Fragment=60107,t.StrictMode=60108,t.Profiler=60114;var a=60109,s=60110,l=60112;t.Suspense=60113;var u=60115,c=60116;if("function"===typeof Symbol&&Symbol.for){var d=Symbol.for;o=d("react.element"),i=d("react.portal"),t.Fragment=d("react.fragment"),t.StrictMode=d("react.strict_mode"),t.Profiler=d("react.profiler"),a=d("react.provider"),s=d("react.context"),l=d("react.forward_ref"),t.Suspense=d("react.suspense"),u=d("react.memo"),c=d("react.lazy")}var f="function"===typeof Symbol&&Symbol.iterator;function p(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 h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m={};function v(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||h}function g(){}function y(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error(p(85));this.updater.enqueueSetState(this,e,t,"setState")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},g.prototype=v.prototype;var b=y.prototype=new g;b.constructor=y,r(b,v.prototype),b.isPureReactComponent=!0;var w={current:null},k=Object.prototype.hasOwnProperty,x={key:!0,ref:!0,__self:!0,__source:!0};function O(e,t,n){var r,i={},a=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)k.call(t,r)&&!x.hasOwnProperty(r)&&(i[r]=t[r]);var l=arguments.length-2;if(1===l)i.children=n;else if(1<l){for(var u=Array(l),c=0;c<l;c++)u[c]=arguments[c+2];i.children=u}if(e&&e.defaultProps)for(r in l=e.defaultProps)void 0===i[r]&&(i[r]=l[r]);return{$$typeof:o,type:e,key:a,ref:s,props:i,_owner:w.current}}function S(e){return"object"===typeof e&&null!==e&&e.$$typeof===o}var C=/\/+/g;function j(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function D(e,t,n,r,a){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var l=!1;if(null===e)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case o:case i:l=!0}}if(l)return a=a(l=e),e=""===r?"."+j(l,0):r,Array.isArray(a)?(n="",null!=e&&(n=e.replace(C,"$&/")+"/"),D(a,t,n,"",(function(e){return e}))):null!=a&&(S(a)&&(a=function(e,t){return{$$typeof:o,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,n+(!a.key||l&&l.key===a.key?"":(""+a.key).replace(C,"$&/")+"/")+e)),t.push(a)),1;if(l=0,r=""===r?".":r+":",Array.isArray(e))for(var u=0;u<e.length;u++){var c=r+j(s=e[u],u);l+=D(s,t,n,c,a)}else if(c=function(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=f&&e[f]||e["@@iterator"])?e:null}(e),"function"===typeof c)for(e=c.call(e),u=0;!(s=e.next()).done;)l+=D(s=s.value,t,n,c=r+j(s,u++),a);else if("object"===s)throw t=""+e,Error(p(31,"[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t));return l}function E(e,t,n){if(null==e)return e;var r=[],o=0;return D(e,r,"","",(function(e){return t.call(n,e,o++)})),r}function A(e){if(-1===e._status){var t=e._result;t=t(),e._status=0,e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}if(1===e._status)return e._result;throw e._result}var M={current:null};function T(){var e=M.current;if(null===e)throw Error(p(321));return e}var L={ReactCurrentDispatcher:M,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:w,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:E,forEach:function(e,t,n){E(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return E(e,(function(){t++})),t},toArray:function(e){return E(e,(function(e){return e}))||[]},only:function(e){if(!S(e))throw Error(p(143));return e}},t.Component=v,t.PureComponent=y,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=L,t.cloneElement=function(e,t,n){if(null===e||void 0===e)throw Error(p(267,e));var i=r({},e.props),a=e.key,s=e.ref,l=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,l=w.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var u=e.type.defaultProps;for(c in t)k.call(t,c)&&!x.hasOwnProperty(c)&&(i[c]=void 0===t[c]&&void 0!==u?u[c]:t[c])}var c=arguments.length-2;if(1===c)i.children=n;else if(1<c){u=Array(c);for(var d=0;d<c;d++)u[d]=arguments[d+2];i.children=u}return{$$typeof:o,type:e.type,key:a,ref:s,props:i,_owner:l}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:s,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:a,_context:e},e.Consumer=e},t.createElement=O,t.createFactory=function(e){var t=O.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:l,render:e}},t.isValidElement=S,t.lazy=function(e){return{$$typeof:c,_payload:{_status:-1,_result:e},_init:A}},t.memo=function(e,t){return{$$typeof:u,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return T().useCallback(e,t)},t.useContext=function(e,t){return T().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return T().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return T().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return T().useLayoutEffect(e,t)},t.useMemo=function(e,t){return T().useMemo(e,t)},t.useReducer=function(e,t,n){return T().useReducer(e,t,n)},t.useRef=function(e){return T().useRef(e)},t.useState=function(e){return T().useState(e)},t.version="17.0.2"},function(e,t,n){"use strict";var r=n(1),o=n(19),i=n(81);function a(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."}if(!r)throw Error(a(227));var s=new Set,l={};function u(e,t){c(e,t),c(e+"Capture",t)}function c(e,t){for(l[e]=t,e=0;e<t.length;e++)s.add(t[e])}var d=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),f=/^[: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]*$/,p=Object.prototype.hasOwnProperty,h={},m={};function v(e,t,n,r,o,i,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var g={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){g[e]=new v(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];g[t]=new v(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){g[e]=new v(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){g[e]=new v(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){g[e]=new v(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){g[e]=new v(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){g[e]=new v(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){g[e]=new v(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){g[e]=new v(e,5,!1,e.toLowerCase(),null,!1,!1)}));var y=/[\-:]([a-z])/g;function b(e){return e[1].toUpperCase()}function w(e,t,n,r){var o=g.hasOwnProperty(t)?g[t]:null;(null!==o?0===o.type:!r&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(function(e,t,n,r){if(null===t||"undefined"===typeof t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)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}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!p.call(m,e)||!p.call(h,e)&&(f.test(e)?m[e]=!0:(h[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"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);g[t]=new v(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);g[t]=new v(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);g[t]=new v(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){g[e]=new v(e,1,!1,e.toLowerCase(),null,!1,!1)})),g.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){g[e]=new v(e,1,!1,e.toLowerCase(),null,!0,!0)}));var k=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,x=60103,O=60106,S=60107,C=60108,j=60114,D=60109,E=60110,A=60112,M=60113,T=60120,L=60115,N=60116,P=60121,R=60128,H=60129,F=60130,V=60131;if("function"===typeof Symbol&&Symbol.for){var z=Symbol.for;x=z("react.element"),O=z("react.portal"),S=z("react.fragment"),C=z("react.strict_mode"),j=z("react.profiler"),D=z("react.provider"),E=z("react.context"),A=z("react.forward_ref"),M=z("react.suspense"),T=z("react.suspense_list"),L=z("react.memo"),N=z("react.lazy"),P=z("react.block"),z("react.scope"),R=z("react.opaque.id"),H=z("react.debug_trace_mode"),F=z("react.offscreen"),V=z("react.legacy_hidden")}var B,_="function"===typeof Symbol&&Symbol.iterator;function I(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=_&&e[_]||e["@@iterator"])?e:null}function $(e){if(void 0===B)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);B=t&&t[1]||""}return"\n"+B+e}var q=!1;function W(e,t){if(!e||q)return"";q=!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()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(l){var r=l}Reflect.construct(e,[],t)}else{try{t.call()}catch(l){r=l}e.call(t.prototype)}else{try{throw Error()}catch(l){r=l}e()}}catch(l){if(l&&r&&"string"===typeof l.stack){for(var o=l.stack.split("\n"),i=r.stack.split("\n"),a=o.length-1,s=i.length-1;1<=a&&0<=s&&o[a]!==i[s];)s--;for(;1<=a&&0<=s;a--,s--)if(o[a]!==i[s]){if(1!==a||1!==s)do{if(a--,0>--s||o[a]!==i[s])return"\n"+o[a].replace(" at new "," at ")}while(1<=a&&0<=s);break}}}finally{q=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?$(e):""}function U(e){switch(e.tag){case 5:return $(e.type);case 16:return $("Lazy");case 13:return $("Suspense");case 19:return $("SuspenseList");case 0:case 2:case 15:return e=W(e.type,!1);case 11:return e=W(e.type.render,!1);case 22:return e=W(e.type._render,!1);case 1:return e=W(e.type,!0);default:return""}}function K(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case S:return"Fragment";case O:return"Portal";case j:return"Profiler";case C:return"StrictMode";case M:return"Suspense";case T:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case E:return(e.displayName||"Context")+".Consumer";case D:return(e._context.displayName||"Context")+".Provider";case A:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case L:return K(e.type);case P:return K(e._render);case N:t=e._payload,e=e._init;try{return K(e(t))}catch(n){}}return null}function G(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function J(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function Y(e){e._valueTracker||(e._valueTracker=function(e){var t=J(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,i.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]}}}}(e))}function Z(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=J(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function X(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Q(e,t){var n=t.checked;return o({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function ee(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=G(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function te(e,t){null!=(t=t.checked)&&w(e,"checked",t,!1)}function ne(e,t){te(e,t);var n=G(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?oe(e,t.type,n):t.hasOwnProperty("defaultValue")&&oe(e,t.type,G(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function re(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function oe(e,t,n){"number"===t&&X(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function ie(e,t){return e=o({children:void 0},t),(t=function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function ae(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+G(n),t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function se(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(a(91));return o({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function le(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(a(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:G(n)}}function ue(e,t){var n=G(t.value),r=G(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function ce(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}var de="http://www.w3.org/1999/xhtml",fe="http://www.w3.org/2000/svg";function pe(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 he(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?pe(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var me,ve,ge=(ve=function(e,t){if(e.namespaceURI!==fe||"innerHTML"in e)e.innerHTML=t;else{for((me=me||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=me.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ve(e,t)}))}:ve);function ye(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var be={animationIterationCount:!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},we=["Webkit","ms","Moz","O"];function ke(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||be.hasOwnProperty(e)&&be[e]?(""+t).trim():t+"px"}function xe(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=ke(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(be).forEach((function(e){we.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),be[t]=be[e]}))}));var Oe=o({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 Se(e,t){if(t){if(Oe[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(a(62))}}function Ce(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;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}}function je(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var De=null,Ee=null,Ae=null;function Me(e){if(e=ro(e)){if("function"!==typeof De)throw Error(a(280));var t=e.stateNode;t&&(t=io(t),De(e.stateNode,e.type,t))}}function Te(e){Ee?Ae?Ae.push(e):Ae=[e]:Ee=e}function Le(){if(Ee){var e=Ee,t=Ae;if(Ae=Ee=null,Me(e),t)for(e=0;e<t.length;e++)Me(t[e])}}function Ne(e,t){return e(t)}function Pe(e,t,n,r,o){return e(t,n,r,o)}function Re(){}var He=Ne,Fe=!1,Ve=!1;function ze(){null===Ee&&null===Ae||(Re(),Le())}function Be(e,t){var n=e.stateNode;if(null===n)return null;var r=io(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!==typeof n)throw Error(a(231,t,typeof n));return n}var _e=!1;if(d)try{var Ie={};Object.defineProperty(Ie,"passive",{get:function(){_e=!0}}),window.addEventListener("test",Ie,Ie),window.removeEventListener("test",Ie,Ie)}catch(ve){_e=!1}function $e(e,t,n,r,o,i,a,s,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var qe=!1,We=null,Ue=!1,Ke=null,Ge={onError:function(e){qe=!0,We=e}};function Je(e,t,n,r,o,i,a,s,l){qe=!1,We=null,$e.apply(Ge,arguments)}function Ye(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(1026&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Ze(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function Xe(e){if(Ye(e)!==e)throw Error(a(188))}function Qe(e){if(e=function(e){var t=e.alternate;if(!t){if(null===(t=Ye(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(null===o)break;var i=o.alternate;if(null===i){if(null!==(r=o.return)){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return Xe(o),e;if(i===r)return Xe(o),t;i=i.sibling}throw Error(a(188))}if(n.return!==r.return)n=o,r=i;else{for(var s=!1,l=o.child;l;){if(l===n){s=!0,n=o,r=i;break}if(l===r){s=!0,r=o,n=i;break}l=l.sibling}if(!s){for(l=i.child;l;){if(l===n){s=!0,n=i,r=o;break}if(l===r){s=!0,r=i,n=o;break}l=l.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(e),!e)return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function et(e,t){for(var n=e.alternate;null!==t;){if(t===e||t===n)return!0;t=t.return}return!1}var tt,nt,rt,ot,it=!1,at=[],st=null,lt=null,ut=null,ct=new Map,dt=new Map,ft=[],pt="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 ht(e,t,n,r,o){return{blockedOn:e,domEventName:t,eventSystemFlags:16|n,nativeEvent:o,targetContainers:[r]}}function mt(e,t){switch(e){case"focusin":case"focusout":st=null;break;case"dragenter":case"dragleave":lt=null;break;case"mouseover":case"mouseout":ut=null;break;case"pointerover":case"pointerout":ct.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":dt.delete(t.pointerId)}}function vt(e,t,n,r,o,i){return null===e||e.nativeEvent!==i?(e=ht(t,n,r,o,i),null!==t&&(null!==(t=ro(t))&&nt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==o&&-1===t.indexOf(o)&&t.push(o),e)}function gt(e){var t=no(e.target);if(null!==t){var n=Ye(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Ze(n)))return e.blockedOn=t,void ot(e.lanePriority,(function(){i.unstable_runWithPriority(e.priority,(function(){rt(n)}))}))}else if(3===t&&n.stateNode.hydrate)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function yt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Qt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=ro(n))&&nt(t),e.blockedOn=n,!1;t.shift()}return!0}function bt(e,t,n){yt(e)&&n.delete(t)}function wt(){for(it=!1;0<at.length;){var e=at[0];if(null!==e.blockedOn){null!==(e=ro(e.blockedOn))&&tt(e);break}for(var t=e.targetContainers;0<t.length;){var n=Qt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n){e.blockedOn=n;break}t.shift()}null===e.blockedOn&&at.shift()}null!==st&&yt(st)&&(st=null),null!==lt&&yt(lt)&&(lt=null),null!==ut&&yt(ut)&&(ut=null),ct.forEach(bt),dt.forEach(bt)}function kt(e,t){e.blockedOn===t&&(e.blockedOn=null,it||(it=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,wt)))}function xt(e){function t(t){return kt(t,e)}if(0<at.length){kt(at[0],e);for(var n=1;n<at.length;n++){var r=at[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==st&&kt(st,e),null!==lt&&kt(lt,e),null!==ut&&kt(ut,e),ct.forEach(t),dt.forEach(t),n=0;n<ft.length;n++)(r=ft[n]).blockedOn===e&&(r.blockedOn=null);for(;0<ft.length&&null===(n=ft[0]).blockedOn;)gt(n),null===n.blockedOn&&ft.shift()}function Ot(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var St={animationend:Ot("Animation","AnimationEnd"),animationiteration:Ot("Animation","AnimationIteration"),animationstart:Ot("Animation","AnimationStart"),transitionend:Ot("Transition","TransitionEnd")},Ct={},jt={};function Dt(e){if(Ct[e])return Ct[e];if(!St[e])return e;var t,n=St[e];for(t in n)if(n.hasOwnProperty(t)&&t in jt)return Ct[e]=n[t];return e}d&&(jt=document.createElement("div").style,"AnimationEvent"in window||(delete St.animationend.animation,delete St.animationiteration.animation,delete St.animationstart.animation),"TransitionEvent"in window||delete St.transitionend.transition);var Et=Dt("animationend"),At=Dt("animationiteration"),Mt=Dt("animationstart"),Tt=Dt("transitionend"),Lt=new Map,Nt=new Map,Pt=["abort","abort",Et,"animationEnd",At,"animationIteration",Mt,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Tt,"transitionEnd","waiting","waiting"];function Rt(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],o=e[n+1];o="on"+(o[0].toUpperCase()+o.slice(1)),Nt.set(r,t),Lt.set(r,o),u(o,[r])}}(0,i.unstable_now)();var Ht=8;function Ft(e){if(0!==(1&e))return Ht=15,1;if(0!==(2&e))return Ht=14,2;if(0!==(4&e))return Ht=13,4;var t=24&e;return 0!==t?(Ht=12,t):0!==(32&e)?(Ht=11,32):0!==(t=192&e)?(Ht=10,t):0!==(256&e)?(Ht=9,256):0!==(t=3584&e)?(Ht=8,t):0!==(4096&e)?(Ht=7,4096):0!==(t=4186112&e)?(Ht=6,t):0!==(t=62914560&e)?(Ht=5,t):67108864&e?(Ht=4,67108864):0!==(134217728&e)?(Ht=3,134217728):0!==(t=805306368&e)?(Ht=2,t):0!==(1073741824&e)?(Ht=1,1073741824):(Ht=8,e)}function Vt(e,t){var n=e.pendingLanes;if(0===n)return Ht=0;var r=0,o=0,i=e.expiredLanes,a=e.suspendedLanes,s=e.pingedLanes;if(0!==i)r=i,o=Ht=15;else if(0!==(i=134217727&n)){var l=i&~a;0!==l?(r=Ft(l),o=Ht):0!==(s&=i)&&(r=Ft(s),o=Ht)}else 0!==(i=n&~a)?(r=Ft(i),o=Ht):0!==s&&(r=Ft(s),o=Ht);if(0===r)return 0;if(r=n&((0>(r=31-qt(r))?0:1<<r)<<1)-1,0!==t&&t!==r&&0===(t&a)){if(Ft(t),o<=Ht)return t;Ht=o}if(0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)o=1<<(n=31-qt(t)),r|=e[n],t&=~o;return r}function zt(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function Bt(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return 0===(e=_t(24&~t))?Bt(10,t):e;case 10:return 0===(e=_t(192&~t))?Bt(8,t):e;case 8:return 0===(e=_t(3584&~t))&&(0===(e=_t(4186112&~t))&&(e=512)),e;case 2:return 0===(t=_t(805306368&~t))&&(t=268435456),t}throw Error(a(358,e))}function _t(e){return e&-e}function It(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function $t(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,(e=e.eventTimes)[t=31-qt(t)]=n}var qt=Math.clz32?Math.clz32:function(e){return 0===e?32:31-(Wt(e)/Ut|0)|0},Wt=Math.log,Ut=Math.LN2;var Kt=i.unstable_UserBlockingPriority,Gt=i.unstable_runWithPriority,Jt=!0;function Yt(e,t,n,r){Fe||Re();var o=Xt,i=Fe;Fe=!0;try{Pe(o,e,t,n,r)}finally{(Fe=i)||ze()}}function Zt(e,t,n,r){Gt(Kt,Xt.bind(null,e,t,n,r))}function Xt(e,t,n,r){var o;if(Jt)if((o=0===(4&t))&&0<at.length&&-1<pt.indexOf(e))e=ht(null,e,t,n,r),at.push(e);else{var i=Qt(e,t,n,r);if(null===i)o&&mt(e,r);else{if(o){if(-1<pt.indexOf(e))return e=ht(i,e,t,n,r),void at.push(e);if(function(e,t,n,r,o){switch(t){case"focusin":return st=vt(st,e,t,n,r,o),!0;case"dragenter":return lt=vt(lt,e,t,n,r,o),!0;case"mouseover":return ut=vt(ut,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return ct.set(i,vt(ct.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,dt.set(i,vt(dt.get(i)||null,e,t,n,r,o)),!0}return!1}(i,e,t,n,r))return;mt(e,r)}Rr(e,t,r,null,n)}}}function Qt(e,t,n,r){var o=je(r);if(null!==(o=no(o))){var i=Ye(o);if(null===i)o=null;else{var a=i.tag;if(13===a){if(null!==(o=Ze(i)))return o;o=null}else if(3===a){if(i.stateNode.hydrate)return 3===i.tag?i.stateNode.containerInfo:null;o=null}else i!==o&&(o=null)}}return Rr(e,t,r,o,n),null}var en=null,tn=null,nn=null;function rn(){if(nn)return nn;var e,t,n=tn,r=n.length,o="value"in en?en.value:en.textContent,i=o.length;for(e=0;e<r&&n[e]===o[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===o[i-t];t++);return nn=o.slice(e,1<t?1-t:void 0)}function on(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function an(){return!0}function sn(){return!1}function ln(e){function t(t,n,r,o,i){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=o,this.target=i,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(o):o[a]);return this.isDefaultPrevented=(null!=o.defaultPrevented?o.defaultPrevented:!1===o.returnValue)?an:sn,this.isPropagationStopped=sn,this}return o(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=an)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=an)},persist:function(){},isPersistent:an}),t}var un,cn,dn,fn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},pn=ln(fn),hn=o({},fn,{view:0,detail:0}),mn=ln(hn),vn=o({},hn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:En,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==dn&&(dn&&"mousemove"===e.type?(un=e.screenX-dn.screenX,cn=e.screenY-dn.screenY):cn=un=0,dn=e),un)},movementY:function(e){return"movementY"in e?e.movementY:cn}}),gn=ln(vn),yn=ln(o({},vn,{dataTransfer:0})),bn=ln(o({},hn,{relatedTarget:0})),wn=ln(o({},fn,{animationName:0,elapsedTime:0,pseudoElement:0})),kn=o({},fn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),xn=ln(kn),On=ln(o({},fn,{data:0})),Sn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Cn={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"},jn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Dn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=jn[e])&&!!t[e]}function En(){return Dn}var An=o({},hn,{key:function(e){if(e.key){var t=Sn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=on(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Cn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:En,charCode:function(e){return"keypress"===e.type?on(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?on(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Mn=ln(An),Tn=ln(o({},vn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Ln=ln(o({},hn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:En})),Nn=ln(o({},fn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Pn=o({},vn,{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}),Rn=ln(Pn),Hn=[9,13,27,32],Fn=d&&"CompositionEvent"in window,Vn=null;d&&"documentMode"in document&&(Vn=document.documentMode);var zn=d&&"TextEvent"in window&&!Vn,Bn=d&&(!Fn||Vn&&8<Vn&&11>=Vn),_n=String.fromCharCode(32),In=!1;function $n(e,t){switch(e){case"keyup":return-1!==Hn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function qn(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var Wn=!1;var Un={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 Kn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Un[e.type]:"textarea"===t}function Gn(e,t,n,r){Te(r),0<(t=Fr(t,"onChange")).length&&(n=new pn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Jn=null,Yn=null;function Zn(e){Ar(e,0)}function Xn(e){if(Z(oo(e)))return e}function Qn(e,t){if("change"===e)return t}var er=!1;if(d){var tr;if(d){var nr="oninput"in document;if(!nr){var rr=document.createElement("div");rr.setAttribute("oninput","return;"),nr="function"===typeof rr.oninput}tr=nr}else tr=!1;er=tr&&(!document.documentMode||9<document.documentMode)}function or(){Jn&&(Jn.detachEvent("onpropertychange",ir),Yn=Jn=null)}function ir(e){if("value"===e.propertyName&&Xn(Yn)){var t=[];if(Gn(t,Yn,e,je(e)),e=Zn,Fe)e(t);else{Fe=!0;try{Ne(e,t)}finally{Fe=!1,ze()}}}}function ar(e,t,n){"focusin"===e?(or(),Yn=n,(Jn=t).attachEvent("onpropertychange",ir)):"focusout"===e&&or()}function sr(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Xn(Yn)}function lr(e,t){if("click"===e)return Xn(t)}function ur(e,t){if("input"===e||"change"===e)return Xn(t)}var cr="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},dr=Object.prototype.hasOwnProperty;function fr(e,t){if(cr(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===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++)if(!dr.call(t,n[r])||!cr(e[n[r]],t[n[r]]))return!1;return!0}function pr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function hr(e,t){var n,r=pr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=pr(r)}}function mr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?mr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function vr(){for(var e=window,t=X();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=X((e=t.contentWindow).document)}return t}function gr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var yr=d&&"documentMode"in document&&11>=document.documentMode,br=null,wr=null,kr=null,xr=!1;function Or(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;xr||null==br||br!==X(r)||("selectionStart"in(r=br)&&gr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},kr&&fr(kr,r)||(kr=r,0<(r=Fr(wr,"onSelect")).length&&(t=new pn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=br)))}Rt("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),Rt("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),Rt(Pt,2);for(var Sr="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Cr=0;Cr<Sr.length;Cr++)Nt.set(Sr[Cr],0);c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),u("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),u("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),u("onBeforeInput",["compositionend","keypress","textInput","paste"]),u("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var jr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Dr=new Set("cancel close invalid load scroll toggle".split(" ").concat(jr));function Er(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,o,i,s,l,u){if(Je.apply(this,arguments),qe){if(!qe)throw Error(a(198));var c=We;qe=!1,We=null,Ue||(Ue=!0,Ke=c)}}(r,t,void 0,e),e.currentTarget=null}function Ar(e,t){t=0!==(4&t);for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],l=s.instance,u=s.currentTarget;if(s=s.listener,l!==i&&o.isPropagationStopped())break e;Er(o,s,u),i=l}else for(a=0;a<r.length;a++){if(l=(s=r[a]).instance,u=s.currentTarget,s=s.listener,l!==i&&o.isPropagationStopped())break e;Er(o,s,u),i=l}}}if(Ue)throw e=Ke,Ue=!1,Ke=null,e}function Mr(e,t){var n=ao(t),r=e+"__bubble";n.has(r)||(Pr(t,e,2,!1),n.add(r))}var Tr="_reactListening"+Math.random().toString(36).slice(2);function Lr(e){e[Tr]||(e[Tr]=!0,s.forEach((function(t){Dr.has(t)||Nr(t,!1,e,null),Nr(t,!0,e,null)})))}function Nr(e,t,n,r){var o=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,i=n;if("selectionchange"===e&&9!==n.nodeType&&(i=n.ownerDocument),null!==r&&!t&&Dr.has(e)){if("scroll"!==e)return;o|=2,i=r}var a=ao(i),s=e+"__"+(t?"capture":"bubble");a.has(s)||(t&&(o|=4),Pr(i,e,o,t),a.add(s))}function Pr(e,t,n,r){var o=Nt.get(t);switch(void 0===o?2:o){case 0:o=Yt;break;case 1:o=Zt;break;default:o=Xt}n=o.bind(null,t,n,e),o=void 0,!_e||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(o=!0),r?void 0!==o?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):void 0!==o?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function Rr(e,t,n,r,o){var i=r;if(0===(1&t)&&0===(2&t)&&null!==r)e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===o||8===s.nodeType&&s.parentNode===o)break;if(4===a)for(a=r.return;null!==a;){var l=a.tag;if((3===l||4===l)&&((l=a.stateNode.containerInfo)===o||8===l.nodeType&&l.parentNode===o))return;a=a.return}for(;null!==s;){if(null===(a=no(s)))return;if(5===(l=a.tag)||6===l){r=i=a;continue e}s=s.parentNode}}r=r.return}!function(e,t,n){if(Ve)return e(t,n);Ve=!0;try{He(e,t,n)}finally{Ve=!1,ze()}}((function(){var r=i,o=je(n),a=[];e:{var s=Lt.get(e);if(void 0!==s){var l=pn,u=e;switch(e){case"keypress":if(0===on(n))break e;case"keydown":case"keyup":l=Mn;break;case"focusin":u="focus",l=bn;break;case"focusout":u="blur",l=bn;break;case"beforeblur":case"afterblur":l=bn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=gn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=yn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Ln;break;case Et:case At:case Mt:l=wn;break;case Tt:l=Nn;break;case"scroll":l=mn;break;case"wheel":l=Rn;break;case"copy":case"cut":case"paste":l=xn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=Tn}var c=0!==(4&t),d=!c&&"scroll"===e,f=c?null!==s?s+"Capture":null:s;c=[];for(var p,h=r;null!==h;){var m=(p=h).stateNode;if(5===p.tag&&null!==m&&(p=m,null!==f&&(null!=(m=Be(h,f))&&c.push(Hr(h,m,p)))),d)break;h=h.return}0<c.length&&(s=new l(s,u,null,n,o),a.push({event:s,listeners:c}))}}if(0===(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||0!==(16&t)||!(u=n.relatedTarget||n.fromElement)||!no(u)&&!u[eo])&&(l||s)&&(s=o.window===o?o:(s=o.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=r,null!==(u=(u=n.relatedTarget||n.toElement)?no(u):null)&&(u!==(d=Ye(u))||5!==u.tag&&6!==u.tag)&&(u=null)):(l=null,u=r),l!==u)){if(c=gn,m="onMouseLeave",f="onMouseEnter",h="mouse","pointerout"!==e&&"pointerover"!==e||(c=Tn,m="onPointerLeave",f="onPointerEnter",h="pointer"),d=null==l?s:oo(l),p=null==u?s:oo(u),(s=new c(m,h+"leave",l,n,o)).target=d,s.relatedTarget=p,m=null,no(o)===r&&((c=new c(f,h+"enter",u,n,o)).target=p,c.relatedTarget=d,m=c),d=m,l&&u)e:{for(f=u,h=0,p=c=l;p;p=Vr(p))h++;for(p=0,m=f;m;m=Vr(m))p++;for(;0<h-p;)c=Vr(c),h--;for(;0<p-h;)f=Vr(f),p--;for(;h--;){if(c===f||null!==f&&c===f.alternate)break e;c=Vr(c),f=Vr(f)}c=null}else c=null;null!==l&&zr(a,s,l,c,!1),null!==u&&null!==d&&zr(a,d,u,c,!0)}if("select"===(l=(s=r?oo(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var v=Qn;else if(Kn(s))if(er)v=ur;else{v=sr;var g=ar}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(v=lr);switch(v&&(v=v(e,r))?Gn(a,v,n,o):(g&&g(e,s,r),"focusout"===e&&(g=s._wrapperState)&&g.controlled&&"number"===s.type&&oe(s,"number",s.value)),g=r?oo(r):window,e){case"focusin":(Kn(g)||"true"===g.contentEditable)&&(br=g,wr=r,kr=null);break;case"focusout":kr=wr=br=null;break;case"mousedown":xr=!0;break;case"contextmenu":case"mouseup":case"dragend":xr=!1,Or(a,n,o);break;case"selectionchange":if(yr)break;case"keydown":case"keyup":Or(a,n,o)}var y;if(Fn)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else Wn?$n(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(Bn&&"ko"!==n.locale&&(Wn||"onCompositionStart"!==b?"onCompositionEnd"===b&&Wn&&(y=rn()):(tn="value"in(en=o)?en.value:en.textContent,Wn=!0)),0<(g=Fr(r,b)).length&&(b=new On(b,e,null,n,o),a.push({event:b,listeners:g}),y?b.data=y:null!==(y=qn(n))&&(b.data=y))),(y=zn?function(e,t){switch(e){case"compositionend":return qn(t);case"keypress":return 32!==t.which?null:(In=!0,_n);case"textInput":return(e=t.data)===_n&&In?null:e;default:return null}}(e,n):function(e,t){if(Wn)return"compositionend"===e||!Fn&&$n(e,t)?(e=rn(),nn=tn=en=null,Wn=!1,e):null;switch(e){case"paste":default: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 Bn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Fr(r,"onBeforeInput")).length&&(o=new On("onBeforeInput","beforeinput",null,n,o),a.push({event:o,listeners:r}),o.data=y))}Ar(a,t)}))}function Hr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Fr(e,t){for(var n=t+"Capture",r=[];null!==e;){var o=e,i=o.stateNode;5===o.tag&&null!==i&&(o=i,null!=(i=Be(e,n))&&r.unshift(Hr(e,i,o)),null!=(i=Be(e,t))&&r.push(Hr(e,i,o))),e=e.return}return r}function Vr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function zr(e,t,n,r,o){for(var i=t._reactName,a=[];null!==n&&n!==r;){var s=n,l=s.alternate,u=s.stateNode;if(null!==l&&l===r)break;5===s.tag&&null!==u&&(s=u,o?null!=(l=Be(n,i))&&a.unshift(Hr(n,l,s)):o||null!=(l=Be(n,i))&&a.push(Hr(n,l,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}function Br(){}var _r=null,Ir=null;function $r(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function qr(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var Wr="function"===typeof setTimeout?setTimeout:void 0,Ur="function"===typeof clearTimeout?clearTimeout:void 0;function Kr(e){1===e.nodeType?e.textContent="":9===e.nodeType&&(null!=(e=e.body)&&(e.textContent=""))}function Gr(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function Jr(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var Yr=0;var Zr=Math.random().toString(36).slice(2),Xr="__reactFiber$"+Zr,Qr="__reactProps$"+Zr,eo="__reactContainer$"+Zr,to="__reactEvents$"+Zr;function no(e){var t=e[Xr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[eo]||n[Xr]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Jr(e);null!==e;){if(n=e[Xr])return n;e=Jr(e)}return t}n=(e=n).parentNode}return null}function ro(e){return!(e=e[Xr]||e[eo])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function oo(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function io(e){return e[Qr]||null}function ao(e){var t=e[to];return void 0===t&&(t=e[to]=new Set),t}var so=[],lo=-1;function uo(e){return{current:e}}function co(e){0>lo||(e.current=so[lo],so[lo]=null,lo--)}function fo(e,t){lo++,so[lo]=e.current,e.current=t}var po={},ho=uo(po),mo=uo(!1),vo=po;function go(e,t){var n=e.type.contextTypes;if(!n)return po;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function yo(e){return null!==(e=e.childContextTypes)&&void 0!==e}function bo(){co(mo),co(ho)}function wo(e,t,n){if(ho.current!==po)throw Error(a(168));fo(ho,t),fo(mo,n)}function ko(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in e))throw Error(a(108,K(t)||"Unknown",i));return o({},n,r)}function xo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||po,vo=ho.current,fo(ho,e),fo(mo,mo.current),!0}function Oo(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=ko(e,t,vo),r.__reactInternalMemoizedMergedChildContext=e,co(mo),co(ho),fo(ho,e)):co(mo),fo(mo,n)}var So=null,Co=null,jo=i.unstable_runWithPriority,Do=i.unstable_scheduleCallback,Eo=i.unstable_cancelCallback,Ao=i.unstable_shouldYield,Mo=i.unstable_requestPaint,To=i.unstable_now,Lo=i.unstable_getCurrentPriorityLevel,No=i.unstable_ImmediatePriority,Po=i.unstable_UserBlockingPriority,Ro=i.unstable_NormalPriority,Ho=i.unstable_LowPriority,Fo=i.unstable_IdlePriority,Vo={},zo=void 0!==Mo?Mo:function(){},Bo=null,_o=null,Io=!1,$o=To(),qo=1e4>$o?To:function(){return To()-$o};function Wo(){switch(Lo()){case No:return 99;case Po:return 98;case Ro:return 97;case Ho:return 96;case Fo:return 95;default:throw Error(a(332))}}function Uo(e){switch(e){case 99:return No;case 98:return Po;case 97:return Ro;case 96:return Ho;case 95:return Fo;default:throw Error(a(332))}}function Ko(e,t){return e=Uo(e),jo(e,t)}function Go(e,t,n){return e=Uo(e),Do(e,t,n)}function Jo(){if(null!==_o){var e=_o;_o=null,Eo(e)}Yo()}function Yo(){if(!Io&&null!==Bo){Io=!0;var e=0;try{var t=Bo;Ko(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),Bo=null}catch(n){throw null!==Bo&&(Bo=Bo.slice(e+1)),Do(No,Jo),n}finally{Io=!1}}}var Zo=k.ReactCurrentBatchConfig;function Xo(e,t){if(e&&e.defaultProps){for(var n in t=o({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var Qo=uo(null),ei=null,ti=null,ni=null;function ri(){ni=ti=ei=null}function oi(e){var t=Qo.current;co(Qo),e.type._context._currentValue=t}function ii(e,t){for(;null!==e;){var n=e.alternate;if((e.childLanes&t)===t){if(null===n||(n.childLanes&t)===t)break;n.childLanes|=t}else e.childLanes|=t,null!==n&&(n.childLanes|=t);e=e.return}}function ai(e,t){ei=e,ni=ti=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(Fa=!0),e.firstContext=null)}function si(e,t){if(ni!==e&&!1!==t&&0!==t)if("number"===typeof t&&1073741823!==t||(ni=e,t=1073741823),t={context:e,observedBits:t,next:null},null===ti){if(null===ei)throw Error(a(308));ti=t,ei.dependencies={lanes:0,firstContext:t,responders:null}}else ti=ti.next=t;return e._currentValue}var li=!1;function ui(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function ci(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 di(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function fi(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function pi(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var o=null,i=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===i?o=i=a:i=i.next=a,n=n.next}while(null!==n);null===i?o=i=t:i=i.next=t}else o=i=t;return n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function hi(e,t,n,r){var i=e.updateQueue;li=!1;var a=i.firstBaseUpdate,s=i.lastBaseUpdate,l=i.shared.pending;if(null!==l){i.shared.pending=null;var u=l,c=u.next;u.next=null,null===s?a=c:s.next=c,s=u;var d=e.alternate;if(null!==d){var f=(d=d.updateQueue).lastBaseUpdate;f!==s&&(null===f?d.firstBaseUpdate=c:f.next=c,d.lastBaseUpdate=u)}}if(null!==a){for(f=i.baseState,s=0,d=c=u=null;;){l=a.lane;var p=a.eventTime;if((r&l)===l){null!==d&&(d=d.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var h=e,m=a;switch(l=t,p=n,m.tag){case 1:if("function"===typeof(h=m.payload)){f=h.call(p,f,l);break e}f=h;break e;case 3:h.flags=-4097&h.flags|64;case 0:if(null===(l="function"===typeof(h=m.payload)?h.call(p,f,l):h)||void 0===l)break e;f=o({},f,l);break e;case 2:li=!0}}null!==a.callback&&(e.flags|=32,null===(l=i.effects)?i.effects=[a]:l.push(a))}else p={eventTime:p,lane:l,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===d?(c=d=p,u=f):d=d.next=p,s|=l;if(null===(a=a.next)){if(null===(l=i.shared.pending))break;a=l.next,l.next=null,i.lastBaseUpdate=l,i.shared.pending=null}}null===d&&(u=f),i.baseState=u,i.firstBaseUpdate=c,i.lastBaseUpdate=d,_s|=s,e.lanes=s,e.memoizedState=f}}function mi(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(null!==o){if(r.callback=null,r=n,"function"!==typeof o)throw Error(a(191,o));o.call(r)}}}var vi=(new r.Component).refs;function gi(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:o({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var yi={isMounted:function(e){return!!(e=e._reactInternals)&&Ye(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=fl(),o=pl(e),i=di(r,o);i.payload=t,void 0!==n&&null!==n&&(i.callback=n),fi(e,i),hl(e,o,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=fl(),o=pl(e),i=di(r,o);i.tag=1,i.payload=t,void 0!==n&&null!==n&&(i.callback=n),fi(e,i),hl(e,o,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=fl(),r=pl(e),o=di(n,r);o.tag=2,void 0!==t&&null!==t&&(o.callback=t),fi(e,o),hl(e,r,n)}};function bi(e,t,n,r,o,i,a){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,i,a):!t.prototype||!t.prototype.isPureReactComponent||(!fr(n,r)||!fr(o,i))}function wi(e,t,n){var r=!1,o=po,i=t.contextType;return"object"===typeof i&&null!==i?i=si(i):(o=yo(t)?vo:ho.current,i=(r=null!==(r=t.contextTypes)&&void 0!==r)?go(e,o):po),t=new t(n,i),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=yi,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function ki(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&yi.enqueueReplaceState(t,t.state,null)}function xi(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=vi,ui(e);var i=t.contextType;"object"===typeof i&&null!==i?o.context=si(i):(i=yo(t)?vo:ho.current,o.context=go(e,i)),hi(e,n,o,r),o.state=e.memoizedState,"function"===typeof(i=t.getDerivedStateFromProps)&&(gi(e,t,i,n),o.state=e.memoizedState),"function"===typeof t.getDerivedStateFromProps||"function"===typeof o.getSnapshotBeforeUpdate||"function"!==typeof o.UNSAFE_componentWillMount&&"function"!==typeof o.componentWillMount||(t=o.state,"function"===typeof o.componentWillMount&&o.componentWillMount(),"function"===typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&yi.enqueueReplaceState(o,o.state,null),hi(e,n,o,r),o.state=e.memoizedState),"function"===typeof o.componentDidMount&&(e.flags|=4)}var Oi=Array.isArray;function Si(e,t,n){if(null!==(e=n.ref)&&"function"!==typeof e&&"object"!==typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,e));var o=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===o?t.ref:(t=function(e){var t=r.refs;t===vi&&(t=r.refs={}),null===e?delete t[o]:t[o]=e},t._stringRef=o,t)}if("string"!==typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function Ci(e,t){if("textarea"!==e.type)throw Error(a(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function ji(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.flags=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=Ul(e,t)).index=0,e.sibling=null,e}function i(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags=2,n):r:(t.flags=2,n):n}function s(t){return e&&null===t.alternate&&(t.flags=2),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=Yl(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function u(e,t,n,r){return null!==t&&t.elementType===n.type?((r=o(t,n.props)).ref=Si(e,t,n),r.return=e,r):((r=Kl(n.type,n.key,n.props,null,e.mode,r)).ref=Si(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Zl(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function d(e,t,n,r,i){return null===t||7!==t.tag?((t=Gl(n,e.mode,r,i)).return=e,t):((t=o(t,n)).return=e,t)}function f(e,t,n){if("string"===typeof t||"number"===typeof t)return(t=Yl(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case x:return(n=Kl(t.type,t.key,t.props,null,e.mode,n)).ref=Si(e,null,t),n.return=e,n;case O:return(t=Zl(t,e.mode,n)).return=e,t}if(Oi(t)||I(t))return(t=Gl(t,e.mode,n,null)).return=e,t;Ci(e,t)}return null}function p(e,t,n,r){var o=null!==t?t.key:null;if("string"===typeof n||"number"===typeof n)return null!==o?null:l(e,t,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case x:return n.key===o?n.type===S?d(e,t,n.props.children,r,o):u(e,t,n,r):null;case O:return n.key===o?c(e,t,n,r):null}if(Oi(n)||I(n))return null!==o?null:d(e,t,n,r,null);Ci(e,n)}return null}function h(e,t,n,r,o){if("string"===typeof r||"number"===typeof r)return l(t,e=e.get(n)||null,""+r,o);if("object"===typeof r&&null!==r){switch(r.$$typeof){case x:return e=e.get(null===r.key?n:r.key)||null,r.type===S?d(t,e,r.props.children,o,r.key):u(t,e,r,o);case O:return c(t,e=e.get(null===r.key?n:r.key)||null,r,o)}if(Oi(r)||I(r))return d(t,e=e.get(n)||null,r,o,null);Ci(t,r)}return null}function m(o,a,s,l){for(var u=null,c=null,d=a,m=a=0,v=null;null!==d&&m<s.length;m++){d.index>m?(v=d,d=null):v=d.sibling;var g=p(o,d,s[m],l);if(null===g){null===d&&(d=v);break}e&&d&&null===g.alternate&&t(o,d),a=i(g,a,m),null===c?u=g:c.sibling=g,c=g,d=v}if(m===s.length)return n(o,d),u;if(null===d){for(;m<s.length;m++)null!==(d=f(o,s[m],l))&&(a=i(d,a,m),null===c?u=d:c.sibling=d,c=d);return u}for(d=r(o,d);m<s.length;m++)null!==(v=h(d,o,m,s[m],l))&&(e&&null!==v.alternate&&d.delete(null===v.key?m:v.key),a=i(v,a,m),null===c?u=v:c.sibling=v,c=v);return e&&d.forEach((function(e){return t(o,e)})),u}function v(o,s,l,u){var c=I(l);if("function"!==typeof c)throw Error(a(150));if(null==(l=c.call(l)))throw Error(a(151));for(var d=c=null,m=s,v=s=0,g=null,y=l.next();null!==m&&!y.done;v++,y=l.next()){m.index>v?(g=m,m=null):g=m.sibling;var b=p(o,m,y.value,u);if(null===b){null===m&&(m=g);break}e&&m&&null===b.alternate&&t(o,m),s=i(b,s,v),null===d?c=b:d.sibling=b,d=b,m=g}if(y.done)return n(o,m),c;if(null===m){for(;!y.done;v++,y=l.next())null!==(y=f(o,y.value,u))&&(s=i(y,s,v),null===d?c=y:d.sibling=y,d=y);return c}for(m=r(o,m);!y.done;v++,y=l.next())null!==(y=h(m,o,v,y.value,u))&&(e&&null!==y.alternate&&m.delete(null===y.key?v:y.key),s=i(y,s,v),null===d?c=y:d.sibling=y,d=y);return e&&m.forEach((function(e){return t(o,e)})),c}return function(e,r,i,l){var u="object"===typeof i&&null!==i&&i.type===S&&null===i.key;u&&(i=i.props.children);var c="object"===typeof i&&null!==i;if(c)switch(i.$$typeof){case x:e:{for(c=i.key,u=r;null!==u;){if(u.key===c){if(7===u.tag){if(i.type===S){n(e,u.sibling),(r=o(u,i.props.children)).return=e,e=r;break e}}else if(u.elementType===i.type){n(e,u.sibling),(r=o(u,i.props)).ref=Si(e,u,i),r.return=e,e=r;break e}n(e,u);break}t(e,u),u=u.sibling}i.type===S?((r=Gl(i.props.children,e.mode,l,i.key)).return=e,e=r):((l=Kl(i.type,i.key,i.props,null,e.mode,l)).ref=Si(e,r,i),l.return=e,e=l)}return s(e);case O:e:{for(u=i.key;null!==r;){if(r.key===u){if(4===r.tag&&r.stateNode.containerInfo===i.containerInfo&&r.stateNode.implementation===i.implementation){n(e,r.sibling),(r=o(r,i.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Zl(i,e.mode,l)).return=e,e=r}return s(e)}if("string"===typeof i||"number"===typeof i)return i=""+i,null!==r&&6===r.tag?(n(e,r.sibling),(r=o(r,i)).return=e,e=r):(n(e,r),(r=Yl(i,e.mode,l)).return=e,e=r),s(e);if(Oi(i))return m(e,r,i,l);if(I(i))return v(e,r,i,l);if(c&&Ci(e,i),"undefined"===typeof i&&!u)switch(e.tag){case 1:case 22:case 0:case 11:case 15:throw Error(a(152,K(e.type)||"Component"))}return n(e,r)}}var Di=ji(!0),Ei=ji(!1),Ai={},Mi=uo(Ai),Ti=uo(Ai),Li=uo(Ai);function Ni(e){if(e===Ai)throw Error(a(174));return e}function Pi(e,t){switch(fo(Li,t),fo(Ti,e),fo(Mi,Ai),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:he(null,"");break;default:t=he(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}co(Mi),fo(Mi,t)}function Ri(){co(Mi),co(Ti),co(Li)}function Hi(e){Ni(Li.current);var t=Ni(Mi.current),n=he(t,e.type);t!==n&&(fo(Ti,e),fo(Mi,n))}function Fi(e){Ti.current===e&&(co(Mi),co(Ti))}var Vi=uo(0);function zi(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(64&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Bi=null,_i=null,Ii=!1;function $i(e,t){var n=ql(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function qi(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);default:return!1}}function Wi(e){if(Ii){var t=_i;if(t){var n=t;if(!qi(e,t)){if(!(t=Gr(n.nextSibling))||!qi(e,t))return e.flags=-1025&e.flags|2,Ii=!1,void(Bi=e);$i(Bi,n)}Bi=e,_i=Gr(t.firstChild)}else e.flags=-1025&e.flags|2,Ii=!1,Bi=e}}function Ui(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Bi=e}function Ki(e){if(e!==Bi)return!1;if(!Ii)return Ui(e),Ii=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!qr(t,e.memoizedProps))for(t=_i;t;)$i(e,t),t=Gr(t.nextSibling);if(Ui(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){_i=Gr(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}_i=null}}else _i=Bi?Gr(e.stateNode.nextSibling):null;return!0}function Gi(){_i=Bi=null,Ii=!1}var Ji=[];function Yi(){for(var e=0;e<Ji.length;e++)Ji[e]._workInProgressVersionPrimary=null;Ji.length=0}var Zi=k.ReactCurrentDispatcher,Xi=k.ReactCurrentBatchConfig,Qi=0,ea=null,ta=null,na=null,ra=!1,oa=!1;function ia(){throw Error(a(321))}function aa(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!cr(e[n],t[n]))return!1;return!0}function sa(e,t,n,r,o,i){if(Qi=i,ea=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Zi.current=null===e||null===e.memoizedState?Na:Pa,e=n(r,o),oa){i=0;do{if(oa=!1,!(25>i))throw Error(a(301));i+=1,na=ta=null,t.updateQueue=null,Zi.current=Ra,e=n(r,o)}while(oa)}if(Zi.current=La,t=null!==ta&&null!==ta.next,Qi=0,na=ta=ea=null,ra=!1,t)throw Error(a(300));return e}function la(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===na?ea.memoizedState=na=e:na=na.next=e,na}function ua(){if(null===ta){var e=ea.alternate;e=null!==e?e.memoizedState:null}else e=ta.next;var t=null===na?ea.memoizedState:na.next;if(null!==t)na=t,ta=e;else{if(null===e)throw Error(a(310));e={memoizedState:(ta=e).memoizedState,baseState:ta.baseState,baseQueue:ta.baseQueue,queue:ta.queue,next:null},null===na?ea.memoizedState=na=e:na=na.next=e}return na}function ca(e,t){return"function"===typeof t?t(e):t}function da(e){var t=ua(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=ta,o=r.baseQueue,i=n.pending;if(null!==i){if(null!==o){var s=o.next;o.next=i.next,i.next=s}r.baseQueue=o=i,n.pending=null}if(null!==o){o=o.next,r=r.baseState;var l=s=i=null,u=o;do{var c=u.lane;if((Qi&c)===c)null!==l&&(l=l.next={lane:0,action:u.action,eagerReducer:u.eagerReducer,eagerState:u.eagerState,next:null}),r=u.eagerReducer===e?u.eagerState:e(r,u.action);else{var d={lane:c,action:u.action,eagerReducer:u.eagerReducer,eagerState:u.eagerState,next:null};null===l?(s=l=d,i=r):l=l.next=d,ea.lanes|=c,_s|=c}u=u.next}while(null!==u&&u!==o);null===l?i=r:l.next=s,cr(r,t.memoizedState)||(Fa=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=l,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function fa(e){var t=ua(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(null!==o){n.pending=null;var s=o=o.next;do{i=e(i,s.action),s=s.next}while(s!==o);cr(i,t.memoizedState)||(Fa=!0),t.memoizedState=i,null===t.baseQueue&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function pa(e,t,n){var r=t._getVersion;r=r(t._source);var o=t._workInProgressVersionPrimary;if(null!==o?e=o===r:(e=e.mutableReadLanes,(e=(Qi&e)===e)&&(t._workInProgressVersionPrimary=r,Ji.push(t))),e)return n(t._source);throw Ji.push(t),Error(a(350))}function ha(e,t,n,r){var o=Ns;if(null===o)throw Error(a(349));var i=t._getVersion,s=i(t._source),l=Zi.current,u=l.useState((function(){return pa(o,t,n)})),c=u[1],d=u[0];u=na;var f=e.memoizedState,p=f.refs,h=p.getSnapshot,m=f.source;f=f.subscribe;var v=ea;return e.memoizedState={refs:p,source:t,subscribe:r},l.useEffect((function(){p.getSnapshot=n,p.setSnapshot=c;var e=i(t._source);if(!cr(s,e)){e=n(t._source),cr(d,e)||(c(e),e=pl(v),o.mutableReadLanes|=e&o.pendingLanes),e=o.mutableReadLanes,o.entangledLanes|=e;for(var r=o.entanglements,a=e;0<a;){var l=31-qt(a),u=1<<l;r[l]|=e,a&=~u}}}),[n,t,r]),l.useEffect((function(){return r(t._source,(function(){var e=p.getSnapshot,n=p.setSnapshot;try{n(e(t._source));var r=pl(v);o.mutableReadLanes|=r&o.pendingLanes}catch(i){n((function(){throw i}))}}))}),[t,r]),cr(h,n)&&cr(m,t)&&cr(f,r)||((e={pending:null,dispatch:null,lastRenderedReducer:ca,lastRenderedState:d}).dispatch=c=Ta.bind(null,ea,e),u.queue=e,u.baseQueue=null,d=pa(o,t,n),u.memoizedState=u.baseState=d),d}function ma(e,t,n){return ha(ua(),e,t,n)}function va(e){var t=la();return"function"===typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:ca,lastRenderedState:e}).dispatch=Ta.bind(null,ea,e),[t.memoizedState,e]}function ga(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=ea.updateQueue)?(t={lastEffect:null},ea.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ya(e){return e={current:e},la().memoizedState=e}function ba(){return ua().memoizedState}function wa(e,t,n,r){var o=la();ea.flags|=e,o.memoizedState=ga(1|t,n,void 0,void 0===r?null:r)}function ka(e,t,n,r){var o=ua();r=void 0===r?null:r;var i=void 0;if(null!==ta){var a=ta.memoizedState;if(i=a.destroy,null!==r&&aa(r,a.deps))return void ga(t,n,i,r)}ea.flags|=e,o.memoizedState=ga(1|t,n,i,r)}function xa(e,t){return wa(516,4,e,t)}function Oa(e,t){return ka(516,4,e,t)}function Sa(e,t){return ka(4,2,e,t)}function Ca(e,t){return"function"===typeof t?(e=e(),t(e),function(){t(null)}):null!==t&&void 0!==t?(e=e(),t.current=e,function(){t.current=null}):void 0}function ja(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,ka(4,2,Ca.bind(null,t,e),n)}function Da(){}function Ea(e,t){var n=ua();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&aa(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Aa(e,t){var n=ua();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&aa(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Ma(e,t){var n=Wo();Ko(98>n?98:n,(function(){e(!0)})),Ko(97<n?97:n,(function(){var n=Xi.transition;Xi.transition=1;try{e(!1),t()}finally{Xi.transition=n}}))}function Ta(e,t,n){var r=fl(),o=pl(e),i={lane:o,action:n,eagerReducer:null,eagerState:null,next:null},a=t.pending;if(null===a?i.next=i:(i.next=a.next,a.next=i),t.pending=i,a=e.alternate,e===ea||null!==a&&a===ea)oa=ra=!0;else{if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var s=t.lastRenderedState,l=a(s,n);if(i.eagerReducer=a,i.eagerState=l,cr(l,s))return}catch(u){}hl(e,o,r)}}var La={readContext:si,useCallback:ia,useContext:ia,useEffect:ia,useImperativeHandle:ia,useLayoutEffect:ia,useMemo:ia,useReducer:ia,useRef:ia,useState:ia,useDebugValue:ia,useDeferredValue:ia,useTransition:ia,useMutableSource:ia,useOpaqueIdentifier:ia,unstable_isNewReconciler:!1},Na={readContext:si,useCallback:function(e,t){return la().memoizedState=[e,void 0===t?null:t],e},useContext:si,useEffect:xa,useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,wa(4,2,Ca.bind(null,t,e),n)},useLayoutEffect:function(e,t){return wa(4,2,e,t)},useMemo:function(e,t){var n=la();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=la();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=Ta.bind(null,ea,e),[r.memoizedState,e]},useRef:ya,useState:va,useDebugValue:Da,useDeferredValue:function(e){var t=va(e),n=t[0],r=t[1];return xa((function(){var t=Xi.transition;Xi.transition=1;try{r(e)}finally{Xi.transition=t}}),[e]),n},useTransition:function(){var e=va(!1),t=e[0];return ya(e=Ma.bind(null,e[1])),[e,t]},useMutableSource:function(e,t,n){var r=la();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},ha(r,e,t,n)},useOpaqueIdentifier:function(){if(Ii){var e=!1,t=function(e){return{$$typeof:R,toString:e,valueOf:e}}((function(){throw e||(e=!0,n("r:"+(Yr++).toString(36))),Error(a(355))})),n=va(t)[1];return 0===(2&ea.mode)&&(ea.flags|=516,ga(5,(function(){n("r:"+(Yr++).toString(36))}),void 0,null)),t}return va(t="r:"+(Yr++).toString(36)),t},unstable_isNewReconciler:!1},Pa={readContext:si,useCallback:Ea,useContext:si,useEffect:Oa,useImperativeHandle:ja,useLayoutEffect:Sa,useMemo:Aa,useReducer:da,useRef:ba,useState:function(){return da(ca)},useDebugValue:Da,useDeferredValue:function(e){var t=da(ca),n=t[0],r=t[1];return Oa((function(){var t=Xi.transition;Xi.transition=1;try{r(e)}finally{Xi.transition=t}}),[e]),n},useTransition:function(){var e=da(ca)[0];return[ba().current,e]},useMutableSource:ma,useOpaqueIdentifier:function(){return da(ca)[0]},unstable_isNewReconciler:!1},Ra={readContext:si,useCallback:Ea,useContext:si,useEffect:Oa,useImperativeHandle:ja,useLayoutEffect:Sa,useMemo:Aa,useReducer:fa,useRef:ba,useState:function(){return fa(ca)},useDebugValue:Da,useDeferredValue:function(e){var t=fa(ca),n=t[0],r=t[1];return Oa((function(){var t=Xi.transition;Xi.transition=1;try{r(e)}finally{Xi.transition=t}}),[e]),n},useTransition:function(){var e=fa(ca)[0];return[ba().current,e]},useMutableSource:ma,useOpaqueIdentifier:function(){return fa(ca)[0]},unstable_isNewReconciler:!1},Ha=k.ReactCurrentOwner,Fa=!1;function Va(e,t,n,r){t.child=null===e?Ei(t,null,n,r):Di(t,e.child,n,r)}function za(e,t,n,r,o){n=n.render;var i=t.ref;return ai(t,o),r=sa(e,t,n,r,i,o),null===e||Fa?(t.flags|=1,Va(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,is(e,t,o))}function Ba(e,t,n,r,o,i){if(null===e){var a=n.type;return"function"!==typeof a||Wl(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Kl(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,_a(e,t,a,r,o,i))}return a=e.child,0===(o&i)&&(o=a.memoizedProps,(n=null!==(n=n.compare)?n:fr)(o,r)&&e.ref===t.ref)?is(e,t,i):(t.flags|=1,(e=Ul(a,r)).ref=t.ref,e.return=t,t.child=e)}function _a(e,t,n,r,o,i){if(null!==e&&fr(e.memoizedProps,r)&&e.ref===t.ref){if(Fa=!1,0===(i&o))return t.lanes=e.lanes,is(e,t,i);0!==(16384&e.flags)&&(Fa=!0)}return qa(e,t,n,r,i)}function Ia(e,t,n){var r=t.pendingProps,o=r.children,i=null!==e?e.memoizedState:null;if("hidden"===r.mode||"unstable-defer-without-hiding"===r.mode)if(0===(4&t.mode))t.memoizedState={baseLanes:0},xl(t,n);else{if(0===(1073741824&n))return e=null!==i?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},xl(t,e),null;t.memoizedState={baseLanes:0},xl(t,null!==i?i.baseLanes:n)}else null!==i?(r=i.baseLanes|n,t.memoizedState=null):r=n,xl(t,r);return Va(e,t,o,n),t.child}function $a(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=128)}function qa(e,t,n,r,o){var i=yo(n)?vo:ho.current;return i=go(t,i),ai(t,o),n=sa(e,t,n,r,i,o),null===e||Fa?(t.flags|=1,Va(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,is(e,t,o))}function Wa(e,t,n,r,o){if(yo(n)){var i=!0;xo(t)}else i=!1;if(ai(t,o),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),wi(t,n,r),xi(t,n,r,o),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,u=n.contextType;"object"===typeof u&&null!==u?u=si(u):u=go(t,u=yo(n)?vo:ho.current);var c=n.getDerivedStateFromProps,d="function"===typeof c||"function"===typeof a.getSnapshotBeforeUpdate;d||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==r||l!==u)&&ki(t,a,r,u),li=!1;var f=t.memoizedState;a.state=f,hi(t,r,a,o),l=t.memoizedState,s!==r||f!==l||mo.current||li?("function"===typeof c&&(gi(t,n,c,r),l=t.memoizedState),(s=li||bi(t,n,s,r,f,l,u))?(d||"function"!==typeof a.UNSAFE_componentWillMount&&"function"!==typeof a.componentWillMount||("function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"===typeof a.componentDidMount&&(t.flags|=4)):("function"===typeof a.componentDidMount&&(t.flags|=4),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=u,r=s):("function"===typeof a.componentDidMount&&(t.flags|=4),r=!1)}else{a=t.stateNode,ci(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:Xo(t.type,s),a.props=u,d=t.pendingProps,f=a.context,"object"===typeof(l=n.contextType)&&null!==l?l=si(l):l=go(t,l=yo(n)?vo:ho.current);var p=n.getDerivedStateFromProps;(c="function"===typeof p||"function"===typeof a.getSnapshotBeforeUpdate)||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==d||f!==l)&&ki(t,a,r,l),li=!1,f=t.memoizedState,a.state=f,hi(t,r,a,o);var h=t.memoizedState;s!==d||f!==h||mo.current||li?("function"===typeof p&&(gi(t,n,p,r),h=t.memoizedState),(u=li||bi(t,n,u,r,f,h,l))?(c||"function"!==typeof a.UNSAFE_componentWillUpdate&&"function"!==typeof a.componentWillUpdate||("function"===typeof a.componentWillUpdate&&a.componentWillUpdate(r,h,l),"function"===typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,h,l)),"function"===typeof a.componentDidUpdate&&(t.flags|=4),"function"===typeof a.getSnapshotBeforeUpdate&&(t.flags|=256)):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=256),t.memoizedProps=r,t.memoizedState=h),a.props=r,a.state=h,a.context=l,r=u):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=256),r=!1)}return Ua(e,t,n,r,i,o)}function Ua(e,t,n,r,o,i){$a(e,t);var a=0!==(64&t.flags);if(!r&&!a)return o&&Oo(t,n,!1),is(e,t,i);r=t.stateNode,Ha.current=t;var s=a&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=Di(t,e.child,null,i),t.child=Di(t,null,s,i)):Va(e,t,s,i),t.memoizedState=r.state,o&&Oo(t,n,!0),t.child}function Ka(e){var t=e.stateNode;t.pendingContext?wo(0,t.pendingContext,t.pendingContext!==t.context):t.context&&wo(0,t.context,!1),Pi(e,t.containerInfo)}var Ga,Ja,Ya,Za={dehydrated:null,retryLane:0};function Xa(e,t,n){var r,o=t.pendingProps,i=Vi.current,a=!1;return(r=0!==(64&t.flags))||(r=(null===e||null!==e.memoizedState)&&0!==(2&i)),r?(a=!0,t.flags&=-65):null!==e&&null===e.memoizedState||void 0===o.fallback||!0===o.unstable_avoidThisFallback||(i|=1),fo(Vi,1&i),null===e?(void 0!==o.fallback&&Wi(t),e=o.children,i=o.fallback,a?(e=Qa(t,e,i,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Za,e):"number"===typeof o.unstable_expectedLoadTime?(e=Qa(t,e,i,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Za,t.lanes=33554432,e):((n=Jl({mode:"visible",children:e},t.mode,n,null)).return=t,t.child=n)):(e.memoizedState,a?(o=ts(e,t,o.children,o.fallback,n),a=t.child,i=e.child.memoizedState,a.memoizedState=null===i?{baseLanes:n}:{baseLanes:i.baseLanes|n},a.childLanes=e.childLanes&~n,t.memoizedState=Za,o):(n=es(e,t,o.children,n),t.memoizedState=null,n))}function Qa(e,t,n,r){var o=e.mode,i=e.child;return t={mode:"hidden",children:t},0===(2&o)&&null!==i?(i.childLanes=0,i.pendingProps=t):i=Jl(t,o,0,null),n=Gl(n,o,r,null),i.return=e,n.return=e,i.sibling=n,e.child=i,n}function es(e,t,n,r){var o=e.child;return e=o.sibling,n=Ul(o,{mode:"visible",children:n}),0===(2&t.mode)&&(n.lanes=r),n.return=t,n.sibling=null,null!==e&&(e.nextEffect=null,e.flags=8,t.firstEffect=t.lastEffect=e),t.child=n}function ts(e,t,n,r,o){var i=t.mode,a=e.child;e=a.sibling;var s={mode:"hidden",children:n};return 0===(2&i)&&t.child!==a?((n=t.child).childLanes=0,n.pendingProps=s,null!==(a=n.lastEffect)?(t.firstEffect=n.firstEffect,t.lastEffect=a,a.nextEffect=null):t.firstEffect=t.lastEffect=null):n=Ul(a,s),null!==e?r=Ul(e,r):(r=Gl(r,i,o,null)).flags|=2,r.return=t,n.return=t,n.sibling=r,t.child=n,r}function ns(e,t){e.lanes|=t;var n=e.alternate;null!==n&&(n.lanes|=t),ii(e.return,t)}function rs(e,t,n,r,o,i){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o,lastEffect:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=o,a.lastEffect=i)}function os(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Va(e,t,r.children,n),0!==(2&(r=Vi.current)))r=1&r|2,t.flags|=64;else{if(null!==e&&0!==(64&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&ns(e,n);else if(19===e.tag)ns(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(fo(Vi,r),0===(2&t.mode))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===zi(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),rs(t,!1,o,n,i,t.lastEffect);break;case"backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===zi(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}rs(t,!0,n,null,i,t.lastEffect);break;case"together":rs(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function is(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),_s|=t.lanes,0!==(n&t.childLanes)){if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=Ul(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Ul(e,e.pendingProps)).return=t;n.sibling=null}return t.child}return null}function as(e,t){if(!Ii)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ss(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:case 17:return yo(t.type)&&bo(),null;case 3:return Ri(),co(mo),co(ho),Yi(),(r=t.stateNode).pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(Ki(t)?t.flags|=4:r.hydrate||(t.flags|=256)),null;case 5:Fi(t);var i=Ni(Li.current);if(n=t.type,null!==e&&null!=t.stateNode)Ja(e,t,n,r),e.ref!==t.ref&&(t.flags|=128);else{if(!r){if(null===t.stateNode)throw Error(a(166));return null}if(e=Ni(Mi.current),Ki(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[Xr]=t,r[Qr]=s,n){case"dialog":Mr("cancel",r),Mr("close",r);break;case"iframe":case"object":case"embed":Mr("load",r);break;case"video":case"audio":for(e=0;e<jr.length;e++)Mr(jr[e],r);break;case"source":Mr("error",r);break;case"img":case"image":case"link":Mr("error",r),Mr("load",r);break;case"details":Mr("toggle",r);break;case"input":ee(r,s),Mr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Mr("invalid",r);break;case"textarea":le(r,s),Mr("invalid",r)}for(var u in Se(n,s),e=null,s)s.hasOwnProperty(u)&&(i=s[u],"children"===u?"string"===typeof i?r.textContent!==i&&(e=["children",i]):"number"===typeof i&&r.textContent!==""+i&&(e=["children",""+i]):l.hasOwnProperty(u)&&null!=i&&"onScroll"===u&&Mr("scroll",r));switch(n){case"input":Y(r),re(r,s,!0);break;case"textarea":Y(r),ce(r);break;case"select":case"option":break;default:"function"===typeof s.onClick&&(r.onclick=Br)}r=e,t.updateQueue=r,null!==r&&(t.flags|=4)}else{switch(u=9===i.nodeType?i:i.ownerDocument,e===de&&(e=pe(n)),e===de?"script"===n?((e=u.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"===typeof r.is?e=u.createElement(n,{is:r.is}):(e=u.createElement(n),"select"===n&&(u=e,r.multiple?u.multiple=!0:r.size&&(u.size=r.size))):e=u.createElementNS(e,n),e[Xr]=t,e[Qr]=r,Ga(e,t),t.stateNode=e,u=Ce(n,r),n){case"dialog":Mr("cancel",e),Mr("close",e),i=r;break;case"iframe":case"object":case"embed":Mr("load",e),i=r;break;case"video":case"audio":for(i=0;i<jr.length;i++)Mr(jr[i],e);i=r;break;case"source":Mr("error",e),i=r;break;case"img":case"image":case"link":Mr("error",e),Mr("load",e),i=r;break;case"details":Mr("toggle",e),i=r;break;case"input":ee(e,r),i=Q(e,r),Mr("invalid",e);break;case"option":i=ie(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=o({},r,{value:void 0}),Mr("invalid",e);break;case"textarea":le(e,r),i=se(e,r),Mr("invalid",e);break;default:i=r}Se(n,i);var c=i;for(s in c)if(c.hasOwnProperty(s)){var d=c[s];"style"===s?xe(e,d):"dangerouslySetInnerHTML"===s?null!=(d=d?d.__html:void 0)&&ge(e,d):"children"===s?"string"===typeof d?("textarea"!==n||""!==d)&&ye(e,d):"number"===typeof d&&ye(e,""+d):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(l.hasOwnProperty(s)?null!=d&&"onScroll"===s&&Mr("scroll",e):null!=d&&w(e,s,d,u))}switch(n){case"input":Y(e),re(e,r,!1);break;case"textarea":Y(e),ce(e);break;case"option":null!=r.value&&e.setAttribute("value",""+G(r.value));break;case"select":e.multiple=!!r.multiple,null!=(s=r.value)?ae(e,!!r.multiple,s,!1):null!=r.defaultValue&&ae(e,!!r.multiple,r.defaultValue,!0);break;default:"function"===typeof i.onClick&&(e.onclick=Br)}$r(n,r)&&(t.flags|=4)}null!==t.ref&&(t.flags|=128)}return null;case 6:if(e&&null!=t.stateNode)Ya(0,t,e.memoizedProps,r);else{if("string"!==typeof r&&null===t.stateNode)throw Error(a(166));n=Ni(Li.current),Ni(Mi.current),Ki(t)?(r=t.stateNode,n=t.memoizedProps,r[Xr]=t,r.nodeValue!==n&&(t.flags|=4)):((r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[Xr]=t,t.stateNode=r)}return null;case 13:return co(Vi),r=t.memoizedState,0!==(64&t.flags)?(t.lanes=n,t):(r=null!==r,n=!1,null===e?void 0!==t.memoizedProps.fallback&&Ki(t):n=null!==e.memoizedState,r&&!n&&0!==(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!==(1&Vi.current)?0===Vs&&(Vs=3):(0!==Vs&&3!==Vs||(Vs=4),null===Ns||0===(134217727&_s)&&0===(134217727&Is)||yl(Ns,Rs))),(r||n)&&(t.flags|=4),null);case 4:return Ri(),null===e&&Lr(t.stateNode.containerInfo),null;case 10:return oi(t),null;case 19:if(co(Vi),null===(r=t.memoizedState))return null;if(s=0!==(64&t.flags),null===(u=r.rendering))if(s)as(r,!1);else{if(0!==Vs||null!==e&&0!==(64&e.flags))for(e=t.child;null!==e;){if(null!==(u=zi(e))){for(t.flags|=64,as(r,!1),null!==(s=u.updateQueue)&&(t.updateQueue=s,t.flags|=4),null===r.lastEffect&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=n,n=t.child;null!==n;)e=r,(s=n).flags&=2,s.nextEffect=null,s.firstEffect=null,s.lastEffect=null,null===(u=s.alternate)?(s.childLanes=0,s.lanes=e,s.child=null,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=u.childLanes,s.lanes=u.lanes,s.child=u.child,s.memoizedProps=u.memoizedProps,s.memoizedState=u.memoizedState,s.updateQueue=u.updateQueue,s.type=u.type,e=u.dependencies,s.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return fo(Vi,1&Vi.current|2),t.child}e=e.sibling}null!==r.tail&&qo()>Us&&(t.flags|=64,s=!0,as(r,!1),t.lanes=33554432)}else{if(!s)if(null!==(e=zi(u))){if(t.flags|=64,s=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),as(r,!0),null===r.tail&&"hidden"===r.tailMode&&!u.alternate&&!Ii)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*qo()-r.renderingStartTime>Us&&1073741824!==n&&(t.flags|=64,s=!0,as(r,!1),t.lanes=33554432);r.isBackwards?(u.sibling=t.child,t.child=u):(null!==(n=r.last)?n.sibling=u:t.child=u,r.last=u)}return null!==r.tail?(n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=qo(),n.sibling=null,t=Vi.current,fo(Vi,s?1&t|2:1&t),n):null;case 23:case 24:return Ol(),null!==e&&null!==e.memoizedState!==(null!==t.memoizedState)&&"unstable-defer-without-hiding"!==r.mode&&(t.flags|=4),null}throw Error(a(156,t.tag))}function ls(e){switch(e.tag){case 1:yo(e.type)&&bo();var t=e.flags;return 4096&t?(e.flags=-4097&t|64,e):null;case 3:if(Ri(),co(mo),co(ho),Yi(),0!==(64&(t=e.flags)))throw Error(a(285));return e.flags=-4097&t|64,e;case 5:return Fi(e),null;case 13:return co(Vi),4096&(t=e.flags)?(e.flags=-4097&t|64,e):null;case 19:return co(Vi),null;case 4:return Ri(),null;case 10:return oi(e),null;case 23:case 24:return Ol(),null;default:return null}}function us(e,t){try{var n="",r=t;do{n+=U(r),r=r.return}while(r);var o=n}catch(i){o="\nError generating stack: "+i.message+"\n"+i.stack}return{value:e,source:t,stack:o}}function cs(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}Ga=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ja=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Ni(Mi.current);var a,s=null;switch(n){case"input":i=Q(e,i),r=Q(e,r),s=[];break;case"option":i=ie(e,i),r=ie(e,r),s=[];break;case"select":i=o({},i,{value:void 0}),r=o({},r,{value:void 0}),s=[];break;case"textarea":i=se(e,i),r=se(e,r),s=[];break;default:"function"!==typeof i.onClick&&"function"===typeof r.onClick&&(e.onclick=Br)}for(d in Se(n,r),n=null,i)if(!r.hasOwnProperty(d)&&i.hasOwnProperty(d)&&null!=i[d])if("style"===d){var u=i[d];for(a in u)u.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==d&&"children"!==d&&"suppressContentEditableWarning"!==d&&"suppressHydrationWarning"!==d&&"autoFocus"!==d&&(l.hasOwnProperty(d)?s||(s=[]):(s=s||[]).push(d,null));for(d in r){var c=r[d];if(u=null!=i?i[d]:void 0,r.hasOwnProperty(d)&&c!==u&&(null!=c||null!=u))if("style"===d)if(u){for(a in u)!u.hasOwnProperty(a)||c&&c.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in c)c.hasOwnProperty(a)&&u[a]!==c[a]&&(n||(n={}),n[a]=c[a])}else n||(s||(s=[]),s.push(d,n)),n=c;else"dangerouslySetInnerHTML"===d?(c=c?c.__html:void 0,u=u?u.__html:void 0,null!=c&&u!==c&&(s=s||[]).push(d,c)):"children"===d?"string"!==typeof c&&"number"!==typeof c||(s=s||[]).push(d,""+c):"suppressContentEditableWarning"!==d&&"suppressHydrationWarning"!==d&&(l.hasOwnProperty(d)?(null!=c&&"onScroll"===d&&Mr("scroll",e),s||u===c||(s=[])):"object"===typeof c&&null!==c&&c.$$typeof===R?c.toString():(s=s||[]).push(d,c))}n&&(s=s||[]).push("style",n);var d=s;(t.updateQueue=d)&&(t.flags|=4)}},Ya=function(e,t,n,r){n!==r&&(t.flags|=4)};var ds="function"===typeof WeakMap?WeakMap:Map;function fs(e,t,n){(n=di(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ys||(Ys=!0,Zs=r),cs(0,t)},n}function ps(e,t,n){(n=di(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"===typeof r){var o=t.value;n.payload=function(){return cs(0,t),r(o)}}var i=e.stateNode;return null!==i&&"function"===typeof i.componentDidCatch&&(n.callback=function(){"function"!==typeof r&&(null===Xs?Xs=new Set([this]):Xs.add(this),cs(0,t));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}var hs="function"===typeof WeakSet?WeakSet:Set;function ms(e){var t=e.ref;if(null!==t)if("function"===typeof t)try{t(null)}catch(n){Bl(e,n)}else t.current=null}function vs(e,t){switch(t.tag){case 0:case 11:case 15:case 22:case 5:case 6:case 4:case 17:return;case 1:if(256&t.flags&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Xo(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:return void(256&t.flags&&Kr(t.stateNode.containerInfo))}throw Error(a(163))}function gs(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{if(3===(3&e.tag)){var r=e.create;e.destroy=r()}e=e.next}while(e!==t)}if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{var o=e;r=o.next,0!==(4&(o=o.tag))&&0!==(1&o)&&(Fl(n,e),Hl(n,e)),e=r}while(e!==t)}return;case 1:return e=n.stateNode,4&n.flags&&(null===t?e.componentDidMount():(r=n.elementType===n.type?t.memoizedProps:Xo(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),void(null!==(t=n.updateQueue)&&mi(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:case 1:e=n.child.stateNode}mi(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.flags&&$r(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:case 19:case 17:case 20:case 21:case 23:case 24:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&xt(n)))))}throw Error(a(163))}function ys(e,t){for(var n=e;;){if(5===n.tag){var r=n.stateNode;if(t)"function"===typeof(r=r.style).setProperty?r.setProperty("display","none","important"):r.display="none";else{r=n.stateNode;var o=n.memoizedProps.style;o=void 0!==o&&null!==o&&o.hasOwnProperty("display")?o.display:null,r.style.display=ke("display",o)}}else if(6===n.tag)n.stateNode.nodeValue=t?"":n.memoizedProps;else if((23!==n.tag&&24!==n.tag||null===n.memoizedState||n===e)&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function bs(e,t){if(Co&&"function"===typeof Co.onCommitFiberUnmount)try{Co.onCommitFiberUnmount(So,t)}catch(i){}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var n=e=e.next;do{var r=n,o=r.destroy;if(r=r.tag,void 0!==o)if(0!==(4&r))Fl(t,n);else{r=t;try{o()}catch(i){Bl(r,i)}}n=n.next}while(n!==e)}break;case 1:if(ms(t),"function"===typeof(e=t.stateNode).componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(i){Bl(t,i)}break;case 5:ms(t);break;case 4:Cs(e,t)}}function ws(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function ks(e){return 5===e.tag||3===e.tag||4===e.tag}function xs(e){e:{for(var t=e.return;null!==t;){if(ks(t))break e;t=t.return}throw Error(a(160))}var n=t;switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(a(161))}16&n.flags&&(ye(t,""),n.flags&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||ks(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.flags)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.flags)){n=n.stateNode;break e}}r?Os(e,n,t):Ss(e,n,t)}function Os(e,t,n){var r=e.tag,o=5===r||6===r;if(o)e=o?e.stateNode:e.stateNode.instance,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=Br));else if(4!==r&&null!==(e=e.child))for(Os(e,t,n),e=e.sibling;null!==e;)Os(e,t,n),e=e.sibling}function Ss(e,t,n){var r=e.tag,o=5===r||6===r;if(o)e=o?e.stateNode:e.stateNode.instance,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(Ss(e,t,n),e=e.sibling;null!==e;)Ss(e,t,n),e=e.sibling}function Cs(e,t){for(var n,r,o=t,i=!1;;){if(!i){i=o.return;e:for(;;){if(null===i)throw Error(a(160));switch(n=i.stateNode,i.tag){case 5:r=!1;break e;case 3:case 4:n=n.containerInfo,r=!0;break e}i=i.return}i=!0}if(5===o.tag||6===o.tag){e:for(var s=e,l=o,u=l;;)if(bs(s,u),null!==u.child&&4!==u.tag)u.child.return=u,u=u.child;else{if(u===l)break e;for(;null===u.sibling;){if(null===u.return||u.return===l)break e;u=u.return}u.sibling.return=u.return,u=u.sibling}r?(s=n,l=o.stateNode,8===s.nodeType?s.parentNode.removeChild(l):s.removeChild(l)):n.removeChild(o.stateNode)}else if(4===o.tag){if(null!==o.child){n=o.stateNode.containerInfo,r=!0,o.child.return=o,o=o.child;continue}}else if(bs(e,o),null!==o.child){o.child.return=o,o=o.child;continue}if(o===t)break;for(;null===o.sibling;){if(null===o.return||o.return===t)return;4===(o=o.return).tag&&(i=!1)}o.sibling.return=o.return,o=o.sibling}}function js(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var n=t.updateQueue;if(null!==(n=null!==n?n.lastEffect:null)){var r=n=n.next;do{3===(3&r.tag)&&(e=r.destroy,r.destroy=void 0,void 0!==e&&e()),r=r.next}while(r!==n)}return;case 1:case 12:case 17:return;case 5:if(null!=(n=t.stateNode)){r=t.memoizedProps;var o=null!==e?e.memoizedProps:r;e=t.type;var i=t.updateQueue;if(t.updateQueue=null,null!==i){for(n[Qr]=r,"input"===e&&"radio"===r.type&&null!=r.name&&te(n,r),Ce(e,o),t=Ce(e,r),o=0;o<i.length;o+=2){var s=i[o],l=i[o+1];"style"===s?xe(n,l):"dangerouslySetInnerHTML"===s?ge(n,l):"children"===s?ye(n,l):w(n,s,l,t)}switch(e){case"input":ne(n,r);break;case"textarea":ue(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(i=r.value)?ae(n,!!r.multiple,i,!1):e!==!!r.multiple&&(null!=r.defaultValue?ae(n,!!r.multiple,r.defaultValue,!0):ae(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(null===t.stateNode)throw Error(a(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((n=t.stateNode).hydrate&&(n.hydrate=!1,xt(n.containerInfo)));case 13:return null!==t.memoizedState&&(Ws=qo(),ys(t.child,!0)),void Ds(t);case 19:return void Ds(t);case 23:case 24:return void ys(t,null!==t.memoizedState)}throw Error(a(163))}function Ds(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new hs),t.forEach((function(t){var r=Il.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function Es(e,t){return null!==e&&(null===(e=e.memoizedState)||null!==e.dehydrated)&&(null!==(t=t.memoizedState)&&null===t.dehydrated)}var As=Math.ceil,Ms=k.ReactCurrentDispatcher,Ts=k.ReactCurrentOwner,Ls=0,Ns=null,Ps=null,Rs=0,Hs=0,Fs=uo(0),Vs=0,zs=null,Bs=0,_s=0,Is=0,$s=0,qs=null,Ws=0,Us=1/0;function Ks(){Us=qo()+500}var Gs,Js=null,Ys=!1,Zs=null,Xs=null,Qs=!1,el=null,tl=90,nl=[],rl=[],ol=null,il=0,al=null,sl=-1,ll=0,ul=0,cl=null,dl=!1;function fl(){return 0!==(48&Ls)?qo():-1!==sl?sl:sl=qo()}function pl(e){if(0===(2&(e=e.mode)))return 1;if(0===(4&e))return 99===Wo()?1:2;if(0===ll&&(ll=Bs),0!==Zo.transition){0!==ul&&(ul=null!==qs?qs.pendingLanes:0),e=ll;var t=4186112&~ul;return 0===(t&=-t)&&(0===(t=(e=4186112&~e)&-e)&&(t=8192)),t}return e=Wo(),0!==(4&Ls)&&98===e?e=Bt(12,ll):e=Bt(e=function(e){switch(e){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}(e),ll),e}function hl(e,t,n){if(50<il)throw il=0,al=null,Error(a(185));if(null===(e=ml(e,t)))return null;$t(e,t,n),e===Ns&&(Is|=t,4===Vs&&yl(e,Rs));var r=Wo();1===t?0!==(8&Ls)&&0===(48&Ls)?bl(e):(vl(e,n),0===Ls&&(Ks(),Jo())):(0===(4&Ls)||98!==r&&99!==r||(null===ol?ol=new Set([e]):ol.add(e)),vl(e,n)),qs=e}function ml(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}function vl(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,o=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var l=31-qt(s),u=1<<l,c=i[l];if(-1===c){if(0===(u&r)||0!==(u&o)){c=t,Ft(u);var d=Ht;i[l]=10<=d?c+250:6<=d?c+5e3:-1}}else c<=t&&(e.expiredLanes|=u);s&=~u}if(r=Vt(e,e===Ns?Rs:0),t=Ht,0===r)null!==n&&(n!==Vo&&Eo(n),e.callbackNode=null,e.callbackPriority=0);else{if(null!==n){if(e.callbackPriority===t)return;n!==Vo&&Eo(n)}15===t?(n=bl.bind(null,e),null===Bo?(Bo=[n],_o=Do(No,Yo)):Bo.push(n),n=Vo):14===t?n=Go(99,bl.bind(null,e)):(n=function(e){switch(e){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(a(358,e))}}(t),n=Go(n,gl.bind(null,e))),e.callbackPriority=t,e.callbackNode=n}}function gl(e){if(sl=-1,ul=ll=0,0!==(48&Ls))throw Error(a(327));var t=e.callbackNode;if(Rl()&&e.callbackNode!==t)return null;var n=Vt(e,e===Ns?Rs:0);if(0===n)return null;var r=n,o=Ls;Ls|=16;var i=jl();for(Ns===e&&Rs===r||(Ks(),Sl(e,r));;)try{Al();break}catch(l){Cl(e,l)}if(ri(),Ms.current=i,Ls=o,null!==Ps?r=0:(Ns=null,Rs=0,r=Vs),0!==(Bs&Is))Sl(e,0);else if(0!==r){if(2===r&&(Ls|=64,e.hydrate&&(e.hydrate=!1,Kr(e.containerInfo)),0!==(n=zt(e))&&(r=Dl(e,n))),1===r)throw t=zs,Sl(e,0),yl(e,n),vl(e,qo()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(a(345));case 2:case 5:Ll(e);break;case 3:if(yl(e,n),(62914560&n)===n&&10<(r=Ws+500-qo())){if(0!==Vt(e,0))break;if(((o=e.suspendedLanes)&n)!==n){fl(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=Wr(Ll.bind(null,e),r);break}Ll(e);break;case 4:if(yl(e,n),(4186112&n)===n)break;for(r=e.eventTimes,o=-1;0<n;){var s=31-qt(n);i=1<<s,(s=r[s])>o&&(o=s),n&=~i}if(n=o,10<(n=(120>(n=qo()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*As(n/1960))-n)){e.timeoutHandle=Wr(Ll.bind(null,e),n);break}Ll(e);break;default:throw Error(a(329))}}return vl(e,qo()),e.callbackNode===t?gl.bind(null,e):null}function yl(e,t){for(t&=~$s,t&=~Is,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-qt(t),r=1<<n;e[n]=-1,t&=~r}}function bl(e){if(0!==(48&Ls))throw Error(a(327));if(Rl(),e===Ns&&0!==(e.expiredLanes&Rs)){var t=Rs,n=Dl(e,t);0!==(Bs&Is)&&(n=Dl(e,t=Vt(e,t)))}else n=Dl(e,t=Vt(e,0));if(0!==e.tag&&2===n&&(Ls|=64,e.hydrate&&(e.hydrate=!1,Kr(e.containerInfo)),0!==(t=zt(e))&&(n=Dl(e,t))),1===n)throw n=zs,Sl(e,0),yl(e,t),vl(e,qo()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ll(e),vl(e,qo()),null}function wl(e,t){var n=Ls;Ls|=1;try{return e(t)}finally{0===(Ls=n)&&(Ks(),Jo())}}function kl(e,t){var n=Ls;Ls&=-2,Ls|=8;try{return e(t)}finally{0===(Ls=n)&&(Ks(),Jo())}}function xl(e,t){fo(Fs,Hs),Hs|=t,Bs|=t}function Ol(){Hs=Fs.current,co(Fs)}function Sl(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,Ur(n)),null!==Ps)for(n=Ps.return;null!==n;){var r=n;switch(r.tag){case 1:null!==(r=r.type.childContextTypes)&&void 0!==r&&bo();break;case 3:Ri(),co(mo),co(ho),Yi();break;case 5:Fi(r);break;case 4:Ri();break;case 13:case 19:co(Vi);break;case 10:oi(r);break;case 23:case 24:Ol()}n=n.return}Ns=e,Ps=Ul(e.current,null),Rs=Hs=Bs=t,Vs=0,zs=null,$s=Is=_s=0}function Cl(e,t){for(;;){var n=Ps;try{if(ri(),Zi.current=La,ra){for(var r=ea.memoizedState;null!==r;){var o=r.queue;null!==o&&(o.pending=null),r=r.next}ra=!1}if(Qi=0,na=ta=ea=null,oa=!1,Ts.current=null,null===n||null===n.return){Vs=1,zs=t,Ps=null;break}e:{var i=e,a=n.return,s=n,l=t;if(t=Rs,s.flags|=2048,s.firstEffect=s.lastEffect=null,null!==l&&"object"===typeof l&&"function"===typeof l.then){var u=l;if(0===(2&s.mode)){var c=s.alternate;c?(s.updateQueue=c.updateQueue,s.memoizedState=c.memoizedState,s.lanes=c.lanes):(s.updateQueue=null,s.memoizedState=null)}var d=0!==(1&Vi.current),f=a;do{var p;if(p=13===f.tag){var h=f.memoizedState;if(null!==h)p=null!==h.dehydrated;else{var m=f.memoizedProps;p=void 0!==m.fallback&&(!0!==m.unstable_avoidThisFallback||!d)}}if(p){var v=f.updateQueue;if(null===v){var g=new Set;g.add(u),f.updateQueue=g}else v.add(u);if(0===(2&f.mode)){if(f.flags|=64,s.flags|=16384,s.flags&=-2981,1===s.tag)if(null===s.alternate)s.tag=17;else{var y=di(-1,1);y.tag=2,fi(s,y)}s.lanes|=1;break e}l=void 0,s=t;var b=i.pingCache;if(null===b?(b=i.pingCache=new ds,l=new Set,b.set(u,l)):void 0===(l=b.get(u))&&(l=new Set,b.set(u,l)),!l.has(s)){l.add(s);var w=_l.bind(null,i,u,s);u.then(w,w)}f.flags|=4096,f.lanes=t;break e}f=f.return}while(null!==f);l=Error((K(s.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.")}5!==Vs&&(Vs=2),l=us(l,s),f=a;do{switch(f.tag){case 3:i=l,f.flags|=4096,t&=-t,f.lanes|=t,pi(f,fs(0,i,t));break e;case 1:i=l;var k=f.type,x=f.stateNode;if(0===(64&f.flags)&&("function"===typeof k.getDerivedStateFromError||null!==x&&"function"===typeof x.componentDidCatch&&(null===Xs||!Xs.has(x)))){f.flags|=4096,t&=-t,f.lanes|=t,pi(f,ps(f,i,t));break e}}f=f.return}while(null!==f)}Tl(n)}catch(O){t=O,Ps===n&&null!==n&&(Ps=n=n.return);continue}break}}function jl(){var e=Ms.current;return Ms.current=La,null===e?La:e}function Dl(e,t){var n=Ls;Ls|=16;var r=jl();for(Ns===e&&Rs===t||Sl(e,t);;)try{El();break}catch(o){Cl(e,o)}if(ri(),Ls=n,Ms.current=r,null!==Ps)throw Error(a(261));return Ns=null,Rs=0,Vs}function El(){for(;null!==Ps;)Ml(Ps)}function Al(){for(;null!==Ps&&!Ao();)Ml(Ps)}function Ml(e){var t=Gs(e.alternate,e,Hs);e.memoizedProps=e.pendingProps,null===t?Tl(e):Ps=t,Ts.current=null}function Tl(e){var t=e;do{var n=t.alternate;if(e=t.return,0===(2048&t.flags)){if(null!==(n=ss(n,t,Hs)))return void(Ps=n);if(24!==(n=t).tag&&23!==n.tag||null===n.memoizedState||0!==(1073741824&Hs)||0===(4&n.mode)){for(var r=0,o=n.child;null!==o;)r|=o.lanes|o.childLanes,o=o.sibling;n.childLanes=r}null!==e&&0===(2048&e.flags)&&(null===e.firstEffect&&(e.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1<t.flags&&(null!==e.lastEffect?e.lastEffect.nextEffect=t:e.firstEffect=t,e.lastEffect=t))}else{if(null!==(n=ls(t)))return n.flags&=2047,void(Ps=n);null!==e&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}if(null!==(t=t.sibling))return void(Ps=t);Ps=t=e}while(null!==t);0===Vs&&(Vs=5)}function Ll(e){var t=Wo();return Ko(99,Nl.bind(null,e,t)),null}function Nl(e,t){do{Rl()}while(null!==el);if(0!==(48&Ls))throw Error(a(327));var n=e.finishedWork;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(a(177));e.callbackNode=null;var r=n.lanes|n.childLanes,o=r,i=e.pendingLanes&~o;e.pendingLanes=o,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=o,e.mutableReadLanes&=o,e.entangledLanes&=o,o=e.entanglements;for(var s=e.eventTimes,l=e.expirationTimes;0<i;){var u=31-qt(i),c=1<<u;o[u]=0,s[u]=-1,l[u]=-1,i&=~c}if(null!==ol&&0===(24&r)&&ol.has(e)&&ol.delete(e),e===Ns&&(Ps=Ns=null,Rs=0),1<n.flags?null!==n.lastEffect?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,null!==r){if(o=Ls,Ls|=32,Ts.current=null,_r=Jt,gr(s=vr())){if("selectionStart"in s)l={start:s.selectionStart,end:s.selectionEnd};else e:if(l=(l=s.ownerDocument)&&l.defaultView||window,(c=l.getSelection&&l.getSelection())&&0!==c.rangeCount){l=c.anchorNode,i=c.anchorOffset,u=c.focusNode,c=c.focusOffset;try{l.nodeType,u.nodeType}catch(j){l=null;break e}var d=0,f=-1,p=-1,h=0,m=0,v=s,g=null;t:for(;;){for(var y;v!==l||0!==i&&3!==v.nodeType||(f=d+i),v!==u||0!==c&&3!==v.nodeType||(p=d+c),3===v.nodeType&&(d+=v.nodeValue.length),null!==(y=v.firstChild);)g=v,v=y;for(;;){if(v===s)break t;if(g===l&&++h===i&&(f=d),g===u&&++m===c&&(p=d),null!==(y=v.nextSibling))break;g=(v=g).parentNode}v=y}l=-1===f||-1===p?null:{start:f,end:p}}else l=null;l=l||{start:0,end:0}}else l=null;Ir={focusedElem:s,selectionRange:l},Jt=!1,cl=null,dl=!1,Js=r;do{try{Pl()}catch(j){if(null===Js)throw Error(a(330));Bl(Js,j),Js=Js.nextEffect}}while(null!==Js);cl=null,Js=r;do{try{for(s=e;null!==Js;){var b=Js.flags;if(16&b&&ye(Js.stateNode,""),128&b){var w=Js.alternate;if(null!==w){var k=w.ref;null!==k&&("function"===typeof k?k(null):k.current=null)}}switch(1038&b){case 2:xs(Js),Js.flags&=-3;break;case 6:xs(Js),Js.flags&=-3,js(Js.alternate,Js);break;case 1024:Js.flags&=-1025;break;case 1028:Js.flags&=-1025,js(Js.alternate,Js);break;case 4:js(Js.alternate,Js);break;case 8:Cs(s,l=Js);var x=l.alternate;ws(l),null!==x&&ws(x)}Js=Js.nextEffect}}catch(j){if(null===Js)throw Error(a(330));Bl(Js,j),Js=Js.nextEffect}}while(null!==Js);if(k=Ir,w=vr(),b=k.focusedElem,s=k.selectionRange,w!==b&&b&&b.ownerDocument&&mr(b.ownerDocument.documentElement,b)){null!==s&&gr(b)&&(w=s.start,void 0===(k=s.end)&&(k=w),"selectionStart"in b?(b.selectionStart=w,b.selectionEnd=Math.min(k,b.value.length)):(k=(w=b.ownerDocument||document)&&w.defaultView||window).getSelection&&(k=k.getSelection(),l=b.textContent.length,x=Math.min(s.start,l),s=void 0===s.end?x:Math.min(s.end,l),!k.extend&&x>s&&(l=s,s=x,x=l),l=hr(b,x),i=hr(b,s),l&&i&&(1!==k.rangeCount||k.anchorNode!==l.node||k.anchorOffset!==l.offset||k.focusNode!==i.node||k.focusOffset!==i.offset)&&((w=w.createRange()).setStart(l.node,l.offset),k.removeAllRanges(),x>s?(k.addRange(w),k.extend(i.node,i.offset)):(w.setEnd(i.node,i.offset),k.addRange(w))))),w=[];for(k=b;k=k.parentNode;)1===k.nodeType&&w.push({element:k,left:k.scrollLeft,top:k.scrollTop});for("function"===typeof b.focus&&b.focus(),b=0;b<w.length;b++)(k=w[b]).element.scrollLeft=k.left,k.element.scrollTop=k.top}Jt=!!_r,Ir=_r=null,e.current=n,Js=r;do{try{for(b=e;null!==Js;){var O=Js.flags;if(36&O&&gs(b,Js.alternate,Js),128&O){w=void 0;var S=Js.ref;if(null!==S){var C=Js.stateNode;Js.tag,w=C,"function"===typeof S?S(w):S.current=w}}Js=Js.nextEffect}}catch(j){if(null===Js)throw Error(a(330));Bl(Js,j),Js=Js.nextEffect}}while(null!==Js);Js=null,zo(),Ls=o}else e.current=n;if(Qs)Qs=!1,el=e,tl=t;else for(Js=r;null!==Js;)t=Js.nextEffect,Js.nextEffect=null,8&Js.flags&&((O=Js).sibling=null,O.stateNode=null),Js=t;if(0===(r=e.pendingLanes)&&(Xs=null),1===r?e===al?il++:(il=0,al=e):il=0,n=n.stateNode,Co&&"function"===typeof Co.onCommitFiberRoot)try{Co.onCommitFiberRoot(So,n,void 0,64===(64&n.current.flags))}catch(j){}if(vl(e,qo()),Ys)throw Ys=!1,e=Zs,Zs=null,e;return 0!==(8&Ls)||Jo(),null}function Pl(){for(;null!==Js;){var e=Js.alternate;dl||null===cl||(0!==(8&Js.flags)?et(Js,cl)&&(dl=!0):13===Js.tag&&Es(e,Js)&&et(Js,cl)&&(dl=!0));var t=Js.flags;0!==(256&t)&&vs(e,Js),0===(512&t)||Qs||(Qs=!0,Go(97,(function(){return Rl(),null}))),Js=Js.nextEffect}}function Rl(){if(90!==tl){var e=97<tl?97:tl;return tl=90,Ko(e,Vl)}return!1}function Hl(e,t){nl.push(t,e),Qs||(Qs=!0,Go(97,(function(){return Rl(),null})))}function Fl(e,t){rl.push(t,e),Qs||(Qs=!0,Go(97,(function(){return Rl(),null})))}function Vl(){if(null===el)return!1;var e=el;if(el=null,0!==(48&Ls))throw Error(a(331));var t=Ls;Ls|=32;var n=rl;rl=[];for(var r=0;r<n.length;r+=2){var o=n[r],i=n[r+1],s=o.destroy;if(o.destroy=void 0,"function"===typeof s)try{s()}catch(u){if(null===i)throw Error(a(330));Bl(i,u)}}for(n=nl,nl=[],r=0;r<n.length;r+=2){o=n[r],i=n[r+1];try{var l=o.create;o.destroy=l()}catch(u){if(null===i)throw Error(a(330));Bl(i,u)}}for(l=e.current.firstEffect;null!==l;)e=l.nextEffect,l.nextEffect=null,8&l.flags&&(l.sibling=null,l.stateNode=null),l=e;return Ls=t,Jo(),!0}function zl(e,t,n){fi(e,t=fs(0,t=us(n,t),1)),t=fl(),null!==(e=ml(e,1))&&($t(e,1,t),vl(e,t))}function Bl(e,t){if(3===e.tag)zl(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){zl(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"===typeof n.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===Xs||!Xs.has(r))){var o=ps(n,e=us(t,e),1);if(fi(n,o),o=fl(),null!==(n=ml(n,1)))$t(n,1,o),vl(n,o);else if("function"===typeof r.componentDidCatch&&(null===Xs||!Xs.has(r)))try{r.componentDidCatch(t,e)}catch(i){}break}}n=n.return}}function _l(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=fl(),e.pingedLanes|=e.suspendedLanes&n,Ns===e&&(Rs&n)===n&&(4===Vs||3===Vs&&(62914560&Rs)===Rs&&500>qo()-Ws?Sl(e,0):$s|=n),vl(e,t)}function Il(e,t){var n=e.stateNode;null!==n&&n.delete(t),0===(t=0)&&(0===(2&(t=e.mode))?t=1:0===(4&t)?t=99===Wo()?1:2:(0===ll&&(ll=Bs),0===(t=_t(62914560&~ll))&&(t=4194304))),n=fl(),null!==(e=ml(e,t))&&($t(e,t,n),vl(e,n))}function $l(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.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function ql(e,t,n,r){return new $l(e,t,n,r)}function Wl(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Ul(e,t){var n=e.alternate;return null===n?((n=ql(e.tag,t,e.key,e.mode)).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.nextEffect=null,n.firstEffect=null,n.lastEffect=null),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=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Kl(e,t,n,r,o,i){var s=2;if(r=e,"function"===typeof e)Wl(e)&&(s=1);else if("string"===typeof e)s=5;else e:switch(e){case S:return Gl(n.children,o,i,t);case H:s=8,o|=16;break;case C:s=8,o|=1;break;case j:return(e=ql(12,n,t,8|o)).elementType=j,e.type=j,e.lanes=i,e;case M:return(e=ql(13,n,t,o)).type=M,e.elementType=M,e.lanes=i,e;case T:return(e=ql(19,n,t,o)).elementType=T,e.lanes=i,e;case F:return Jl(n,o,i,t);case V:return(e=ql(24,n,t,o)).elementType=V,e.lanes=i,e;default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case D:s=10;break e;case E:s=9;break e;case A:s=11;break e;case L:s=14;break e;case N:s=16,r=null;break e;case P:s=22;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=ql(s,n,t,o)).elementType=e,t.type=r,t.lanes=i,t}function Gl(e,t,n,r){return(e=ql(7,e,r,t)).lanes=n,e}function Jl(e,t,n,r){return(e=ql(23,e,r,t)).elementType=F,e.lanes=n,e}function Yl(e,t,n){return(e=ql(6,e,null,t)).lanes=n,e}function Zl(e,t,n){return(t=ql(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Xl(e,t,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=It(0),this.expirationTimes=It(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=It(0),this.mutableSourceEagerHydrationData=null}function Ql(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:O,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function eu(e,t,n,r){var o=t.current,i=fl(),s=pl(o);e:if(n){t:{if(Ye(n=n._reactInternals)!==n||1!==n.tag)throw Error(a(170));var l=n;do{switch(l.tag){case 3:l=l.stateNode.context;break t;case 1:if(yo(l.type)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break t}}l=l.return}while(null!==l);throw Error(a(171))}if(1===n.tag){var u=n.type;if(yo(u)){n=ko(n,u,l);break e}}n=l}else n=po;return null===t.context?t.context=n:t.pendingContext=n,(t=di(i,s)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),fi(o,t),hl(o,s,i),s}function tu(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function nu(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function ru(e,t){nu(e,t),(e=e.alternate)&&nu(e,t)}function ou(e,t,n){var r=null!=n&&null!=n.hydrationOptions&&n.hydrationOptions.mutableSources||null;if(n=new Xl(e,t,null!=n&&!0===n.hydrate),t=ql(3,null,null,2===t?7:1===t?3:0),n.current=t,t.stateNode=n,ui(t),e[eo]=n.current,Lr(8===e.nodeType?e.parentNode:e),r)for(e=0;e<r.length;e++){var o=(t=r[e])._getVersion;o=o(t._source),null==n.mutableSourceEagerHydrationData?n.mutableSourceEagerHydrationData=[t,o]:n.mutableSourceEagerHydrationData.push(t,o)}this._internalRoot=n}function iu(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function au(e,t,n,r,o){var i=n._reactRootContainer;if(i){var a=i._internalRoot;if("function"===typeof o){var s=o;o=function(){var e=tu(a);s.call(e)}}eu(t,a,e,o)}else{if(i=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new ou(e,0,t?{hydrate:!0}:void 0)}(n,r),a=i._internalRoot,"function"===typeof o){var l=o;o=function(){var e=tu(a);l.call(e)}}kl((function(){eu(t,a,e,o)}))}return tu(a)}function su(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!iu(t))throw Error(a(200));return Ql(e,t,null,n)}Gs=function(e,t,n){var r=t.lanes;if(null!==e)if(e.memoizedProps!==t.pendingProps||mo.current)Fa=!0;else{if(0===(n&r)){switch(Fa=!1,t.tag){case 3:Ka(t),Gi();break;case 5:Hi(t);break;case 1:yo(t.type)&&xo(t);break;case 4:Pi(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var o=t.type._context;fo(Qo,o._currentValue),o._currentValue=r;break;case 13:if(null!==t.memoizedState)return 0!==(n&t.child.childLanes)?Xa(e,t,n):(fo(Vi,1&Vi.current),null!==(t=is(e,t,n))?t.sibling:null);fo(Vi,1&Vi.current);break;case 19:if(r=0!==(n&t.childLanes),0!==(64&e.flags)){if(r)return os(e,t,n);t.flags|=64}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null,o.lastEffect=null),fo(Vi,Vi.current),r)break;return null;case 23:case 24:return t.lanes=0,Ia(e,t,n)}return is(e,t,n)}Fa=0!==(16384&e.flags)}else Fa=!1;switch(t.lanes=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,o=go(t,ho.current),ai(t,n),o=sa(null,t,r,e,o,n),t.flags|=1,"object"===typeof o&&null!==o&&"function"===typeof o.render&&void 0===o.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,yo(r)){var i=!0;xo(t)}else i=!1;t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,ui(t);var s=r.getDerivedStateFromProps;"function"===typeof s&&gi(t,r,s,e),o.updater=yi,t.stateNode=o,o._reactInternals=t,xi(t,r,e,n),t=Ua(null,t,r,!0,i,n)}else t.tag=0,Va(null,t,o,n),t=t.child;return t;case 16:o=t.elementType;e:{switch(null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,o=(i=o._init)(o._payload),t.type=o,i=t.tag=function(e){if("function"===typeof e)return Wl(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===A)return 11;if(e===L)return 14}return 2}(o),e=Xo(o,e),i){case 0:t=qa(null,t,o,e,n);break e;case 1:t=Wa(null,t,o,e,n);break e;case 11:t=za(null,t,o,e,n);break e;case 14:t=Ba(null,t,o,Xo(o.type,e),r,n);break e}throw Error(a(306,o,""))}return t;case 0:return r=t.type,o=t.pendingProps,qa(e,t,r,o=t.elementType===r?o:Xo(r,o),n);case 1:return r=t.type,o=t.pendingProps,Wa(e,t,r,o=t.elementType===r?o:Xo(r,o),n);case 3:if(Ka(t),r=t.updateQueue,null===e||null===r)throw Error(a(282));if(r=t.pendingProps,o=null!==(o=t.memoizedState)?o.element:null,ci(e,t),hi(t,r,null,n),(r=t.memoizedState.element)===o)Gi(),t=is(e,t,n);else{if((i=(o=t.stateNode).hydrate)&&(_i=Gr(t.stateNode.containerInfo.firstChild),Bi=t,i=Ii=!0),i){if(null!=(e=o.mutableSourceEagerHydrationData))for(o=0;o<e.length;o+=2)(i=e[o])._workInProgressVersionPrimary=e[o+1],Ji.push(i);for(n=Ei(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|1024,n=n.sibling}else Va(e,t,r,n),Gi();t=t.child}return t;case 5:return Hi(t),null===e&&Wi(t),r=t.type,o=t.pendingProps,i=null!==e?e.memoizedProps:null,s=o.children,qr(r,o)?s=null:null!==i&&qr(r,i)&&(t.flags|=16),$a(e,t),Va(e,t,s,n),t.child;case 6:return null===e&&Wi(t),null;case 13:return Xa(e,t,n);case 4:return Pi(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Di(t,null,r,n):Va(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,za(e,t,r,o=t.elementType===r?o:Xo(r,o),n);case 7:return Va(e,t,t.pendingProps,n),t.child;case 8:case 12:return Va(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,o=t.pendingProps,s=t.memoizedProps,i=o.value;var l=t.type._context;if(fo(Qo,l._currentValue),l._currentValue=i,null!==s)if(l=s.value,0===(i=cr(l,i)?0:0|("function"===typeof r._calculateChangedBits?r._calculateChangedBits(l,i):1073741823))){if(s.children===o.children&&!mo.current){t=is(e,t,n);break e}}else for(null!==(l=t.child)&&(l.return=t);null!==l;){var u=l.dependencies;if(null!==u){s=l.child;for(var c=u.firstContext;null!==c;){if(c.context===r&&0!==(c.observedBits&i)){1===l.tag&&((c=di(-1,n&-n)).tag=2,fi(l,c)),l.lanes|=n,null!==(c=l.alternate)&&(c.lanes|=n),ii(l.return,n),u.lanes|=n;break}c=c.next}}else s=10===l.tag&&l.type===t.type?null:l.child;if(null!==s)s.return=l;else for(s=l;null!==s;){if(s===t){s=null;break}if(null!==(l=s.sibling)){l.return=s.return,s=l;break}s=s.return}l=s}Va(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=(i=t.pendingProps).children,ai(t,n),r=r(o=si(o,i.unstable_observedBits)),t.flags|=1,Va(e,t,r,n),t.child;case 14:return i=Xo(o=t.type,t.pendingProps),Ba(e,t,o,i=Xo(o.type,i),r,n);case 15:return _a(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Xo(r,o),null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,yo(r)?(e=!0,xo(t)):e=!1,ai(t,n),wi(t,r,o),xi(t,r,o,n),Ua(null,t,r,!0,e,n);case 19:return os(e,t,n);case 23:case 24:return Ia(e,t,n)}throw Error(a(156,t.tag))},ou.prototype.render=function(e){eu(e,this._internalRoot,null,null)},ou.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;eu(null,e,null,(function(){t[eo]=null}))},tt=function(e){13===e.tag&&(hl(e,4,fl()),ru(e,4))},nt=function(e){13===e.tag&&(hl(e,67108864,fl()),ru(e,67108864))},rt=function(e){if(13===e.tag){var t=fl(),n=pl(e);hl(e,n,t),ru(e,n)}},ot=function(e,t){return t()},De=function(e,t,n){switch(t){case"input":if(ne(e,n),t=n.name,"radio"===n.type&&null!=t){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 r=n[t];if(r!==e&&r.form===e.form){var o=io(r);if(!o)throw Error(a(90));Z(r),ne(r,o)}}}break;case"textarea":ue(e,n);break;case"select":null!=(t=n.value)&&ae(e,!!n.multiple,t,!1)}},Ne=wl,Pe=function(e,t,n,r,o){var i=Ls;Ls|=4;try{return Ko(98,e.bind(null,t,n,r,o))}finally{0===(Ls=i)&&(Ks(),Jo())}},Re=function(){0===(49&Ls)&&(function(){if(null!==ol){var e=ol;ol=null,e.forEach((function(e){e.expiredLanes|=24&e.pendingLanes,vl(e,qo())}))}Jo()}(),Rl())},He=function(e,t){var n=Ls;Ls|=2;try{return e(t)}finally{0===(Ls=n)&&(Ks(),Jo())}};var lu={Events:[ro,oo,io,Te,Le,Rl,{current:!1}]},uu={findFiberByHostInstance:no,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},cu={bundleType:uu.bundleType,version:uu.version,rendererPackageName:uu.rendererPackageName,rendererConfig:uu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:k.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Qe(e))?null:e.stateNode},findFiberByHostInstance:uu.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var du=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!du.isDisabled&&du.supportsFiber)try{So=du.inject(cu),Co=du}catch(ve){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=lu,t.createPortal=su,t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"===typeof e.render)throw Error(a(188));throw Error(a(268,Object.keys(e)))}return e=null===(e=Qe(t))?null:e.stateNode},t.flushSync=function(e,t){var n=Ls;if(0!==(48&n))return e(t);Ls|=1;try{if(e)return Ko(99,e.bind(null,t))}finally{Ls=n,Jo()}},t.hydrate=function(e,t,n){if(!iu(t))throw Error(a(200));return au(null,e,t,!0,n)},t.render=function(e,t,n){if(!iu(t))throw Error(a(200));return au(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!iu(e))throw Error(a(40));return!!e._reactRootContainer&&(kl((function(){au(null,null,e,!1,(function(){e._reactRootContainer=null,e[eo]=null}))})),!0)},t.unstable_batchedUpdates=wl,t.unstable_createPortal=function(e,t){return su(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!iu(n))throw Error(a(200));if(null==e||void 0===e._reactInternals)throw Error(a(38));return au(e,t,n,!1,r)},t.version="17.0.2"},function(e,t,n){"use strict";e.exports=n(82)},function(e,t,n){"use strict";var r,o,i,a;if("object"===typeof performance&&"function"===typeof performance.now){var s=performance;t.unstable_now=function(){return s.now()}}else{var l=Date,u=l.now();t.unstable_now=function(){return l.now()-u}}if("undefined"===typeof window||"function"!==typeof MessageChannel){var c=null,d=null,f=function e(){if(null!==c)try{var n=t.unstable_now();c(!0,n),c=null}catch(r){throw setTimeout(e,0),r}};r=function(e){null!==c?setTimeout(r,0,e):(c=e,setTimeout(f,0))},o=function(e,t){d=setTimeout(e,t)},i=function(){clearTimeout(d)},t.unstable_shouldYield=function(){return!1},a=t.unstable_forceFrameRate=function(){}}else{var p=window.setTimeout,h=window.clearTimeout;if("undefined"!==typeof console){var m=window.cancelAnimationFrame;"function"!==typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),"function"!==typeof m&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var v=!1,g=null,y=-1,b=5,w=0;t.unstable_shouldYield=function(){return t.unstable_now()>=w},a=function(){},t.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"):b=0<e?Math.floor(1e3/e):5};var k=new MessageChannel,x=k.port2;k.port1.onmessage=function(){if(null!==g){var e=t.unstable_now();w=e+b;try{g(!0,e)?x.postMessage(null):(v=!1,g=null)}catch(n){throw x.postMessage(null),n}}else v=!1},r=function(e){g=e,v||(v=!0,x.postMessage(null))},o=function(e,n){y=p((function(){e(t.unstable_now())}),n)},i=function(){h(y),y=-1}}function O(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,o=e[r];if(!(void 0!==o&&0<j(o,t)))break e;e[r]=t,e[n]=o,n=r}}function S(e){return void 0===(e=e[0])?null:e}function C(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length;r<o;){var i=2*(r+1)-1,a=e[i],s=i+1,l=e[s];if(void 0!==a&&0>j(a,n))void 0!==l&&0>j(l,a)?(e[r]=l,e[s]=n,r=s):(e[r]=a,e[i]=n,r=i);else{if(!(void 0!==l&&0>j(l,n)))break e;e[r]=l,e[s]=n,r=s}}}return t}return null}function j(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var D=[],E=[],A=1,M=null,T=3,L=!1,N=!1,P=!1;function R(e){for(var t=S(E);null!==t;){if(null===t.callback)C(E);else{if(!(t.startTime<=e))break;C(E),t.sortIndex=t.expirationTime,O(D,t)}t=S(E)}}function H(e){if(P=!1,R(e),!N)if(null!==S(D))N=!0,r(F);else{var t=S(E);null!==t&&o(H,t.startTime-e)}}function F(e,n){N=!1,P&&(P=!1,i()),L=!0;var r=T;try{for(R(n),M=S(D);null!==M&&(!(M.expirationTime>n)||e&&!t.unstable_shouldYield());){var a=M.callback;if("function"===typeof a){M.callback=null,T=M.priorityLevel;var s=a(M.expirationTime<=n);n=t.unstable_now(),"function"===typeof s?M.callback=s:M===S(D)&&C(D),R(n)}else C(D);M=S(D)}if(null!==M)var l=!0;else{var u=S(E);null!==u&&o(H,u.startTime-n),l=!1}return l}finally{M=null,T=r,L=!1}}var V=a;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){N||L||(N=!0,r(F))},t.unstable_getCurrentPriorityLevel=function(){return T},t.unstable_getFirstCallbackNode=function(){return S(D)},t.unstable_next=function(e){switch(T){case 1:case 2:case 3:var t=3;break;default:t=T}var n=T;T=t;try{return e()}finally{T=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=V,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=T;T=e;try{return t()}finally{T=n}},t.unstable_scheduleCallback=function(e,n,a){var s=t.unstable_now();switch("object"===typeof a&&null!==a?a="number"===typeof(a=a.delay)&&0<a?s+a:s:a=s,e){case 1:var l=-1;break;case 2:l=250;break;case 5:l=1073741823;break;case 4:l=1e4;break;default:l=5e3}return e={id:A++,callback:n,priorityLevel:e,startTime:a,expirationTime:l=a+l,sortIndex:-1},a>s?(e.sortIndex=a,O(E,e),null===S(D)&&e===S(E)&&(P?i():P=!0,o(H,a-s))):(e.sortIndex=l,O(D,e),N||L||(N=!0,r(F))),e},t.unstable_wrapCallback=function(e){var t=T;return function(){var n=T;T=t;try{return e.apply(this,arguments)}finally{T=n}}}},,,function(e,t,n){"use strict";n(19);var r=n(1),o=60103;if(t.Fragment=60107,"function"===typeof Symbol&&Symbol.for){var i=Symbol.for;o=i("react.element"),t.Fragment=i("react.fragment")}var a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s=Object.prototype.hasOwnProperty,l={key:!0,ref:!0,__self:!0,__source:!0};function u(e,t,n){var r,i={},u=null,c=null;for(r in void 0!==n&&(u=""+n),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(c=t.ref),t)s.call(t,r)&&!l.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:u,ref:c,props:i,_owner:a.current}}t.jsx=u,t.jsxs=u},function(e,t,n){var r=n(87);e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,n(t,r)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";e.exports=n(89)},function(e,t,n){"use strict";var r="function"===typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,l=r?Symbol.for("react.profiler"):60114,u=r?Symbol.for("react.provider"):60109,c=r?Symbol.for("react.context"):60110,d=r?Symbol.for("react.async_mode"):60111,f=r?Symbol.for("react.concurrent_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,h=r?Symbol.for("react.suspense"):60113,m=r?Symbol.for("react.suspense_list"):60120,v=r?Symbol.for("react.memo"):60115,g=r?Symbol.for("react.lazy"):60116,y=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,w=r?Symbol.for("react.responder"):60118,k=r?Symbol.for("react.scope"):60119;function x(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case d:case f:case a:case l:case s:case h:return e;default:switch(e=e&&e.$$typeof){case c:case p:case g:case v:case u:return e;default:return t}}case i:return t}}}function O(e){return x(e)===f}t.AsyncMode=d,t.ConcurrentMode=f,t.ContextConsumer=c,t.ContextProvider=u,t.Element=o,t.ForwardRef=p,t.Fragment=a,t.Lazy=g,t.Memo=v,t.Portal=i,t.Profiler=l,t.StrictMode=s,t.Suspense=h,t.isAsyncMode=function(e){return O(e)||x(e)===d},t.isConcurrentMode=O,t.isContextConsumer=function(e){return x(e)===c},t.isContextProvider=function(e){return x(e)===u},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return x(e)===p},t.isFragment=function(e){return x(e)===a},t.isLazy=function(e){return x(e)===g},t.isMemo=function(e){return x(e)===v},t.isPortal=function(e){return x(e)===i},t.isProfiler=function(e){return x(e)===l},t.isStrictMode=function(e){return x(e)===s},t.isSuspense=function(e){return x(e)===h},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===a||e===f||e===l||e===s||e===h||e===m||"object"===typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===v||e.$$typeof===u||e.$$typeof===c||e.$$typeof===p||e.$$typeof===b||e.$$typeof===w||e.$$typeof===k||e.$$typeof===y)},t.typeOf=x},function(e,t,n){"use strict";var r=n(19),o="function"===typeof Symbol&&Symbol.for,i=o?Symbol.for("react.element"):60103,a=o?Symbol.for("react.portal"):60106,s=o?Symbol.for("react.fragment"):60107,l=o?Symbol.for("react.strict_mode"):60108,u=o?Symbol.for("react.profiler"):60114,c=o?Symbol.for("react.provider"):60109,d=o?Symbol.for("react.context"):60110,f=o?Symbol.for("react.forward_ref"):60112,p=o?Symbol.for("react.suspense"):60113,h=o?Symbol.for("react.memo"):60115,m=o?Symbol.for("react.lazy"):60116,v="function"===typeof Symbol&&Symbol.iterator;function g(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 y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b={};function w(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||y}function k(){}function x(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||y}w.prototype.isReactComponent={},w.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error(g(85));this.updater.enqueueSetState(this,e,t,"setState")},w.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},k.prototype=w.prototype;var O=x.prototype=new k;O.constructor=x,r(O,w.prototype),O.isPureReactComponent=!0;var S={current:null},C=Object.prototype.hasOwnProperty,j={key:!0,ref:!0,__self:!0,__source:!0};function D(e,t,n){var r,o={},a=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)C.call(t,r)&&!j.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(1===l)o.children=n;else if(1<l){for(var u=Array(l),c=0;c<l;c++)u[c]=arguments[c+2];o.children=u}if(e&&e.defaultProps)for(r in l=e.defaultProps)void 0===o[r]&&(o[r]=l[r]);return{$$typeof:i,type:e,key:a,ref:s,props:o,_owner:S.current}}function E(e){return"object"===typeof e&&null!==e&&e.$$typeof===i}var A=/\/+/g,M=[];function T(e,t,n,r){if(M.length){var o=M.pop();return o.result=e,o.keyPrefix=t,o.func=n,o.context=r,o.count=0,o}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function L(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>M.length&&M.push(e)}function N(e,t,n,r){var o=typeof e;"undefined"!==o&&"boolean"!==o||(e=null);var s=!1;if(null===e)s=!0;else switch(o){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case i:case a:s=!0}}if(s)return n(r,e,""===t?"."+R(e,0):t),1;if(s=0,t=""===t?".":t+":",Array.isArray(e))for(var l=0;l<e.length;l++){var u=t+R(o=e[l],l);s+=N(o,u,n,r)}else if(null===e||"object"!==typeof e?u=null:u="function"===typeof(u=v&&e[v]||e["@@iterator"])?u:null,"function"===typeof u)for(e=u.call(e),l=0;!(o=e.next()).done;)s+=N(o=o.value,u=t+R(o,l++),n,r);else if("object"===o)throw n=""+e,Error(g(31,"[object Object]"===n?"object with keys {"+Object.keys(e).join(", ")+"}":n,""));return s}function P(e,t,n){return null==e?0:N(e,"",t,n)}function R(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,(function(e){return t[e]}))}(e.key):t.toString(36)}function H(e,t){e.func.call(e.context,t,e.count++)}function F(e,t,n){var r=e.result,o=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?V(e,r,n,(function(e){return e})):null!=e&&(E(e)&&(e=function(e,t){return{$$typeof:i,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(e,o+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(A,"$&/")+"/")+n)),r.push(e))}function V(e,t,n,r,o){var i="";null!=n&&(i=(""+n).replace(A,"$&/")+"/"),P(e,F,t=T(t,i,r,o)),L(t)}var z={current:null};function B(){var e=z.current;if(null===e)throw Error(g(321));return e}var _={ReactCurrentDispatcher:z,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:S,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:function(e,t,n){if(null==e)return e;var r=[];return V(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;P(e,H,t=T(null,null,t,n)),L(t)},count:function(e){return P(e,(function(){return null}),null)},toArray:function(e){var t=[];return V(e,t,null,(function(e){return e})),t},only:function(e){if(!E(e))throw Error(g(143));return e}},t.Component=w,t.Fragment=s,t.Profiler=u,t.PureComponent=x,t.StrictMode=l,t.Suspense=p,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=_,t.cloneElement=function(e,t,n){if(null===e||void 0===e)throw Error(g(267,e));var o=r({},e.props),a=e.key,s=e.ref,l=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,l=S.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var u=e.type.defaultProps;for(c in t)C.call(t,c)&&!j.hasOwnProperty(c)&&(o[c]=void 0===t[c]&&void 0!==u?u[c]:t[c])}var c=arguments.length-2;if(1===c)o.children=n;else if(1<c){u=Array(c);for(var d=0;d<c;d++)u[d]=arguments[d+2];o.children=u}return{$$typeof:i,type:e.type,key:a,ref:s,props:o,_owner:l}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:d,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:c,_context:e},e.Consumer=e},t.createElement=D,t.createFactory=function(e){var t=D.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:f,render:e}},t.isValidElement=E,t.lazy=function(e){return{$$typeof:m,_ctor:e,_status:-1,_result:null}},t.memo=function(e,t){return{$$typeof:h,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return B().useCallback(e,t)},t.useContext=function(e,t){return B().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return B().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return B().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return B().useLayoutEffect(e,t)},t.useMemo=function(e,t){return B().useMemo(e,t)},t.useReducer=function(e,t,n){return B().useReducer(e,t,n)},t.useRef=function(e){return B().useRef(e)},t.useState=function(e){return B().useState(e)},t.version="16.14.0"},function(e,t,n){"use strict";var r=n(92);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bodyOpenClassName=t.portalClassName=void 0;var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(1),a=h(i),s=h(n(25)),l=h(n(50)),u=h(n(94)),c=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(54)),d=n(51),f=h(d),p=n(101);function h(e){return e&&e.__esModule?e:{default:e}}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}var g=t.portalClassName="ReactModalPortal",y=t.bodyOpenClassName="ReactModal__Body--open",b=d.canUseDOM&&void 0!==s.default.createPortal,w=function(e){return document.createElement(e)},k=function(){return b?s.default.createPortal:s.default.unstable_renderSubtreeIntoContainer};function x(e){return e()}var O=function(e){function t(){var e,n,o;m(this,t);for(var i=arguments.length,l=Array(i),c=0;c<i;c++)l[c]=arguments[c];return n=o=v(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(l))),o.removePortal=function(){!b&&s.default.unmountComponentAtNode(o.node);var e=x(o.props.parentSelector);e&&e.contains(o.node)?e.removeChild(o.node):console.warn('React-Modal: "parentSelector" prop did not returned any DOM element. Make sure that the parent element is unmounted to avoid any memory leaks.')},o.portalRef=function(e){o.portal=e},o.renderPortal=function(e){var n=k()(o,a.default.createElement(u.default,r({defaultStyles:t.defaultStyles},e)),o.node);o.portalRef(n)},v(o,n)}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"componentDidMount",value:function(){d.canUseDOM&&(b||(this.node=w("div")),this.node.className=this.props.portalClassName,x(this.props.parentSelector).appendChild(this.node),!b&&this.renderPortal(this.props))}},{key:"getSnapshotBeforeUpdate",value:function(e){return{prevParent:x(e.parentSelector),nextParent:x(this.props.parentSelector)}}},{key:"componentDidUpdate",value:function(e,t,n){if(d.canUseDOM){var r=this.props,o=r.isOpen,i=r.portalClassName;e.portalClassName!==i&&(this.node.className=i);var a=n.prevParent,s=n.nextParent;s!==a&&(a.removeChild(this.node),s.appendChild(this.node)),(e.isOpen||o)&&!b&&this.renderPortal(this.props)}}},{key:"componentWillUnmount",value:function(){if(d.canUseDOM&&this.node&&this.portal){var e=this.portal.state,t=Date.now(),n=e.isOpen&&this.props.closeTimeoutMS&&(e.closesAt||t+this.props.closeTimeoutMS);n?(e.beforeClose||this.portal.closeWithTimeout(),setTimeout(this.removePortal,n-t)):this.removePortal()}}},{key:"render",value:function(){return d.canUseDOM&&b?(!this.node&&b&&(this.node=w("div")),k()(a.default.createElement(u.default,r({ref:this.portalRef,defaultStyles:t.defaultStyles},this.props)),this.node)):null}}],[{key:"setAppElement",value:function(e){c.setElement(e)}}]),t}(i.Component);O.propTypes={isOpen:l.default.bool.isRequired,style:l.default.shape({content:l.default.object,overlay:l.default.object}),portalClassName:l.default.string,bodyOpenClassName:l.default.string,htmlOpenClassName:l.default.string,className:l.default.oneOfType([l.default.string,l.default.shape({base:l.default.string.isRequired,afterOpen:l.default.string.isRequired,beforeClose:l.default.string.isRequired})]),overlayClassName:l.default.oneOfType([l.default.string,l.default.shape({base:l.default.string.isRequired,afterOpen:l.default.string.isRequired,beforeClose:l.default.string.isRequired})]),appElement:l.default.oneOfType([l.default.instanceOf(f.default),l.default.instanceOf(d.SafeHTMLCollection),l.default.instanceOf(d.SafeNodeList),l.default.arrayOf(l.default.instanceOf(f.default))]),onAfterOpen:l.default.func,onRequestClose:l.default.func,closeTimeoutMS:l.default.number,ariaHideApp:l.default.bool,shouldFocusAfterRender:l.default.bool,shouldCloseOnOverlayClick:l.default.bool,shouldReturnFocusAfterClose:l.default.bool,preventScroll:l.default.bool,parentSelector:l.default.func,aria:l.default.object,data:l.default.object,role:l.default.string,contentLabel:l.default.string,shouldCloseOnEsc:l.default.bool,overlayRef:l.default.func,contentRef:l.default.func,id:l.default.string,overlayElement:l.default.func,contentElement:l.default.func},O.defaultProps={isOpen:!1,portalClassName:g,bodyOpenClassName:y,role:"dialog",ariaHideApp:!0,closeTimeoutMS:0,shouldFocusAfterRender:!0,shouldCloseOnEsc:!0,shouldCloseOnOverlayClick:!0,shouldReturnFocusAfterClose:!0,preventScroll:!1,parentSelector:function(){return document.body},overlayElement:function(e,t){return a.default.createElement("div",e,t)},contentElement:function(e,t){return a.default.createElement("div",e,t)}},O.defaultStyles={overlay:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(255, 255, 255, 0.75)"},content:{position:"absolute",top:"40px",left:"40px",right:"40px",bottom:"40px",border:"1px solid #ccc",background:"#fff",overflow:"auto",WebkitOverflowScrolling:"touch",borderRadius:"4px",outline:"none",padding:"20px"}},(0,p.polyfill)(O),t.default=O},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(1),s=v(n(50)),l=m(n(95)),u=v(n(96)),c=m(n(54)),d=m(n(99)),f=n(51),p=v(f),h=v(n(55));function m(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function v(e){return e&&e.__esModule?e:{default:e}}n(100);var g={overlay:"ReactModal__Overlay",content:"ReactModal__Content"},y=0,b=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.setOverlayRef=function(e){n.overlay=e,n.props.overlayRef&&n.props.overlayRef(e)},n.setContentRef=function(e){n.content=e,n.props.contentRef&&n.props.contentRef(e)},n.afterClose=function(){var e=n.props,t=e.appElement,r=e.ariaHideApp,o=e.htmlOpenClassName,i=e.bodyOpenClassName;i&&d.remove(document.body,i),o&&d.remove(document.getElementsByTagName("html")[0],o),r&&y>0&&0===(y-=1)&&c.show(t),n.props.shouldFocusAfterRender&&(n.props.shouldReturnFocusAfterClose?(l.returnFocus(n.props.preventScroll),l.teardownScopedFocus()):l.popWithoutFocus()),n.props.onAfterClose&&n.props.onAfterClose(),h.default.deregister(n)},n.open=function(){n.beforeOpen(),n.state.afterOpen&&n.state.beforeClose?(clearTimeout(n.closeTimer),n.setState({beforeClose:!1})):(n.props.shouldFocusAfterRender&&(l.setupScopedFocus(n.node),l.markForFocusLater()),n.setState({isOpen:!0},(function(){n.openAnimationFrame=requestAnimationFrame((function(){n.setState({afterOpen:!0}),n.props.isOpen&&n.props.onAfterOpen&&n.props.onAfterOpen({overlayEl:n.overlay,contentEl:n.content})}))})))},n.close=function(){n.props.closeTimeoutMS>0?n.closeWithTimeout():n.closeWithoutTimeout()},n.focusContent=function(){return n.content&&!n.contentHasFocus()&&n.content.focus({preventScroll:!0})},n.closeWithTimeout=function(){var e=Date.now()+n.props.closeTimeoutMS;n.setState({beforeClose:!0,closesAt:e},(function(){n.closeTimer=setTimeout(n.closeWithoutTimeout,n.state.closesAt-Date.now())}))},n.closeWithoutTimeout=function(){n.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},n.afterClose)},n.handleKeyDown=function(e){9===e.keyCode&&(0,u.default)(n.content,e),n.props.shouldCloseOnEsc&&27===e.keyCode&&(e.stopPropagation(),n.requestClose(e))},n.handleOverlayOnClick=function(e){null===n.shouldClose&&(n.shouldClose=!0),n.shouldClose&&n.props.shouldCloseOnOverlayClick&&(n.ownerHandlesClose()?n.requestClose(e):n.focusContent()),n.shouldClose=null},n.handleContentOnMouseUp=function(){n.shouldClose=!1},n.handleOverlayOnMouseDown=function(e){n.props.shouldCloseOnOverlayClick||e.target!=n.overlay||e.preventDefault()},n.handleContentOnClick=function(){n.shouldClose=!1},n.handleContentOnMouseDown=function(){n.shouldClose=!1},n.requestClose=function(e){return n.ownerHandlesClose()&&n.props.onRequestClose(e)},n.ownerHandlesClose=function(){return n.props.onRequestClose},n.shouldBeClosed=function(){return!n.state.isOpen&&!n.state.beforeClose},n.contentHasFocus=function(){return document.activeElement===n.content||n.content.contains(document.activeElement)},n.buildClassName=function(e,t){var r="object"===("undefined"===typeof t?"undefined":o(t))?t:{base:g[e],afterOpen:g[e]+"--after-open",beforeClose:g[e]+"--before-close"},i=r.base;return n.state.afterOpen&&(i=i+" "+r.afterOpen),n.state.beforeClose&&(i=i+" "+r.beforeClose),"string"===typeof t&&t?i+" "+t:i},n.attributesFromObject=function(e,t){return Object.keys(t).reduce((function(n,r){return n[e+"-"+r]=t[r],n}),{})},n.state={afterOpen:!1,beforeClose:!1},n.shouldClose=null,n.moveFromContentToOverlay=null,n}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(e,t){this.props.isOpen&&!e.isOpen?this.open():!this.props.isOpen&&e.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!t.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer),cancelAnimationFrame(this.openAnimationFrame)}},{key:"beforeOpen",value:function(){var e=this.props,t=e.appElement,n=e.ariaHideApp,r=e.htmlOpenClassName,o=e.bodyOpenClassName;o&&d.add(document.body,o),r&&d.add(document.getElementsByTagName("html")[0],r),n&&(y+=1,c.hide(t)),h.default.register(this)}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.className,o=e.overlayClassName,i=e.defaultStyles,a=e.children,s=n?{}:i.content,l=o?{}:i.overlay;if(this.shouldBeClosed())return null;var u={ref:this.setOverlayRef,className:this.buildClassName("overlay",o),style:r({},l,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},c=r({id:t,ref:this.setContentRef,style:r({},s,this.props.style.content),className:this.buildClassName("content",n),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",r({modal:!0},this.props.aria)),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),d=this.props.contentElement(c,a);return this.props.overlayElement(u,d)}}]),t}(a.Component);b.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},b.propTypes={isOpen:s.default.bool.isRequired,defaultStyles:s.default.shape({content:s.default.object,overlay:s.default.object}),style:s.default.shape({content:s.default.object,overlay:s.default.object}),className:s.default.oneOfType([s.default.string,s.default.object]),overlayClassName:s.default.oneOfType([s.default.string,s.default.object]),bodyOpenClassName:s.default.string,htmlOpenClassName:s.default.string,ariaHideApp:s.default.bool,appElement:s.default.oneOfType([s.default.instanceOf(p.default),s.default.instanceOf(f.SafeHTMLCollection),s.default.instanceOf(f.SafeNodeList),s.default.arrayOf(s.default.instanceOf(p.default))]),onAfterOpen:s.default.func,onAfterClose:s.default.func,onRequestClose:s.default.func,closeTimeoutMS:s.default.number,shouldFocusAfterRender:s.default.bool,shouldCloseOnOverlayClick:s.default.bool,shouldReturnFocusAfterClose:s.default.bool,preventScroll:s.default.bool,role:s.default.string,contentLabel:s.default.string,aria:s.default.object,data:s.default.object,children:s.default.node,shouldCloseOnEsc:s.default.bool,overlayRef:s.default.func,contentRef:s.default.func,id:s.default.string,overlayElement:s.default.func,contentElement:s.default.func,testId:s.default.string},t.default=b,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){a=[]},t.log=function(){0},t.handleBlur=u,t.handleFocus=c,t.markForFocusLater=function(){a.push(document.activeElement)},t.returnFocus=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=null;try{return void(0!==a.length&&(t=a.pop()).focus({preventScroll:e}))}catch(n){console.warn(["You tried to return focus to",t,"but it is not in the DOM anymore"].join(" "))}},t.popWithoutFocus=function(){a.length>0&&a.pop()},t.setupScopedFocus=function(e){s=e,window.addEventListener?(window.addEventListener("blur",u,!1),document.addEventListener("focus",c,!0)):(window.attachEvent("onBlur",u),document.attachEvent("onFocus",c))},t.teardownScopedFocus=function(){s=null,window.addEventListener?(window.removeEventListener("blur",u),document.removeEventListener("focus",c)):(window.detachEvent("onBlur",u),document.detachEvent("onFocus",c))};var r,o=n(53),i=(r=o)&&r.__esModule?r:{default:r};var a=[],s=null,l=!1;function u(){l=!0}function c(){if(l){if(l=!1,!s)return;setTimeout((function(){s.contains(document.activeElement)||((0,i.default)(s)[0]||s).focus()}),0)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,i.default)(e);if(!n.length)return void t.preventDefault();var r=void 0,o=t.shiftKey,s=n[0],l=n[n.length-1],u=a();if(e===u){if(!o)return;r=l}l!==u||o||(r=s);s===u&&o&&(r=l);if(r)return t.preventDefault(),void r.focus();var c=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent);if(null==c||"Chrome"==c[1]||null!=/\biPod\b|\biPad\b/g.exec(navigator.userAgent))return;var d=n.indexOf(u);d>-1&&(d+=o?-1:1);if("undefined"===typeof(r=n[d]))return t.preventDefault(),void(r=o?l:s).focus();t.preventDefault(),r.focus()};var r,o=n(53),i=(r=o)&&r.__esModule?r:{default:r};function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return e.activeElement.shadowRoot?a(e.activeElement.shadowRoot):e.activeElement}e.exports=t.default},function(e,t,n){"use strict";var r=function(){};e.exports=r},function(e,t,n){var r;!function(){"use strict";var o=!("undefined"===typeof window||!window.document||!window.document.createElement),i={canUseDOM:o,canUseWorkers:"undefined"!==typeof Worker,canUseEventListeners:o&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:o&&!!window.screen};void 0===(r=function(){return i}.call(t,n,t,e))||(e.exports=r)}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){var e=document.getElementsByTagName("html")[0];for(var t in r)i(e,r[t]);var n=document.body;for(var a in o)i(n,o[a]);r={},o={}},t.log=function(){0};var r={},o={};function i(e,t){e.classList.remove(t)}t.add=function(e,t){return n=e.classList,i="html"==e.nodeName.toLowerCase()?r:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]||(e[t]=0),e[t]+=1}(i,e),n.add(e)}));var n,i},t.remove=function(e,t){return n=e.classList,i="html"==e.nodeName.toLowerCase()?r:o,void t.split(" ").forEach((function(e){!function(e,t){e[t]&&(e[t]-=1)}(i,e),0===i[e]&&n.remove(e)}));var n,i}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){for(var e=[a,s],t=0;t<e.length;t++){var n=e[t];n&&(n.parentNode&&n.parentNode.removeChild(n))}a=s=null,l=[]},t.log=function(){console.log("bodyTrap ----------"),console.log(l.length);for(var e=[a,s],t=0;t<e.length;t++){var n=e[t]||{};console.log(n.nodeName,n.className,n.id)}console.log("edn bodyTrap ----------")};var r,o=n(55),i=(r=o)&&r.__esModule?r:{default:r};var a=void 0,s=void 0,l=[];function u(){0!==l.length&&l[l.length-1].focusContent()}i.default.subscribe((function(e,t){a||s||((a=document.createElement("div")).setAttribute("data-react-modal-body-trap",""),a.style.position="absolute",a.style.opacity="0",a.setAttribute("tabindex","0"),a.addEventListener("focus",u),(s=a.cloneNode()).addEventListener("focus",u)),(l=t).length>0?(document.body.firstChild!==a&&document.body.insertBefore(a,document.body.firstChild),document.body.lastChild!==s&&document.body.appendChild(s)):(a.parentElement&&a.parentElement.removeChild(a),s.parentElement&&s.parentElement.removeChild(s))}))},function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!==e&&void 0!==e&&this.setState(e)}function o(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!==n&&void 0!==n?n:null}.bind(this))}function i(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function a(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!==typeof e.getDerivedStateFromProps&&"function"!==typeof t.getSnapshotBeforeUpdate)return e;var n=null,a=null,s=null;if("function"===typeof t.componentWillMount?n="componentWillMount":"function"===typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"===typeof t.componentWillReceiveProps?a="componentWillReceiveProps":"function"===typeof t.UNSAFE_componentWillReceiveProps&&(a="UNSAFE_componentWillReceiveProps"),"function"===typeof t.componentWillUpdate?s="componentWillUpdate":"function"===typeof t.UNSAFE_componentWillUpdate&&(s="UNSAFE_componentWillUpdate"),null!==n||null!==a||null!==s){var l=e.displayName||e.name,u="function"===typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+l+" uses "+u+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==a?"\n "+a:"")+(null!==s?"\n "+s:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"===typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=o),"function"===typeof t.getSnapshotBeforeUpdate){if("function"!==typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=i;var c=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;c.call(this,e,t,r)}}return e}n.r(t),n.d(t,"polyfill",(function(){return a})),r.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0},function(e,t,n){"use strict";var r=n(19),o="function"===typeof Symbol&&Symbol.for,i=o?Symbol.for("react.element"):60103,a=o?Symbol.for("react.portal"):60106,s=o?Symbol.for("react.fragment"):60107,l=o?Symbol.for("react.strict_mode"):60108,u=o?Symbol.for("react.profiler"):60114,c=o?Symbol.for("react.provider"):60109,d=o?Symbol.for("react.context"):60110,f=o?Symbol.for("react.forward_ref"):60112,p=o?Symbol.for("react.suspense"):60113,h=o?Symbol.for("react.memo"):60115,m=o?Symbol.for("react.lazy"):60116,v="function"===typeof Symbol&&Symbol.iterator;function g(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 y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b={};function w(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||y}function k(){}function x(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||y}w.prototype.isReactComponent={},w.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error(g(85));this.updater.enqueueSetState(this,e,t,"setState")},w.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},k.prototype=w.prototype;var O=x.prototype=new k;O.constructor=x,r(O,w.prototype),O.isPureReactComponent=!0;var S={current:null},C=Object.prototype.hasOwnProperty,j={key:!0,ref:!0,__self:!0,__source:!0};function D(e,t,n){var r,o={},a=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)C.call(t,r)&&!j.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(1===l)o.children=n;else if(1<l){for(var u=Array(l),c=0;c<l;c++)u[c]=arguments[c+2];o.children=u}if(e&&e.defaultProps)for(r in l=e.defaultProps)void 0===o[r]&&(o[r]=l[r]);return{$$typeof:i,type:e,key:a,ref:s,props:o,_owner:S.current}}function E(e){return"object"===typeof e&&null!==e&&e.$$typeof===i}var A=/\/+/g,M=[];function T(e,t,n,r){if(M.length){var o=M.pop();return o.result=e,o.keyPrefix=t,o.func=n,o.context=r,o.count=0,o}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function L(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>M.length&&M.push(e)}function N(e,t,n,r){var o=typeof e;"undefined"!==o&&"boolean"!==o||(e=null);var s=!1;if(null===e)s=!0;else switch(o){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case i:case a:s=!0}}if(s)return n(r,e,""===t?"."+R(e,0):t),1;if(s=0,t=""===t?".":t+":",Array.isArray(e))for(var l=0;l<e.length;l++){var u=t+R(o=e[l],l);s+=N(o,u,n,r)}else if(null===e||"object"!==typeof e?u=null:u="function"===typeof(u=v&&e[v]||e["@@iterator"])?u:null,"function"===typeof u)for(e=u.call(e),l=0;!(o=e.next()).done;)s+=N(o=o.value,u=t+R(o,l++),n,r);else if("object"===o)throw n=""+e,Error(g(31,"[object Object]"===n?"object with keys {"+Object.keys(e).join(", ")+"}":n,""));return s}function P(e,t,n){return null==e?0:N(e,"",t,n)}function R(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,(function(e){return t[e]}))}(e.key):t.toString(36)}function H(e,t){e.func.call(e.context,t,e.count++)}function F(e,t,n){var r=e.result,o=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?V(e,r,n,(function(e){return e})):null!=e&&(E(e)&&(e=function(e,t){return{$$typeof:i,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(e,o+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(A,"$&/")+"/")+n)),r.push(e))}function V(e,t,n,r,o){var i="";null!=n&&(i=(""+n).replace(A,"$&/")+"/"),P(e,F,t=T(t,i,r,o)),L(t)}var z={current:null};function B(){var e=z.current;if(null===e)throw Error(g(321));return e}var _={ReactCurrentDispatcher:z,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:S,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:function(e,t,n){if(null==e)return e;var r=[];return V(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;P(e,H,t=T(null,null,t,n)),L(t)},count:function(e){return P(e,(function(){return null}),null)},toArray:function(e){var t=[];return V(e,t,null,(function(e){return e})),t},only:function(e){if(!E(e))throw Error(g(143));return e}},t.Component=w,t.Fragment=s,t.Profiler=u,t.PureComponent=x,t.StrictMode=l,t.Suspense=p,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=_,t.cloneElement=function(e,t,n){if(null===e||void 0===e)throw Error(g(267,e));var o=r({},e.props),a=e.key,s=e.ref,l=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,l=S.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var u=e.type.defaultProps;for(c in t)C.call(t,c)&&!j.hasOwnProperty(c)&&(o[c]=void 0===t[c]&&void 0!==u?u[c]:t[c])}var c=arguments.length-2;if(1===c)o.children=n;else if(1<c){u=Array(c);for(var d=0;d<c;d++)u[d]=arguments[d+2];o.children=u}return{$$typeof:i,type:e.type,key:a,ref:s,props:o,_owner:l}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:d,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:c,_context:e},e.Consumer=e},t.createElement=D,t.createFactory=function(e){var t=D.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:f,render:e}},t.isValidElement=E,t.lazy=function(e){return{$$typeof:m,_ctor:e,_status:-1,_result:null}},t.memo=function(e,t){return{$$typeof:h,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return B().useCallback(e,t)},t.useContext=function(e,t){return B().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return B().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return B().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return B().useLayoutEffect(e,t)},t.useMemo=function(e,t){return B().useMemo(e,t)},t.useReducer=function(e,t,n){return B().useReducer(e,t,n)},t.useRef=function(e){return B().useRef(e)},t.useState=function(e){return B().useState(e)},t.version="16.14.0"},function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};Object.defineProperty(t,"__esModule",{value:!0}),t.getAllAccents=t.getDefaultAccentColor=void 0;var o={orange:"#FF5722",yellow:"#FFA000",green:"#1B5E20",green2:"#008837",gray:"#757575",blue:"#0560ff",teal:"#009688",lightblue:"#2196F3",indigo:"#880E4F",purple:"#9C27B0",pink:"#FF1744",red:"#B71C1C"};t.getDefaultAccentColor=function(){return o.green2},t.getAllAccents=function(){return Object.entries(o).map((function(e){var t=r(e,2);return{label:t[0],code:t[1]}}))}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.useTheme=void 0;var o=r(n(56)),i=n(117),a=new o.default;t.useTheme=function(e,t){void 0===t&&(t=!0);var n=e.theme,r=e.accent,o=e.scale,s=void 0===o?1:o,l=a.construct({theme:n,accent:r,scale:s});return t&&(0,i.injectCss)(a.transform("css",l)),l}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getColors=void 0;var r=n(106),o=n(107),i={dark:r.getDarkScheme,light:o.getLightScheme};t.getColors=function(e,t){return i[e](t)}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getDarkScheme=void 0;var i=o(n(29)),a=n(57);t.getDarkScheme=function(e){return r(r({primary:e,placeholder:(0,i.default)("#ffffff").setAlpha(.6).toRgbString(),background:"#1b1b1b",bgTransparent:"#1f1f1f99",accent:"#000",bgSecondary:"#2b2b2b",bgSecondaryText:"#A1A1A1",bgSecondaryHover:"#3d3d3d",border:"#353535",hover:"#2f2f2f",fontSecondary:"#000",fontTertiary:"#A1A1A1",text:"#d3d3d3",overlay:"rgba(53, 53, 53, 0.5)",secondary:"black",icon:"#dbdbdb",disabled:"#5b5b5b",checked:"#6b6b6b"},(0,a.getStaticColors)(e)),{red:"#f44336",orange:"#FF9800",yellow:"#FFD600",green:"#4CAF50",blue:"#2196F3",purple:"#9568ED",gray:"#9E9E9E"})}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getLightScheme=void 0;var i=o(n(29)),a=n(57);t.getLightScheme=function(e){return r(r({primary:e,background:"white",bgTransparent:"#ffffff99",accent:"white",bgSecondary:"#f7f7f7",bgSecondaryText:"#5E5E5E",bgSecondaryHover:"#dbdbdb",border:"#e5e5e5",hover:"#f0f0f0",fontSecondary:"white",fontTertiary:"#656565",text:"#202124",overlay:"rgba(0, 0, 0, 0.1)",secondary:"white",icon:"#3b3b3b",disabled:"#9b9b9b",placeholder:(0,i.default)("#000000").setAlpha(.6).toRgbString(),checked:"#505050"},(0,a.getStaticColors)(e)),{red:"#f44336",orange:"#FF9800",yellow:"#f0c800",green:"#4CAF50",blue:"#2196F3",purple:"#9568ED",gray:"#9E9E9E"})}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.variants=void 0;var o=n(109),i=n(110),a=n(111),s=n(112);t.variants={buttons:o.buttonVariants,forms:i.inputVariants,text:a.textVariants,variants:r(r({},(0,s.createFlexVariants)("row")),(0,s.createFlexVariants)("column"))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.buttonVariants=void 0;t.buttonVariants={default:{bg:"transparent",fontFamily:"body",fontWeight:"body",fontSize:"body",borderRadius:"default",cursor:"pointer",p:2,py:"7.5px",transition:"filter 200ms ease-in, box-shadow 200ms ease-out",":hover:not(:disabled)":{filter:"brightness(90%)"},":active":{filter:"brightness(98%)"},outline:"none",":focus-visible:not(:active)":{filter:"brightness(90%)",bg:"bgSecondary"},":disabled":{opacity:.5,cursor:"not-allowed"}},primary:{variant:"buttons.default",color:"static",bg:"primary"},secondary:{variant:"buttons.default",color:"text",bg:"border"},tertiary:{variant:"buttons.default",color:"text",bg:"transparent",border:"2px solid",borderColor:"border",":hover":{borderColor:"primary"}},list:{variant:"buttons.tertiary",border:"0px solid",borderBottom:"1px solid",borderBottomColor:"border",borderRadius:0,textAlign:"left",py:2,px:0,cursor:"pointer",":hover":{borderBottomColor:"primary"}},anchor:{variant:"buttons.default",color:"primary",fontSize:"subBody",p:0,m:0,px:0,py:0,":hover":{textDecoration:"underline"}},tool:{variant:"buttons.default",color:"text",backgroundColor:"bgSecondary",borderRadius:"default",":hover":{backgroundColor:"hover"}},icon:{variant:"buttons.default",color:"text",borderRadius:"none",":hover":{backgroundColor:"hover",filter:"brightness(90%)"}},dialog:{variant:"buttons.primary",color:"primary",fontWeight:"bold",bg:"transparent",":hover":{bg:"bgSecondary"},":focus:not(:active), :focus-within:not(:active), :focus-visible:not(:active)":{bg:"hover",filter:"brightness(90%)"},":disabled":{opacity:.7,cursor:"not-allowed"}},statusitem:{variant:"buttons.icon",p:0,py:1,px:1},menuitem:{variant:"buttons.default",py:"8px",px:3,borderRadius:0,color:"text",cursor:"pointer",":hover:not(:disabled),:focus:not(:disabled)":{backgroundColor:"hover",boxShadow:"none"},":active:not(:disabled)":{backgroundColor:"border"}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.inputVariants=void 0;t.inputVariants={input:{borderRadius:"default",border:"none",boxShadow:"0px 0px 0px 1px var(--border) inset",fontFamily:"body",fontWeight:"body",fontSize:"input",color:"text",outline:"none",":focus":{boxShadow:"0px 0px 0px 1.5px var(--primary) inset"},":hover:not(:focus)":{boxShadow:"0px 0px 0px 1px var(--dimPrimary) inset"}},error:{variant:"forms.input",boxShadow:"0px 0px 0px 1px var(--error) inset",outline:"none",":focus":{boxShadow:"0px 0px 0px 1.5px var(--error) inset"},":hover:not(:focus)":{boxShadow:"0px 0px 0px 1px var(--error) inset"}},clean:{variant:"forms.input",outline:"none",boxShadow:"none",":focus":{boxShadow:"none"},":hover:not(:focus)":{boxShadow:"none"}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.textVariants=void 0;t.textVariants={default:{color:"text",fontFamily:"body"},heading:{variant:"text.default",fontFamily:"heading",fontWeight:"bold",fontSize:"heading"},title:{variant:"text.heading",fontSize:"title",fontWeight:"bold"},subtitle:{variant:"text.heading",fontSize:"subtitle",fontWeight:"bold"},body:{variant:"text.default",fontSize:"body"},subBody:{variant:"text.default",fontSize:"subBody",color:"fontTertiary"},error:{variant:"text.default",fontSize:"subBody",color:"error"}}},function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};function o(e){return{justifyContent:"center",alignItems:"center",flexDirection:e}}function i(e){return{flex:"1 1 auto",flexDirection:e}}function a(e){return{variant:"variants.".concat(e,"Center"),flex:"1 1 auto",flexDirection:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.createFlexVariants=void 0,t.createFlexVariants=function(e){var t={Center:o(e),Fill:i(e),CenterFill:a(e)};return Object.fromEntries(Object.entries(t).map((function(t){var n=r(t,2),o=n[0],i=n[1];return["".concat(e).concat(o),i]})))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFontConfig=void 0;var r=n(114),o=['"Open Sans"','"Noto Sans"',"Frutiger","Calibri","Myriad","Arial","Ubuntu","Helvetica","-apple-system","BlinkMacSystemFont","sans-serif"],i=["Hack","Consolas",'"Andale Mono"','"Lucida Console"','"Liberation Mono"','"Courier New"',"Courier","monospace"];t.getFontConfig=function(e){return{fontSizes:(0,r.getFontSizes)(e),fontWeights:{normal:400,body:400,heading:600,bold:600},fonts:{body:o.join(","),monospace:i.join(","),heading:o.join(",")}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFontSizes=void 0,t.getFontSizes=function(e){return{heading:"1.5rem",subheading:"1.2rem",input:"0.875rem",title:"0.95rem",subtitle:"0.85rem",body:"0.8rem",menu:"0.8rem",subBody:"0.750rem",code:"0.9rem"}}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.TransformerFactory=void 0;var o={css:r(n(116)).default},i=function(){function e(){}return e.prototype.construct=function(e,t){return o[e](t)},e}();t.TransformerFactory=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=":root {";for(var n in e.colors)t+="--".concat(n,": ").concat(e.colors[n],";");return t+"}"}},function(e,t,n){"use strict";var r=this&&this.__values||function(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.changeSvgTheme=t.injectCss=t.injectCssSrc=t.removeCss=void 0,t.removeCss=function(e){var t=document.getElementById(e);t&&t.remove()},t.injectCssSrc=function(e,t){var n=document.head,r=document.createElement("link");r.id=e,r.type="text/css",r.rel="stylesheet",r.href=t,n.appendChild(r)},t.injectCss=function(e){var t=document.getElementById("variables"),n=document.getElementsByTagName("head")[0];t&&n.removeChild(t);var o=document.createElement("style");o.type="text/css",o.id="variables","styleSheet"in o?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e)),n.insertBefore(o,function(){var e,t;try{for(var n=r(document.getElementsByTagName("style")),o=n.next();!o.done;o=n.next()){var i=o.value;if(i.innerHTML.includes("#root"))return i}}catch(a){e={error:a}}finally{try{o&&!o.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}return null}())},t.changeSvgTheme=function(e){for(var t=document.querySelectorAll('*[fill="#0560ff"]'),n=0;n<t.length;++n)t[n].setAttribute("fill",e)}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){}]]);\ No newline at end of filediff --git a/apps/mobile/web.bundle/static/js/4.628ec668.chunk.js b/apps/mobile/web.bundle/static/js/4.7884bc18.chunk.jssimilarity index 99%rename from apps/mobile/web.bundle/static/js/4.628ec668.chunk.jsrename to apps/mobile/web.bundle/static/js/4.7884bc18.chunk.jsindex 5dd98e485..55c922909 100644--- a/apps/mobile/web.bundle/static/js/4.628ec668.chunk.js+++ b/apps/mobile/web.bundle/static/js/4.7884bc18.chunk.js@@ -1 +1 @@-(this.webpackJsonptiptap=this.webpackJsonptiptap||[]).push([[4],{128:function(t,e,n){"use strict";n.r(e);var a=n(127),o=n.n(a);o.a.__defineMacro("\\ce",(function(t){return r(t.consumeArgs(1)[0],"ce")})),o.a.__defineMacro("\\pu",(function(t){return r(t.consumeArgs(1)[0],"pu")})),o.a.__defineMacro("\\tripledash","{\\vphantom{-}\\raisebox{2.56mu}{$\\mkern2mu\\tiny\\text{-}\\mkern1mu\\text{-}\\mkern1mu\\text{-}\\mkern2mu$}}");var r=function(t,e){for(var n="",a=t.length&&t[t.length-1].loc.start,o=t.length-1;o>=0;o--)t[o].loc.start>a&&(n+=" ",a=t[o].loc.start),n+=t[o].text,a+=t[o].text.length;return c.go(i.go(n,e))},i={go:function(t,e){if(!t)return[];void 0===e&&(e="ce");var n,a="0",o={};o.parenthesisLevel=0,t=(t=(t=t.replace(/\n/g," ")).replace(/[\u2212\u2013\u2014\u2010]/g,"-")).replace(/[\u2026]/g,"...");for(var r=10,c=[];;){n!==t?(r=10,n=t):r--;var p=i.stateMachines[e],u=p.transitions[a]||p.transitions["*"];t:for(var s=0;s<u.length;s++){var _=i.patterns.match_(u[s].pattern,t);if(_){for(var d=u[s].task,m=0;m<d.action_.length;m++){var l;if(p.actions[d.action_[m].type_])l=p.actions[d.action_[m].type_](o,_.match_,d.action_[m].option);else{if(!i.actions[d.action_[m].type_])throw["MhchemBugA","mhchem bug A. Please report. ("+d.action_[m].type_+")"];l=i.actions[d.action_[m].type_](o,_.match_,d.action_[m].option)}i.concatArray(c,l)}if(a=d.nextState||a,!(t.length>0))return c;if(d.revisit||(t=_.remainder),!d.toContinue)break t}}if(r<=0)throw["MhchemBugU","mhchem bug U. Please report."]}},concatArray:function(t,e){if(e)if(Array.isArray(e))for(var n=0;n<e.length;n++)t.push(e[n]);else t.push(e)},patterns:{patterns:{empty:/^$/,else:/^./,else2:/^./,space:/^\s/,"space A":/^\s(?=[A-Z\\$])/,space$:/^\s$/,"a-z":/^[a-z]/,x:/^x/,x$:/^x$/,i$:/^i$/,letters:/^(?:[a-zA-Z\u03B1-\u03C9\u0391-\u03A9?@]|(?:\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?:\s+|\{\}|(?![a-zA-Z]))))+/,"\\greek":/^\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?:\s+|\{\}|(?![a-zA-Z]))/,"one lowercase latin letter $":/^(?:([a-z])(?:$|[^a-zA-Z]))$/,"$one lowercase latin letter$ $":/^\$(?:([a-z])(?:$|[^a-zA-Z]))\$$/,"one lowercase greek letter $":/^(?:\$?[\u03B1-\u03C9]\$?|\$?\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega)\s*\$?)(?:\s+|\{\}|(?![a-zA-Z]))$/,digits:/^[0-9]+/,"-9.,9":/^[+\-]?(?:[0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))/,"-9.,9 no missing 0":/^[+\-]?[0-9]+(?:[.,][0-9]+)?/,"(-)(9.,9)(e)(99)":function(t){var e=t.match(/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))?(\((?:[0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))\))?(?:([eE]|\s*(\*|x|\\times|\u00D7)\s*10\^)([+\-]?[0-9]+|\{[+\-]?[0-9]+\}))?/);return e&&e[0]?{match_:e.splice(1),remainder:t.substr(e[0].length)}:null},"(-)(9)^(-9)":function(t){var e=t.match(/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+)?)\^([+\-]?[0-9]+|\{[+\-]?[0-9]+\})/);return e&&e[0]?{match_:e.splice(1),remainder:t.substr(e[0].length)}:null},"state of aggregation $":function(t){var e=i.patterns.findObserveGroups(t,"",/^\([a-z]{1,3}(?=[\),])/,")","");if(e&&e.remainder.match(/^($|[\s,;\)\]\}])/))return e;var n=t.match(/^(?:\((?:\\ca\s?)?\$[amothc]\$\))/);return n?{match_:n[0],remainder:t.substr(n[0].length)}:null},"_{(state of aggregation)}$":/^_\{(\([a-z]{1,3}\))\}/,"{[(":/^(?:\\\{|\[|\()/,")]}":/^(?:\)|\]|\\\})/,", ":/^[,;]\s*/,",":/^[,;]/,".":/^[.]/,". ":/^([.\u22C5\u00B7\u2022])\s*/,"...":/^\.\.\.(?=$|[^.])/,"* ":/^([*])\s*/,"^{(...)}":function(t){return i.patterns.findObserveGroups(t,"^{","","","}")},"^($...$)":function(t){return i.patterns.findObserveGroups(t,"^","$","$","")},"^a":/^\^([0-9]+|[^\\_])/,"^\\x{}{}":function(t){return i.patterns.findObserveGroups(t,"^",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"^\\x{}":function(t){return i.patterns.findObserveGroups(t,"^",/^\\[a-zA-Z]+\{/,"}","")},"^\\x":/^\^(\\[a-zA-Z]+)\s*/,"^(-1)":/^\^(-?\d+)/,"'":/^'/,"_{(...)}":function(t){return i.patterns.findObserveGroups(t,"_{","","","}")},"_($...$)":function(t){return i.patterns.findObserveGroups(t,"_","$","$","")},_9:/^_([+\-]?[0-9]+|[^\\])/,"_\\x{}{}":function(t){return i.patterns.findObserveGroups(t,"_",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"_\\x{}":function(t){return i.patterns.findObserveGroups(t,"_",/^\\[a-zA-Z]+\{/,"}","")},"_\\x":/^_(\\[a-zA-Z]+)\s*/,"^_":/^(?:\^(?=_)|\_(?=\^)|[\^_]$)/,"{}":/^\{\}/,"{...}":function(t){return i.patterns.findObserveGroups(t,"","{","}","")},"{(...)}":function(t){return i.patterns.findObserveGroups(t,"{","","","}")},"$...$":function(t){return i.patterns.findObserveGroups(t,"","$","$","")},"${(...)}$":function(t){return i.patterns.findObserveGroups(t,"${","","","}$")},"$(...)$":function(t){return i.patterns.findObserveGroups(t,"$","","","$")},"=<>":/^[=<>]/,"#":/^[#\u2261]/,"+":/^\+/,"-$":/^-(?=[\s_},;\]/]|$|\([a-z]+\))/,"-9":/^-(?=[0-9])/,"- orbital overlap":/^-(?=(?:[spd]|sp)(?:$|[\s,;\)\]\}]))/,"-":/^-/,"pm-operator":/^(?:\\pm|\$\\pm\$|\+-|\+\/-)/,operator:/^(?:\+|(?:[\-=<>]|<<|>>|\\approx|\$\\approx\$)(?=\s|$|-?[0-9]))/,arrowUpDown:/^(?:v|\(v\)|\^|\(\^\))(?=$|[\s,;\)\]\}])/,"\\bond{(...)}":function(t){return i.patterns.findObserveGroups(t,"\\bond{","","","}")},"->":/^(?:<->|<-->|->|<-|<=>>|<<=>|<=>|[\u2192\u27F6\u21CC])/,CMT:/^[CMT](?=\[)/,"[(...)]":function(t){return i.patterns.findObserveGroups(t,"[","","","]")},"1st-level escape":/^(&|\\\\|\\hline)\s*/,"\\,":/^(?:\\[,\ ;:])/,"\\x{}{}":function(t){return i.patterns.findObserveGroups(t,"",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"\\x{}":function(t){return i.patterns.findObserveGroups(t,"",/^\\[a-zA-Z]+\{/,"}","")},"\\ca":/^\\ca(?:\s+|(?![a-zA-Z]))/,"\\x":/^(?:\\[a-zA-Z]+\s*|\\[_&{}%])/,orbital:/^(?:[0-9]{1,2}[spdfgh]|[0-9]{0,2}sp)(?=$|[^a-zA-Z])/,others:/^[\/~|]/,"\\frac{(...)}":function(t){return i.patterns.findObserveGroups(t,"\\frac{","","","}","{","","","}")},"\\overset{(...)}":function(t){return i.patterns.findObserveGroups(t,"\\overset{","","","}","{","","","}")},"\\underset{(...)}":function(t){return i.patterns.findObserveGroups(t,"\\underset{","","","}","{","","","}")},"\\underbrace{(...)}":function(t){return i.patterns.findObserveGroups(t,"\\underbrace{","","","}_","{","","","}")},"\\color{(...)}0":function(t){return i.patterns.findObserveGroups(t,"\\color{","","","}")},"\\color{(...)}{(...)}1":function(t){return i.patterns.findObserveGroups(t,"\\color{","","","}","{","","","}")},"\\color(...){(...)}2":function(t){return i.patterns.findObserveGroups(t,"\\color","\\","",/^(?=\{)/,"{","","","}")},"\\ce{(...)}":function(t){return i.patterns.findObserveGroups(t,"\\ce{","","","}")},oxidation$:/^(?:[+-][IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"d-oxidation$":/^(?:[+-]?\s?[IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"roman numeral":/^[IVX]+/,"1/2$":/^[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+(?:\$[a-z]\$|[a-z])?$/,amount:function(t){var e;if(e=t.match(/^(?:(?:(?:\([+\-]?[0-9]+\/[0-9]+\)|[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+|[+\-]?[0-9]+[.,][0-9]+|[+\-]?\.[0-9]+|[+\-]?[0-9]+)(?:[a-z](?=\s*[A-Z]))?)|[+\-]?[a-z](?=\s*[A-Z])|\+(?!\s))/))return{match_:e[0],remainder:t.substr(e[0].length)};var n=i.patterns.findObserveGroups(t,"","$","$","");return n&&(e=n.match_.match(/^\$(?:\(?[+\-]?(?:[0-9]*[a-z]?[+\-])?[0-9]*[a-z](?:[+\-][0-9]*[a-z]?)?\)?|\+|-)\$$/))?{match_:e[0],remainder:t.substr(e[0].length)}:null},amount2:function(t){return this.amount(t)},"(KV letters),":/^(?:[A-Z][a-z]{0,2}|i)(?=,)/,formula$:function(t){if(t.match(/^\([a-z]+\)$/))return null;var e=t.match(/^(?:[a-z]|(?:[0-9\ \+\-\,\.\(\)]+[a-z])+[0-9\ \+\-\,\.\(\)]*|(?:[a-z][0-9\ \+\-\,\.\(\)]+)+[a-z]?)$/);return e?{match_:e[0],remainder:t.substr(e[0].length)}:null},uprightEntities:/^(?:pH|pOH|pC|pK|iPr|iBu)(?=$|[^a-zA-Z])/,"/":/^\s*(\/)\s*/,"//":/^\s*(\/\/)\s*/,"*":/^\s*[*.]\s*/},findObserveGroups:function(t,e,n,a,o,r,i,c,p,u){var s=function(t,e){if("string"===typeof e)return 0!==t.indexOf(e)?null:e;var n=t.match(e);return n?n[0]:null},_=s(t,e);if(null===_)return null;if(t=t.substr(_.length),null===(_=s(t,n)))return null;var d=function(t,e,n){for(var a=0;e<t.length;){var o=t.charAt(e),r=s(t.substr(e),n);if(null!==r&&0===a)return{endMatchBegin:e,endMatchEnd:e+r.length};if("{"===o)a++;else if("}"===o){if(0===a)throw["ExtraCloseMissingOpen","Extra close brace or missing open brace"];a--}e++}return null}(t,_.length,a||o);if(null===d)return null;var m=t.substring(0,a?d.endMatchEnd:d.endMatchBegin);if(r||i){var l=this.findObserveGroups(t.substr(d.endMatchEnd),r,i,c,p);if(null===l)return null;var h=[m,l.match_];return{match_:u?h.join(""):h,remainder:l.remainder}}return{match_:m,remainder:t.substr(d.endMatchEnd)}},match_:function(t,e){var n=i.patterns.patterns[t];if(void 0===n)throw["MhchemBugP","mhchem bug P. Please report. ("+t+")"];if("function"===typeof n)return i.patterns.patterns[t](e);var a=e.match(n);return a?{match_:a[2]?[a[1],a[2]]:a[1]?a[1]:a[0],remainder:e.substr(a[0].length)}:null}},actions:{"a=":function(t,e){t.a=(t.a||"")+e},"b=":function(t,e){t.b=(t.b||"")+e},"p=":function(t,e){t.p=(t.p||"")+e},"o=":function(t,e){t.o=(t.o||"")+e},"q=":function(t,e){t.q=(t.q||"")+e},"d=":function(t,e){t.d=(t.d||"")+e},"rm=":function(t,e){t.rm=(t.rm||"")+e},"text=":function(t,e){t.text_=(t.text_||"")+e},insert:function(t,e,n){return{type_:n}},"insert+p1":function(t,e,n){return{type_:n,p1:e}},"insert+p1+p2":function(t,e,n){return{type_:n,p1:e[0],p2:e[1]}},copy:function(t,e){return e},rm:function(t,e){return{type_:"rm",p1:e||""}},text:function(t,e){return i.go(e,"text")},"{text}":function(t,e){var n=["{"];return i.concatArray(n,i.go(e,"text")),n.push("}"),n},"tex-math":function(t,e){return i.go(e,"tex-math")},"tex-math tight":function(t,e){return i.go(e,"tex-math tight")},bond:function(t,e,n){return{type_:"bond",kind_:n||e}},"color0-output":function(t,e){return{type_:"color0",color:e[0]}},ce:function(t,e){return i.go(e)},"1/2":function(t,e){var n=[];e.match(/^[+\-]/)&&(n.push(e.substr(0,1)),e=e.substr(1));var a=e.match(/^([0-9]+|\$[a-z]\$|[a-z])\/([0-9]+)(\$[a-z]\$|[a-z])?$/);return a[1]=a[1].replace(/\$/g,""),n.push({type_:"frac",p1:a[1],p2:a[2]}),a[3]&&(a[3]=a[3].replace(/\$/g,""),n.push({type_:"tex-math",p1:a[3]})),n},"9,9":function(t,e){return i.go(e,"9,9")}},createTransitions:function(t){var e,n,a,o,r={};for(e in t)for(n in t[e])for(a=n.split("|"),t[e][n].stateArray=a,o=0;o<a.length;o++)r[a[o]]=[];for(e in t)for(n in t[e])for(a=t[e][n].stateArray||[],o=0;o<a.length;o++){var i=t[e][n];if(i.action_){i.action_=[].concat(i.action_);for(var c=0;c<i.action_.length;c++)"string"===typeof i.action_[c]&&(i.action_[c]={type_:i.action_[c]})}else i.action_=[];for(var p=e.split("|"),u=0;u<p.length;u++)if("*"===a[o])for(var s in r)r[s].push({pattern:p[u],task:i});else r[a[o]].push({pattern:p[u],task:i})}return r},stateMachines:{}};i.stateMachines={ce:{transitions:i.createTransitions({empty:{"*":{action_:"output"}},else:{"0|1|2":{action_:"beginsWithBond=false",revisit:!0,toContinue:!0}},oxidation$:{0:{action_:"oxidation-output"}},CMT:{r:{action_:"rdt=",nextState:"rt"},rd:{action_:"rqt=",nextState:"rdt"}},arrowUpDown:{"0|1|2|as":{action_:["sb=false","output","operator"],nextState:"1"}},uprightEntities:{"0|1|2":{action_:["o=","output"],nextState:"1"}},orbital:{"0|1|2|3":{action_:"o=",nextState:"o"}},"->":{"0|1|2|3":{action_:"r=",nextState:"r"},"a|as":{action_:["output","r="],nextState:"r"},"*":{action_:["output","r="],nextState:"r"}},"+":{o:{action_:"d= kv",nextState:"d"},"d|D":{action_:"d=",nextState:"d"},q:{action_:"d=",nextState:"qd"},"qd|qD":{action_:"d=",nextState:"qd"},dq:{action_:["output","d="],nextState:"d"},3:{action_:["sb=false","output","operator"],nextState:"0"}},amount:{"0|2":{action_:"a=",nextState:"a"}},"pm-operator":{"0|1|2|a|as":{action_:["sb=false","output",{type_:"operator",option:"\\pm"}],nextState:"0"}},operator:{"0|1|2|a|as":{action_:["sb=false","output","operator"],nextState:"0"}},"-$":{"o|q":{action_:["charge or bond","output"],nextState:"qd"},d:{action_:"d=",nextState:"d"},D:{action_:["output",{type_:"bond",option:"-"}],nextState:"3"},q:{action_:"d=",nextState:"qd"},qd:{action_:"d=",nextState:"qd"},"qD|dq":{action_:["output",{type_:"bond",option:"-"}],nextState:"3"}},"-9":{"3|o":{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"3"}},"- orbital overlap":{o:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"},d:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"}},"-":{"0|1|2":{action_:[{type_:"output",option:1},"beginsWithBond=true",{type_:"bond",option:"-"}],nextState:"3"},3:{action_:{type_:"bond",option:"-"}},a:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"},as:{action_:[{type_:"output",option:2},{type_:"bond",option:"-"}],nextState:"3"},b:{action_:"b="},o:{action_:{type_:"- after o/d",option:!1},nextState:"2"},q:{action_:{type_:"- after o/d",option:!1},nextState:"2"},"d|qd|dq":{action_:{type_:"- after o/d",option:!0},nextState:"2"},"D|qD|p":{action_:["output",{type_:"bond",option:"-"}],nextState:"3"}},amount2:{"1|3":{action_:"a=",nextState:"a"}},letters:{"0|1|2|3|a|as|b|p|bp|o":{action_:"o=",nextState:"o"},"q|dq":{action_:["output","o="],nextState:"o"},"d|D|qd|qD":{action_:"o after d",nextState:"o"}},digits:{o:{action_:"q=",nextState:"q"},"d|D":{action_:"q=",nextState:"dq"},q:{action_:["output","o="],nextState:"o"},a:{action_:"o=",nextState:"o"}},"space A":{"b|p|bp":{}},space:{a:{nextState:"as"},0:{action_:"sb=false"},"1|2":{action_:"sb=true"},"r|rt|rd|rdt|rdq":{action_:"output",nextState:"0"},"*":{action_:["output","sb=true"],nextState:"1"}},"1st-level escape":{"1|2":{action_:["output",{type_:"insert+p1",option:"1st-level escape"}]},"*":{action_:["output",{type_:"insert+p1",option:"1st-level escape"}],nextState:"0"}},"[(...)]":{"r|rt":{action_:"rd=",nextState:"rd"},"rd|rdt":{action_:"rq=",nextState:"rdq"}},"...":{"o|d|D|dq|qd|qD":{action_:["output",{type_:"bond",option:"..."}],nextState:"3"},"*":{action_:[{type_:"output",option:1},{type_:"insert",option:"ellipsis"}],nextState:"1"}},". |* ":{"*":{action_:["output",{type_:"insert",option:"addition compound"}],nextState:"1"}},"state of aggregation $":{"*":{action_:["output","state of aggregation"],nextState:"1"}},"{[(":{"a|as|o":{action_:["o=","output","parenthesisLevel++"],nextState:"2"},"0|1|2|3":{action_:["o=","output","parenthesisLevel++"],nextState:"2"},"*":{action_:["output","o=","output","parenthesisLevel++"],nextState:"2"}},")]}":{"0|1|2|3|b|p|bp|o":{action_:["o=","parenthesisLevel--"],nextState:"o"},"a|as|d|D|q|qd|qD|dq":{action_:["output","o=","parenthesisLevel--"],nextState:"o"}},", ":{"*":{action_:["output","comma"],nextState:"0"}},"^_":{"*":{}},"^{(...)}|^($...$)":{"0|1|2|as":{action_:"b=",nextState:"b"},p:{action_:"b=",nextState:"bp"},"3|o":{action_:"d= kv",nextState:"D"},q:{action_:"d=",nextState:"qD"},"d|D|qd|qD|dq":{action_:["output","d="],nextState:"D"}},"^a|^\\x{}{}|^\\x{}|^\\x|'":{"0|1|2|as":{action_:"b=",nextState:"b"},p:{action_:"b=",nextState:"bp"},"3|o":{action_:"d= kv",nextState:"d"},q:{action_:"d=",nextState:"qd"},"d|qd|D|qD":{action_:"d="},dq:{action_:["output","d="],nextState:"d"}},"_{(state of aggregation)}$":{"d|D|q|qd|qD|dq":{action_:["output","q="],nextState:"q"}},"_{(...)}|_($...$)|_9|_\\x{}{}|_\\x{}|_\\x":{"0|1|2|as":{action_:"p=",nextState:"p"},b:{action_:"p=",nextState:"bp"},"3|o":{action_:"q=",nextState:"q"},"d|D":{action_:"q=",nextState:"dq"},"q|qd|qD|dq":{action_:["output","q="],nextState:"q"}},"=<>":{"0|1|2|3|a|as|o|q|d|D|qd|qD|dq":{action_:[{type_:"output",option:2},"bond"],nextState:"3"}},"#":{"0|1|2|3|a|as|o":{action_:[{type_:"output",option:2},{type_:"bond",option:"#"}],nextState:"3"}},"{}":{"*":{action_:{type_:"output",option:1},nextState:"1"}},"{...}":{"0|1|2|3|a|as|b|p|bp":{action_:"o=",nextState:"o"},"o|d|D|q|qd|qD|dq":{action_:["output","o="],nextState:"o"}},"$...$":{a:{action_:"a="},"0|1|2|3|as|b|p|bp|o":{action_:"o=",nextState:"o"},"as|o":{action_:"o="},"q|d|D|qd|qD|dq":{action_:["output","o="],nextState:"o"}},"\\bond{(...)}":{"*":{action_:[{type_:"output",option:2},"bond"],nextState:"3"}},"\\frac{(...)}":{"*":{action_:[{type_:"output",option:1},"frac-output"],nextState:"3"}},"\\overset{(...)}":{"*":{action_:[{type_:"output",option:2},"overset-output"],nextState:"3"}},"\\underset{(...)}":{"*":{action_:[{type_:"output",option:2},"underset-output"],nextState:"3"}},"\\underbrace{(...)}":{"*":{action_:[{type_:"output",option:2},"underbrace-output"],nextState:"3"}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:[{type_:"output",option:2},"color-output"],nextState:"3"}},"\\color{(...)}0":{"*":{action_:[{type_:"output",option:2},"color0-output"]}},"\\ce{(...)}":{"*":{action_:[{type_:"output",option:2},"ce"],nextState:"3"}},"\\,":{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"1"}},"\\x{}{}|\\x{}|\\x":{"0|1|2|3|a|as|b|p|bp|o|c0":{action_:["o=","output"],nextState:"3"},"*":{action_:["output","o=","output"],nextState:"3"}},others:{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"3"}},else2:{a:{action_:"a to o",nextState:"o",revisit:!0},as:{action_:["output","sb=true"],nextState:"1",revisit:!0},"r|rt|rd|rdt|rdq":{action_:["output"],nextState:"0",revisit:!0},"*":{action_:["output","copy"],nextState:"3"}}}),actions:{"o after d":function(t,e){var n;if((t.d||"").match(/^[0-9]+$/)){var a=t.d;t.d=void 0,n=this.output(t),t.b=a}else n=this.output(t);return i.actions["o="](t,e),n},"d= kv":function(t,e){t.d=e,t.dType="kv"},"charge or bond":function(t,e){if(t.beginsWithBond){var n=[];return i.concatArray(n,this.output(t)),i.concatArray(n,i.actions.bond(t,e,"-")),n}t.d=e},"- after o/d":function(t,e,n){var a=i.patterns.match_("orbital",t.o||""),o=i.patterns.match_("one lowercase greek letter $",t.o||""),r=i.patterns.match_("one lowercase latin letter $",t.o||""),c=i.patterns.match_("$one lowercase latin letter$ $",t.o||""),p="-"===e&&(a&&""===a.remainder||o||r||c);!p||t.a||t.b||t.p||t.d||t.q||a||!r||(t.o="$"+t.o+"$");var u=[];return p?(i.concatArray(u,this.output(t)),u.push({type_:"hyphen"})):(a=i.patterns.match_("digits",t.d||""),n&&a&&""===a.remainder?(i.concatArray(u,i.actions["d="](t,e)),i.concatArray(u,this.output(t))):(i.concatArray(u,this.output(t)),i.concatArray(u,i.actions.bond(t,e,"-")))),u},"a to o":function(t){t.o=t.a,t.a=void 0},"sb=true":function(t){t.sb=!0},"sb=false":function(t){t.sb=!1},"beginsWithBond=true":function(t){t.beginsWithBond=!0},"beginsWithBond=false":function(t){t.beginsWithBond=!1},"parenthesisLevel++":function(t){t.parenthesisLevel++},"parenthesisLevel--":function(t){t.parenthesisLevel--},"state of aggregation":function(t,e){return{type_:"state of aggregation",p1:i.go(e,"o")}},comma:function(t,e){var n=e.replace(/\s*$/,"");return n!==e&&0===t.parenthesisLevel?{type_:"comma enumeration L",p1:n}:{type_:"comma enumeration M",p1:n}},output:function(t,e,n){var a,o,r;t.r?(o="M"===t.rdt?i.go(t.rd,"tex-math"):"T"===t.rdt?[{type_:"text",p1:t.rd||""}]:i.go(t.rd),r="M"===t.rqt?i.go(t.rq,"tex-math"):"T"===t.rqt?[{type_:"text",p1:t.rq||""}]:i.go(t.rq),a={type_:"arrow",r:t.r,rd:o,rq:r}):(a=[],(t.a||t.b||t.p||t.o||t.q||t.d||n)&&(t.sb&&a.push({type_:"entitySkip"}),t.o||t.q||t.d||t.b||t.p||2===n?t.o||t.q||t.d||!t.b&&!t.p?t.o&&"kv"===t.dType&&i.patterns.match_("d-oxidation$",t.d||"")?t.dType="oxidation":t.o&&"kv"===t.dType&&!t.q&&(t.dType=void 0):(t.o=t.a,t.d=t.b,t.q=t.p,t.a=t.b=t.p=void 0):(t.o=t.a,t.a=void 0),a.push({type_:"chemfive",a:i.go(t.a,"a"),b:i.go(t.b,"bd"),p:i.go(t.p,"pq"),o:i.go(t.o,"o"),q:i.go(t.q,"pq"),d:i.go(t.d,"oxidation"===t.dType?"oxidation":"bd"),dType:t.dType})));for(var c in t)"parenthesisLevel"!==c&&"beginsWithBond"!==c&&delete t[c];return a},"oxidation-output":function(t,e){var n=["{"];return i.concatArray(n,i.go(e,"oxidation")),n.push("}"),n},"frac-output":function(t,e){return{type_:"frac-ce",p1:i.go(e[0]),p2:i.go(e[1])}},"overset-output":function(t,e){return{type_:"overset",p1:i.go(e[0]),p2:i.go(e[1])}},"underset-output":function(t,e){return{type_:"underset",p1:i.go(e[0]),p2:i.go(e[1])}},"underbrace-output":function(t,e){return{type_:"underbrace",p1:i.go(e[0]),p2:i.go(e[1])}},"color-output":function(t,e){return{type_:"color",color1:e[0],color2:i.go(e[1])}},"r=":function(t,e){t.r=e},"rdt=":function(t,e){t.rdt=e},"rd=":function(t,e){t.rd=e},"rqt=":function(t,e){t.rqt=e},"rq=":function(t,e){t.rq=e},operator:function(t,e,n){return{type_:"operator",kind_:n||e}}}},a:{transitions:i.createTransitions({empty:{"*":{}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"1",revisit:!0}},"$(...)$":{"*":{action_:"tex-math tight",nextState:"1"}},",":{"*":{action_:{type_:"insert",option:"commaDecimal"}}},else2:{"*":{action_:"copy"}}}),actions:{}},o:{transitions:i.createTransitions({empty:{"*":{}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"1",revisit:!0}},letters:{"*":{action_:"rm"}},"\\ca":{"*":{action_:{type_:"insert",option:"circa"}}},"\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"{text}"}},else2:{"*":{action_:"copy"}}}),actions:{}},text:{transitions:i.createTransitions({empty:{"*":{action_:"output"}},"{...}":{"*":{action_:"text="}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"\\greek":{"*":{action_:["output","rm"]}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:["output","copy"]}},else:{"*":{action_:"text="}}}),actions:{output:function(t){if(t.text_){var e={type_:"text",p1:t.text_};for(var n in t)delete t[n];return e}}}},pq:{transitions:i.createTransitions({empty:{"*":{}},"state of aggregation $":{"*":{action_:"state of aggregation"}},i$:{0:{nextState:"!f",revisit:!0}},"(KV letters),":{0:{action_:"rm",nextState:"0"}},formula$:{0:{nextState:"f",revisit:!0}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"!f",revisit:!0}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"text"}},"a-z":{f:{action_:"tex-math"}},letters:{"*":{action_:"rm"}},"-9.,9":{"*":{action_:"9,9"}},",":{"*":{action_:{type_:"insert+p1",option:"comma enumeration S"}}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:"color-output"}},"\\color{(...)}0":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"state of aggregation":function(t,e){return{type_:"state of aggregation subscript",p1:i.go(e,"o")}},"color-output":function(t,e){return{type_:"color",color1:e[0],color2:i.go(e[1],"pq")}}}},bd:{transitions:i.createTransitions({empty:{"*":{}},x$:{0:{nextState:"!f",revisit:!0}},formula$:{0:{nextState:"f",revisit:!0}},else:{0:{nextState:"!f",revisit:!0}},"-9.,9 no missing 0":{"*":{action_:"9,9"}},".":{"*":{action_:{type_:"insert",option:"electron dot"}}},"a-z":{f:{action_:"tex-math"}},x:{"*":{action_:{type_:"insert",option:"KV x"}}},letters:{"*":{action_:"rm"}},"'":{"*":{action_:{type_:"insert",option:"prime"}}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"text"}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:"color-output"}},"\\color{(...)}0":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"color-output":function(t,e){return{type_:"color",color1:e[0],color2:i.go(e[1],"bd")}}}},oxidation:{transitions:i.createTransitions({empty:{"*":{}},"roman numeral":{"*":{action_:"roman-numeral"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},else:{"*":{action_:"copy"}}}),actions:{"roman-numeral":function(t,e){return{type_:"roman numeral",p1:e||""}}}},"tex-math":{transitions:i.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},else:{"*":{action_:"o="}}}),actions:{output:function(t){if(t.o){var e={type_:"tex-math",p1:t.o};for(var n in t)delete t[n];return e}}}},"tex-math tight":{transitions:i.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},"-|+":{"*":{action_:"tight operator"}},else:{"*":{action_:"o="}}}),actions:{"tight operator":function(t,e){t.o=(t.o||"")+"{"+e+"}"},output:function(t){if(t.o){var e={type_:"tex-math",p1:t.o};for(var n in t)delete t[n];return e}}}},"9,9":{transitions:i.createTransitions({empty:{"*":{}},",":{"*":{action_:"comma"}},else:{"*":{action_:"copy"}}}),actions:{comma:function(){return{type_:"commaDecimal"}}}},pu:{transitions:i.createTransitions({empty:{"*":{action_:"output"}},space$:{"*":{action_:["output","space"]}},"{[(|)]}":{"0|a":{action_:"copy"}},"(-)(9)^(-9)":{0:{action_:"number^",nextState:"a"}},"(-)(9.,9)(e)(99)":{0:{action_:"enumber",nextState:"a"}},space:{"0|a":{}},"pm-operator":{"0|a":{action_:{type_:"operator",option:"\\pm"},nextState:"0"}},operator:{"0|a":{action_:"copy",nextState:"0"}},"//":{d:{action_:"o=",nextState:"/"}},"/":{d:{action_:"o=",nextState:"/"}},"{...}|else":{"0|d":{action_:"d=",nextState:"d"},a:{action_:["space","d="],nextState:"d"},"/|q":{action_:"q=",nextState:"q"}}}),actions:{enumber:function(t,e){var n=[];return"+-"===e[0]||"+/-"===e[0]?n.push("\\pm "):e[0]&&n.push(e[0]),e[1]&&(i.concatArray(n,i.go(e[1],"pu-9,9")),e[2]&&(e[2].match(/[,.]/)?i.concatArray(n,i.go(e[2],"pu-9,9")):n.push(e[2])),e[3]=e[4]||e[3],e[3]&&(e[3]=e[3].trim(),"e"===e[3]||"*"===e[3].substr(0,1)?n.push({type_:"cdot"}):n.push({type_:"times"}))),e[3]&&n.push("10^{"+e[5]+"}"),n},"number^":function(t,e){var n=[];return"+-"===e[0]||"+/-"===e[0]?n.push("\\pm "):e[0]&&n.push(e[0]),i.concatArray(n,i.go(e[1],"pu-9,9")),n.push("^{"+e[2]+"}"),n},operator:function(t,e,n){return{type_:"operator",kind_:n||e}},space:function(){return{type_:"pu-space-1"}},output:function(t){var e,n=i.patterns.match_("{(...)}",t.d||"");n&&""===n.remainder&&(t.d=n.match_);var a=i.patterns.match_("{(...)}",t.q||"");if(a&&""===a.remainder&&(t.q=a.match_),t.d&&(t.d=t.d.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),t.d=t.d.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F")),t.q){t.q=t.q.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),t.q=t.q.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F");var o={d:i.go(t.d,"pu"),q:i.go(t.q,"pu")};"//"===t.o?e={type_:"pu-frac",p1:o.d,p2:o.q}:(e=o.d,o.d.length>1||o.q.length>1?e.push({type_:" / "}):e.push({type_:"/"}),i.concatArray(e,o.q))}else e=i.go(t.d,"pu-2");for(var r in t)delete t[r];return e}}},"pu-2":{transitions:i.createTransitions({empty:{"*":{action_:"output"}},"*":{"*":{action_:["output","cdot"],nextState:"0"}},"\\x":{"*":{action_:"rm="}},space:{"*":{action_:["output","space"],nextState:"0"}},"^{(...)}|^(-1)":{1:{action_:"^(-1)"}},"-9.,9":{0:{action_:"rm=",nextState:"0"},1:{action_:"^(-1)",nextState:"0"}},"{...}|else":{"*":{action_:"rm=",nextState:"1"}}}),actions:{cdot:function(){return{type_:"tight cdot"}},"^(-1)":function(t,e){t.rm+="^{"+e+"}"},space:function(){return{type_:"pu-space-2"}},output:function(t){var e=[];if(t.rm){var n=i.patterns.match_("{(...)}",t.rm||"");e=n&&""===n.remainder?i.go(n.match_,"pu"):{type_:"rm",p1:t.rm}}for(var a in t)delete t[a];return e}}},"pu-9,9":{transitions:i.createTransitions({empty:{0:{action_:"output-0"},o:{action_:"output-o"}},",":{0:{action_:["output-0","comma"],nextState:"o"}},".":{0:{action_:["output-0","copy"],nextState:"o"}},else:{"*":{action_:"text="}}}),actions:{comma:function(){return{type_:"commaDecimal"}},"output-0":function(t){var e=[];if(t.text_=t.text_||"",t.text_.length>4){var n=t.text_.length%3;0===n&&(n=3);for(var a=t.text_.length-3;a>0;a-=3)e.push(t.text_.substr(a,3)),e.push({type_:"1000 separator"});e.push(t.text_.substr(0,n)),e.reverse()}else e.push(t.text_);for(var o in t)delete t[o];return e},"output-o":function(t){var e=[];if(t.text_=t.text_||"",t.text_.length>4){for(var n=t.text_.length-3,a=0;a<n;a+=3)e.push(t.text_.substr(a,3)),e.push({type_:"1000 separator"});e.push(t.text_.substr(a))}else e.push(t.text_);for(var o in t)delete t[o];return e}}}};var c={go:function(t,e){if(!t)return"";for(var n="",a=!1,o=0;o<t.length;o++){var r=t[o];"string"===typeof r?n+=r:(n+=c._go2(r),"1st-level escape"===r.type_&&(a=!0))}return e||a||!n||(n="{"+n+"}"),n},_goInner:function(t){return t?c.go(t,!0):t},_go2:function(t){var e;switch(t.type_){case"chemfive":e="";var n={a:c._goInner(t.a),b:c._goInner(t.b),p:c._goInner(t.p),o:c._goInner(t.o),q:c._goInner(t.q),d:c._goInner(t.d)};n.a&&(n.a.match(/^[+\-]/)&&(n.a="{"+n.a+"}"),e+=n.a+"\\,"),(n.b||n.p)&&(e+="{\\vphantom{X}}",e+="^{\\hphantom{"+(n.b||"")+"}}_{\\hphantom{"+(n.p||"")+"}}",e+="{\\vphantom{X}}",e+="^{\\smash[t]{\\vphantom{2}}\\mathllap{"+(n.b||"")+"}}",e+="_{\\vphantom{2}\\mathllap{\\smash[t]{"+(n.p||"")+"}}}"),n.o&&(n.o.match(/^[+\-]/)&&(n.o="{"+n.o+"}"),e+=n.o),"kv"===t.dType?((n.d||n.q)&&(e+="{\\vphantom{X}}"),n.d&&(e+="^{"+n.d+"}"),n.q&&(e+="_{\\smash[t]{"+n.q+"}}")):"oxidation"===t.dType?(n.d&&(e+="{\\vphantom{X}}",e+="^{"+n.d+"}"),n.q&&(e+="{\\vphantom{X}}",e+="_{\\smash[t]{"+n.q+"}}")):(n.q&&(e+="{\\vphantom{X}}",e+="_{\\smash[t]{"+n.q+"}}"),n.d&&(e+="{\\vphantom{X}}",e+="^{"+n.d+"}"));break;case"rm":case"roman numeral":e="\\mathrm{"+t.p1+"}";break;case"text":t.p1.match(/[\^_]/)?(t.p1=t.p1.replace(" ","~").replace("-","\\text{-}"),e="\\mathrm{"+t.p1+"}"):e="\\text{"+t.p1+"}";break;case"state of aggregation":e="\\mskip2mu "+c._goInner(t.p1);break;case"state of aggregation subscript":e="\\mskip1mu "+c._goInner(t.p1);break;case"bond":if(!(e=c._getBond(t.kind_)))throw["MhchemErrorBond","mhchem Error. Unknown bond type ("+t.kind_+")"];break;case"frac":var a="\\frac{"+t.p1+"}{"+t.p2+"}";e="\\mathchoice{\\textstyle"+a+"}{"+a+"}{"+a+"}{"+a+"}";break;case"pu-frac":var o="\\frac{"+c._goInner(t.p1)+"}{"+c._goInner(t.p2)+"}";e="\\mathchoice{\\textstyle"+o+"}{"+o+"}{"+o+"}{"+o+"}";break;case"tex-math":case"1st-level escape":e=t.p1+" ";break;case"frac-ce":e="\\frac{"+c._goInner(t.p1)+"}{"+c._goInner(t.p2)+"}";break;case"overset":e="\\overset{"+c._goInner(t.p1)+"}{"+c._goInner(t.p2)+"}";break;case"underset":e="\\underset{"+c._goInner(t.p1)+"}{"+c._goInner(t.p2)+"}";break;case"underbrace":e="\\underbrace{"+c._goInner(t.p1)+"}_{"+c._goInner(t.p2)+"}";break;case"color":e="{\\color{"+t.color1+"}{"+c._goInner(t.color2)+"}}";break;case"color0":e="\\color{"+t.color+"}";break;case"arrow":var r={rd:c._goInner(t.rd),rq:c._goInner(t.rq)},i="\\x"+c._getArrow(t.r);r.rq&&(i+="[{"+r.rq+"}]"),e=i+=r.rd?"{"+r.rd+"}":"{}";break;case"operator":e=c._getOperator(t.kind_);break;case"space":e=" ";break;case"entitySkip":case"pu-space-1":e="~";break;case"pu-space-2":e="\\mkern3mu ";break;case"1000 separator":e="\\mkern2mu ";break;case"commaDecimal":e="{,}";break;case"comma enumeration L":e="{"+t.p1+"}\\mkern6mu ";break;case"comma enumeration M":e="{"+t.p1+"}\\mkern3mu ";break;case"comma enumeration S":e="{"+t.p1+"}\\mkern1mu ";break;case"hyphen":e="\\text{-}";break;case"addition compound":e="\\,{\\cdot}\\,";break;case"electron dot":e="\\mkern1mu \\bullet\\mkern1mu ";break;case"KV x":e="{\\times}";break;case"prime":e="\\prime ";break;case"cdot":e="\\cdot ";break;case"tight cdot":e="\\mkern1mu{\\cdot}\\mkern1mu ";break;case"times":e="\\times ";break;case"circa":e="{\\sim}";break;case"^":e="uparrow";break;case"v":e="downarrow";break;case"ellipsis":e="\\ldots ";break;case"/":e="/";break;case" / ":e="\\,/\\,";break;default:throw["MhchemBugT","mhchem bug T. Please report."]}return e},_getArrow:function(t){switch(t){case"->":case"\u2192":case"\u27f6":return"rightarrow";case"<-":return"leftarrow";case"<->":return"leftrightarrow";case"<--\x3e":return"rightleftarrows";case"<=>":case"\u21cc":return"rightleftharpoons";case"<=>>":return"rightequilibrium";case"<<=>":return"leftequilibrium";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getBond:function(t){switch(t){case"-":case"1":return"{-}";case"=":case"2":return"{=}";case"#":case"3":return"{\\equiv}";case"~":return"{\\tripledash}";case"~-":return"{\\mathrlap{\\raisebox{-.1em}{$-$}}\\raisebox{.1em}{$\\tripledash$}}";case"~=":case"~--":return"{\\mathrlap{\\raisebox{-.2em}{$-$}}\\mathrlap{\\raisebox{.2em}{$\\tripledash$}}-}";case"-~-":return"{\\mathrlap{\\raisebox{-.2em}{$-$}}\\mathrlap{\\raisebox{.2em}{$-$}}\\tripledash}";case"...":return"{{\\cdot}{\\cdot}{\\cdot}}";case"....":return"{{\\cdot}{\\cdot}{\\cdot}{\\cdot}}";case"->":return"{\\rightarrow}";case"<-":return"{\\leftarrow}";case"<":return"{<}";case">":return"{>}";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getOperator:function(t){switch(t){case"+":return" {}+{} ";case"-":return" {}-{} ";case"=":return" {}={} ";case"<":return" {}<{} ";case">":return" {}>{} ";case"<<":return" {}\\ll{} ";case">>":return" {}\\gg{} ";case"\\pm":return" {}\\pm{} ";case"\\approx":case"$\\approx$":return" {}\\approx{} ";case"v":case"(v)":return" \\downarrow{} ";case"^":case"(^)":return" \\uparrow{} ";default:throw["MhchemBugT","mhchem bug T. Please report."]}}}}}]);\ No newline at end of file+(this.webpackJsonptiptap=this.webpackJsonptiptap||[]).push([[4],{124:function(t,e,n){"use strict";n.r(e);var a=n(123),o=n.n(a);o.a.__defineMacro("\\ce",(function(t){return r(t.consumeArgs(1)[0],"ce")})),o.a.__defineMacro("\\pu",(function(t){return r(t.consumeArgs(1)[0],"pu")})),o.a.__defineMacro("\\tripledash","{\\vphantom{-}\\raisebox{2.56mu}{$\\mkern2mu\\tiny\\text{-}\\mkern1mu\\text{-}\\mkern1mu\\text{-}\\mkern2mu$}}");var r=function(t,e){for(var n="",a=t.length&&t[t.length-1].loc.start,o=t.length-1;o>=0;o--)t[o].loc.start>a&&(n+=" ",a=t[o].loc.start),n+=t[o].text,a+=t[o].text.length;return c.go(i.go(n,e))},i={go:function(t,e){if(!t)return[];void 0===e&&(e="ce");var n,a="0",o={};o.parenthesisLevel=0,t=(t=(t=t.replace(/\n/g," ")).replace(/[\u2212\u2013\u2014\u2010]/g,"-")).replace(/[\u2026]/g,"...");for(var r=10,c=[];;){n!==t?(r=10,n=t):r--;var p=i.stateMachines[e],u=p.transitions[a]||p.transitions["*"];t:for(var s=0;s<u.length;s++){var _=i.patterns.match_(u[s].pattern,t);if(_){for(var d=u[s].task,m=0;m<d.action_.length;m++){var l;if(p.actions[d.action_[m].type_])l=p.actions[d.action_[m].type_](o,_.match_,d.action_[m].option);else{if(!i.actions[d.action_[m].type_])throw["MhchemBugA","mhchem bug A. Please report. ("+d.action_[m].type_+")"];l=i.actions[d.action_[m].type_](o,_.match_,d.action_[m].option)}i.concatArray(c,l)}if(a=d.nextState||a,!(t.length>0))return c;if(d.revisit||(t=_.remainder),!d.toContinue)break t}}if(r<=0)throw["MhchemBugU","mhchem bug U. Please report."]}},concatArray:function(t,e){if(e)if(Array.isArray(e))for(var n=0;n<e.length;n++)t.push(e[n]);else t.push(e)},patterns:{patterns:{empty:/^$/,else:/^./,else2:/^./,space:/^\s/,"space A":/^\s(?=[A-Z\\$])/,space$:/^\s$/,"a-z":/^[a-z]/,x:/^x/,x$:/^x$/,i$:/^i$/,letters:/^(?:[a-zA-Z\u03B1-\u03C9\u0391-\u03A9?@]|(?:\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?:\s+|\{\}|(?![a-zA-Z]))))+/,"\\greek":/^\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?:\s+|\{\}|(?![a-zA-Z]))/,"one lowercase latin letter $":/^(?:([a-z])(?:$|[^a-zA-Z]))$/,"$one lowercase latin letter$ $":/^\$(?:([a-z])(?:$|[^a-zA-Z]))\$$/,"one lowercase greek letter $":/^(?:\$?[\u03B1-\u03C9]\$?|\$?\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega)\s*\$?)(?:\s+|\{\}|(?![a-zA-Z]))$/,digits:/^[0-9]+/,"-9.,9":/^[+\-]?(?:[0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))/,"-9.,9 no missing 0":/^[+\-]?[0-9]+(?:[.,][0-9]+)?/,"(-)(9.,9)(e)(99)":function(t){var e=t.match(/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))?(\((?:[0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))\))?(?:([eE]|\s*(\*|x|\\times|\u00D7)\s*10\^)([+\-]?[0-9]+|\{[+\-]?[0-9]+\}))?/);return e&&e[0]?{match_:e.splice(1),remainder:t.substr(e[0].length)}:null},"(-)(9)^(-9)":function(t){var e=t.match(/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+)?)\^([+\-]?[0-9]+|\{[+\-]?[0-9]+\})/);return e&&e[0]?{match_:e.splice(1),remainder:t.substr(e[0].length)}:null},"state of aggregation $":function(t){var e=i.patterns.findObserveGroups(t,"",/^\([a-z]{1,3}(?=[\),])/,")","");if(e&&e.remainder.match(/^($|[\s,;\)\]\}])/))return e;var n=t.match(/^(?:\((?:\\ca\s?)?\$[amothc]\$\))/);return n?{match_:n[0],remainder:t.substr(n[0].length)}:null},"_{(state of aggregation)}$":/^_\{(\([a-z]{1,3}\))\}/,"{[(":/^(?:\\\{|\[|\()/,")]}":/^(?:\)|\]|\\\})/,", ":/^[,;]\s*/,",":/^[,;]/,".":/^[.]/,". ":/^([.\u22C5\u00B7\u2022])\s*/,"...":/^\.\.\.(?=$|[^.])/,"* ":/^([*])\s*/,"^{(...)}":function(t){return i.patterns.findObserveGroups(t,"^{","","","}")},"^($...$)":function(t){return i.patterns.findObserveGroups(t,"^","$","$","")},"^a":/^\^([0-9]+|[^\\_])/,"^\\x{}{}":function(t){return i.patterns.findObserveGroups(t,"^",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"^\\x{}":function(t){return i.patterns.findObserveGroups(t,"^",/^\\[a-zA-Z]+\{/,"}","")},"^\\x":/^\^(\\[a-zA-Z]+)\s*/,"^(-1)":/^\^(-?\d+)/,"'":/^'/,"_{(...)}":function(t){return i.patterns.findObserveGroups(t,"_{","","","}")},"_($...$)":function(t){return i.patterns.findObserveGroups(t,"_","$","$","")},_9:/^_([+\-]?[0-9]+|[^\\])/,"_\\x{}{}":function(t){return i.patterns.findObserveGroups(t,"_",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"_\\x{}":function(t){return i.patterns.findObserveGroups(t,"_",/^\\[a-zA-Z]+\{/,"}","")},"_\\x":/^_(\\[a-zA-Z]+)\s*/,"^_":/^(?:\^(?=_)|\_(?=\^)|[\^_]$)/,"{}":/^\{\}/,"{...}":function(t){return i.patterns.findObserveGroups(t,"","{","}","")},"{(...)}":function(t){return i.patterns.findObserveGroups(t,"{","","","}")},"$...$":function(t){return i.patterns.findObserveGroups(t,"","$","$","")},"${(...)}$":function(t){return i.patterns.findObserveGroups(t,"${","","","}$")},"$(...)$":function(t){return i.patterns.findObserveGroups(t,"$","","","$")},"=<>":/^[=<>]/,"#":/^[#\u2261]/,"+":/^\+/,"-$":/^-(?=[\s_},;\]/]|$|\([a-z]+\))/,"-9":/^-(?=[0-9])/,"- orbital overlap":/^-(?=(?:[spd]|sp)(?:$|[\s,;\)\]\}]))/,"-":/^-/,"pm-operator":/^(?:\\pm|\$\\pm\$|\+-|\+\/-)/,operator:/^(?:\+|(?:[\-=<>]|<<|>>|\\approx|\$\\approx\$)(?=\s|$|-?[0-9]))/,arrowUpDown:/^(?:v|\(v\)|\^|\(\^\))(?=$|[\s,;\)\]\}])/,"\\bond{(...)}":function(t){return i.patterns.findObserveGroups(t,"\\bond{","","","}")},"->":/^(?:<->|<-->|->|<-|<=>>|<<=>|<=>|[\u2192\u27F6\u21CC])/,CMT:/^[CMT](?=\[)/,"[(...)]":function(t){return i.patterns.findObserveGroups(t,"[","","","]")},"1st-level escape":/^(&|\\\\|\\hline)\s*/,"\\,":/^(?:\\[,\ ;:])/,"\\x{}{}":function(t){return i.patterns.findObserveGroups(t,"",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"\\x{}":function(t){return i.patterns.findObserveGroups(t,"",/^\\[a-zA-Z]+\{/,"}","")},"\\ca":/^\\ca(?:\s+|(?![a-zA-Z]))/,"\\x":/^(?:\\[a-zA-Z]+\s*|\\[_&{}%])/,orbital:/^(?:[0-9]{1,2}[spdfgh]|[0-9]{0,2}sp)(?=$|[^a-zA-Z])/,others:/^[\/~|]/,"\\frac{(...)}":function(t){return i.patterns.findObserveGroups(t,"\\frac{","","","}","{","","","}")},"\\overset{(...)}":function(t){return i.patterns.findObserveGroups(t,"\\overset{","","","}","{","","","}")},"\\underset{(...)}":function(t){return i.patterns.findObserveGroups(t,"\\underset{","","","}","{","","","}")},"\\underbrace{(...)}":function(t){return i.patterns.findObserveGroups(t,"\\underbrace{","","","}_","{","","","}")},"\\color{(...)}0":function(t){return i.patterns.findObserveGroups(t,"\\color{","","","}")},"\\color{(...)}{(...)}1":function(t){return i.patterns.findObserveGroups(t,"\\color{","","","}","{","","","}")},"\\color(...){(...)}2":function(t){return i.patterns.findObserveGroups(t,"\\color","\\","",/^(?=\{)/,"{","","","}")},"\\ce{(...)}":function(t){return i.patterns.findObserveGroups(t,"\\ce{","","","}")},oxidation$:/^(?:[+-][IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"d-oxidation$":/^(?:[+-]?\s?[IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"roman numeral":/^[IVX]+/,"1/2$":/^[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+(?:\$[a-z]\$|[a-z])?$/,amount:function(t){var e;if(e=t.match(/^(?:(?:(?:\([+\-]?[0-9]+\/[0-9]+\)|[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+|[+\-]?[0-9]+[.,][0-9]+|[+\-]?\.[0-9]+|[+\-]?[0-9]+)(?:[a-z](?=\s*[A-Z]))?)|[+\-]?[a-z](?=\s*[A-Z])|\+(?!\s))/))return{match_:e[0],remainder:t.substr(e[0].length)};var n=i.patterns.findObserveGroups(t,"","$","$","");return n&&(e=n.match_.match(/^\$(?:\(?[+\-]?(?:[0-9]*[a-z]?[+\-])?[0-9]*[a-z](?:[+\-][0-9]*[a-z]?)?\)?|\+|-)\$$/))?{match_:e[0],remainder:t.substr(e[0].length)}:null},amount2:function(t){return this.amount(t)},"(KV letters),":/^(?:[A-Z][a-z]{0,2}|i)(?=,)/,formula$:function(t){if(t.match(/^\([a-z]+\)$/))return null;var e=t.match(/^(?:[a-z]|(?:[0-9\ \+\-\,\.\(\)]+[a-z])+[0-9\ \+\-\,\.\(\)]*|(?:[a-z][0-9\ \+\-\,\.\(\)]+)+[a-z]?)$/);return e?{match_:e[0],remainder:t.substr(e[0].length)}:null},uprightEntities:/^(?:pH|pOH|pC|pK|iPr|iBu)(?=$|[^a-zA-Z])/,"/":/^\s*(\/)\s*/,"//":/^\s*(\/\/)\s*/,"*":/^\s*[*.]\s*/},findObserveGroups:function(t,e,n,a,o,r,i,c,p,u){var s=function(t,e){if("string"===typeof e)return 0!==t.indexOf(e)?null:e;var n=t.match(e);return n?n[0]:null},_=s(t,e);if(null===_)return null;if(t=t.substr(_.length),null===(_=s(t,n)))return null;var d=function(t,e,n){for(var a=0;e<t.length;){var o=t.charAt(e),r=s(t.substr(e),n);if(null!==r&&0===a)return{endMatchBegin:e,endMatchEnd:e+r.length};if("{"===o)a++;else if("}"===o){if(0===a)throw["ExtraCloseMissingOpen","Extra close brace or missing open brace"];a--}e++}return null}(t,_.length,a||o);if(null===d)return null;var m=t.substring(0,a?d.endMatchEnd:d.endMatchBegin);if(r||i){var l=this.findObserveGroups(t.substr(d.endMatchEnd),r,i,c,p);if(null===l)return null;var h=[m,l.match_];return{match_:u?h.join(""):h,remainder:l.remainder}}return{match_:m,remainder:t.substr(d.endMatchEnd)}},match_:function(t,e){var n=i.patterns.patterns[t];if(void 0===n)throw["MhchemBugP","mhchem bug P. Please report. ("+t+")"];if("function"===typeof n)return i.patterns.patterns[t](e);var a=e.match(n);return a?{match_:a[2]?[a[1],a[2]]:a[1]?a[1]:a[0],remainder:e.substr(a[0].length)}:null}},actions:{"a=":function(t,e){t.a=(t.a||"")+e},"b=":function(t,e){t.b=(t.b||"")+e},"p=":function(t,e){t.p=(t.p||"")+e},"o=":function(t,e){t.o=(t.o||"")+e},"q=":function(t,e){t.q=(t.q||"")+e},"d=":function(t,e){t.d=(t.d||"")+e},"rm=":function(t,e){t.rm=(t.rm||"")+e},"text=":function(t,e){t.text_=(t.text_||"")+e},insert:function(t,e,n){return{type_:n}},"insert+p1":function(t,e,n){return{type_:n,p1:e}},"insert+p1+p2":function(t,e,n){return{type_:n,p1:e[0],p2:e[1]}},copy:function(t,e){return e},rm:function(t,e){return{type_:"rm",p1:e||""}},text:function(t,e){return i.go(e,"text")},"{text}":function(t,e){var n=["{"];return i.concatArray(n,i.go(e,"text")),n.push("}"),n},"tex-math":function(t,e){return i.go(e,"tex-math")},"tex-math tight":function(t,e){return i.go(e,"tex-math tight")},bond:function(t,e,n){return{type_:"bond",kind_:n||e}},"color0-output":function(t,e){return{type_:"color0",color:e[0]}},ce:function(t,e){return i.go(e)},"1/2":function(t,e){var n=[];e.match(/^[+\-]/)&&(n.push(e.substr(0,1)),e=e.substr(1));var a=e.match(/^([0-9]+|\$[a-z]\$|[a-z])\/([0-9]+)(\$[a-z]\$|[a-z])?$/);return a[1]=a[1].replace(/\$/g,""),n.push({type_:"frac",p1:a[1],p2:a[2]}),a[3]&&(a[3]=a[3].replace(/\$/g,""),n.push({type_:"tex-math",p1:a[3]})),n},"9,9":function(t,e){return i.go(e,"9,9")}},createTransitions:function(t){var e,n,a,o,r={};for(e in t)for(n in t[e])for(a=n.split("|"),t[e][n].stateArray=a,o=0;o<a.length;o++)r[a[o]]=[];for(e in t)for(n in t[e])for(a=t[e][n].stateArray||[],o=0;o<a.length;o++){var i=t[e][n];if(i.action_){i.action_=[].concat(i.action_);for(var c=0;c<i.action_.length;c++)"string"===typeof i.action_[c]&&(i.action_[c]={type_:i.action_[c]})}else i.action_=[];for(var p=e.split("|"),u=0;u<p.length;u++)if("*"===a[o])for(var s in r)r[s].push({pattern:p[u],task:i});else r[a[o]].push({pattern:p[u],task:i})}return r},stateMachines:{}};i.stateMachines={ce:{transitions:i.createTransitions({empty:{"*":{action_:"output"}},else:{"0|1|2":{action_:"beginsWithBond=false",revisit:!0,toContinue:!0}},oxidation$:{0:{action_:"oxidation-output"}},CMT:{r:{action_:"rdt=",nextState:"rt"},rd:{action_:"rqt=",nextState:"rdt"}},arrowUpDown:{"0|1|2|as":{action_:["sb=false","output","operator"],nextState:"1"}},uprightEntities:{"0|1|2":{action_:["o=","output"],nextState:"1"}},orbital:{"0|1|2|3":{action_:"o=",nextState:"o"}},"->":{"0|1|2|3":{action_:"r=",nextState:"r"},"a|as":{action_:["output","r="],nextState:"r"},"*":{action_:["output","r="],nextState:"r"}},"+":{o:{action_:"d= kv",nextState:"d"},"d|D":{action_:"d=",nextState:"d"},q:{action_:"d=",nextState:"qd"},"qd|qD":{action_:"d=",nextState:"qd"},dq:{action_:["output","d="],nextState:"d"},3:{action_:["sb=false","output","operator"],nextState:"0"}},amount:{"0|2":{action_:"a=",nextState:"a"}},"pm-operator":{"0|1|2|a|as":{action_:["sb=false","output",{type_:"operator",option:"\\pm"}],nextState:"0"}},operator:{"0|1|2|a|as":{action_:["sb=false","output","operator"],nextState:"0"}},"-$":{"o|q":{action_:["charge or bond","output"],nextState:"qd"},d:{action_:"d=",nextState:"d"},D:{action_:["output",{type_:"bond",option:"-"}],nextState:"3"},q:{action_:"d=",nextState:"qd"},qd:{action_:"d=",nextState:"qd"},"qD|dq":{action_:["output",{type_:"bond",option:"-"}],nextState:"3"}},"-9":{"3|o":{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"3"}},"- orbital overlap":{o:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"},d:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"}},"-":{"0|1|2":{action_:[{type_:"output",option:1},"beginsWithBond=true",{type_:"bond",option:"-"}],nextState:"3"},3:{action_:{type_:"bond",option:"-"}},a:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"},as:{action_:[{type_:"output",option:2},{type_:"bond",option:"-"}],nextState:"3"},b:{action_:"b="},o:{action_:{type_:"- after o/d",option:!1},nextState:"2"},q:{action_:{type_:"- after o/d",option:!1},nextState:"2"},"d|qd|dq":{action_:{type_:"- after o/d",option:!0},nextState:"2"},"D|qD|p":{action_:["output",{type_:"bond",option:"-"}],nextState:"3"}},amount2:{"1|3":{action_:"a=",nextState:"a"}},letters:{"0|1|2|3|a|as|b|p|bp|o":{action_:"o=",nextState:"o"},"q|dq":{action_:["output","o="],nextState:"o"},"d|D|qd|qD":{action_:"o after d",nextState:"o"}},digits:{o:{action_:"q=",nextState:"q"},"d|D":{action_:"q=",nextState:"dq"},q:{action_:["output","o="],nextState:"o"},a:{action_:"o=",nextState:"o"}},"space A":{"b|p|bp":{}},space:{a:{nextState:"as"},0:{action_:"sb=false"},"1|2":{action_:"sb=true"},"r|rt|rd|rdt|rdq":{action_:"output",nextState:"0"},"*":{action_:["output","sb=true"],nextState:"1"}},"1st-level escape":{"1|2":{action_:["output",{type_:"insert+p1",option:"1st-level escape"}]},"*":{action_:["output",{type_:"insert+p1",option:"1st-level escape"}],nextState:"0"}},"[(...)]":{"r|rt":{action_:"rd=",nextState:"rd"},"rd|rdt":{action_:"rq=",nextState:"rdq"}},"...":{"o|d|D|dq|qd|qD":{action_:["output",{type_:"bond",option:"..."}],nextState:"3"},"*":{action_:[{type_:"output",option:1},{type_:"insert",option:"ellipsis"}],nextState:"1"}},". |* ":{"*":{action_:["output",{type_:"insert",option:"addition compound"}],nextState:"1"}},"state of aggregation $":{"*":{action_:["output","state of aggregation"],nextState:"1"}},"{[(":{"a|as|o":{action_:["o=","output","parenthesisLevel++"],nextState:"2"},"0|1|2|3":{action_:["o=","output","parenthesisLevel++"],nextState:"2"},"*":{action_:["output","o=","output","parenthesisLevel++"],nextState:"2"}},")]}":{"0|1|2|3|b|p|bp|o":{action_:["o=","parenthesisLevel--"],nextState:"o"},"a|as|d|D|q|qd|qD|dq":{action_:["output","o=","parenthesisLevel--"],nextState:"o"}},", ":{"*":{action_:["output","comma"],nextState:"0"}},"^_":{"*":{}},"^{(...)}|^($...$)":{"0|1|2|as":{action_:"b=",nextState:"b"},p:{action_:"b=",nextState:"bp"},"3|o":{action_:"d= kv",nextState:"D"},q:{action_:"d=",nextState:"qD"},"d|D|qd|qD|dq":{action_:["output","d="],nextState:"D"}},"^a|^\\x{}{}|^\\x{}|^\\x|'":{"0|1|2|as":{action_:"b=",nextState:"b"},p:{action_:"b=",nextState:"bp"},"3|o":{action_:"d= kv",nextState:"d"},q:{action_:"d=",nextState:"qd"},"d|qd|D|qD":{action_:"d="},dq:{action_:["output","d="],nextState:"d"}},"_{(state of aggregation)}$":{"d|D|q|qd|qD|dq":{action_:["output","q="],nextState:"q"}},"_{(...)}|_($...$)|_9|_\\x{}{}|_\\x{}|_\\x":{"0|1|2|as":{action_:"p=",nextState:"p"},b:{action_:"p=",nextState:"bp"},"3|o":{action_:"q=",nextState:"q"},"d|D":{action_:"q=",nextState:"dq"},"q|qd|qD|dq":{action_:["output","q="],nextState:"q"}},"=<>":{"0|1|2|3|a|as|o|q|d|D|qd|qD|dq":{action_:[{type_:"output",option:2},"bond"],nextState:"3"}},"#":{"0|1|2|3|a|as|o":{action_:[{type_:"output",option:2},{type_:"bond",option:"#"}],nextState:"3"}},"{}":{"*":{action_:{type_:"output",option:1},nextState:"1"}},"{...}":{"0|1|2|3|a|as|b|p|bp":{action_:"o=",nextState:"o"},"o|d|D|q|qd|qD|dq":{action_:["output","o="],nextState:"o"}},"$...$":{a:{action_:"a="},"0|1|2|3|as|b|p|bp|o":{action_:"o=",nextState:"o"},"as|o":{action_:"o="},"q|d|D|qd|qD|dq":{action_:["output","o="],nextState:"o"}},"\\bond{(...)}":{"*":{action_:[{type_:"output",option:2},"bond"],nextState:"3"}},"\\frac{(...)}":{"*":{action_:[{type_:"output",option:1},"frac-output"],nextState:"3"}},"\\overset{(...)}":{"*":{action_:[{type_:"output",option:2},"overset-output"],nextState:"3"}},"\\underset{(...)}":{"*":{action_:[{type_:"output",option:2},"underset-output"],nextState:"3"}},"\\underbrace{(...)}":{"*":{action_:[{type_:"output",option:2},"underbrace-output"],nextState:"3"}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:[{type_:"output",option:2},"color-output"],nextState:"3"}},"\\color{(...)}0":{"*":{action_:[{type_:"output",option:2},"color0-output"]}},"\\ce{(...)}":{"*":{action_:[{type_:"output",option:2},"ce"],nextState:"3"}},"\\,":{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"1"}},"\\x{}{}|\\x{}|\\x":{"0|1|2|3|a|as|b|p|bp|o|c0":{action_:["o=","output"],nextState:"3"},"*":{action_:["output","o=","output"],nextState:"3"}},others:{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"3"}},else2:{a:{action_:"a to o",nextState:"o",revisit:!0},as:{action_:["output","sb=true"],nextState:"1",revisit:!0},"r|rt|rd|rdt|rdq":{action_:["output"],nextState:"0",revisit:!0},"*":{action_:["output","copy"],nextState:"3"}}}),actions:{"o after d":function(t,e){var n;if((t.d||"").match(/^[0-9]+$/)){var a=t.d;t.d=void 0,n=this.output(t),t.b=a}else n=this.output(t);return i.actions["o="](t,e),n},"d= kv":function(t,e){t.d=e,t.dType="kv"},"charge or bond":function(t,e){if(t.beginsWithBond){var n=[];return i.concatArray(n,this.output(t)),i.concatArray(n,i.actions.bond(t,e,"-")),n}t.d=e},"- after o/d":function(t,e,n){var a=i.patterns.match_("orbital",t.o||""),o=i.patterns.match_("one lowercase greek letter $",t.o||""),r=i.patterns.match_("one lowercase latin letter $",t.o||""),c=i.patterns.match_("$one lowercase latin letter$ $",t.o||""),p="-"===e&&(a&&""===a.remainder||o||r||c);!p||t.a||t.b||t.p||t.d||t.q||a||!r||(t.o="$"+t.o+"$");var u=[];return p?(i.concatArray(u,this.output(t)),u.push({type_:"hyphen"})):(a=i.patterns.match_("digits",t.d||""),n&&a&&""===a.remainder?(i.concatArray(u,i.actions["d="](t,e)),i.concatArray(u,this.output(t))):(i.concatArray(u,this.output(t)),i.concatArray(u,i.actions.bond(t,e,"-")))),u},"a to o":function(t){t.o=t.a,t.a=void 0},"sb=true":function(t){t.sb=!0},"sb=false":function(t){t.sb=!1},"beginsWithBond=true":function(t){t.beginsWithBond=!0},"beginsWithBond=false":function(t){t.beginsWithBond=!1},"parenthesisLevel++":function(t){t.parenthesisLevel++},"parenthesisLevel--":function(t){t.parenthesisLevel--},"state of aggregation":function(t,e){return{type_:"state of aggregation",p1:i.go(e,"o")}},comma:function(t,e){var n=e.replace(/\s*$/,"");return n!==e&&0===t.parenthesisLevel?{type_:"comma enumeration L",p1:n}:{type_:"comma enumeration M",p1:n}},output:function(t,e,n){var a,o,r;t.r?(o="M"===t.rdt?i.go(t.rd,"tex-math"):"T"===t.rdt?[{type_:"text",p1:t.rd||""}]:i.go(t.rd),r="M"===t.rqt?i.go(t.rq,"tex-math"):"T"===t.rqt?[{type_:"text",p1:t.rq||""}]:i.go(t.rq),a={type_:"arrow",r:t.r,rd:o,rq:r}):(a=[],(t.a||t.b||t.p||t.o||t.q||t.d||n)&&(t.sb&&a.push({type_:"entitySkip"}),t.o||t.q||t.d||t.b||t.p||2===n?t.o||t.q||t.d||!t.b&&!t.p?t.o&&"kv"===t.dType&&i.patterns.match_("d-oxidation$",t.d||"")?t.dType="oxidation":t.o&&"kv"===t.dType&&!t.q&&(t.dType=void 0):(t.o=t.a,t.d=t.b,t.q=t.p,t.a=t.b=t.p=void 0):(t.o=t.a,t.a=void 0),a.push({type_:"chemfive",a:i.go(t.a,"a"),b:i.go(t.b,"bd"),p:i.go(t.p,"pq"),o:i.go(t.o,"o"),q:i.go(t.q,"pq"),d:i.go(t.d,"oxidation"===t.dType?"oxidation":"bd"),dType:t.dType})));for(var c in t)"parenthesisLevel"!==c&&"beginsWithBond"!==c&&delete t[c];return a},"oxidation-output":function(t,e){var n=["{"];return i.concatArray(n,i.go(e,"oxidation")),n.push("}"),n},"frac-output":function(t,e){return{type_:"frac-ce",p1:i.go(e[0]),p2:i.go(e[1])}},"overset-output":function(t,e){return{type_:"overset",p1:i.go(e[0]),p2:i.go(e[1])}},"underset-output":function(t,e){return{type_:"underset",p1:i.go(e[0]),p2:i.go(e[1])}},"underbrace-output":function(t,e){return{type_:"underbrace",p1:i.go(e[0]),p2:i.go(e[1])}},"color-output":function(t,e){return{type_:"color",color1:e[0],color2:i.go(e[1])}},"r=":function(t,e){t.r=e},"rdt=":function(t,e){t.rdt=e},"rd=":function(t,e){t.rd=e},"rqt=":function(t,e){t.rqt=e},"rq=":function(t,e){t.rq=e},operator:function(t,e,n){return{type_:"operator",kind_:n||e}}}},a:{transitions:i.createTransitions({empty:{"*":{}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"1",revisit:!0}},"$(...)$":{"*":{action_:"tex-math tight",nextState:"1"}},",":{"*":{action_:{type_:"insert",option:"commaDecimal"}}},else2:{"*":{action_:"copy"}}}),actions:{}},o:{transitions:i.createTransitions({empty:{"*":{}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"1",revisit:!0}},letters:{"*":{action_:"rm"}},"\\ca":{"*":{action_:{type_:"insert",option:"circa"}}},"\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"{text}"}},else2:{"*":{action_:"copy"}}}),actions:{}},text:{transitions:i.createTransitions({empty:{"*":{action_:"output"}},"{...}":{"*":{action_:"text="}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"\\greek":{"*":{action_:["output","rm"]}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:["output","copy"]}},else:{"*":{action_:"text="}}}),actions:{output:function(t){if(t.text_){var e={type_:"text",p1:t.text_};for(var n in t)delete t[n];return e}}}},pq:{transitions:i.createTransitions({empty:{"*":{}},"state of aggregation $":{"*":{action_:"state of aggregation"}},i$:{0:{nextState:"!f",revisit:!0}},"(KV letters),":{0:{action_:"rm",nextState:"0"}},formula$:{0:{nextState:"f",revisit:!0}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"!f",revisit:!0}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"text"}},"a-z":{f:{action_:"tex-math"}},letters:{"*":{action_:"rm"}},"-9.,9":{"*":{action_:"9,9"}},",":{"*":{action_:{type_:"insert+p1",option:"comma enumeration S"}}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:"color-output"}},"\\color{(...)}0":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"state of aggregation":function(t,e){return{type_:"state of aggregation subscript",p1:i.go(e,"o")}},"color-output":function(t,e){return{type_:"color",color1:e[0],color2:i.go(e[1],"pq")}}}},bd:{transitions:i.createTransitions({empty:{"*":{}},x$:{0:{nextState:"!f",revisit:!0}},formula$:{0:{nextState:"f",revisit:!0}},else:{0:{nextState:"!f",revisit:!0}},"-9.,9 no missing 0":{"*":{action_:"9,9"}},".":{"*":{action_:{type_:"insert",option:"electron dot"}}},"a-z":{f:{action_:"tex-math"}},x:{"*":{action_:{type_:"insert",option:"KV x"}}},letters:{"*":{action_:"rm"}},"'":{"*":{action_:{type_:"insert",option:"prime"}}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"text"}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:"color-output"}},"\\color{(...)}0":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"color-output":function(t,e){return{type_:"color",color1:e[0],color2:i.go(e[1],"bd")}}}},oxidation:{transitions:i.createTransitions({empty:{"*":{}},"roman numeral":{"*":{action_:"roman-numeral"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},else:{"*":{action_:"copy"}}}),actions:{"roman-numeral":function(t,e){return{type_:"roman numeral",p1:e||""}}}},"tex-math":{transitions:i.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},else:{"*":{action_:"o="}}}),actions:{output:function(t){if(t.o){var e={type_:"tex-math",p1:t.o};for(var n in t)delete t[n];return e}}}},"tex-math tight":{transitions:i.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},"-|+":{"*":{action_:"tight operator"}},else:{"*":{action_:"o="}}}),actions:{"tight operator":function(t,e){t.o=(t.o||"")+"{"+e+"}"},output:function(t){if(t.o){var e={type_:"tex-math",p1:t.o};for(var n in t)delete t[n];return e}}}},"9,9":{transitions:i.createTransitions({empty:{"*":{}},",":{"*":{action_:"comma"}},else:{"*":{action_:"copy"}}}),actions:{comma:function(){return{type_:"commaDecimal"}}}},pu:{transitions:i.createTransitions({empty:{"*":{action_:"output"}},space$:{"*":{action_:["output","space"]}},"{[(|)]}":{"0|a":{action_:"copy"}},"(-)(9)^(-9)":{0:{action_:"number^",nextState:"a"}},"(-)(9.,9)(e)(99)":{0:{action_:"enumber",nextState:"a"}},space:{"0|a":{}},"pm-operator":{"0|a":{action_:{type_:"operator",option:"\\pm"},nextState:"0"}},operator:{"0|a":{action_:"copy",nextState:"0"}},"//":{d:{action_:"o=",nextState:"/"}},"/":{d:{action_:"o=",nextState:"/"}},"{...}|else":{"0|d":{action_:"d=",nextState:"d"},a:{action_:["space","d="],nextState:"d"},"/|q":{action_:"q=",nextState:"q"}}}),actions:{enumber:function(t,e){var n=[];return"+-"===e[0]||"+/-"===e[0]?n.push("\\pm "):e[0]&&n.push(e[0]),e[1]&&(i.concatArray(n,i.go(e[1],"pu-9,9")),e[2]&&(e[2].match(/[,.]/)?i.concatArray(n,i.go(e[2],"pu-9,9")):n.push(e[2])),e[3]=e[4]||e[3],e[3]&&(e[3]=e[3].trim(),"e"===e[3]||"*"===e[3].substr(0,1)?n.push({type_:"cdot"}):n.push({type_:"times"}))),e[3]&&n.push("10^{"+e[5]+"}"),n},"number^":function(t,e){var n=[];return"+-"===e[0]||"+/-"===e[0]?n.push("\\pm "):e[0]&&n.push(e[0]),i.concatArray(n,i.go(e[1],"pu-9,9")),n.push("^{"+e[2]+"}"),n},operator:function(t,e,n){return{type_:"operator",kind_:n||e}},space:function(){return{type_:"pu-space-1"}},output:function(t){var e,n=i.patterns.match_("{(...)}",t.d||"");n&&""===n.remainder&&(t.d=n.match_);var a=i.patterns.match_("{(...)}",t.q||"");if(a&&""===a.remainder&&(t.q=a.match_),t.d&&(t.d=t.d.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),t.d=t.d.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F")),t.q){t.q=t.q.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),t.q=t.q.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F");var o={d:i.go(t.d,"pu"),q:i.go(t.q,"pu")};"//"===t.o?e={type_:"pu-frac",p1:o.d,p2:o.q}:(e=o.d,o.d.length>1||o.q.length>1?e.push({type_:" / "}):e.push({type_:"/"}),i.concatArray(e,o.q))}else e=i.go(t.d,"pu-2");for(var r in t)delete t[r];return e}}},"pu-2":{transitions:i.createTransitions({empty:{"*":{action_:"output"}},"*":{"*":{action_:["output","cdot"],nextState:"0"}},"\\x":{"*":{action_:"rm="}},space:{"*":{action_:["output","space"],nextState:"0"}},"^{(...)}|^(-1)":{1:{action_:"^(-1)"}},"-9.,9":{0:{action_:"rm=",nextState:"0"},1:{action_:"^(-1)",nextState:"0"}},"{...}|else":{"*":{action_:"rm=",nextState:"1"}}}),actions:{cdot:function(){return{type_:"tight cdot"}},"^(-1)":function(t,e){t.rm+="^{"+e+"}"},space:function(){return{type_:"pu-space-2"}},output:function(t){var e=[];if(t.rm){var n=i.patterns.match_("{(...)}",t.rm||"");e=n&&""===n.remainder?i.go(n.match_,"pu"):{type_:"rm",p1:t.rm}}for(var a in t)delete t[a];return e}}},"pu-9,9":{transitions:i.createTransitions({empty:{0:{action_:"output-0"},o:{action_:"output-o"}},",":{0:{action_:["output-0","comma"],nextState:"o"}},".":{0:{action_:["output-0","copy"],nextState:"o"}},else:{"*":{action_:"text="}}}),actions:{comma:function(){return{type_:"commaDecimal"}},"output-0":function(t){var e=[];if(t.text_=t.text_||"",t.text_.length>4){var n=t.text_.length%3;0===n&&(n=3);for(var a=t.text_.length-3;a>0;a-=3)e.push(t.text_.substr(a,3)),e.push({type_:"1000 separator"});e.push(t.text_.substr(0,n)),e.reverse()}else e.push(t.text_);for(var o in t)delete t[o];return e},"output-o":function(t){var e=[];if(t.text_=t.text_||"",t.text_.length>4){for(var n=t.text_.length-3,a=0;a<n;a+=3)e.push(t.text_.substr(a,3)),e.push({type_:"1000 separator"});e.push(t.text_.substr(a))}else e.push(t.text_);for(var o in t)delete t[o];return e}}}};var c={go:function(t,e){if(!t)return"";for(var n="",a=!1,o=0;o<t.length;o++){var r=t[o];"string"===typeof r?n+=r:(n+=c._go2(r),"1st-level escape"===r.type_&&(a=!0))}return e||a||!n||(n="{"+n+"}"),n},_goInner:function(t){return t?c.go(t,!0):t},_go2:function(t){var e;switch(t.type_){case"chemfive":e="";var n={a:c._goInner(t.a),b:c._goInner(t.b),p:c._goInner(t.p),o:c._goInner(t.o),q:c._goInner(t.q),d:c._goInner(t.d)};n.a&&(n.a.match(/^[+\-]/)&&(n.a="{"+n.a+"}"),e+=n.a+"\\,"),(n.b||n.p)&&(e+="{\\vphantom{X}}",e+="^{\\hphantom{"+(n.b||"")+"}}_{\\hphantom{"+(n.p||"")+"}}",e+="{\\vphantom{X}}",e+="^{\\smash[t]{\\vphantom{2}}\\mathllap{"+(n.b||"")+"}}",e+="_{\\vphantom{2}\\mathllap{\\smash[t]{"+(n.p||"")+"}}}"),n.o&&(n.o.match(/^[+\-]/)&&(n.o="{"+n.o+"}"),e+=n.o),"kv"===t.dType?((n.d||n.q)&&(e+="{\\vphantom{X}}"),n.d&&(e+="^{"+n.d+"}"),n.q&&(e+="_{\\smash[t]{"+n.q+"}}")):"oxidation"===t.dType?(n.d&&(e+="{\\vphantom{X}}",e+="^{"+n.d+"}"),n.q&&(e+="{\\vphantom{X}}",e+="_{\\smash[t]{"+n.q+"}}")):(n.q&&(e+="{\\vphantom{X}}",e+="_{\\smash[t]{"+n.q+"}}"),n.d&&(e+="{\\vphantom{X}}",e+="^{"+n.d+"}"));break;case"rm":case"roman numeral":e="\\mathrm{"+t.p1+"}";break;case"text":t.p1.match(/[\^_]/)?(t.p1=t.p1.replace(" ","~").replace("-","\\text{-}"),e="\\mathrm{"+t.p1+"}"):e="\\text{"+t.p1+"}";break;case"state of aggregation":e="\\mskip2mu "+c._goInner(t.p1);break;case"state of aggregation subscript":e="\\mskip1mu "+c._goInner(t.p1);break;case"bond":if(!(e=c._getBond(t.kind_)))throw["MhchemErrorBond","mhchem Error. Unknown bond type ("+t.kind_+")"];break;case"frac":var a="\\frac{"+t.p1+"}{"+t.p2+"}";e="\\mathchoice{\\textstyle"+a+"}{"+a+"}{"+a+"}{"+a+"}";break;case"pu-frac":var o="\\frac{"+c._goInner(t.p1)+"}{"+c._goInner(t.p2)+"}";e="\\mathchoice{\\textstyle"+o+"}{"+o+"}{"+o+"}{"+o+"}";break;case"tex-math":case"1st-level escape":e=t.p1+" ";break;case"frac-ce":e="\\frac{"+c._goInner(t.p1)+"}{"+c._goInner(t.p2)+"}";break;case"overset":e="\\overset{"+c._goInner(t.p1)+"}{"+c._goInner(t.p2)+"}";break;case"underset":e="\\underset{"+c._goInner(t.p1)+"}{"+c._goInner(t.p2)+"}";break;case"underbrace":e="\\underbrace{"+c._goInner(t.p1)+"}_{"+c._goInner(t.p2)+"}";break;case"color":e="{\\color{"+t.color1+"}{"+c._goInner(t.color2)+"}}";break;case"color0":e="\\color{"+t.color+"}";break;case"arrow":var r={rd:c._goInner(t.rd),rq:c._goInner(t.rq)},i="\\x"+c._getArrow(t.r);r.rq&&(i+="[{"+r.rq+"}]"),e=i+=r.rd?"{"+r.rd+"}":"{}";break;case"operator":e=c._getOperator(t.kind_);break;case"space":e=" ";break;case"entitySkip":case"pu-space-1":e="~";break;case"pu-space-2":e="\\mkern3mu ";break;case"1000 separator":e="\\mkern2mu ";break;case"commaDecimal":e="{,}";break;case"comma enumeration L":e="{"+t.p1+"}\\mkern6mu ";break;case"comma enumeration M":e="{"+t.p1+"}\\mkern3mu ";break;case"comma enumeration S":e="{"+t.p1+"}\\mkern1mu ";break;case"hyphen":e="\\text{-}";break;case"addition compound":e="\\,{\\cdot}\\,";break;case"electron dot":e="\\mkern1mu \\bullet\\mkern1mu ";break;case"KV x":e="{\\times}";break;case"prime":e="\\prime ";break;case"cdot":e="\\cdot ";break;case"tight cdot":e="\\mkern1mu{\\cdot}\\mkern1mu ";break;case"times":e="\\times ";break;case"circa":e="{\\sim}";break;case"^":e="uparrow";break;case"v":e="downarrow";break;case"ellipsis":e="\\ldots ";break;case"/":e="/";break;case" / ":e="\\,/\\,";break;default:throw["MhchemBugT","mhchem bug T. Please report."]}return e},_getArrow:function(t){switch(t){case"->":case"\u2192":case"\u27f6":return"rightarrow";case"<-":return"leftarrow";case"<->":return"leftrightarrow";case"<--\x3e":return"rightleftarrows";case"<=>":case"\u21cc":return"rightleftharpoons";case"<=>>":return"rightequilibrium";case"<<=>":return"leftequilibrium";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getBond:function(t){switch(t){case"-":case"1":return"{-}";case"=":case"2":return"{=}";case"#":case"3":return"{\\equiv}";case"~":return"{\\tripledash}";case"~-":return"{\\mathrlap{\\raisebox{-.1em}{$-$}}\\raisebox{.1em}{$\\tripledash$}}";case"~=":case"~--":return"{\\mathrlap{\\raisebox{-.2em}{$-$}}\\mathrlap{\\raisebox{.2em}{$\\tripledash$}}-}";case"-~-":return"{\\mathrlap{\\raisebox{-.2em}{$-$}}\\mathrlap{\\raisebox{.2em}{$-$}}\\tripledash}";case"...":return"{{\\cdot}{\\cdot}{\\cdot}}";case"....":return"{{\\cdot}{\\cdot}{\\cdot}{\\cdot}}";case"->":return"{\\rightarrow}";case"<-":return"{\\leftarrow}";case"<":return"{<}";case">":return"{>}";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getOperator:function(t){switch(t){case"+":return" {}+{} ";case"-":return" {}-{} ";case"=":return" {}={} ";case"<":return" {}<{} ";case">":return" {}>{} ";case"<<":return" {}\\ll{} ";case">>":return" {}\\gg{} ";case"\\pm":return" {}\\pm{} ";case"\\approx":case"$\\approx$":return" {}\\approx{} ";case"v":case"(v)":return" \\downarrow{} ";case"^":case"(^)":return" \\uparrow{} ";default:throw["MhchemBugT","mhchem bug T. Please report."]}}}}}]);\ No newline at end of filediff --git a/apps/mobile/web.bundle/static/js/5.34df2de4.chunk.js b/apps/mobile/web.bundle/static/js/5.077f361c.chunk.jssimilarity index 97%rename from apps/mobile/web.bundle/static/js/5.34df2de4.chunk.jsrename to apps/mobile/web.bundle/static/js/5.077f361c.chunk.jsindex 4c464430f..f85b9123e 100644--- a/apps/mobile/web.bundle/static/js/5.34df2de4.chunk.js+++ b/apps/mobile/web.bundle/static/js/5.077f361c.chunk.js@@ -1 +1 @@-(this.webpackJsonptiptap=this.webpackJsonptiptap||[]).push([[5],{129:function(t,e,n){"use strict";n.r(e),n.d(e,"getCLS",(function(){return d})),n.d(e,"getFCP",(function(){return S})),n.d(e,"getFID",(function(){return F})),n.d(e,"getLCP",(function(){return k})),n.d(e,"getTTFB",(function(){return C}));var i,a,r,o,u=function(t,e){return{name:t,value:void 0===e?-1:e,delta:0,entries:[],id:"v1-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12)}},c=function(t,e){try{if(PerformanceObserver.supportedEntryTypes.includes(t)){if("first-input"===t&&!("PerformanceEventTiming"in self))return;var n=new PerformanceObserver((function(t){return t.getEntries().map(e)}));return n.observe({type:t,buffered:!0}),n}}catch(t){}},f=function(t,e){var n=function n(i){"pagehide"!==i.type&&"hidden"!==document.visibilityState||(t(i),e&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)},s=function(t){addEventListener("pageshow",(function(e){e.persisted&&t(e)}),!0)},p="function"==typeof WeakSet?new WeakSet:new Set,m=function(t,e,n){var i;return function(){e.value>=0&&(n||p.has(e)||"hidden"===document.visibilityState)&&(e.delta=e.value-(i||0),(e.delta||void 0===i)&&(i=e.value,t(e)))}},d=function(t,e){var n,i=u("CLS",0),a=function(t){t.hadRecentInput||(i.value+=t.value,i.entries.push(t),n())},r=c("layout-shift",a);r&&(n=m(t,i,e),f((function(){r.takeRecords().map(a),n()})),s((function(){i=u("CLS",0),n=m(t,i,e)})))},v=-1,l=function(){return"hidden"===document.visibilityState?0:1/0},h=function(){f((function(t){var e=t.timeStamp;v=e}),!0)},g=function(){return v<0&&(v=l(),h(),s((function(){setTimeout((function(){v=l(),h()}),0)}))),{get timeStamp(){return v}}},S=function(t,e){var n,i=g(),a=u("FCP"),r=function(t){"first-contentful-paint"===t.name&&(f&&f.disconnect(),t.startTime<i.timeStamp&&(a.value=t.startTime,a.entries.push(t),p.add(a),n()))},o=performance.getEntriesByName("first-contentful-paint")[0],f=o?null:c("paint",r);(o||f)&&(n=m(t,a,e),o&&r(o),s((function(i){a=u("FCP"),n=m(t,a,e),requestAnimationFrame((function(){requestAnimationFrame((function(){a.value=performance.now()-i.timeStamp,p.add(a),n()}))}))})))},y={passive:!0,capture:!0},E=new Date,w=function(t,e){i||(i=e,a=t,r=new Date,b(removeEventListener),L())},L=function(){if(a>=0&&a<r-E){var t={entryType:"first-input",name:i.type,target:i.target,cancelable:i.cancelable,startTime:i.timeStamp,processingStart:i.timeStamp+a};o.forEach((function(e){e(t)})),o=[]}},T=function(t){if(t.cancelable){var e=(t.timeStamp>1e12?new Date:performance.now())-t.timeStamp;"pointerdown"==t.type?function(t,e){var n=function(){w(t,e),a()},i=function(){a()},a=function(){removeEventListener("pointerup",n,y),removeEventListener("pointercancel",i,y)};addEventListener("pointerup",n,y),addEventListener("pointercancel",i,y)}(e,t):w(e,t)}},b=function(t){["mousedown","keydown","touchstart","pointerdown"].forEach((function(e){return t(e,T,y)}))},F=function(t,e){var n,r=g(),d=u("FID"),v=function(t){t.startTime<r.timeStamp&&(d.value=t.processingStart-t.startTime,d.entries.push(t),p.add(d),n())},l=c("first-input",v);n=m(t,d,e),l&&f((function(){l.takeRecords().map(v),l.disconnect()}),!0),l&&s((function(){var r;d=u("FID"),n=m(t,d,e),o=[],a=-1,i=null,b(addEventListener),r=v,o.push(r),L()}))},k=function(t,e){var n,i=g(),a=u("LCP"),r=function(t){var e=t.startTime;e<i.timeStamp&&(a.value=e,a.entries.push(t)),n()},o=c("largest-contentful-paint",r);if(o){n=m(t,a,e);var d=function(){p.has(a)||(o.takeRecords().map(r),o.disconnect(),p.add(a),n())};["keydown","click"].forEach((function(t){addEventListener(t,d,{once:!0,capture:!0})})),f(d,!0),s((function(i){a=u("LCP"),n=m(t,a,e),requestAnimationFrame((function(){requestAnimationFrame((function(){a.value=performance.now()-i.timeStamp,p.add(a),n()}))}))}))}},C=function(t){var e,n=u("TTFB");e=function(){try{var e=performance.getEntriesByType("navigation")[0]||function(){var t=performance.timing,e={entryType:"navigation",startTime:0};for(var n in t)"navigationStart"!==n&&"toJSON"!==n&&(e[n]=Math.max(t[n]-t.navigationStart,0));return e}();if(n.value=n.delta=e.responseStart,n.value<0)return;n.entries=[e],t(n)}catch(t){}},"complete"===document.readyState?setTimeout(e,0):addEventListener("pageshow",e)}}}]);\ No newline at end of file+(this.webpackJsonptiptap=this.webpackJsonptiptap||[]).push([[5],{125:function(t,e,n){"use strict";n.r(e),n.d(e,"getCLS",(function(){return d})),n.d(e,"getFCP",(function(){return S})),n.d(e,"getFID",(function(){return F})),n.d(e,"getLCP",(function(){return k})),n.d(e,"getTTFB",(function(){return C}));var i,a,r,o,u=function(t,e){return{name:t,value:void 0===e?-1:e,delta:0,entries:[],id:"v1-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12)}},c=function(t,e){try{if(PerformanceObserver.supportedEntryTypes.includes(t)){if("first-input"===t&&!("PerformanceEventTiming"in self))return;var n=new PerformanceObserver((function(t){return t.getEntries().map(e)}));return n.observe({type:t,buffered:!0}),n}}catch(t){}},f=function(t,e){var n=function n(i){"pagehide"!==i.type&&"hidden"!==document.visibilityState||(t(i),e&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)},s=function(t){addEventListener("pageshow",(function(e){e.persisted&&t(e)}),!0)},p="function"==typeof WeakSet?new WeakSet:new Set,m=function(t,e,n){var i;return function(){e.value>=0&&(n||p.has(e)||"hidden"===document.visibilityState)&&(e.delta=e.value-(i||0),(e.delta||void 0===i)&&(i=e.value,t(e)))}},d=function(t,e){var n,i=u("CLS",0),a=function(t){t.hadRecentInput||(i.value+=t.value,i.entries.push(t),n())},r=c("layout-shift",a);r&&(n=m(t,i,e),f((function(){r.takeRecords().map(a),n()})),s((function(){i=u("CLS",0),n=m(t,i,e)})))},v=-1,l=function(){return"hidden"===document.visibilityState?0:1/0},h=function(){f((function(t){var e=t.timeStamp;v=e}),!0)},g=function(){return v<0&&(v=l(),h(),s((function(){setTimeout((function(){v=l(),h()}),0)}))),{get timeStamp(){return v}}},S=function(t,e){var n,i=g(),a=u("FCP"),r=function(t){"first-contentful-paint"===t.name&&(f&&f.disconnect(),t.startTime<i.timeStamp&&(a.value=t.startTime,a.entries.push(t),p.add(a),n()))},o=performance.getEntriesByName("first-contentful-paint")[0],f=o?null:c("paint",r);(o||f)&&(n=m(t,a,e),o&&r(o),s((function(i){a=u("FCP"),n=m(t,a,e),requestAnimationFrame((function(){requestAnimationFrame((function(){a.value=performance.now()-i.timeStamp,p.add(a),n()}))}))})))},y={passive:!0,capture:!0},E=new Date,w=function(t,e){i||(i=e,a=t,r=new Date,b(removeEventListener),L())},L=function(){if(a>=0&&a<r-E){var t={entryType:"first-input",name:i.type,target:i.target,cancelable:i.cancelable,startTime:i.timeStamp,processingStart:i.timeStamp+a};o.forEach((function(e){e(t)})),o=[]}},T=function(t){if(t.cancelable){var e=(t.timeStamp>1e12?new Date:performance.now())-t.timeStamp;"pointerdown"==t.type?function(t,e){var n=function(){w(t,e),a()},i=function(){a()},a=function(){removeEventListener("pointerup",n,y),removeEventListener("pointercancel",i,y)};addEventListener("pointerup",n,y),addEventListener("pointercancel",i,y)}(e,t):w(e,t)}},b=function(t){["mousedown","keydown","touchstart","pointerdown"].forEach((function(e){return t(e,T,y)}))},F=function(t,e){var n,r=g(),d=u("FID"),v=function(t){t.startTime<r.timeStamp&&(d.value=t.processingStart-t.startTime,d.entries.push(t),p.add(d),n())},l=c("first-input",v);n=m(t,d,e),l&&f((function(){l.takeRecords().map(v),l.disconnect()}),!0),l&&s((function(){var r;d=u("FID"),n=m(t,d,e),o=[],a=-1,i=null,b(addEventListener),r=v,o.push(r),L()}))},k=function(t,e){var n,i=g(),a=u("LCP"),r=function(t){var e=t.startTime;e<i.timeStamp&&(a.value=e,a.entries.push(t)),n()},o=c("largest-contentful-paint",r);if(o){n=m(t,a,e);var d=function(){p.has(a)||(o.takeRecords().map(r),o.disconnect(),p.add(a),n())};["keydown","click"].forEach((function(t){addEventListener(t,d,{once:!0,capture:!0})})),f(d,!0),s((function(i){a=u("LCP"),n=m(t,a,e),requestAnimationFrame((function(){requestAnimationFrame((function(){a.value=performance.now()-i.timeStamp,p.add(a),n()}))}))}))}},C=function(t){var e,n=u("TTFB");e=function(){try{var e=performance.getEntriesByType("navigation")[0]||function(){var t=performance.timing,e={entryType:"navigation",startTime:0};for(var n in t)"navigationStart"!==n&&"toJSON"!==n&&(e[n]=Math.max(t[n]-t.navigationStart,0));return e}();if(n.value=n.delta=e.responseStart,n.value<0)return;n.entries=[e],t(n)}catch(t){}},"complete"===document.readyState?setTimeout(e,0):addEventListener("pageshow",e)}}}]);\ No newline at end of filediff --git a/apps/mobile/web.bundle/static/js/main.473e79dd.chunk.js b/apps/mobile/web.bundle/static/js/main.473e79dd.chunk.jsdeleted file mode 100644index a7f651fb2..000000000--- a/apps/mobile/web.bundle/static/js/main.473e79dd.chunk.js+++ /dev/null@@ -1 +0,0 @@-(this.webpackJsonptiptap=this.webpackJsonptiptap||[]).push([[1],{123:function(e,t,n){"use strict";n.r(t);var o=n(1),r=n.n(o),i=n(25),a=n.n(i),c=(n(83),n(84),n(59)),l=n(0);var s=function(){return Object(l.jsx)(c.a,{})},u=function(e){e&&e instanceof Function&&n.e(5).then(n.bind(null,129)).then((function(t){var n=t.getCLS,o=t.getFID,r=t.getFCP,i=t.getLCP,a=t.getTTFB;n(e),o(e),r(e),i(e),a(e)}))};n(118),n(119),n(120),n(121),n(122);a.a.render(Object(l.jsx)(r.a.StrictMode,{children:Object(l.jsx)(s,{})}),document.getElementById("root")),u()},16:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return i}));var o={selection:"editor-event:selection",content:"editor-event:content",title:"editor-event:title",scroll:"editor-event:scroll",history:"editor-event:history",newtag:"editor-event:newtag",tag:"editor-event:tag",filepicker:"editor-event:picker",download:"editor-event:download-attachment",logger:"native:logger",back:"editor-event:back",pro:"editor-event:pro",monograph:"editor-event:monograph",properties:"editor-event:properties",fullscreen:"editor-event:fullscreen"};function r(){return!!window.ReactNativeWebView}function i(t,n){r()?window.ReactNativeWebView.postMessage(JSON.stringify({type:o[t]||t,value:n,sessionId:e.sessionId})):console.log(t,n)}globalThis.logger=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var a=n.map((function(e){return"string"!==typeof e?JSON.stringify(e):e})).join(" ");i(o.logger,"[".concat(e,"]: ")+a)},globalThis.post=i}).call(this,n(33))},34:function(e,t,n){e.exports={btn:"styles_btn__19MaA",btn_header:"styles_btn_header__2xGXR",titleBar:"styles_titleBar__2hePW"}},40:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var o=n(47),r=n.n(o),i=n(15);function a(e){var t=document.getElementById("variables-nn"),n=document.getElementsByTagName("head")[0];t&&n.removeChild(t);var o=document.createElement("style");o.type="text/css",o.id="variables-nn",o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e)),n.insertBefore(o,function(){var e,t=Object(i.a)(document.getElementsByTagName("style"));try{for(t.s();!(e=t.n()).done;){var n=e.value;if(n.innerHTML.includes("#root"))return n}}catch(o){t.e(o)}finally{t.f()}}())}function c(e){var t=":root {";for(var n in e)t+="--nn_".concat(n,": ").concat(e[n],";");return t+"}"}var l={accent:"#008837",shade:"#00883712",fg:"#008837",normal:"black",icon:"gray",transGray:"#00000010",errorBg:"#FFB6C1",errorText:"#ff6961",successBg:"#DFF2BF",successText:"#4F8A10",warningBg:"#FF990020",warningText:"#FF9900",red:"#f44336",orange:"#FF9800",yellow:"#FFD600",green:"#4CAF50",blue:"#2196F3",purple:"#673AB7",gray:"#9E9E9E",discord:"#5865F2",night:!1,bg:"#ffffff",navbg:"#f7f7f7",nav:"#f7f7f7",pri:"#424242",sec:"white",light:"#ffffff",input:"transparent",heading:"#212121",border:"#E8E8E8",placeholder:"#a9a9a9"};a(c(l));var s=r()((function(e,t){return{colors:l,setColors:function(t){a(c(t)),e({colors:t})}}}))},59:function(e,t,n){"use strict";(function(e){var o=n(7),r=n(9),i=n(6),a=n(35),c=n(52),l=n(1),s=n(63),u=n(64),d=n(40),f=n(16),b=n(65),v=n(75),g=n(76),h=n(77),p=n(0),j=function(t){var n,o,c=t.editorTheme,u=t.toolbarTheme,d=t.settings,j=Object(l.useState)(0),O=Object(i.a)(j,2),y=O[0],x=O[1],C=Object(l.useRef)(null),w=Object(l.useRef)(null),S=Object(l.useState)(!1),T=Object(i.a)(S,2),R=T[0],k=T[1];Object(a.d)({claims:{premium:d.premium},onPermissionDenied:function(){post(f.a.pro)}});var _=Object(a.e)({onUpdate:function(t){var n=t.editor;e.editorController.contentChange(n)},onSelectionUpdate:function(e){e.transaction.scrollIntoView()},onOpenAttachmentPicker:function(t,n){return e.editorController.openFilePicker(n),!0},onDownloadAttachment:function(t,n){return e.editorController.downloadAttachment(n),!0},theme:c,element:R&&C.current||void 0,editable:!d.readonly,editorProps:{editable:function(){return!d.readonly}},content:null===(n=e.editorController)||void 0===n||null===(o=n.content)||void 0===o?void 0:o.current,isMobile:!0,isKeyboardOpen:d.keyboardShown,doubleSpacedLines:d.doubleSpacedLines},[R,d.readonly,y]),I=Object(l.useCallback)((function(){x((function(e){return e+1})),globalThis.editorController.setTitlePlaceholder("Note title")}),[]),D=Object(s.a)(I),F=Object(l.useRef)(D);return globalThis.editorController=D,globalThis.editor=_,Object(l.useLayoutEffect)((function(){k(!0)}),[]),Object(p.jsx)(p.Fragment,{children:Object(p.jsxs)("div",{style:{display:"flex",flex:1,flexDirection:"column",maxWidth:"100vw",marginBottom:"5px"},children:[Object(p.jsx)(b.a,{hasRedo:(null===_||void 0===_?void 0:_.can().redo())||!1,hasUndo:(null===_||void 0===_?void 0:_.can().undo())||!1,settings:d,noHeader:d.noHeader||!1}),Object(p.jsxs)("div",{onScroll:D.scroll,ref:w,style:{overflowY:"scroll",flexDirection:"column",height:"100%",flexGrow:1,flexShrink:1,display:"flex"},children:[d.noHeader?null:Object(p.jsxs)(p.Fragment,{children:[Object(p.jsx)(g.a,{}),Object(p.jsx)(h.a,{titlePlaceholder:D.titlePlaceholder,readonly:d.readonly,controller:F,title:D.title}),Object(p.jsx)(v.a,{container:w})]}),Object(p.jsx)(m,{padding:d.doubleSpacedLines?0:6,ref:C}),Object(p.jsx)("div",{onDoubleClick:function(){var e,t,n=null===(e=globalThis.editor)||void 0===e?void 0:e.state.doc.content.size;n&&(null===(t=globalThis.editor)||void 0===t||t.chain().insertContentAt(n-1,"<p></p>",{updateSelection:!0}).run(),setTimeout((function(){var e;null===(e=globalThis.editor)||void 0===e||e.commands.focus()}),1))},style:{flexShrink:0,height:150,width:"100%"}})]}),d.noToolbar||!R?null:Object(p.jsx)(a.b,{sx:{pl:"10px",pt:"5px",minHeight:45},theme:u,editor:_,location:"bottom",tools:Object(r.a)(d.tools)})]})})},m=Object(l.memo)(Object(l.forwardRef)((function(e,t){var n=Object(d.a)((function(e){return e.colors}));return Object(p.jsx)("div",{ref:t,style:{padding:12,paddingTop:e.padding,flex:1,color:n.pri,marginTop:-12}})})),(function(){return!0}));t.a=function(){var e=Object(u.a)(),t=Object(d.a)((function(e){return e.colors})),n=Object(c.useTheme)({accent:null===t||void 0===t?void 0:t.accent,scale:1,theme:null!==t&&void 0!==t&&t.night?"dark":"light"});!function(e){e.space=[0,10,12,18],e.space.small="10px",e.buttons.menuitem=Object(o.a)(Object(o.a)({},e.buttons.menuitem),{},{height:"50px",paddingX:"20px",borderBottomWidth:0}),e.iconSizes={big:20,medium:18,small:18},e.fontSizes=Object(o.a)(Object(o.a)({},e.fontSizes),{},{subBody:"0.8rem",body:"0.9rem"}),e.radii=Object(o.a)(Object(o.a)({},e.radii),{},{small:5}),e.buttons.menuitem=Object(o.a)(Object(o.a)({},e.buttons.menuitem),{},{px:5,height:"45px"})}(n);var r=Object(c.useTheme)({accent:null===t||void 0===t?void 0:t.accent,scale:1,theme:null!==t&&void 0!==t&&t.night?"dark":"light"});return r.colors.background=(null===t||void 0===t?void 0:t.bg)||"#f0f0f0",r.space=[0,10,12,20],Object(p.jsx)(a.a,{children:Object(p.jsx)(j,{editorTheme:r,toolbarTheme:n,settings:e})})}}).call(this,n(33))},63:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return c}));var o=n(6),r=n(1),i=n(40),a=n(16);function c(t){var n=Object(r.useState)(""),c=Object(o.a)(n,2),l=c[0],s=c[1],u=Object(r.useState)("Note title"),d=Object(o.a)(u,2),f=d[0],b=d[1],v=Object(r.useRef)(null),g=Object(r.useRef)({selectionChange:null,change:null}),h=Object(r.useCallback)((function(e){}),[]),p=Object(r.useCallback)((function(e){Object(a.c)(a.a.title,e)}),[]),j=Object(r.useCallback)((function(e){if(e){var t;if("number"===typeof g.current.change)clearTimeout(null===(t=g.current)||void 0===t?void 0:t.change);g.current.change=setTimeout((function(){v.current=e.getHTML(),Object(a.c)(a.a.content,v.current)}),300)}}),[]),m=Object(r.useCallback)((function(e){}),[]),O=Object(r.useCallback)((function(){t()}),[t]),y=Object(r.useCallback)((function(n){if("{"===(null===n||void 0===n?void 0:n.data[0])){var o=JSON.parse(n.data),r=o.type,c=o.value;switch(e.sessionId=o.sessionId,r){case"native:html":v.current=c,t();break;case"native:theme":i.a.getState().setColors(o.value);break;case"native:title":s(c);break;case"native:titleplaceholder":b(c)}Object(a.c)(r)}}),[t]);Object(r.useEffect)((function(){if(Object(a.b)()){var e=navigator.vendor.match(/apple/i),t=document;return e&&(t=window),console.log("recreating messaging"),t.addEventListener("message",y),function(){t.removeEventListener("message",y)}}}),[y]);var x=Object(r.useCallback)((function(e){Object(a.c)(a.a.filepicker,e)}),[]),C=Object(r.useCallback)((function(e){Object(a.c)(a.a.download,e)}),[]);return{contentChange:j,selectionChange:h,titleChange:p,scroll:m,title:l,setTitle:s,titlePlaceholder:f,setTitlePlaceholder:b,openFilePicker:x,downloadAttachment:C,content:v,onUpdate:O}}}).call(this,n(33))},64:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return s}));var o=n(6),r=n(7),i=n(35),a=n(1),c=localStorage.getItem("editorSettings"),l={fullscreen:!1,deviceMode:"mobile",premium:!1,tools:JSON.parse(JSON.stringify(Object(i.c)().default)),noToolbar:e.noToolbar,noHeader:e.noHeader,readonly:e.readonly,doubleSpacedLines:!0};e.settingsController={update:function(t){var n=Object(r.a)(Object(r.a)({},t),{},{noToolbar:e.noToolbar||t.noToolbar,noHeader:e.noHeader||t.noHeader,readonly:e.readonly||t.readonly});JSON.stringify(n)!==JSON.stringify(e.settingsController.previous)&&(e.settingsController.set&&e.settingsController.set(n),t?localStorage.setItem("editorSettings",JSON.stringify(n)):localStorage.removeItem("editorSettings"),settingsController.previous=Object(r.a)({},n))},previous:c?JSON.parse(c):Object(r.a)({},l)};var s=function(){var t=Object(a.useState)(Object(r.a)({},e.settingsController.previous)),n=Object(o.a)(t,2),i=n[0],c=n[1];return e.settingsController.set=c,i}}).call(this,n(33))},65:function(e,t,n){"use strict";n.d(t,"a",(function(){return S}));var o=n(66),r=n.n(o),i=n(67),a=n.n(i),c=n(68),l=n.n(c),s=n(69),u=n.n(s),d=n(70),f=n.n(d),b=n(71),v=n.n(b),g=n(72),h=n.n(g),p=n(73),j=n.n(p),m=(n(1),n(74)),O=n(16),y=n(34),x=n.n(y),C=n(0),w=function(e){var t=e.onPress,n=e.children,o=e.style,r=e.preventDefault,i=void 0===r||r;return Object(C.jsx)("button",{className:x.a.btn_header,style:o,onMouseDown:function(e){i&&e.preventDefault(),t()},children:n})};function S(e){var t=e.noHeader,n=e.settings,o=e.hasUndo,i=e.hasRedo,c=Object(m.a)();return Object(C.jsx)("div",{style:{display:"flex",alignItems:"center",height:"".concat(t?c.top:50+c.top,"px"),backgroundColor:"var(--nn_bg)",position:"sticky",width:"100vw"},children:t?null:Object(C.jsxs)("div",{style:{display:"flex",width:"100%",justifyContent:"space-between",flexDirection:"row",paddingTop:c.top,height:50,alignItems:"center"},children:["mobile"===n.deviceMode||n.fullscreen?Object(C.jsx)(w,{onPress:function(){post(O.a.back)},preventDefault:!1,style:{borderWidth:0,borderRadius:100,color:"var(--nn_icon)",marginLeft:6,width:40,height:40,display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column",position:"relative"},children:Object(C.jsx)(r.a,{size:27,style:{position:"absolute"},color:"var(--nn_pri)"})}):Object(C.jsx)("div",{}),Object(C.jsxs)("div",{style:{display:"flex",alignItems:"center",flexDirection:"row"},children:[Object(C.jsx)(w,{onPress:function(){var e;null===(e=editor)||void 0===e||e.commands.undo()},style:{borderWidth:0,borderRadius:100,color:"var(--nn_icon)",marginRight:10,width:39,height:39,display:"flex",justifyContent:"center",alignItems:"center",position:"relative"},children:Object(C.jsx)(f.a,{color:o?"var(--nn_pri)":"var(--nn_nav)",size:25,style:{position:"absolute"}})}),Object(C.jsx)(w,{onPress:function(){var e;null===(e=editor)||void 0===e||e.commands.redo()},style:{borderWidth:0,borderRadius:100,color:"var(--nn_icon)",marginRight:10,width:39,height:39,display:"flex",justifyContent:"center",alignItems:"center",position:"relative"},children:Object(C.jsx)(v.a,{color:i?"var(--nn_pri)":"var(--nn_nav)",size:25,style:{position:"absolute"}})}),!n.premium&&Object(C.jsx)(w,{onPress:function(){post(O.a.pro)},preventDefault:!1,style:{borderWidth:0,borderRadius:100,color:"var(--nn_icon)",marginRight:10,width:39,height:39,display:"flex",justifyContent:"center",alignItems:"center",position:"relative"},children:Object(C.jsx)(l.a,{size:25,style:{position:"absolute"},color:"orange"})}),Object(C.jsx)(w,{onPress:function(){var e;null===(e=editor)||void 0===e||e.commands.startSearch()},style:{borderWidth:0,borderRadius:100,color:"var(--nn_icon)",marginRight:10,width:39,height:39,display:"flex",justifyContent:"center",alignItems:"center",position:"relative"},children:Object(C.jsx)(j.a,{size:25,style:{position:"absolute"},color:"var(--nn_pri)"})}),Object(C.jsx)(w,{onPress:function(){post(O.a.monograph)},preventDefault:!1,style:{borderWidth:0,borderRadius:100,color:"var(--nn_icon)",marginRight:10,width:39,height:39,display:"flex",justifyContent:"center",alignItems:"center",position:"relative"},children:Object(C.jsx)(a.a,{size:25,style:{position:"absolute"},color:"var(--nn_pri)"})}),"mobile"===n.deviceMode||n.fullscreen?null:Object(C.jsx)(w,{onPress:function(){post(O.a.fullscreen)},preventDefault:!1,style:{borderWidth:0,borderRadius:100,color:"var(--nn_icon)",marginRight:10,width:39,height:39,display:"flex",justifyContent:"center",alignItems:"center",position:"relative"},children:Object(C.jsx)(h.a,{size:25,style:{position:"absolute"},color:"var(--nn_pri)"})}),Object(C.jsx)(w,{onPress:function(){post(O.a.properties)},preventDefault:!1,style:{borderWidth:0,borderRadius:100,color:"var(--nn_icon)",marginRight:12,width:39,height:39,display:"flex",justifyContent:"center",alignItems:"center",position:"relative"},children:Object(C.jsx)(u.a,{size:25,style:{position:"absolute"},color:"var(--nn_pri)"})})]})]})})}},74:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return c}));var o=n(6),r=n(1),i=localStorage.getItem("safeAreaInsets"),a=i?JSON.parse(i):{top:0,bottom:0,left:0,right:0};e.safeAreaController={update:function(e){safeAreaController.set&&safeAreaController.set(e),safeAreaController.previous=e,localStorage.setItem("safeAreaInsets",JSON.stringify(e))},reset:function(){safeAreaController.set&&safeAreaController.set(a)},previous:a};var c=function(){var t=Object(r.useState)(e.safeAreaController.previous),n=Object(o.a)(t,2),i=n[0],a=n[1];return e.safeAreaController.set=a,i}}).call(this,n(33))},75:function(e,t,n){"use strict";var o=n(6),r=n(1),i=n.n(r),a=n(0);function c(e){var t=e.container,n=Object(r.useState)({date:"",saved:""}),c=Object(o.a)(n,2),l=c[0],s=c[1],u=Object(r.useState)(!1),d=Object(o.a)(u,2),f=d[0],b=d[1],v=Object(r.useRef)(!1),g=Object(r.useRef)(0),h=Object(r.useRef)(0),p=Object(r.useState)("0 words"),j=Object(o.a)(p,2),m=j[0],O=j[1],y=Object(r.useRef)(m),x=Object(r.useRef)(0),C=Object(r.useRef)({set:s});globalThis.statusBar=C;var w=i.a.useCallback((function(e){var t=e.target.scrollTop;t<200?v.current&&(v.current=!1,b(!1),h.current=Date.now(),g.current=t):Date.now()-h.current<300||(t>g.current?(b(!1),v.current=!1):(b(!0),v.current=!0),h.current=Date.now(),g.current=t)}),[]);Object(r.useEffect)((function(){y.current=m}),[m]),Object(r.useEffect)((function(){return clearInterval(x.current),x.current=setInterval((function(){var e,t,n,o=(null===(e=editor)||void 0===e||null===(t=e.storage)||void 0===t||null===(n=t.characterCount)||void 0===n?void 0:n.words())+" words";y.current!==o&&O(o)}),3e3),function(){clearInterval(x.current)}}),[]),Object(r.useEffect)((function(){var e=t.current;return null===e||void 0===e||e.addEventListener("scroll",w),function(){null===e||void 0===e||e.removeEventListener("scroll",w)}}),[w,t]);var S={marginTop:0,marginBottom:0,fontSize:"12px",color:"var(--nn_icon)",marginRight:8,paddingBottom:0};return Object(a.jsxs)("div",{style:{flexDirection:"row",display:"flex",paddingRight:12,paddingLeft:12,position:f?"sticky":"relative",top:-3,backgroundColor:"var(--nn_bg)",zIndex:1,justifyContent:f?"center":"flex-start",paddingTop:2,paddingBottom:2},children:[Object(a.jsx)("p",{style:S,children:m}),Object(a.jsx)("p",{style:S,children:l.date}),Object(a.jsx)("p",{style:S,children:l.saved})]})}t.a=i.a.memo(c,(function(){return!0}))},76:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return s}));var o=n(6),r=n(1),i=n(16),a=n(34),c=n.n(a),l=n(0);function s(){var t=Object(r.useState)([]),n=Object(o.a)(t,2),a=n[0],s=n[1],u=Object(r.useRef)({setTags:s});e.editorTags=u;var d=function(){var e,t;null!==(e=editor)&&void 0!==e&&e.isFocused&&(editor.commands.blur(),null===(t=editorTitle.current)||void 0===t||t.blur());post(i.a.newtag)};return Object(l.jsxs)("div",{style:{padding:"0px 12px",display:"flex",alignItems:"center",marginTop:10},children:[Object(l.jsxs)("button",{className:c.a.btn,onMouseUp:function(e){e.preventDefault(),d()},onMouseDown:function(e){return e.preventDefault()},onTouchEnd:function(e){e.preventDefault(),d()},style:{borderWidth:0,backgroundColor:"var(--nn_nav)",marginRight:5,borderRadius:100,padding:"0px 10px",fontFamily:"Open Sans",display:"flex",alignItems:"center",height:"30px"},children:[0===a.length?Object(l.jsx)("p",{style:{marginRight:4,fontSize:13,color:"var(--nn_icon)",userSelect:"none"},children:"Add a tag"}):null,Object(l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"20",height:"20",viewBox:"0 0 24 24",children:Object(l.jsx)("path",{fill:"var(--nn_accent)",d:"M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z"})})]}),a.map((function(e){return Object(l.jsxs)("button",{className:c.a.btn,style:{borderWidth:0,backgroundColor:"var(--nn_nav)",marginRight:5,borderRadius:100,padding:"0px 10px",height:"30px",fontFamily:"Open Sans",fontSize:13,color:"var(--nn_icon)"},onMouseUp:function(t){t.preventDefault(),post(i.a.tag,e.title)},onMouseDown:function(e){return e.preventDefault()},onTouchEnd:function(t){t.preventDefault(),post(i.a.tag,e.title)},children:["#",e.alias]})}))]})}}).call(this,n(33))},77:function(e,t,n){"use strict";(function(e){var o=n(1),r=n.n(o),i=n(34),a=n.n(i),c=n(0);function l(t){var n=t.controller,r=t.title,i=t.titlePlaceholder,l=t.readonly,s=Object(o.useRef)(null),u=Object(o.useRef)(!0);return e.editorTitle=s,Object(o.useEffect)((function(){s.current&&(u.current=!1,s.current.value=r,u.current=!0)}),[r]),Object(c.jsx)("input",{ref:s,className:a.a.titleBar,contentEditable:!l,disabled:l,style:{height:50,fontSize:25,width:"100%",boxSizing:"border-box",borderWidth:0,paddingRight:12,paddingLeft:12,fontWeight:600,fontFamily:"Open Sans",backgroundColor:"transparent",color:"var(--nn_heading)"},maxLength:150,onChange:function(e){var t;u.current&&(null===(t=n.current)||void 0===t||t.titleChange(e.target.value))},placeholder:i})}t.a=r.a.memo(l,(function(e,t){return e.title===t.title&&(e.titlePlaceholder===t.titlePlaceholder&&e.readonly===t.readonly)}))}).call(this,n(33))},83:function(e,t,n){},84:function(e,t,n){}},[[123,2,3]]]);\ No newline at end of filediff --git a/apps/mobile/web.bundle/static/js/main.63f81e65.chunk.js b/apps/mobile/web.bundle/static/js/main.63f81e65.chunk.jsnew file mode 100644index 000000000..3cb6498f8--- /dev/null+++ b/apps/mobile/web.bundle/static/js/main.63f81e65.chunk.js@@ -0,0 +1 @@+(this.webpackJsonptiptap=this.webpackJsonptiptap||[]).push([[1],{119:function(e,t,n){"use strict";n.r(t);var o=n(1),r=n.n(o),i=n(23),a=n.n(i),l=(n(81),n(82),n(57)),c=n(0);var s=function(){return Object(c.jsx)(l.a,{})},u=function(e){e&&e instanceof Function&&n.e(5).then(n.bind(null,125)).then((function(t){var n=t.getCLS,o=t.getFID,r=t.getFCP,i=t.getLCP,a=t.getTTFB;n(e),o(e),r(e),i(e),a(e)}))};n(114),n(115),n(116),n(117),n(118);a.a.render(Object(c.jsx)(r.a.StrictMode,{children:Object(c.jsx)(s,{})}),document.getElementById("root")),u()},15:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return i}));var o={selection:"editor-event:selection",content:"editor-event:content",title:"editor-event:title",scroll:"editor-event:scroll",history:"editor-event:history",newtag:"editor-event:newtag",tag:"editor-event:tag",filepicker:"editor-event:picker",download:"editor-event:download-attachment",logger:"native:logger",back:"editor-event:back",pro:"editor-event:pro",monograph:"editor-event:monograph",properties:"editor-event:properties",fullscreen:"editor-event:fullscreen"};function r(){return!!window.ReactNativeWebView}function i(t,n){r()?window.ReactNativeWebView.postMessage(JSON.stringify({type:o[t]||t,value:n,sessionId:e.sessionId})):console.log(t,n)}globalThis.logger=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var a=n.map((function(e){return"string"!==typeof e?JSON.stringify(e):e})).join(" ");i(o.logger,"[".concat(e,"]: ")+a)},globalThis.post=i}).call(this,n(31))},32:function(e,t,n){e.exports={btn:"styles_btn__19MaA",btn_header:"styles_btn_header__2xGXR",titleBar:"styles_titleBar__2hePW"}},38:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var o=n(45),r=n.n(o),i=n(14);function a(e){var t=document.getElementById("variables-nn"),n=document.getElementsByTagName("head")[0];t&&n.removeChild(t);var o=document.createElement("style");o.type="text/css",o.id="variables-nn",o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e)),n.insertBefore(o,function(){var e,t=Object(i.a)(document.getElementsByTagName("style"));try{for(t.s();!(e=t.n()).done;){var n=e.value;if(n.innerHTML.includes("#root"))return n}}catch(o){t.e(o)}finally{t.f()}}())}function l(e){var t=":root {";for(var n in e)t+="--nn_".concat(n,": ").concat(e[n],";");return t+"}"}var c={accent:"#008837",shade:"#00883712",fg:"#008837",normal:"black",icon:"gray",transGray:"#00000010",errorBg:"#FFB6C1",errorText:"#ff6961",successBg:"#DFF2BF",successText:"#4F8A10",warningBg:"#FF990020",warningText:"#FF9900",red:"#f44336",orange:"#FF9800",yellow:"#FFD600",green:"#4CAF50",blue:"#2196F3",purple:"#673AB7",gray:"#9E9E9E",discord:"#5865F2",night:!1,bg:"#ffffff",navbg:"#f7f7f7",nav:"#f7f7f7",pri:"#424242",sec:"white",light:"#ffffff",input:"transparent",heading:"#212121",border:"#E8E8E8",placeholder:"#a9a9a9"};a(l(c));var s=r()((function(e,t){return{colors:c,setColors:function(t){a(l(t)),e({colors:t})}}}))},57:function(e,t,n){"use strict";(function(e){var o=n(7),r=n(9),i=n(6),a=n(33),l=n(50),c=n(1),s=n(61),u=n(62),d=n(38),f=n(15),b=n(63),g=n(73),v=n(74),h=n(75),p=n(0),j=function(t){var n,o,l=t.editorTheme,u=t.toolbarTheme,d=t.settings,j=Object(c.useState)(0),O=Object(i.a)(j,2),y=O[0],x=O[1],C=Object(c.useRef)(null),w=Object(c.useRef)(null),T=Object(c.useState)(!1),S=Object(i.a)(T,2),R=S[0],_=S[1];Object(a.d)({claims:{premium:d.premium},onPermissionDenied:function(){post(f.a.pro)}});var k=Object(a.e)({onUpdate:function(t){var n=t.editor;e.editorController.contentChange(n)},onSelectionUpdate:function(e){e.transaction.scrollIntoView()},onOpenAttachmentPicker:function(t,n){return e.editorController.openFilePicker(n),!0},onDownloadAttachment:function(t,n){return e.editorController.downloadAttachment(n),!0},theme:l,element:R&&C.current||void 0,editable:!d.readonly,editorProps:{editable:function(){return!d.readonly}},content:null===(n=e.editorController)||void 0===n||null===(o=n.content)||void 0===o?void 0:o.current,isMobile:!0,isKeyboardOpen:d.keyboardShown,doubleSpacedLines:d.doubleSpacedLines},[R,d.readonly,y]),I=Object(c.useCallback)((function(){x((function(e){return e+1})),globalThis.editorController.setTitlePlaceholder("Note title")}),[]),D=Object(s.a)(I),F=Object(c.useRef)(D);return globalThis.editorController=D,globalThis.editor=k,Object(c.useLayoutEffect)((function(){_(!0)}),[]),Object(p.jsx)(p.Fragment,{children:Object(p.jsxs)("div",{style:{display:"flex",flex:1,flexDirection:"column",maxWidth:"100vw",marginBottom:"5px"},children:[Object(p.jsx)(b.a,{hasRedo:(null===k||void 0===k?void 0:k.can().redo())||!1,hasUndo:(null===k||void 0===k?void 0:k.can().undo())||!1,settings:d,noHeader:d.noHeader||!1}),Object(p.jsxs)("div",{onScroll:D.scroll,ref:w,style:{overflowY:"scroll",flexDirection:"column",height:"100%",flexGrow:1,flexShrink:1,display:"flex"},children:[d.noHeader?null:Object(p.jsxs)(p.Fragment,{children:[Object(p.jsx)(v.a,{}),Object(p.jsx)(h.a,{titlePlaceholder:D.titlePlaceholder,readonly:d.readonly,controller:F,title:D.title}),Object(p.jsx)(g.a,{container:w})]}),Object(p.jsx)(m,{padding:d.doubleSpacedLines?0:6,ref:C}),Object(p.jsx)("div",{onDoubleClick:function(){var e,t,n=null===(e=globalThis.editor)||void 0===e?void 0:e.state.doc.content.size;n&&(null===(t=globalThis.editor)||void 0===t||t.chain().insertContentAt(n-1,"<p></p>",{updateSelection:!0}).run(),setTimeout((function(){var e;null===(e=globalThis.editor)||void 0===e||e.commands.focus()}),1))},style:{flexShrink:0,height:150,width:"100%"}})]}),d.noToolbar||!R?null:Object(p.jsx)(a.b,{sx:{pl:"10px",pt:"5px",minHeight:45},theme:u,editor:k,location:"bottom",tools:Object(r.a)(d.tools)})]})})},m=Object(c.memo)(Object(c.forwardRef)((function(e,t){var n=Object(d.a)((function(e){return e.colors}));return Object(p.jsx)("div",{ref:t,style:{padding:12,paddingTop:e.padding,flex:1,color:n.pri,marginTop:-12,caretColor:n.accent}})})),(function(){return!0}));t.a=function(){var e=Object(u.a)(),t=Object(d.a)((function(e){return e.colors})),n=Object(l.useTheme)({accent:null===t||void 0===t?void 0:t.accent,scale:1,theme:null!==t&&void 0!==t&&t.night?"dark":"light"});!function(e){e.space=[0,10,12,18],e.space.small="10px",e.buttons.menuitem=Object(o.a)(Object(o.a)({},e.buttons.menuitem),{},{height:"50px",paddingX:"20px",borderBottomWidth:0}),e.iconSizes={big:20,medium:18,small:18},e.fontSizes=Object(o.a)(Object(o.a)({},e.fontSizes),{},{subBody:"0.8rem",body:"0.9rem"}),e.radii=Object(o.a)(Object(o.a)({},e.radii),{},{small:5}),e.buttons.menuitem=Object(o.a)(Object(o.a)({},e.buttons.menuitem),{},{px:5,height:"45px"})}(n);var r=Object(l.useTheme)({accent:null===t||void 0===t?void 0:t.accent,scale:1,theme:null!==t&&void 0!==t&&t.night?"dark":"light"});return r.colors.background=(null===t||void 0===t?void 0:t.bg)||"#f0f0f0",r.space=[0,10,12,20],Object(p.jsx)(a.a,{children:Object(p.jsx)(j,{editorTheme:r,toolbarTheme:n,settings:e})})}}).call(this,n(31))},61:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return l}));var o=n(6),r=n(1),i=n(38),a=n(15);function l(t){var n=Object(r.useState)(""),l=Object(o.a)(n,2),c=l[0],s=l[1],u=Object(r.useState)("Note title"),d=Object(o.a)(u,2),f=d[0],b=d[1],g=Object(r.useRef)(null),v=Object(r.useRef)({selectionChange:null,change:null}),h=Object(r.useCallback)((function(e){}),[]),p=Object(r.useCallback)((function(e){Object(a.c)(a.a.title,e)}),[]),j=Object(r.useCallback)((function(e){if(e){var t;if("number"===typeof v.current.change)clearTimeout(null===(t=v.current)||void 0===t?void 0:t.change);v.current.change=setTimeout((function(){g.current=e.getHTML(),Object(a.c)(a.a.content,g.current)}),300)}}),[]),m=Object(r.useCallback)((function(e){}),[]),O=Object(r.useCallback)((function(){t()}),[t]),y=Object(r.useCallback)((function(n){if("{"===(null===n||void 0===n?void 0:n.data[0])){var o=JSON.parse(n.data),r=o.type,l=o.value;switch(e.sessionId=o.sessionId,r){case"native:html":g.current=l,t();break;case"native:theme":i.a.getState().setColors(o.value);break;case"native:title":s(l);break;case"native:titleplaceholder":b(l)}Object(a.c)(r)}}),[t]);Object(r.useEffect)((function(){if(Object(a.b)()){var e=navigator.vendor.match(/apple/i),t=document;return e&&(t=window),console.log("recreating messaging"),t.addEventListener("message",y),function(){t.removeEventListener("message",y)}}}),[y]);var x=Object(r.useCallback)((function(e){Object(a.c)(a.a.filepicker,e)}),[]),C=Object(r.useCallback)((function(e){Object(a.c)(a.a.download,e)}),[]);return{contentChange:j,selectionChange:h,titleChange:p,scroll:m,title:c,setTitle:s,titlePlaceholder:f,setTitlePlaceholder:b,openFilePicker:x,downloadAttachment:C,content:g,onUpdate:O}}}).call(this,n(31))},62:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return s}));var o=n(6),r=n(7),i=n(33),a=n(1),l=localStorage.getItem("editorSettings"),c={fullscreen:!1,deviceMode:"mobile",premium:!1,tools:JSON.parse(JSON.stringify(Object(i.c)().default)),noToolbar:globalThis.noToolbar,noHeader:globalThis.noHeader,readonly:globalThis.readonly,doubleSpacedLines:!0};e.settingsController={update:function(t){var n=Object(r.a)(Object(r.a)({},t),{},{noToolbar:globalThis.noToolbar||t.noToolbar,noHeader:globalThis.noHeader||t.noHeader,readonly:globalThis.readonly||t.readonly});JSON.stringify(n)!==JSON.stringify(e.settingsController.previous)&&(e.settingsController.set&&e.settingsController.set(n),t?localStorage.setItem("editorSettings",JSON.stringify(n)):localStorage.removeItem("editorSettings"),settingsController.previous=Object(r.a)({},n))},previous:l?JSON.parse(l):Object(r.a)({},c)},e.settingsController.previous.noHeader=globalThis.noHeader,e.settingsController.previous.noToolbar=globalThis.noToolbar,e.settingsController.previous.readonly=globalThis.readonly;var s=function(){var t=Object(a.useState)(Object(r.a)({},e.settingsController.previous)),n=Object(o.a)(t,2),i=n[0],l=n[1];return e.settingsController.set=l,i}}).call(this,n(31))},63:function(e,t,n){"use strict";n.d(t,"a",(function(){return T}));var o=n(64),r=n.n(o),i=n(65),a=n.n(i),l=n(66),c=n.n(l),s=n(67),u=n.n(s),d=n(68),f=n.n(d),b=n(69),g=n.n(b),v=n(70),h=n.n(v),p=n(71),j=n.n(p),m=(n(1),n(72)),O=n(15),y=n(32),x=n.n(y),C=n(0),w=function(e){var t=e.onPress,n=e.children,o=e.style,r=e.preventDefault,i=void 0===r||r;return Object(C.jsx)("button",{className:x.a.btn_header,style:o,onMouseDown:function(e){i&&e.preventDefault(),t()},children:n})};function T(e){var t=e.noHeader,n=e.settings,o=e.hasUndo,i=e.hasRedo,l=Object(m.a)();return Object(C.jsx)("div",{style:{display:"flex",alignItems:"center",height:"".concat(t?l.top:50+l.top,"px"),backgroundColor:"var(--nn_bg)",position:"sticky",width:"100vw"},children:t?null:Object(C.jsxs)("div",{style:{display:"flex",width:"100%",justifyContent:"space-between",flexDirection:"row",paddingTop:l.top,height:50,alignItems:"center"},children:["mobile"===n.deviceMode||n.fullscreen?Object(C.jsx)(w,{onPress:function(){post(O.a.back)},preventDefault:!1,style:{borderWidth:0,borderRadius:100,color:"var(--nn_icon)",marginLeft:6,width:40,height:40,display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column",position:"relative"},children:Object(C.jsx)(r.a,{size:27,style:{position:"absolute"},color:"var(--nn_pri)"})}):Object(C.jsx)("div",{}),Object(C.jsxs)("div",{style:{display:"flex",alignItems:"center",flexDirection:"row"},children:[Object(C.jsx)(w,{onPress:function(){var e;null===(e=editor)||void 0===e||e.commands.undo()},style:{borderWidth:0,borderRadius:100,color:"var(--nn_icon)",marginRight:10,width:39,height:39,display:"flex",justifyContent:"center",alignItems:"center",position:"relative"},children:Object(C.jsx)(f.a,{color:o?"var(--nn_pri)":"var(--nn_nav)",size:25,style:{position:"absolute"}})}),Object(C.jsx)(w,{onPress:function(){var e;null===(e=editor)||void 0===e||e.commands.redo()},style:{borderWidth:0,borderRadius:100,color:"var(--nn_icon)",marginRight:10,width:39,height:39,display:"flex",justifyContent:"center",alignItems:"center",position:"relative"},children:Object(C.jsx)(g.a,{color:i?"var(--nn_pri)":"var(--nn_nav)",size:25,style:{position:"absolute"}})}),!n.premium&&Object(C.jsx)(w,{onPress:function(){post(O.a.pro)},preventDefault:!1,style:{borderWidth:0,borderRadius:100,color:"var(--nn_icon)",marginRight:10,width:39,height:39,display:"flex",justifyContent:"center",alignItems:"center",position:"relative"},children:Object(C.jsx)(c.a,{size:25,style:{position:"absolute"},color:"orange"})}),Object(C.jsx)(w,{onPress:function(){var e;null===(e=editor)||void 0===e||e.commands.startSearch()},style:{borderWidth:0,borderRadius:100,color:"var(--nn_icon)",marginRight:10,width:39,height:39,display:"flex",justifyContent:"center",alignItems:"center",position:"relative"},children:Object(C.jsx)(j.a,{size:25,style:{position:"absolute"},color:"var(--nn_pri)"})}),Object(C.jsx)(w,{onPress:function(){post(O.a.monograph)},preventDefault:!1,style:{borderWidth:0,borderRadius:100,color:"var(--nn_icon)",marginRight:10,width:39,height:39,display:"flex",justifyContent:"center",alignItems:"center",position:"relative"},children:Object(C.jsx)(a.a,{size:25,style:{position:"absolute"},color:"var(--nn_pri)"})}),"mobile"===n.deviceMode||n.fullscreen?null:Object(C.jsx)(w,{onPress:function(){post(O.a.fullscreen)},preventDefault:!1,style:{borderWidth:0,borderRadius:100,color:"var(--nn_icon)",marginRight:10,width:39,height:39,display:"flex",justifyContent:"center",alignItems:"center",position:"relative"},children:Object(C.jsx)(h.a,{size:25,style:{position:"absolute"},color:"var(--nn_pri)"})}),Object(C.jsx)(w,{onPress:function(){post(O.a.properties)},preventDefault:!1,style:{borderWidth:0,borderRadius:100,color:"var(--nn_icon)",marginRight:12,width:39,height:39,display:"flex",justifyContent:"center",alignItems:"center",position:"relative"},children:Object(C.jsx)(u.a,{size:25,style:{position:"absolute"},color:"var(--nn_pri)"})})]})]})})}},72:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return l}));var o=n(6),r=n(1),i=localStorage.getItem("safeAreaInsets"),a=i&&!globalThis.noHeader?JSON.parse(i):{top:0,bottom:0,left:0,right:0};e.safeAreaController={update:function(e){safeAreaController.set&&safeAreaController.set(e),safeAreaController.previous=e,localStorage.setItem("safeAreaInsets",JSON.stringify(e))},reset:function(){safeAreaController.set&&safeAreaController.set(a)},previous:a};var l=function(){var t=Object(r.useState)(e.safeAreaController.previous),n=Object(o.a)(t,2),i=n[0],a=n[1];return e.safeAreaController.set=a,i}}).call(this,n(31))},73:function(e,t,n){"use strict";var o=n(6),r=n(1),i=n.n(r),a=n(0);function l(e){var t=e.container,n=Object(r.useState)({date:"",saved:""}),l=Object(o.a)(n,2),c=l[0],s=l[1],u=Object(r.useState)(!1),d=Object(o.a)(u,2),f=d[0],b=d[1],g=Object(r.useRef)(!1),v=Object(r.useRef)(0),h=Object(r.useRef)(0),p=Object(r.useState)("0 words"),j=Object(o.a)(p,2),m=j[0],O=j[1],y=Object(r.useRef)(m),x=Object(r.useRef)(0),C=Object(r.useRef)({set:s});globalThis.statusBar=C;var w=i.a.useCallback((function(e){var t=e.target.scrollTop;t<200?g.current&&(g.current=!1,b(!1),h.current=Date.now(),v.current=t):Date.now()-h.current<300||(t>v.current?(b(!1),g.current=!1):(b(!0),g.current=!0),h.current=Date.now(),v.current=t)}),[]);Object(r.useEffect)((function(){y.current=m}),[m]),Object(r.useEffect)((function(){return clearInterval(x.current),x.current=setInterval((function(){var e,t,n,o=(null===(e=editor)||void 0===e||null===(t=e.storage)||void 0===t||null===(n=t.characterCount)||void 0===n?void 0:n.words())+" words";y.current!==o&&O(o)}),3e3),function(){clearInterval(x.current)}}),[]),Object(r.useEffect)((function(){var e=t.current;return null===e||void 0===e||e.addEventListener("scroll",w),function(){null===e||void 0===e||e.removeEventListener("scroll",w)}}),[w,t]);var T={marginTop:0,marginBottom:0,fontSize:"12px",color:"var(--nn_icon)",marginRight:8,paddingBottom:0};return Object(a.jsxs)("div",{style:{flexDirection:"row",display:"flex",paddingRight:12,paddingLeft:12,position:f?"sticky":"relative",top:-3,backgroundColor:"var(--nn_bg)",zIndex:1,justifyContent:f?"center":"flex-start",paddingTop:2,paddingBottom:2},children:[Object(a.jsx)("p",{style:T,children:m}),Object(a.jsx)("p",{style:T,children:c.date}),Object(a.jsx)("p",{style:T,children:c.saved})]})}t.a=i.a.memo(l,(function(){return!0}))},74:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return s}));var o=n(6),r=n(1),i=n(15),a=n(32),l=n.n(a),c=n(0);function s(){var t=Object(r.useState)([]),n=Object(o.a)(t,2),a=n[0],s=n[1],u=Object(r.useRef)({setTags:s});e.editorTags=u;var d=function(){var e,t;null!==(e=editor)&&void 0!==e&&e.isFocused&&(editor.commands.blur(),null===(t=editorTitle.current)||void 0===t||t.blur());post(i.a.newtag)};return Object(c.jsxs)("div",{style:{padding:"0px 12px",display:"flex",alignItems:"center",marginTop:10},children:[Object(c.jsxs)("button",{className:l.a.btn,onMouseUp:function(e){e.preventDefault(),d()},onMouseDown:function(e){return e.preventDefault()},onTouchEnd:function(e){e.preventDefault(),d()},style:{borderWidth:0,backgroundColor:"var(--nn_nav)",marginRight:5,borderRadius:100,padding:"0px 10px",fontFamily:"Open Sans",display:"flex",alignItems:"center",height:"30px"},children:[0===a.length?Object(c.jsx)("p",{style:{marginRight:4,fontSize:13,color:"var(--nn_icon)",userSelect:"none"},children:"Add a tag"}):null,Object(c.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"20",height:"20",viewBox:"0 0 24 24",children:Object(c.jsx)("path",{fill:"var(--nn_accent)",d:"M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z"})})]}),a.map((function(e){return Object(c.jsxs)("button",{className:l.a.btn,style:{borderWidth:0,backgroundColor:"var(--nn_nav)",marginRight:5,borderRadius:100,padding:"0px 10px",height:"30px",fontFamily:"Open Sans",fontSize:13,color:"var(--nn_icon)"},onMouseUp:function(t){t.preventDefault(),post(i.a.tag,e.title)},onMouseDown:function(e){return e.preventDefault()},onTouchEnd:function(t){t.preventDefault(),post(i.a.tag,e.title)},children:["#",e.alias]})}))]})}}).call(this,n(31))},75:function(e,t,n){"use strict";(function(e){var o=n(1),r=n.n(o),i=n(32),a=n.n(i),l=n(0);function c(t){var n=t.controller,r=t.title,i=t.titlePlaceholder,c=t.readonly,s=Object(o.useRef)(null),u=Object(o.useRef)(!0);return e.editorTitle=s,Object(o.useEffect)((function(){s.current&&(u.current=!1,s.current.value=r,u.current=!0)}),[r]),Object(l.jsx)("input",{ref:s,className:a.a.titleBar,contentEditable:!c,disabled:c,style:{height:50,fontSize:25,width:"100%",boxSizing:"border-box",borderWidth:0,paddingRight:12,paddingLeft:12,fontWeight:600,fontFamily:"Open Sans",backgroundColor:"transparent",color:"var(--nn_heading)",caretColor:"var(--nn_accent)"},maxLength:150,onChange:function(e){var t;u.current&&(null===(t=n.current)||void 0===t||t.titleChange(e.target.value))},placeholder:i})}t.a=r.a.memo(c,(function(e,t){return e.title===t.title&&(e.titlePlaceholder===t.titlePlaceholder&&e.readonly===t.readonly)}))}).call(this,n(31))},81:function(e,t,n){},82:function(e,t,n){}},[[119,2,3]]]);\ No newline at end of filediff --git a/apps/mobile/web.bundle/static/js/runtime-main.563aec9a.js b/apps/mobile/web.bundle/static/js/runtime-main.9bd4fa53.jssimilarity index 96%rename from apps/mobile/web.bundle/static/js/runtime-main.563aec9a.jsrename to apps/mobile/web.bundle/static/js/runtime-main.9bd4fa53.jsindex a10b76647..d142e78dd 100644--- a/apps/mobile/web.bundle/static/js/runtime-main.563aec9a.js+++ b/apps/mobile/web.bundle/static/js/runtime-main.9bd4fa53.js@@ -1 +1 @@-!function(e){function t(t){for(var n,i,a=t[0],c=t[1],l=t[2],p=0,s=[];p<a.length;p++)i=a[p],Object.prototype.hasOwnProperty.call(o,i)&&o[i]&&s.push(o[i][0]),o[i]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(f&&f(t);s.length;)s.shift()();return u.push.apply(u,l||[]),r()}function r(){for(var e,t=0;t<u.length;t++){for(var r=u[t],n=!0,a=1;a<r.length;a++){var c=r[a];0!==o[c]&&(n=!1)}n&&(u.splice(t--,1),e=i(i.s=r[0]))}return e}var n={},o={2:0},u=[];function i(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.e=function(e){var t=[],r=o[e];if(0!==r)if(r)t.push(r[2]);else{var n=new Promise((function(t,n){r=o[e]=[t,n]}));t.push(r[2]=n);var u,a=document.createElement("script");a.charset="utf-8",a.timeout=120,i.nc&&a.setAttribute("nonce",i.nc),a.src=function(e){return i.p+"static/js/"+({}[e]||e)+"."+{0:"6b732ed5",4:"628ec668",5:"34df2de4"}[e]+".chunk.js"}(e);var c=new Error;u=function(t){a.onerror=a.onload=null,clearTimeout(l);var r=o[e];if(0!==r){if(r){var n=t&&("load"===t.type?"missing":t.type),u=t&&t.target&&t.target.src;c.message="Loading chunk "+e+" failed.\n("+n+": "+u+")",c.name="ChunkLoadError",c.type=n,c.request=u,r[1](c)}o[e]=void 0}};var l=setTimeout((function(){u({type:"timeout",target:a})}),12e4);a.onerror=a.onload=u,document.head.appendChild(a)}return Promise.all(t)},i.m=e,i.c=n,i.d=function(e,t,r){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)i.d(r,n,function(t){return e[t]}.bind(null,n));return r},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="./",i.oe=function(e){throw console.error(e),e};var a=this.webpackJsonptiptap=this.webpackJsonptiptap||[],c=a.push.bind(a);a.push=t,a=a.slice();for(var l=0;l<a.length;l++)t(a[l]);var f=c;r()}([]);\ No newline at end of file+!function(e){function t(t){for(var n,i,a=t[0],c=t[1],l=t[2],p=0,s=[];p<a.length;p++)i=a[p],Object.prototype.hasOwnProperty.call(o,i)&&o[i]&&s.push(o[i][0]),o[i]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(f&&f(t);s.length;)s.shift()();return u.push.apply(u,l||[]),r()}function r(){for(var e,t=0;t<u.length;t++){for(var r=u[t],n=!0,a=1;a<r.length;a++){var c=r[a];0!==o[c]&&(n=!1)}n&&(u.splice(t--,1),e=i(i.s=r[0]))}return e}var n={},o={2:0},u=[];function i(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.e=function(e){var t=[],r=o[e];if(0!==r)if(r)t.push(r[2]);else{var n=new Promise((function(t,n){r=o[e]=[t,n]}));t.push(r[2]=n);var u,a=document.createElement("script");a.charset="utf-8",a.timeout=120,i.nc&&a.setAttribute("nonce",i.nc),a.src=function(e){return i.p+"static/js/"+({}[e]||e)+"."+{0:"91d7b8d5",4:"7884bc18",5:"077f361c"}[e]+".chunk.js"}(e);var c=new Error;u=function(t){a.onerror=a.onload=null,clearTimeout(l);var r=o[e];if(0!==r){if(r){var n=t&&("load"===t.type?"missing":t.type),u=t&&t.target&&t.target.src;c.message="Loading chunk "+e+" failed.\n("+n+": "+u+")",c.name="ChunkLoadError",c.type=n,c.request=u,r[1](c)}o[e]=void 0}};var l=setTimeout((function(){u({type:"timeout",target:a})}),12e4);a.onerror=a.onload=u,document.head.appendChild(a)}return Promise.all(t)},i.m=e,i.c=n,i.d=function(e,t,r){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)i.d(r,n,function(t){return e[t]}.bind(null,n));return r},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="./",i.oe=function(e){throw console.error(e),e};var a=this.webpackJsonptiptap=this.webpackJsonptiptap||[],c=a.push.bind(a);a.push=t,a=a.slice();for(var l=0;l<a.length;l++)t(a[l]);var f=c;r()}([]);\ No newline at end of file