05-tilda-export-backup/Tilda_ Грёзы Канта_files/t-quill-3.0.min.js
2025-10-29 19:50:39 +03:00

1 line
635 KiB
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(()=>{var t={9929:(t,e,r)=>{var n;window,n=function(t){return function(t){var e=window.webpackHotUpdatequillTable;window.webpackHotUpdatequillTable=function(t,r){!function(t,e){if(k[t]&&w[t]){for(var r in w[t]=!1,e)Object.prototype.hasOwnProperty.call(e,r)&&(f[r]=e[r]);0==--v&&0===y&&A()}}(t,r),e&&e(t,r)};var r,n=!0,i="bf8944d9e17b2492f009",o=1e4,s={},l=[],a=[];function c(t){var e=C[t];if(!e)return M;var n=function(n){return e.hot.active?(C[n]?-1===C[n].parents.indexOf(t)&&C[n].parents.push(t):(l=[t],r=n),-1===e.children.indexOf(n)&&e.children.push(n)):(console.warn("[HMR] unexpected require("+n+") from disposed module "+t),l=[]),M(n)},i=function(t){return{configurable:!0,enumerable:!0,get:function(){return M[t]},set:function(e){M[t]=e}}};for(var o in M)Object.prototype.hasOwnProperty.call(M,o)&&"e"!==o&&"t"!==o&&Object.defineProperty(n,o,i(o));return n.e=function(t){return"ready"===d&&p("prepare"),y++,M.e(t).then(e,(function(t){throw e(),t}));function e(){y--,"prepare"===d&&(x[t]||S(t),0===y&&0===v&&A())}},n.t=function(t,e){return 1&e&&(t=n(t)),M.t(t,-2&e)},n}function u(e){var n={_acceptedDependencies:{},_declinedDependencies:{},_selfAccepted:!1,_selfDeclined:!1,_selfInvalidated:!1,_disposeHandlers:[],_main:r!==e,active:!0,accept:function(t,e){if(void 0===t)n._selfAccepted=!0;else if("function"==typeof t)n._selfAccepted=t;else if("object"==typeof t)for(var r=0;r<t.length;r++)n._acceptedDependencies[t[r]]=e||function(){};else n._acceptedDependencies[t]=e||function(){}},decline:function(t){if(void 0===t)n._selfDeclined=!0;else if("object"==typeof t)for(var e=0;e<t.length;e++)n._declinedDependencies[t[e]]=!0;else n._declinedDependencies[t]=!0},dispose:function(t){n._disposeHandlers.push(t)},addDisposeHandler:function(t){n._disposeHandlers.push(t)},removeDisposeHandler:function(t){var e=n._disposeHandlers.indexOf(t);e>=0&&n._disposeHandlers.splice(e,1)},invalidate:function(){switch(this._selfInvalidated=!0,d){case"idle":(f={})[e]=t[e],p("ready");break;case"ready":L(e);break;case"prepare":case"check":case"dispose":case"apply":(b=b||[]).push(e)}},check:_,apply:N,status:function(t){if(!t)return d;h.push(t)},addStatusHandler:function(t){h.push(t)},removeStatusHandler:function(t){var e=h.indexOf(t);e>=0&&h.splice(e,1)},data:s[e]};return r=void 0,n}var h=[],d="idle";function p(t){d=t;for(var e=0;e<h.length;e++)h[e].call(null,t)}var m,f,g,b,v=0,y=0,x={},w={},k={};function q(t){return+t+""===t?+t:t}function _(t){if("idle"!==d)throw new Error("check() is only allowed in idle status");return n=t,p("check"),(e=o,e=e||1e4,new Promise((function(t,r){if("undefined"==typeof XMLHttpRequest)return r(new Error("No browser support"));try{var n=new XMLHttpRequest,o=M.p+""+i+".hot-update.json";n.open("GET",o,!0),n.timeout=e,n.send(null)}catch(t){return r(t)}n.onreadystatechange=function(){if(4===n.readyState)if(0===n.status)r(new Error("Manifest request to "+o+" timed out."));else if(404===n.status)t();else if(200!==n.status&&304!==n.status)r(new Error("Manifest request to "+o+" failed."));else{try{var e=JSON.parse(n.responseText)}catch(t){return void r(t)}t(e)}}}))).then((function(t){if(!t)return p(E()?"ready":"idle"),null;w={},x={},k=t.c,g=t.h,p("prepare");var e=new Promise((function(t,e){m={resolve:t,reject:e}}));return f={},S(3),"prepare"===d&&0===y&&0===v&&A(),e}));var e}function S(t){k[t]?(w[t]=!0,v++,function(t){var e=document.createElement("script");e.charset="utf-8",e.src=M.p+""+t+"."+i+".hot-update.js",document.head.appendChild(e)}(t)):x[t]=!0}function A(){p("ready");var t=m;if(m=null,t)if(n)Promise.resolve().then((function(){return N(n)})).then((function(e){t.resolve(e)}),(function(e){t.reject(e)}));else{var e=[];for(var r in f)Object.prototype.hasOwnProperty.call(f,r)&&e.push(q(r));t.resolve(e)}}function N(t){if("ready"!==d)throw new Error("apply() is only allowed in ready status");return T(t=t||{})}function T(e){var n,o,a,c,u;function h(t){for(var e=[t],r={},n=e.map((function(t){return{chain:[t],id:t}}));n.length>0;){var i=n.pop(),o=i.id,s=i.chain;if((c=C[o])&&(!c.hot._selfAccepted||c.hot._selfInvalidated)){if(c.hot._selfDeclined)return{type:"self-declined",chain:s,moduleId:o};if(c.hot._main)return{type:"unaccepted",chain:s,moduleId:o};for(var l=0;l<c.parents.length;l++){var a=c.parents[l],u=C[a];if(u){if(u.hot._declinedDependencies[o])return{type:"declined",chain:s.concat([a]),moduleId:o,parentId:a};-1===e.indexOf(a)&&(u.hot._acceptedDependencies[o]?(r[a]||(r[a]=[]),d(r[a],[o])):(delete r[a],e.push(a),n.push({chain:s.concat([a]),id:a})))}}}}return{type:"accepted",moduleId:t,outdatedModules:e,outdatedDependencies:r}}function d(t,e){for(var r=0;r<e.length;r++){var n=e[r];-1===t.indexOf(n)&&t.push(n)}}E();var m={},v=[],y={},x=function(){console.warn("[HMR] unexpected require("+_.moduleId+") to disposed module")};for(var w in f)if(Object.prototype.hasOwnProperty.call(f,w)){var _;u=q(w);var S=!1,A=!1,N=!1,L="";switch((_=f[w]?h(u):{type:"disposed",moduleId:w}).chain&&(L="\nUpdate propagation: "+_.chain.join(" -> ")),_.type){case"self-declined":e.onDeclined&&e.onDeclined(_),e.ignoreDeclined||(S=new Error("Aborted because of self decline: "+_.moduleId+L));break;case"declined":e.onDeclined&&e.onDeclined(_),e.ignoreDeclined||(S=new Error("Aborted because of declined dependency: "+_.moduleId+" in "+_.parentId+L));break;case"unaccepted":e.onUnaccepted&&e.onUnaccepted(_),e.ignoreUnaccepted||(S=new Error("Aborted because "+u+" is not accepted"+L));break;case"accepted":e.onAccepted&&e.onAccepted(_),A=!0;break;case"disposed":e.onDisposed&&e.onDisposed(_),N=!0;break;default:throw new Error("Unexception type "+_.type)}if(S)return p("abort"),Promise.reject(S);if(A)for(u in y[u]=f[u],d(v,_.outdatedModules),_.outdatedDependencies)Object.prototype.hasOwnProperty.call(_.outdatedDependencies,u)&&(m[u]||(m[u]=[]),d(m[u],_.outdatedDependencies[u]));N&&(d(v,[_.moduleId]),y[u]=x)}var O,B=[];for(o=0;o<v.length;o++)u=v[o],C[u]&&C[u].hot._selfAccepted&&y[u]!==x&&!C[u].hot._selfInvalidated&&B.push({module:u,parents:C[u].parents.slice(),errorHandler:C[u].hot._selfAccepted});p("dispose"),Object.keys(k).forEach((function(t){!1===k[t]&&function(t){delete installedChunks[t]}(t)}));for(var z,P,R=v.slice();R.length>0;)if(u=R.pop(),c=C[u]){var Z={},I=c.hot._disposeHandlers;for(a=0;a<I.length;a++)(n=I[a])(Z);for(s[u]=Z,c.hot.active=!1,delete C[u],delete m[u],a=0;a<c.children.length;a++){var j=C[c.children[a]];j&&(O=j.parents.indexOf(u))>=0&&j.parents.splice(O,1)}}for(u in m)if(Object.prototype.hasOwnProperty.call(m,u)&&(c=C[u]))for(P=m[u],a=0;a<P.length;a++)z=P[a],(O=c.children.indexOf(z))>=0&&c.children.splice(O,1);for(u in p("apply"),void 0!==g&&(i=g,g=void 0),f=void 0,y)Object.prototype.hasOwnProperty.call(y,u)&&(t[u]=y[u]);var H=null;for(u in m)if(Object.prototype.hasOwnProperty.call(m,u)&&(c=C[u])){P=m[u];var D=[];for(o=0;o<P.length;o++)if(z=P[o],n=c.hot._acceptedDependencies[z]){if(-1!==D.indexOf(n))continue;D.push(n)}for(o=0;o<D.length;o++){n=D[o];try{n(P)}catch(t){e.onErrored&&e.onErrored({type:"accept-errored",moduleId:u,dependencyId:P[o],error:t}),e.ignoreErrored||H||(H=t)}}}for(o=0;o<B.length;o++){var $=B[o];u=$.module,l=$.parents,r=u;try{M(u)}catch(t){if("function"==typeof $.errorHandler)try{$.errorHandler(t)}catch(r){e.onErrored&&e.onErrored({type:"self-accept-error-handler-errored",moduleId:u,error:r,originalError:t}),e.ignoreErrored||H||(H=r),H||(H=t)}else e.onErrored&&e.onErrored({type:"self-accept-errored",moduleId:u,error:t}),e.ignoreErrored||H||(H=t)}}return H?(p("fail"),Promise.reject(H)):b?T(e).then((function(t){return v.forEach((function(e){t.indexOf(e)<0&&t.push(e)})),t})):(p("idle"),new Promise((function(t){t(v)})))}function E(){if(b)return f||(f={}),b.forEach(L),b=void 0,!0}function L(e){Object.prototype.hasOwnProperty.call(f,e)||(f[e]=t[e])}var C={};function M(e){if(C[e])return C[e].exports;var r=C[e]={i:e,l:!1,exports:{},hot:u(e),parents:(a=l,l=[],a),children:[]};return t[e].call(r.exports,r,r.exports,c(e)),r.l=!0,r.exports}return M.m=t,M.c=C,M.d=function(t,e,r){M.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},M.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},M.t=function(t,e){if(1&e&&(t=M(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(M.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)M.d(r,n,function(e){return t[e]}.bind(null,n));return r},M.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return M.d(e,"a",e),e},M.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},M.p="",M.h=function(){return i},c(3)(M.s=3)}([function(e,r){e.exports=t},function(t,e,r){"use strict";r.r(e);var n=r(0),i=r.n(n);function o(t,e){if("object"==typeof e)for(let r in e)t.style[r]=e[r]}function s(t,e){let r=e.getBoundingClientRect();return{x:t.x-r.x-e.scrollLeft,y:t.y-r.y-e.scrollTop,x1:t.x-r.x-e.scrollLeft+t.width,y1:t.y-r.y-e.scrollTop+t.height,width:t.width,height:t.height}}function l(t,e){return t&&Object.keys(t).reduce(((r,n)=>e.includes(n)?r:Object.assign({},r,{[n]:t[n]})),{})}function a(t){let e;if(e=t.path||t.composedPath&&t.composedPath(),void 0===e&&t.target){e=[];let r=t.target;for(e.push(r);r&&r.parentNode;)r=r.parentNode,e.push(r)}return e}class c{constructor(t,e,r){if(!t)return null;this.table=t,this.quill=e,this.options=r,this.domNode=null,this.isTouchDevice=this.checkTouchDevice(),this.initColTool()}initColTool(){const t=this.quill.root.parentNode;this.domNode=document.createElement("div"),this.domNode.classList.add("quill-table-col-tool"),this.updateToolCells(),t.appendChild(this.domNode),this.updateToolWidth()}createToolCell(t=!0){const e=document.createElement("div");e.classList.add("quill-table-col-tool__cell");const r=document.createElement("div");return t&&this.setCellResizeHolderClass(r),o(e,{height:"12px"}),e.appendChild(r),e}setCellResizeHolderClass(t){t.classList.add("quill-table-col-tool__cell-holder")}updateToolWidth(){const t=this.table.parentNode.getBoundingClientRect(),e=this.quill.root.parentNode;o(this.domNode,{width:`${t.width}px`,height:"12px",left:`${this.table.offsetLeft+e.scrollLeft}px`,top:this.table.offsetTop+e.scrollTop-12+2+"px"})}updateToolCells(){return new Promise((t=>{setTimeout((()=>{const e=i.a.find(this.table),r=e.children.tail.children.head.children,n=e.colGroup().children,s=e.children.tail.domNode.clientWidth,l=function(t){return t.reduce(((t,e)=>{const r=e.formats().colspan;return t+=parseInt(r,10)}),0)}(r);let a=Array.from(this.domNode.querySelectorAll(".quill-table-col-tool__cell"));const c=Math.max(l,a.length);for(let t=0;t<c;t++){let e=n.at(t),r=e&&e.attributes.domNode.clientWidth,i=null;if(a[t])if(a[t]&&t>=l)a[t].remove();else{i=a[t],o(i,{width:r/s*100+"%"});const e=t+1;if(e===a.length&&e<c){const t=i.querySelector("div");if(!t)continue;this.setCellResizeHolderClass(t),this.addColCellHolderHandler(i)}}else i=this.createToolCell(t+1!==c),this.domNode.appendChild(i),this.addColCellHolderHandler(i),o(i,{width:r/s*100+"%"})}t()}),0)}))}destroy(){return this.domNode.remove(),null}addColCellHolderHandler(t){const e=i.a.find(this.table),r=t.querySelector(".quill-table-col-tool__cell-holder");let n=!1,s=0,l=0,a=0,c=0,u={},h={},d=null,p=0;const m=t=>{if(t.preventDefault(),n){l=this.getClientXFromEvent(t);let e=a;a=c+l-s>=50?l-s:50-c;let n=h.left+h.width-1+a;const i=r.parentNode.nextSibling;i||(o(d,{left:`${n}px`}),p=n);const{left:u,width:m}=i.getBoundingClientRect();if(m+u-n>50)return o(d,{left:`${n}px`}),void(p=n);o(d,{left:`${p}px`}),a=e}},f=i=>{i.preventDefault();const o=Array.from(this.domNode.querySelectorAll(".quill-table-col-tool__cell")).indexOf(t),p=e.colGroup().children.at(o),g=p.next,b=g.domNode.clientWidth;n&&(p.format("width",c+a),g.format("width",b-a),s=0,l=0,a=0,c=0,n=!1,r.classList.remove("dragging")),document.removeEventListener("mousemove",m,!1),document.removeEventListener("mouseup",f,!1),this.isTouchDevice&&(document.removeEventListener("touchmove",m,!1),document.removeEventListener("touchend",f,!1)),u={},h={},d.remove(),d=null,e.updateTableWidth();const v=this.quill.getModule("quill-table").tableSelection;v&&v.clearSelection(),this.updateToolCells()},g=e=>{document.addEventListener("mousemove",m,!1),document.addEventListener("mouseup",f,!1),this.isTouchDevice&&(document.addEventListener("touchmove",m,!1),document.addEventListener("touchend",f,!1)),u=this.table.getBoundingClientRect(),h=t.getBoundingClientRect(),d=document.createElement("div"),o(d,{position:"fixed",top:`${h.top}px`,left:h.left+h.width-1+"px",zIndex:"100",height:`${u.height+12+4}px`,width:"1px",backgroundColor:"#35A7ED"}),document.body.appendChild(d),n=!0,s=this.getClientXFromEvent(e),c=h.width,r.classList.add("dragging")};null!==r&&(r.addEventListener("mousedown",g,!1),["dragstart","dragenter","ondragover","drag","drop"].forEach((t=>{r.addEventListener(t,(t=>{t.preventDefault(),t.stopPropagation()}),!1)})),this.isTouchDevice&&r.addEventListener("touchstart",g,!1))}colToolCells(){return Array.from(this.domNode.querySelectorAll(".quill-table-col-tool__cell"))}checkTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0}getClientXFromEvent(t){return this.isTouchDevice?t.touches[0].clientX:t.clientX}}const u=i.a.import("blots/block");class h extends u{static create(t){"string"==typeof t&&(t={value:t});const e=super.create(t.value);return v.forEach((r=>{t[r]&&e.setAttribute(`data-${r}`,t[r])})),y.forEach((r=>{t[r]&&e.setAttribute(`data-${r}`,t[r])})),e}static formats(t){const e={};return e.value=this.tagName.indexOf(t.tagName)+1,y.concat(v).reduce(((e,r)=>(t.hasAttribute(`data-${r}`)&&(e[r]=t.getAttribute(`data-${r}`)||void 0),e)),e)}format(t,e){const{row:r,cell:n,rowspan:i,colspan:o}=h.formats(this.domNode);t===h.blotName?e?super.format(t,{value:e,row:r,cell:n,rowspan:i,colspan:o}):r?this.replaceWith(w.blotName,{row:r,cell:n,rowspan:i,colspan:o}):super.format(t,e):super.format(t,e)}optimize(){const{row:t,rowspan:e,colspan:r}=h.formats(this.domNode);if(!t||this.parent instanceof k||this.wrap(k.blotName,{row:t,colspan:r,rowspan:e}),this.enforceAllowedChildren(),null!=this.uiNode&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),0===this.children.length)if(null!=this.statics.defaultChild){const t=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(t)}else this.remove();this.cache={}}}h.blotName="header",h.tagName=["H1","H2","H3","H4","H5","H6"];var d=h;const p=i.a.import("blots/break"),m=i.a.import("blots/block"),f=i.a.import("blots/container"),g=["width"],b={width:100},v=["row","cell"],y=["rowspan","colspan"],x={rowspan:1,colspan:1};class w extends m{static create(t){const e=super.create(t);return v.forEach((r=>{let n="row"===r?E:L;e.setAttribute(`data-${r}`,t[r]||n())})),y.forEach((r=>{e.setAttribute(`data-${r}`,t[r]||x[r])})),t["cell-bg"]&&e.setAttribute("data-cell-bg",t["cell-bg"]),e}static formats(t){return y.concat(v).concat(["cell-bg"]).reduce(((e,r)=>(t.hasAttribute(`data-${r}`)&&(e[r]=t.getAttribute(`data-${r}`)||void 0),e)),{})}format(t,e){if(y.concat(v).indexOf(t)>-1)e?this.domNode.setAttribute(`data-${t}`,e):this.domNode.removeAttribute(`data-${t}`);else if("cell-bg"===t)e?this.domNode.setAttribute("data-cell-bg",e):this.domNode.removeAttribute("data-cell-bg");else if("header"===t){if(!e)return;const{row:r,cell:n,rowspan:i,colspan:o}=w.formats(this.domNode);super.format(t,{value:e,row:r,cell:n,rowspan:i,colspan:o})}else super.format(t,e)}optimize(t){const e=this.domNode.getAttribute("data-row"),r=this.domNode.getAttribute("data-rowspan"),n=this.domNode.getAttribute("data-colspan"),i=this.domNode.getAttribute("data-cell-bg");!this.statics.requiredContainer||this.parent instanceof this.statics.requiredContainer||this.wrap(this.statics.requiredContainer.blotName,{row:e,colspan:n,rowspan:r,"cell-bg":i}),super.optimize(t)}tableCell(){return this.parent}}w.blotName="table-cell-line",w.className="quill-table__cell-line",w.tagName="P";class k extends f{checkMerge(){if(super.checkMerge()&&null!=this.next.children.head){const t=this.children.head.formats()[this.children.head.statics.blotName],e=this.children.tail.formats()[this.children.tail.statics.blotName],r=this.next.children.head.formats()[this.next.children.head.statics.blotName],n=this.next.children.tail.formats()[this.next.children.tail.statics.blotName];return t.cell===e.cell&&t.cell===r.cell&&t.cell===n.cell}return!1}static create(t){const e=super.create(t);return e.setAttribute("data-row",t.row),y.forEach((r=>{t[r]&&e.setAttribute(r,t[r])})),t["cell-bg"]&&(e.setAttribute("data-cell-bg",t["cell-bg"]),e.style.backgroundColor=t["cell-bg"]),e}static formats(t){const e={};return t.hasAttribute("data-row")&&(e.row=t.getAttribute("data-row")),t.hasAttribute("data-cell-bg")&&(e["cell-bg"]=t.getAttribute("data-cell-bg")),y.reduce(((e,r)=>(t.hasAttribute(r)&&(e[r]=t.getAttribute(r)),e)),e)}cellOffset(){return this.parent?this.parent.children.indexOf(this):-1}formats(){const t={};return this.domNode.hasAttribute("data-row")&&(t.row=this.domNode.getAttribute("data-row")),this.domNode.hasAttribute("data-cell-bg")&&(t["cell-bg"]=this.domNode.getAttribute("data-cell-bg")),y.reduce(((t,e)=>(this.domNode.hasAttribute(e)&&(t[e]=this.domNode.getAttribute(e)),t)),t)}toggleAttribute(t,e){e?this.domNode.setAttribute(t,e):this.domNode.removeAttribute(t)}formatChildren(t,e){this.children.forEach((r=>{r.format(t,e)}))}format(t,e){y.indexOf(t)>-1?(this.toggleAttribute(t,e),this.formatChildren(t,e)):["row"].indexOf(t)>-1?(this.toggleAttribute(`data-${t}`,e),this.formatChildren(t,e)):"cell-bg"===t?(this.toggleAttribute("data-cell-bg",e),this.formatChildren(t,e),this.domNode.style.backgroundColor=e||"initial"):super.format(t,e)}optimize(t){const e=this.domNode.getAttribute("data-row");!this.statics.requiredContainer||this.parent instanceof this.statics.requiredContainer||this.wrap(this.statics.requiredContainer.blotName,{row:e}),super.optimize(t)}row(){return this.parent}rowOffset(){return this.row()?this.row().rowOffset():-1}table(){return this.row()&&this.row().table()}}k.blotName="table",k.className="quill-table__cell",k.tagName="TD";class q extends f{checkMerge(){if(super.checkMerge()&&null!=this.next.children.head){const t=this.children.head.formats(),e=this.children.tail.formats(),r=this.next.children.head.formats(),n=this.next.children.tail.formats();return t.row===e.row&&t.row===r.row&&t.row===n.row}return!1}static create(t){const e=super.create(t);return e.setAttribute("data-row",t.row),e}formats(){return["row"].reduce(((t,e)=>(this.domNode.hasAttribute(`data-${e}`)&&(t[e]=this.domNode.getAttribute(`data-${e}`)),t)),{})}optimize(){!this.statics.requiredContainer||this.parent instanceof this.statics.requiredContainer||this.wrap(this.statics.requiredContainer.blotName),this.enforceAllowedChildren(),null!=this.uiNode&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),this.children.length>0&&null!=this.next&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}rowOffset(){return this.parent?this.parent.children.indexOf(this):-1}table(){return this.parent&&this.parent.parent}}q.blotName="table-row",q.tagName="TR";class _ extends f{}_.blotName="table-body",_.tagName="TBODY";class S extends m{static create(t){let e=super.create(t);return g.forEach((r=>{e.setAttribute(`${r}`,t[r]||b[r])})),e}static formats(t){return g.reduce(((e,r)=>(t.hasAttribute(`${r}`)&&(e[r]=t.getAttribute(`${r}`)||void 0),e)),{})}formats(t){const e=super.formats();return t&&this.domNode.setAttribute("width",t),e}format(t,e){g.indexOf(t)>-1?this.domNode.setAttribute(`${t}`,e||b[t]):super.format(t,e)}html(){return this.domNode.outerHTML}}S.blotName="table-col",S.tagName="col";class A extends f{}A.blotName="table-col-group",A.tagName="colgroup";class N extends f{static create(){return super.create()}constructor(t,e){super(t,e),this.updateTableWidth()}updateTableWidth(){setTimeout((()=>{const t=this.colGroup();if(!t)return;const e=this.domNode.clientWidth;t.children.reduce(((t,r)=>{const n=(r.domNode.clientWidth/e*100).toFixed(2);return r.formats(n+"%"),null}))}),0)}cells(t){return this.rows().map((e=>e.children.at(t)))}colGroup(){return this.children.head}deleteColumns(t,e=[],r){const[n]=this.descendants(_);if(null==n||null==n.children.head)return;const i=this.descendants(k),o=[],l=[];if(i.forEach((e=>{const n=s(e.domNode.getBoundingClientRect(),r);n.x+5>t.x&&n.x1-5<t.x1?o.push(e):n.x<t.x+5&&n.x1>t.x1-5&&l.push(e)})),o.length===i.length)return this.tableDestroy(),!0;e.forEach((()=>{this.colGroup().children.at(e[0]).remove()})),o.forEach((t=>{t.remove()})),l.forEach((t=>{const r=parseInt(t.formats().colspan,10);t.format("colspan",r-e.length)})),this.updateTableWidth()}deleteRow(t,e){const[r]=this.descendants(_);if(null==r||null==r.children.head)return;const n=this.descendants(k),i=this.descendants(q),o=[],l=[],a=[],c=i.filter((r=>{const n=s(r.domNode.getBoundingClientRect(),e);return n.y>t.y-5&&n.y1<t.y1+5}));if(n.forEach((r=>{const n=s(r.domNode.getBoundingClientRect(),e);n.y>t.y-5&&n.y1<t.y1+5?o.push(r):n.y<t.y+5&&n.y1>t.y1-5&&(l.push(r),Math.abs(n.y-t.y)<5&&a.push(r))})),o.length===n.length)return void this.tableDestroy();const u=this.rows().reduce(((r,n)=>{let i=s(n.domNode.getBoundingClientRect(),e);return i.y>t.y-5&&i.y1<t.y1+5&&(r+=1),r}),0);a.forEach((t=>{const r=s(t.domNode.getBoundingClientRect(),e),n=t.parent.next,i=n.children.reduce(((t,n)=>{const i=s(n.domNode.getBoundingClientRect(),e);return Math.abs(r.x1-i.x)<5&&(t=n),t}),null);n.insertBefore(t,i),t.format("row",n.formats().row)})),o.forEach((t=>{t.remove()})),l.forEach((t=>{const e=parseInt(t.formats().rowspan,10);t.format("rowspan",e-u)})),c.forEach((t=>t.remove()))}tableDestroy(){const t=i.a.find(this.scroll.domNode.parentNode),e=t.getModule("quill-table");this.remove(),e.hideTableTools(),t.update(i.a.sources.USER)}insertCell(t,e){const r=L(),n=t.formats().row,i=this.scroll.create(k.blotName,Object.assign({},x,{row:n})),o=this.scroll.create(w.blotName,{row:n,cell:r});i.appendChild(o),e?t.insertBefore(i,e):t.appendChild(i)}insertColumn(t,e,r=!0,n){const[i]=this.descendants(_),[o]=this.descendants(A),l=this.descendants(S);let a=[],c=[],u=[];if(null==i||null==i.children.head)return;this.descendants(k).forEach((e=>{const i=s(e.domNode.getBoundingClientRect(),n);r?Math.abs(i.x1-t.x1)<5?a.push(e):t.x1-i.x>5&&t.x1-i.x1<-5&&c.push(e):Math.abs(i.x-t.x)<5?a.push(e):t.x-i.x>5&&t.x-i.x1<-5&&c.push(e)})),a.forEach((t=>{const e=r?t.next:t,n=L(),i=t.parent,o=i.formats().row,s=t.formats(),l=this.scroll.create(k.blotName,Object.assign({},x,{row:o,rowspan:s.rowspan})),a=this.scroll.create(w.blotName,{row:o,cell:n,rowspan:s.rowspan});l.appendChild(a),e?i.insertBefore(l,e):i.appendChild(l),u.push(l)}));const h=this.scroll.create(S.blotName,!0);let d=r?l[e].next:l[e];return d?o.insertBefore(h,d):o.appendChild(h),c.forEach((t=>{const e=t.formats().colspan;t.format("colspan",parseInt(e,10)+1),u.push(t)})),u.sort(((t,e)=>t.domNode.getBoundingClientRect().y-e.domNode.getBoundingClientRect().y)),this.updateTableWidth(),u}insertRow(t,e,r){const[n]=this.descendants(_);if(null==n||null==n.children.head)return;const i=this.descendants(k),o=E(),l=this.scroll.create(q.blotName,{row:o});let a=[],c=[],u=[];i.forEach((n=>{const i=s(n.domNode.getBoundingClientRect(),r);e?Math.abs(i.y1-t.y1)<5?a.push(n):t.y1-i.y>5&&t.y1-i.y1<-5&&c.push(n):Math.abs(i.y-t.y)<5?a.push(n):t.y-i.y>5&&t.y-i.y1<-5&&c.push(n)}));const h=(t,e)=>t.domNode.getBoundingClientRect().x-e.domNode.getBoundingClientRect().x;a.sort(h),a.forEach((t=>{const e=L(),r=t.formats(),n=this.scroll.create(k.blotName,Object.assign({},x,{row:o,colspan:r.colspan})),i=this.scroll.create(w.blotName,{row:o,cell:e,colspan:r.colspan}),s=this.scroll.create(p.blotName);i.appendChild(s),n.appendChild(i),l.appendChild(n),u.push(n)})),c.forEach((t=>{const e=parseInt(t.formats().rowspan,10);t.format("rowspan",e+1),u.push(t)}));const d=this.rows().find((n=>{let i=s(n.domNode.getBoundingClientRect(),r);return e?Math.abs(i.y-t.y-t.height)<5:Math.abs(i.y-t.y)<5}));return n.insertBefore(l,d),u.sort(h),u}mergeCells(t,e,r,n){const i=e.reduce(((t,e,i)=>(0!==i?(t&&e.moveChildren(t),e.remove()):(e.format("colspan",n),e.format("rowspan",r),t=e),t)),null);let o=i.domNode.getAttribute("data-row"),s=i.children.head.domNode.getAttribute("data-cell");return i.children.forEach((t=>{t.format("cell",s),t.format("row",o),t.format("colspan",n),t.format("rowspan",r)})),i}unmergeCells(t,e){let r={},n=1,i=1;t.forEach((t=>{if(r=t.formats(),n=r.rowspan,i=r.colspan,i>1){let e=t.next,r=t.row();t.format("colspan",1);for(let t=i;t>1;t--)this.insertCell(r,e)}if(n>1){let r=n,o=t.row().next;for(;r>1;){let n=o.children.reduce(((r,n)=>{let i=s(t.domNode.getBoundingClientRect(),e),o=s(n.domNode.getBoundingClientRect(),e);return Math.abs(i.x1-o.x)<5&&(r=n),r}),null);for(let t=i;t>0;t--)this.insertCell(o,n);r-=1,o=o.next}t.format("rowspan",1)}}))}rows(){const t=this.children.tail;return null==t?[]:t.children.map((t=>t))}}N.blotName="table-container",N.className="quill-table__table",N.tagName="TABLE";class T extends f{constructor(t,e){super(t,e);const r=i.a.find(t.domNode.parentNode);e.addEventListener("scroll",(t=>{const e=r.getModule("quill-table");e.columnTool&&(e.columnTool.domNode.scrollLeft=t.target.scrollLeft),e.tableSelection&&e.tableSelection.selectedTds.length>0&&e.tableSelection.repositionHelpLines()}),!1)}table(){return this.children.head}}function E(){return`row-${Math.random().toString(36).slice(2,6)}`}function L(){return`cell-${Math.random().toString(36).slice(2,6)}`}T.blotName="table-view",T.className="quill-table__wrapper",T.tagName="DIV",T.allowedChildren=[N],N.requiredContainer=T,N.allowedChildren=[_,A],_.requiredContainer=N,_.allowedChildren=[q],q.requiredContainer=_,q.allowedChildren=[k],k.requiredContainer=q,k.allowedChildren=[w,d],w.requiredContainer=k,A.allowedChildren=[S],A.requiredContainer=N,S.requiredContainer=A;class C{constructor(t,e){this.quill=t,this.cellNode=e.cellNode,this.init(e)}init({tableNode:t,rowNode:e}){const r=this.quill.root.parentNode;this.domNode=document.createElement("button"),this.domNode.classList.add("quill-table-operation-menu__context-btn"),this.domNode.type="button",this.domNode.addEventListener("click",(r=>{const n=this.quill.getModule("quill-table"),i=n.tableSelection;i&&i.selectedTds.length<=1&&i.highlitSelection(this.cellNode),n.showTableOperationMenu(t,e,this.cellNode,r)})),this.calculateButtonPosition(),r.appendChild(this.domNode)}calculateButtonPosition(){const t=this.quill.root.parentNode,e=s(this.cellNode.getBoundingClientRect(),t);o(this.domNode,{top:`${e.y}px`,left:`${e.x1}px`})}destroy(){return this.domNode&&this.domNode.remove(),null}}function M(t,e,r,n){return t.reduce(((i,o)=>{let l=s(o.getBoundingClientRect(),n);return r(l,e)&&i.push(t.indexOf(o)),i}),[])}function O(t,e){const r={row:null,col:null},n=t.closest&&t.closest("tr"),i=function(t){const e=t.closest&&t.closest("tr");return e?Array.from(e.children).indexOf(t):-1}(t);i>-1&&(r.col=i);const o=e.indexOf(n);return o>-1&&(r.row=o),r}const B=["left","right","top","bottom"];class z{constructor({table:t,cell:e,row:r},n,i){if(!t)return null;this.table=t,this.rowNode=r,this.cellNode=e,this.quill=n,this.options=i,this.boundary={},this.selectedTds=[],this.dragging=!1,this.selectingHandler=this.mouseDownHandler.bind(this),this.clearSelectionHandler=this.clearSelection.bind(this),this.helpLinesInitial(),this.quill.root.addEventListener("mousedown",this.selectingHandler,!1),this.quill.root.addEventListener("keydown",(()=>this.selectCell()),!1),this.quill.on("text-change",(t=>{if(0===this.selectedTds.length)return;const e=this.selectedTds.slice(1);1!==this.selectedTds.length?(this.clearSelectionHandler(),this.applyChangesForSelection(e,t)):this.refreshHelpLinesPosition()})),e&&this.highlitSelection(e)}helpLinesInitial(){let t=this.quill.root.parentNode;B.forEach((e=>{this[e]=document.createElement("div"),this[e].classList.add("quill-table__selection-line"),this[e].classList.add("quill-table__selection-line-"+e),o(this[e],{position:"absolute",display:"none","background-color":"#0589f3"}),t.appendChild(this[e])}))}mouseDownHandler(t){if(0!==t.button||!t.target.closest(".quill-table__table"))return;const e=this.highlitSelection(t.target);if(!e)return;let r,n=null;this.quill.root.addEventListener("mousemove",o,!1),document.addEventListener("mouseup",l,!1),this.quill.root.addEventListener("mouseleave",a,!1),this.table.querySelectorAll(".quill-table__cell-line--selected").forEach((t=>{t.classList.remove("quill-table__cell-line--selected")}));const i=this;function o(t){if(0!==t.button||!t.target.closest(".quill-table__table"))return;if(!e)return;if(n&&clearTimeout(n),r=t.target.closest("td[data-row]"),!r)return;const o=s(r.getBoundingClientRect(),i.quill.root.parentNode);i.boundary=P(e.startTdRect,o),i.correctBoundary(),i.selectedTds=i.computeSelectedTds(e.startTd,r),setTimeout((()=>{i.refreshHelpLinesPosition(),i.showContextMenuButton(r)}),0),e.startTd!==r&&i.quill.blur()}function l(){n&&clearTimeout(n),i.quill.root.removeEventListener("mousemove",o,!1),document.removeEventListener("mouseup",l,!1),i.quill.root.removeEventListener("mouseleave",a,!1),i.dragging=!1,i.selectCell();const t=r||e.startTd;t&&i.showContextMenuButton(t)}function a(t){i.dragging&&(function(t){const e=t.relatedTarget&&t.relatedTarget.closest&&t.relatedTarget.closest(".quill-table__wrapper"),r=t.relatedTarget&&t.relatedTarget.classList.contains("quill-table__selection-line"),n=t.relatedTarget&&t.relatedTarget.classList.contains("quill-table-operation-menu__context-btn");return e||r||n}(t)||(n&&clearTimeout(n),n=setTimeout((()=>{l()}),550)))}this.dragging=!0}highlitSelection(t){const e=t.closest("td[data-row]");if(!e)return;const r=s(e.getBoundingClientRect(),this.quill.root.parentNode);return this.boundary=P(r,r),this.correctBoundary(),this.selectedTds=this.computeSelectedTds(e,e),this.repositionHelpLines(),this.showContextMenuButton(e),{startTd:e,startTdRect:r}}correctBoundary(){i.a.find(this.table).descendants(k).forEach((t=>{let{x:e,y:r,width:n,height:i}=s(t.domNode.getBoundingClientRect(),this.quill.root.parentNode);(e+2>=this.boundary.x&&e+2<=this.boundary.x1||e-2+n>=this.boundary.x&&e-2+n<=this.boundary.x1)&&(r+2>=this.boundary.y&&r+2<=this.boundary.y1||r-2+i>=this.boundary.y&&r-2+i<=this.boundary.y1)&&(this.boundary=P(this.boundary,{x:e,y:r,width:n,height:i}))}))}computeSelectedTds(t,e){if("TD"!==t.tagName||"TD"!==e.tagName)return[];const r=Array.from(this.table.querySelectorAll("tr")),n=O(t,r);if(null===n.row||null===n.col)return[];const o=O(e,r);if(null===!o.row||null===o.col)return[];const s=[],{iterationStart:l,iterationEnd:a,beginSelectionIndex:c,endSelectionIndex:u}=(h=n,d=o,{iterationStart:Math.min(h.row,d.row),iterationEnd:Math.max(h.row,d.row),beginSelectionIndex:Math.min(h.col,d.col),endSelectionIndex:Math.max(h.col,d.col)});var h,d;for(let t=l;t<=a;t++){const e=Array.from(r[t].children).slice(c,u+1);s.push(...e.map((t=>i.a.find(t))))}return s}repositionHelpLines(){if(!(this.left&&this.right&&this.top&&this.bottom))return;const t=this.table.parentNode.scrollLeft;o(this.left,{display:"block",left:this.boundary.x-t-1+"px",top:`${this.boundary.y}px`,height:`${this.boundary.height+1}px`,width:"1px"}),o(this.right,{display:"block",left:this.boundary.x1-t+"px",top:`${this.boundary.y}px`,height:`${this.boundary.height+1}px`,width:"1px"}),o(this.top,{display:"block",left:this.boundary.x-1-t+"px",top:`${this.boundary.y}px`,width:`${this.boundary.width+1}px`,height:"1px"}),o(this.bottom,{display:"block",left:this.boundary.x-1-t+"px",top:`${this.boundary.y1+1}px`,width:`${this.boundary.width+1}px`,height:"1px"})}refreshHelpLinesPosition(){if(0===this.selectedTds.length)return;const t=s(this.selectedTds[0].domNode.getBoundingClientRect(),this.quill.root.parentNode),e=s(this.selectedTds[this.selectedTds.length-1].domNode.getBoundingClientRect(),this.quill.root.parentNode);this.contextMenuButton&&this.contextMenuButton.calculateButtonPosition(),this.boundary=P(t,e),this.repositionHelpLines()}destroy(){return B.forEach((t=>{this[t].remove(),this[t]=null})),this.quill.root.removeEventListener("mousedown",this.selectingHandler,!1),this.quill.off("text-change",this.clearSelectionHandler),this.hideContextMenuButton(),null}setSelection(t,e){const r=t.getBoundingClientRect(),n=e.getBoundingClientRect();this.boundary=P(s(r,this.quill.root.parentNode),s(n,this.quill.root.parentNode)),this.correctBoundary(),this.selectedTds=this.computeSelectedTds(t,e),setTimeout((()=>{this.refreshHelpLinesPosition(),this.showContextMenuButton(this.selectedTds[this.selectedTds.length-1].domNode)}),0)}clearSelection(){this.selectedTds.length>1&&window.getSelection().removeAllRanges(),this.boundary={},this.selectedTds=[],B.forEach((t=>{this[t]&&o(this[t],{display:"none"})})),this.hideContextMenuButton()}selectCell(){if(this.selectedTds.length<=1)return;const t=this.selectedTds[0],e=window.getSelection();e.removeAllRanges();const r=document.createRange();r.setStart(t.domNode,0),r.setEnd(t.domNode,1),e.addRange(r),this.selectedTds.forEach((t=>{t.domNode.classList.add("quill-table__cell-line--selected")}))}keyDownButtonHandler(){this.selectCell()}applyChangesForSelection(t,e){const r=e.ops.reduce(((t,e)=>e.attributes?(Object.entries(e.attributes).forEach((([e,r])=>{t[e]=r})),t):t),{});t.forEach((t=>{const e=this.quill.getIndex(t);this.quill.formatLine(e,0,r),this.quill.formatText(e,t.domNode.textContent.length,r)})),this.quill.setSelection(null)}showContextMenuButton(t){this.hideContextMenuButton(),this.contextMenuButton=new C(this.quill,{tableNode:this.table,rowNode:this.rowNode,cellNode:t})}hideContextMenuButton(){this.contextMenuButton&&(this.contextMenuButton=this.contextMenuButton.destroy())}}function P(t,e){let r=Math.min(t.x,e.x,t.x+t.width-1,e.x+e.width-1),n=Math.max(t.x,e.x,t.x+t.width-1,e.x+e.width-1),i=Math.min(t.y,e.y,t.y+t.height-1,e.y+e.height-1),o=Math.max(t.y,e.y,t.y+t.height-1,e.y+e.height-1);return{x:r,x1:n,y:i,y1:o,width:n-r,height:o-i}}const R={RU:{table:"Таблица",insert_column_right:"Добавить колонку справа",insert_column_left:"Добавить колонку слева",insert_row_up:"Добавить строку сверху",insert_row_bottom:"Добавить строку снизу",merge_cells:"Объединить ячейки",unmerge_cells:"Разъединить ячейку",delete_columns:"Удалить столбец",delete_rows:"Удалить строку",delete_table:"Удалить таблицу"},EN:{table:"Table",insert_column_right:"Insert column right",insert_column_left:"Insert column left",insert_row_up:"Insert row up",insert_row_bottom:"Insert row down",merge_cells:"Merge selected cells",unmerge_cells:"Unmerge cells",delete_columns:"Delete selected columns",delete_rows:"Delete selected rows",delete_table:"Delete table"}};function Z(t,e){const r=e||window.lang||"EN";return(R[r]||R.EN)[t]||R.EN[t]||t}const I=["white","red","yellow","blue"],j={insertColumnRight:{text:Z("insert_column_right"),iconClass:"quill-table-operation-menu__icon-add-column-right",handler(){const t=i.a.find(this.table),e=this.selectedTds[this.selectedTds.length-1],r=e.domNode.parentNode.querySelectorAll(".quill-table__cell");let n=Array.from(r).indexOf(e.domNode);const o=t.insertColumn(this.boundary,n,!0,this.quill.root.parentNode);this.quill.update(i.a.sources.SILENT),this.quill.setSelection(this.quill.getIndex(o[0]),0,i.a.sources.SILENT),this.tableSelection.setSelection(o[0].domNode,o[0].domNode),this.tableColumnTool.updateToolCells()}},insertColumnLeft:{text:Z("insert_column_left"),iconClass:"quill-table-operation-menu__icon-add-column-left",handler(){const t=i.a.find(this.table),e=this.selectedTds[0],r=e.domNode.parentNode.querySelectorAll(".quill-table__cell");let n=Array.from(r).indexOf(e.domNode);const o=t.insertColumn(this.boundary,n,!1,this.quill.root.parentNode);this.quill.update(i.a.sources.SILENT),this.quill.setSelection(this.quill.getIndex(o[0]),0,i.a.sources.SILENT),this.tableSelection.setSelection(o[0].domNode,o[0].domNode),this.tableColumnTool.updateToolCells()}},insertRowUp:{text:Z("insert_row_up"),iconClass:"quill-table-operation-menu__icon-add-column-top",handler(){const t=i.a.find(this.table).insertRow(this.boundary,!1,this.quill.root.parentNode);this.quill.update(i.a.sources.SILENT),this.quill.setSelection(this.quill.getIndex(t[0]),0,i.a.sources.SILENT),this.tableSelection.setSelection(t[0].domNode,t[0].domNode)}},insertRowDown:{text:Z("insert_row_bottom"),iconClass:"quill-table-operation-menu__icon-add-column-bottom",handler(){const t=i.a.find(this.table).insertRow(this.boundary,!0,this.quill.root.parentNode);this.quill.update(i.a.sources.SILENT),this.quill.setSelection(this.quill.getIndex(t[0]),0,i.a.sources.SILENT),this.tableSelection.setSelection(t[0].domNode,t[0].domNode)}},mergeCells:{text:Z("merge_cells"),iconClass:"quill-table-operation-menu__icon-merge-cells",handler(){const t=i.a.find(this.table),e=t.rows().reduce(((t,e)=>{let r=s(e.domNode.getBoundingClientRect(),this.quill.root.parentNode);return r.y>this.boundary.y-5&&r.y+r.height<this.boundary.y+this.boundary.height+5&&(t+=1),t}),0),r=this.columnToolCells.reduce(((t,e)=>{let r=s(e.getBoundingClientRect(),this.quill.root.parentNode);return r.x>this.boundary.x-5&&r.x+r.width<this.boundary.x+this.boundary.width+5&&(t+=1),t}),0),n=t.mergeCells(this.boundary,this.selectedTds,e,r,this.quill.root.parentNode);this.quill.update(i.a.sources.SILENT),this.tableSelection.setSelection(n.domNode,n.domNode)}},unmergeCells:{text:Z("unmerge_cells"),iconClass:"quill-table-operation-menu__icon-slpit-cells",handler(){i.a.find(this.table).unmergeCells(this.selectedTds,this.quill.root.parentNode),this.quill.update(i.a.sources.SILENT),this.tableSelection.clearSelection()}},deleteColumn:{text:Z("delete_columns"),iconClass:"quill-table-operation-menu__icon-remove-column",handler(){const t=i.a.find(this.table);let e=M(this.columnToolCells,this.boundary,((t,e)=>t.x+5>e.x&&t.x+t.width-5<e.x1),this.quill.root.parentNode);t.deleteColumns(this.boundary,e,this.quill.root.parentNode)||(this.quill.update(i.a.sources.SILENT),this.tableSelection.clearSelection(),this.tableColumnTool.updateToolCells())}},deleteRow:{text:Z("delete_rows"),iconClass:"quill-table-operation-menu__icon-remove-row",handler(){i.a.find(this.table).deleteRow(this.boundary,this.quill.root.parentNode),this.quill.update(i.a.sources.SILENT),this.tableSelection.clearSelection()}},deleteTable:{text:Z("delete_table"),iconClass:"quill-table-operation-menu__icon-delete-table",columnClass:"quill-table-operation-menu__item--danger",handler(){const t=this.quill.getModule("quill-table"),e=i.a.find(this.table);t.hideTableTools(),e.remove(),this.quill.update(i.a.sources.SILENT)}}};class H{constructor(t,e,r={}){const n=e.getModule("quill-table");this.tableSelection=n.tableSelection,this.table=t.table,this.quill=e,this.options=r,this.menuItems=Object.assign({},j,r.items||{}),this.tableColumnTool=n.columnTool,this.boundary=this.tableSelection.boundary,this.selectedTds=this.tableSelection.selectedTds,this.destroyHandler=this.destroy.bind(this),this.columnToolCells=this.tableColumnTool.colToolCells(),this.colorSubTitle=r.color&&r.color.text?r.color.text:"Background Colors",this.cellColors=r.color&&r.color.colors?r.color.colors:I,this.evt=t.evt,this.menuInitial(t),this.mount(),document.addEventListener("click",this.destroyHandler,!1)}mount(){document.body.appendChild(this.domNode);const{left:t,top:e}=this.calculatePosition();o(this.domNode,{left:`${t}px`,top:`${e}px`})}destroy(){return this.domNode.remove(),document.removeEventListener("click",this.destroyHandler,!1),null}menuInitial(){this.domNode=document.createElement("div"),this.domNode.classList.add("quill-table-operation-menu"),o(this.domNode,{position:"absolute","min-height":"150px","max-width":"min(-10px + 100vw, 300px);"});for(let e in this.menuItems)this.menuItems[e]&&(this.domNode.appendChild(this.menuItemCreator(Object.assign({},j[e],this.menuItems[e]))),["insertRowDown","unmergeCells"].indexOf(e)>-1&&this.domNode.appendChild(t()));function t(){const t=document.createElement("div");return t.classList.add("quill-table-operation-menu__divider"),t}this.options.color&&!1!==this.options.color&&(this.domNode.appendChild(t()),this.domNode.appendChild(function(t){const e=document.createElement("div");return e.classList.add("quill-table-operation-menu__subtitle"),e.innerText=t,e}(this.colorSubTitle)),this.domNode.appendChild(this.colorsItemCreator(this.cellColors)))}colorsItemCreator(t){const e=this,r=document.createElement("div");return r.classList.add("quill-table-color-picker"),t.forEach((t=>{let n=function(t){const r=document.createElement("div");return r.classList.add("quill-table-color-picker__item"),r.setAttribute("data-color",t),r.style.backgroundColor=t,r.addEventListener("click",(function(){const r=e.tableSelection.selectedTds;r&&r.length>0&&r.forEach((e=>{e.format("cell-bg",t)}))}),!1),r}(t);r.appendChild(n)})),r}menuItemCreator({text:t,iconClass:e,columnClass:r,handler:n}){const i=document.createElement("div"),o=["quill-table-operation-menu__item",r].filter(Boolean);i.classList.add(...o);const s=document.createElement("span");s.classList.add("quill-table-operation-menu__icon"),s.classList.add(e);const l=document.createElement("span");return l.classList.add("quill-table-operation-menu__text"),l.innerText=t,i.appendChild(s),i.appendChild(l),i.addEventListener("click",n.bind(this),!1),i}calculatePosition(){const t=parseInt(this.evt.clientX,10)||0,e=parseInt(this.evt.clientY,10)||0,{clientWidth:r,clientHeight:n}=document.documentElement,{offsetWidth:i,offsetHeight:o}=this.domNode;let s=t+5;t+i>r-5&&(s=t-i-5,s<5&&(s=5));let l=this.evt.pageY;return e+o>n&&(l=this.evt.pageY-o,l<150&&(l=150)),{top:l,left:s}}}const D=i.a.import("delta");function $(t,e){const r=t.parentNode,n="TABLE"===r.parentNode.tagName?r.parentNode:r.parentNode.parentNode,i=Array.from(n.querySelectorAll("tr")),o=Array.from(r.querySelectorAll("td")),s=i.indexOf(r)+1,a=o.indexOf(t)+1,c=t.getAttribute("colspan")||!1,u=t.getAttribute("rowspan")||!1,h=t.getAttribute("data-cell-bg")||t.style.backgroundColor;return 0===e.length()?e=(new D).insert("\n",{"table-cell-line":{row:s,cell:a,rowspan:u,colspan:c}}):(e=e.reduce(((t,e)=>{if(e.insert&&"string"==typeof e.insert){const r=[];let n=e.insert,i=0;for(let t=0;t<e.insert.length;t++)"\n"===n.charAt(t)&&(0===t||r.push(n.substring(i,t)),r.push("\n"),i=t+1);const o=n.substring(i);o&&r.push(o),r.forEach((r=>{"\n"===r?t.insert("\n",e.attributes):t.insert(r,l(e.attributes,["table","table-cell-line"]))}))}else t.insert(e.insert,e.attributes);return t}),new D)).reduce(((t,e)=>e.insert&&"string"==typeof e.insert&&e.insert.startsWith("\n")?(t.insert(e.insert,Object.assign({},Object.assign({},{row:s},e.attributes.table),{"table-cell-line":{row:s,cell:a,rowspan:u,colspan:c,"cell-bg":h}},l(e.attributes,["table"]))),t):(e.attributes&&e.attributes.background&&e.attributes.background===function(t){if(/^(rgb|RGB)/.test(t)){const e=t.toString().match(/\d+/g);let r="#";for(let t=0;t<3;t++)r+=("0"+Number(e[t]).toString(16)).slice(-2);return r}if(/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(t)){const e=t.replace(/#/,"").split("");if(6===e.length)return t;if(3===e.length){let t="#";for(let r=0;r<e.length;r+=1)t+=e[r]+e[r];return t}}return t}(h)?t.insert(e.insert,Object.assign({},l(e.attributes,["table","table-cell-line","background"]))):t.insert(e.insert,Object.assign({},l(e.attributes,["table","table-cell-line"]))),t)),new D)}function U(t,e){const r=t.parentNode,n="TABLE"===r.parentNode.tagName?r.parentNode:r.parentNode.parentNode,i=Array.from(n.querySelectorAll("tr")),o=Array.from(r.querySelectorAll("th")),s=i.indexOf(r)+1,a=o.indexOf(t)+1,c=t.getAttribute("colspan")||!1,u=t.getAttribute("rowspan")||!1;return 0===e.length()?e=(new D).insert("\n",{"table-cell-line":{row:s,cell:a,rowspan:u,colspan:c}}):(e=e.reduce(((t,e)=>{if(e.insert&&"string"==typeof e.insert){const r=[];let n=e.insert,i=0;for(let t=0;t<e.insert.length;t++)"\n"===n.charAt(t)&&(0===t||r.push(n.substring(i,t)),r.push("\n"),i=t+1);const o=n.substring(i);o&&r.push(o),r.indexOf("\n")<0&&r.push("\n"),r.forEach((r=>{"\n"===r?t.insert("\n",{"table-cell-line":{row:s,cell:a,rowspan:u,colspan:c}}):t.insert(r,e.attributes)}))}else t.insert(e.insert,e.attributes);return t}),new D)).reduce(((t,e)=>(e.insert&&"string"==typeof e.insert&&e.insert.startsWith("\n")?t.insert(e.insert,Object.assign({},{"table-cell-line":{row:s,cell:a,rowspan:u,colspan:c}})):t.insert(e.insert,Object.assign({},l(e.attributes,["table","table-cell-line"]))),t)),new D)}function F(t,e){let r=new D;const n=t.querySelector("tr");if(null===n)return r;const i=Array.from(n.querySelectorAll("td")).concat(Array.from(n.querySelectorAll("th"))).reduce(((t,e)=>{const r=e.getAttribute("colspan")||1;return t+=parseInt(r,10)}),0),o=t.querySelectorAll("col").length;if(o===i)return e;{for(let t=0;t<i-o;t++)r.insert("\n",{"table-col":!0});if(0===o)return r.concat(e);let t=0;return e.reduce(((e,n)=>(e.insert(n.insert,n.attributes),n.attributes&&n.attributes["table-col"]&&(t+=n.insert.length,t===o&&(e=e.concat(r))),e)),new D)}}const V=i.a.import("core/module"),W=i.a.import("delta");class K extends V{static register(){i.a.register(S,!0),i.a.register(A,!0),i.a.register(w,!0),i.a.register(k,!0),i.a.register(q,!0),i.a.register(_,!0),i.a.register(N,!0),i.a.register(T,!0)}constructor(t,e){super(t,e),this.quill.root.addEventListener("click",(r=>{const n=a(r);if(!n||n.length<=0)return;const{tableNode:i,rowNode:o,cellNode:s}=n.reduce(((t,e)=>{if(!e.tagName)return t;const n=e.tagName.toUpperCase();if("TABLE"===n&&e.classList.contains("quill-table__table"))return t.tableNode=e,t;if("TR"===n&&(t.rowNode=e),("TBODY"===n||t.rowNode)&&!t.cellNode){const e=document.elementFromPoint(r.x,r.y);e&&(t.cellNode=e.closest(".quill-table__cell"))}return e.classList.contains("quill-table__cell")&&(t.cellNode=e),t}),{cellNode:null,rowNode:null,tableNode:null});if(i){if(this.table===i)return;this.table&&this.hideTableTools(),this.showTableTools(i,o,s,t,e)}else this.table&&this.hideTableTools()}),!1),this.quill.root.addEventListener("contextmenu",(t=>{if(!this.table)return!0;t.preventDefault();const e=a(t);if(!e||e.length<=0)return;const r=e.filter((t=>t.tagName&&"TABLE"===t.tagName.toUpperCase()&&t.classList.contains("quill-table__table")))[0],n=e.filter((t=>t.tagName&&"TR"===t.tagName.toUpperCase()&&t.getAttribute("data-row")))[0],i=e.filter((t=>t.tagName&&"TD"===t.tagName.toUpperCase()&&t.getAttribute("data-row")))[0];let o=this.tableSelection.selectedTds.map((t=>t.domNode)).includes(i);(this.tableSelection.selectedTds.length<=0||!o)&&this.tableSelection.setSelection(i,i),this.showTableOperationMenu(r,n,i,t)}),!1),this.quill.root.addEventListener("mousemove",(t=>{!t.target.closest("table.quill-table__table")||this.tableSelection&&(this.tableSelection.dragging||this.tableSelection.selectedTds&&this.tableSelection.selectedTds.length>0)||window.getSelection().removeAllRanges()})),t.keyboard.addBinding({key:"Backspace"},{},((t,e)=>this.tableDeletionProtection(t,e))),t.keyboard.addBinding({key:"Backspace",shiftKey:!0},{},((t,e)=>this.tableDeletionProtection(t,e)));let r=t.keyboard.bindings.Backspace.slice(t.keyboard.bindings.Backspace.length-2,t.keyboard.bindings.Backspace.length);t.keyboard.bindings.Backspace.splice(0,2,...r),t.keyboard.bindings.Backspace.splice(t.keyboard.bindings.Backspace.length-2,2);const n=t.keyboard.bindings.Tab.slice(t.keyboard.bindings.Tab.length-2,t.keyboard.bindings.Tab.length);t.keyboard.bindings.Tab.splice(0,2,...n),t.keyboard.bindings.Tab.splice(t.keyboard.bindings.Tab.length-2,2),t.clipboard.addMatcher("td",$),t.clipboard.addMatcher("th",U),t.clipboard.addMatcher("table",F),t.clipboard.matchers=t.clipboard.matchers.filter((t=>"tr"!==t[0])),this.quill.on("selection-change",(t=>{this.correctSelection(t)})),this.resizeObserver=new window.ResizeObserver((()=>{this.columnTool&&(this.columnTool.updateToolCells(),this.columnTool.updateToolWidth()),this.tableSelection&&this.tableSelection.refreshHelpLinesPosition()})),this.resizeObserver.observe(this.quill.root)}getTable(t=this.quill.getSelection()){if(null==t)return[null,null,null,-1];const[e,r]=this.quill.getLine(t.index);if(null==e||e.statics.blotName!==w.blotName)return[null,null,null,-1];const n=e.tableCell(),i=n.row();return[i.table(),i,n,r]}insertTable(t,e){const r=this.quill.getSelection(!0);if(null==r)return;let n=this.quill.getLeaf(r.index)[0];if(o=n,Boolean(o.domNode.closest&&o.domNode.closest("table")))return void console.warn("Can not insert table into a table cell.");var o;let s=(new W).retain(r.index);s.insert("\n"),s=new Array(e).fill("\n").reduce(((t,e)=>(t.insert(e,{"table-col":!0}),t)),s),s=new Array(t).fill(0).reduce((t=>{let r=E();return new Array(e).fill("\n").reduce(((t,e)=>(t.insert(e,{"table-cell-line":{row:r,cell:L()}}),t)),t)}),s),this.quill.updateContents(s,i.a.sources.USER);const l=r.index+e+1;this.quill.setSelection(l,i.a.sources.API);const[a]=this.quill.getLine(l);if(!Y(a))return;const c=a.parent;if(!c)return;const u=c.parent;if(!u)return;const h=u.domNode.closest("table");h&&this.showTableTools(h,u.domNode,c.domNode,this.quill,this.options)}tableInsertColumn(t){const e=i.a.find(this.table),r=this.tableSelection,n=this.columnTool,o=n.colToolCells();let l=(a=o,c=r.boundary,u=(t,e)=>Math.abs(t.x+t.width-e.x1)<=5,h=r.quill.root.parentNode,a.reduce(((t,e)=>{let r=s(e.getBoundingClientRect(),h);return u(r,c)&&(t=a.indexOf(e)),t}),!1));var a,c,u,h;const d=e.insertColumn(r.boundary,l,"right"===t,r.quill.root.parentNode);n.updateToolCells(),r.quill.update(i.a.sources.USER),r.quill.setSelection(r.quill.getIndex(d[0]),0,i.a.sources.SILENT),r.setSelection(d[0].domNode,d[0].domNode)}insertColumnLeft(){this.tableInsertColumn("left")}insertColumnRight(){this.tableInsertColumn("right")}tableInsertRow(t){const e=i.a.find(this.table),r=this.tableSelection,n=e.insertRow(r.boundary,"below"===t,r.quill.root.parentNode);r.quill.update(i.a.sources.USER),r.quill.setSelection(r.quill.getIndex(n[0]),0,i.a.sources.SILENT),r.setSelection(n[0].domNode,n[0].domNode)}insertRowAbove(){this.tableInsertRow("above")}insertRowBelow(){this.tableInsertRow("below")}deleteRow(){const t=i.a.find(this.table),e=this.tableSelection;t.deleteRow(e.boundary,e.quill.root.parentNode),e.quill.update(i.a.sources.USER),e.clearSelection()}deleteColumn(){const t=i.a.find(this.table),e=this.tableSelection,r=this.columnTool;let n=M(r.colToolCells(),e.boundary,((t,e)=>t.x+5>e.x&&t.x+t.width-5<e.x1),e.quill.root.parentNode);t.deleteColumns(e.boundary,n,e.quill.root.parentNode)||(r.updateToolCells(),e.quill.update(i.a.sources.USER),e.clearSelection())}deleteTable(){i.a.find(this.table).tableDestroy(),this.resizeObserver.disconnect()}showTableTools(t,e,r,n,i){this.table=t,this.columnTool=new c(t,n,i),this.tableSelection=new z({table:t,row:e,cell:r},n,i)}hideTableTools(){this.columnTool&&this.columnTool.destroy(),this.tableSelection&&this.tableSelection.destroy(),this.tableOperationMenu&&this.tableOperationMenu.destroy(),this.columnTool=null,this.tableSelection=null,this.tableOperationMenu=null,this.table=null}showTableOperationMenu(t,e,r,n){this.tableOperationMenu&&(this.tableOperationMenu=this.tableOperationMenu.destroy()),t&&setTimeout((()=>{this.tableOperationMenu=new H({table:t,row:e,cell:r,evt:n},this.quill,this.options.operationMenu)}),0)}tableDeletionProtection(t,e){if(0===t.index||this.quill.getLength()<=1)return!0;const[r]=this.quill.getLine(t.index),n=Y(r);if((!this.tableSelection||this.tableSelection.selectedTds&&0===this.tableSelection.selectedTds.length)&&n)return!1;if(e.event.shiftKey&&n)return!1;if(this.tableSelection&&this.tableSelection.selectedTds&&this.tableSelection.selectedTds.length>1)return!1;if(0===e.offset){const[e]=this.quill.getLine(t.index-1);if(null!=e&&Y(e)&&!n)return!1}return!0}correctSelection(t){if(!t)return;const e=this.quill.getLines(t);if(0===e.length){const[e]=this.quill.getLine(t.index);if(!Y(e))return;return void(this.tableSelection?this.tableSelection.selectedTds&&1===this.tableSelection.selectedTds.length&&this.tableSelection.setSelection(e.parent.domNode,e.parent.domNode):this.showTableTools(this.table,e.domNode.closest("tr"),e.parent.domNode,this.quill,this.options))}const r=e.filter((t=>Y(t))),n=r.length;if(0===n)return;const i=r[0],o=this.quill.getIndex(i),s=i.domNode.textContent.length;if(1===e.length&&1===n)return 0===s?void this.quill.setSelection(o):void(!i.parent.next&&t.length>=s&&this.quill.setSelection(o,s));const l=e.reduce(((t,e)=>t+e.domNode.textContent.length),0);this.quill.setSelection(o,l+n-1)}}function G(t,e=!1){return{key:t?"ArrowUp":"ArrowDown",collapsed:!0,shiftKey:e,format:["table-cell-line"],handler(e,r){const n=t?"prev":"next";if(null!=r.line[n])return!0;const o=r.line.parent,s=o.parent[n];if(null!=s&&"table-row"===s.statics.blotName){let t=s.children.head,e=parseInt(t.formats().colspan,10),r=o,n=parseInt(r.formats().colspan,10);for(;null!=r.prev;)r=r.prev,n+=parseInt(r.formats().colspan,10);for(;null!=t.next&&e<n;)t=t.next,e+=parseInt(t.formats().colspan,10);const l=t.offset(this.quill.scroll);this.quill.setSelection(l,0,i.a.sources.USER)}else{const e=o.table().parent[n];null!=e&&(t?this.quill.setSelection(e.offset(this.quill.scroll)+e.length()-1,0,i.a.sources.USER):this.quill.setSelection(e.offset(this.quill.scroll),0,i.a.sources.USER))}return!1}}}function Y(t){return"table-cell-line"===t.statics.blotName}K.keyboardBindings={"table-cell-line backspace":{key:"Backspace",format:["table-cell-line"],collapsed:!0,offset:0,handler(t){const[e]=this.quill.getLine(t.index);return!(!e.prev||!Y(e.prev))}},"table-cell-line delete":{key:"Delete",format:["table-cell-line"],collapsed:!0,suffix:/^$/,handler(){}},"table-cell-line enter":{key:"Enter",shiftKey:null,format:["table-cell-line"],handler(t,e){if(this.quill.selection&&this.quill.selection.composing||this.quill.container.querySelectorAll(".quill-table__cell-line--selected").length>1)return;const r=i.a.imports.parchment.Scope;t.length>0&&this.quill.scroll.deleteAt(t.index,t.length);const n=Object.keys(e.format).reduce(((t,n)=>(this.quill.scroll.query(n,r.BLOCK)&&!Array.isArray(e.format[n])&&(t[n]=e.format[n]),t)),{});this.quill.insertText(t.index,"\n",n["table-cell-line"],i.a.sources.USER),this.quill.setSelection(t.index+1,i.a.sources.SILENT),this.quill.focus(),Object.keys(e.format).forEach((t=>{null==n[t]&&(Array.isArray(e.format[t])||"link"!==t&&this.quill.format(t,e.format[t],i.a.sources.USER))}))}},"table-cell-line up":G(!0),"table-cell-line down":G(!1),"table-cell-line up shift":G(!0,!0),"table-cell-line down shift":G(!1,!0),"down-to-table":{key:"ArrowDown",collapsed:!0,handler(t,e){const r=e.line.next;if(r&&"table-view"===r.statics.blotName){const t=r.table().rows()[0].children.head.children.head;return this.quill.setSelection(t.offset(this.quill.scroll),0,i.a.sources.USER),!1}return!0}},"up-to-table":{key:"ArrowUp",collapsed:!0,handler(t,e){const r=e.line.prev;if(r&&"table-view"===r.statics.blotName){const t=r.table().rows(),e=t[t.length-1].children.head.children.head;return this.quill.setSelection(e.offset(this.quill.scroll),0,i.a.sources.USER),!1}return!0}},"table-cell-line shortKey a":{key:"a",shortKey:!0,format:["table-cell-line"],handler(t,e){if(!t||!Y(e.line))return;const r=e.line.parent;let n=0,i=r.children.head;for(;i;)n+=i.domNode.textContent.length,i=i.next;const o=r.children.length-1,s=this.quill.getIndex(r.children.head);this.quill.setSelection(s,n+o)}},"table-cell-line tab":{key:"Tab",format:["table-cell-line"],handler(t,e){if(!Y(e.line))return!0;const r=e.line.parent;if(r.next){const t=this.quill.getIndex(e.line.parent.next);return this.quill.setSelection(t,i.a.sources.USER),!1}if(r.parent.next&&r.parent.next.children.length>0){const t=this.quill.getIndex(r.parent.next.children.head);return this.quill.setSelection(t,i.a.sources.USER),!1}return!1}},"table-cell-line shiftKey tab":{key:"Tab",shiftKey:!0,format:["table-cell-line"],handler(t,e){if(!Y(e.line))return!0;const r=e.line.parent;if(r.prev){const t=this.quill.getIndex(e.line.parent.prev);return this.quill.setSelection(t,i.a.sources.USER),!1}if(r.parent.prev&&r.parent.prev.children.length>0){const t=this.quill.getIndex(r.parent.prev.children.tail);return this.quill.setSelection(t,i.a.sources.USER),!1}if(r.parent.prev&&r.parent.prev.children.length>0){const t=this.quill.getIndex(r.parent.prev.children.head);return this.quill.setSelection(t,i.a.sources.USER),!1}return!1}}},K.requiredTableFormats=["table","table-cell-line","table-row","table-body","table-col","table-col-group","table-container","table-view"],K.selectorsForExclude=[".quill-table__wrapper",".quill-table-operation-menu__context-btn",".quill-table__selection-line",".quill-table-operation-menu",".quill-table-col-tool"],e.default=K},,function(t,e,r){t.exports=r(1)}]).default},t.exports=n(r(6865))},6729:t=>{"use strict";var e=Object.prototype.hasOwnProperty,r="~";function n(){}function i(t,e,r){this.fn=t,this.context=e,this.once=r||!1}function o(t,e,n,o,s){if("function"!=typeof n)throw new TypeError("The listener must be a function");var l=new i(n,o||t,s),a=r?r+e:e;return t._events[a]?t._events[a].fn?t._events[a]=[t._events[a],l]:t._events[a].push(l):(t._events[a]=l,t._eventsCount++),t}function s(t,e){0==--t._eventsCount?t._events=new n:delete t._events[e]}function l(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(r=!1)),l.prototype.eventNames=function(){var t,n,i=[];if(0===this._eventsCount)return i;for(n in t=this._events)e.call(t,n)&&i.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},l.prototype.listeners=function(t){var e=r?r+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,o=n.length,s=new Array(o);i<o;i++)s[i]=n[i].fn;return s},l.prototype.listenerCount=function(t){var e=r?r+t:t,n=this._events[e];return n?n.fn?1:n.length:0},l.prototype.emit=function(t,e,n,i,o,s){var l=r?r+t:t;if(!this._events[l])return!1;var a,c,u=this._events[l],h=arguments.length;if(u.fn){switch(u.once&&this.removeListener(t,u.fn,void 0,!0),h){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,e),!0;case 3:return u.fn.call(u.context,e,n),!0;case 4:return u.fn.call(u.context,e,n,i),!0;case 5:return u.fn.call(u.context,e,n,i,o),!0;case 6:return u.fn.call(u.context,e,n,i,o,s),!0}for(c=1,a=new Array(h-1);c<h;c++)a[c-1]=arguments[c];u.fn.apply(u.context,a)}else{var d,p=u.length;for(c=0;c<p;c++)switch(u[c].once&&this.removeListener(t,u[c].fn,void 0,!0),h){case 1:u[c].fn.call(u[c].context);break;case 2:u[c].fn.call(u[c].context,e);break;case 3:u[c].fn.call(u[c].context,e,n);break;case 4:u[c].fn.call(u[c].context,e,n,i);break;default:if(!a)for(d=1,a=new Array(h-1);d<h;d++)a[d-1]=arguments[d];u[c].fn.apply(u[c].context,a)}}return!0},l.prototype.on=function(t,e,r){return o(this,t,e,r,!1)},l.prototype.once=function(t,e,r){return o(this,t,e,r,!0)},l.prototype.removeListener=function(t,e,n,i){var o=r?r+t:t;if(!this._events[o])return this;if(!e)return s(this,o),this;var l=this._events[o];if(l.fn)l.fn!==e||i&&!l.once||n&&l.context!==n||s(this,o);else{for(var a=0,c=[],u=l.length;a<u;a++)(l[a].fn!==e||i&&!l[a].once||n&&l[a].context!==n)&&c.push(l[a]);c.length?this._events[o]=1===c.length?c[0]:c:s(this,o)}return this},l.prototype.removeAllListeners=function(t){var e;return t?(e=r?r+t:t,this._events[e]&&s(this,e)):(this._events=new n,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=r,l.EventEmitter=l,t.exports=l},7529:t=>{var e=-1,r=1,n=0;function i(t,f,g,b,v){if(t===f)return t?[[n,t]]:[];if(null!=g){var x=function(t,e,r){var n="number"==typeof r?{index:r,length:0}:r.oldRange,i="number"==typeof r?null:r.newRange,o=t.length,s=e.length;if(0===n.length&&(null===i||0===i.length)){var l=n.index,a=t.slice(0,l),c=t.slice(l),u=i?i.index:null,h=l+s-o;if((null===u||u===h)&&!(h<0||h>s)){var d=e.slice(0,h);if((f=e.slice(h))===c){var p=Math.min(l,h);if((b=a.slice(0,p))===(x=d.slice(0,p)))return y(b,a.slice(p),d.slice(p),c)}}if(null===u||u===l){var m=l,f=(d=e.slice(0,m),e.slice(m));if(d===a){var g=Math.min(o-m,s-m);if((v=c.slice(c.length-g))===(w=f.slice(f.length-g)))return y(a,c.slice(0,c.length-g),f.slice(0,f.length-g),v)}}}if(n.length>0&&i&&0===i.length){var b=t.slice(0,n.index),v=t.slice(n.index+n.length);if(!(s<(p=b.length)+(g=v.length))){var x=e.slice(0,p),w=e.slice(s-g);if(b===x&&v===w)return y(b,t.slice(p,o-g),e.slice(p,s-g),v)}}return null}(t,f,g);if(x)return x}var w=s(t,f),k=t.substring(0,w);w=a(t=t.substring(w),f=f.substring(w));var q=t.substring(t.length-w),_=function(t,l){var c;if(!t)return[[r,l]];if(!l)return[[e,t]];var u=t.length>l.length?t:l,h=t.length>l.length?l:t,d=u.indexOf(h);if(-1!==d)return c=[[r,u.substring(0,d)],[n,h],[r,u.substring(d+h.length)]],t.length>l.length&&(c[0][0]=c[2][0]=e),c;if(1===h.length)return[[e,t],[r,l]];var p=function(t,e){var r=t.length>e.length?t:e,n=t.length>e.length?e:t;if(r.length<4||2*n.length<r.length)return null;function i(t,e,r){for(var n,i,o,l,c=t.substring(r,r+Math.floor(t.length/4)),u=-1,h="";-1!==(u=e.indexOf(c,u+1));){var d=s(t.substring(r),e.substring(u)),p=a(t.substring(0,r),e.substring(0,u));h.length<p+d&&(h=e.substring(u-p,u)+e.substring(u,u+d),n=t.substring(0,r-p),i=t.substring(r+d),o=e.substring(0,u-p),l=e.substring(u+d))}return 2*h.length>=t.length?[n,i,o,l,h]:null}var o,l,c,u,h,d=i(r,n,Math.ceil(r.length/4)),p=i(r,n,Math.ceil(r.length/2));if(!d&&!p)return null;o=p?d&&d[4].length>p[4].length?d:p:d;t.length>e.length?(l=o[0],c=o[1],u=o[2],h=o[3]):(u=o[0],h=o[1],l=o[2],c=o[3]);var m=o[4];return[l,c,u,h,m]}(t,l);if(p){var m=p[0],f=p[1],g=p[2],b=p[3],v=p[4],y=i(m,g),x=i(f,b);return y.concat([[n,v]],x)}return function(t,n){for(var i=t.length,s=n.length,l=Math.ceil((i+s)/2),a=l,c=2*l,u=new Array(c),h=new Array(c),d=0;d<c;d++)u[d]=-1,h[d]=-1;u[a+1]=0,h[a+1]=0;for(var p=i-s,m=p%2!=0,f=0,g=0,b=0,v=0,y=0;y<l;y++){for(var x=-y+f;x<=y-g;x+=2){for(var w=a+x,k=(N=x===-y||x!==y&&u[w-1]<u[w+1]?u[w+1]:u[w-1]+1)-x;N<i&&k<s&&t.charAt(N)===n.charAt(k);)N++,k++;if(u[w]=N,N>i)g+=2;else if(k>s)f+=2;else if(m){if((S=a+p-x)>=0&&S<c&&-1!==h[S])if(N>=(_=i-h[S]))return o(t,n,N,k)}}for(var q=-y+b;q<=y-v;q+=2){for(var _,S=a+q,A=(_=q===-y||q!==y&&h[S-1]<h[S+1]?h[S+1]:h[S-1]+1)-q;_<i&&A<s&&t.charAt(i-_-1)===n.charAt(s-A-1);)_++,A++;if(h[S]=_,_>i)v+=2;else if(A>s)b+=2;else if(!m){if((w=a+p-q)>=0&&w<c&&-1!==u[w]){var N;k=a+(N=u[w])-w;if(N>=(_=i-_))return o(t,n,N,k)}}}}return[[e,t],[r,n]]}(t,l)}(t=t.substring(0,t.length-w),f=f.substring(0,f.length-w));return k&&_.unshift([n,k]),q&&_.push([n,q]),m(_,v),b&&function(t){var i=!1,o=[],s=0,f=null,g=0,b=0,v=0,y=0,x=0;for(;g<t.length;)t[g][0]==n?(o[s++]=g,b=y,v=x,y=0,x=0,f=t[g][1]):(t[g][0]==r?y+=t[g][1].length:x+=t[g][1].length,f&&f.length<=Math.max(b,v)&&f.length<=Math.max(y,x)&&(t.splice(o[s-1],0,[e,f]),t[o[s-1]+1][0]=r,s--,g=--s>0?o[s-1]:-1,b=0,v=0,y=0,x=0,f=null,i=!0)),g++;i&&m(t);(function(t){function e(t,e){if(!t||!e)return 6;var r=t.charAt(t.length-1),n=e.charAt(0),i=r.match(c),o=n.match(c),s=i&&r.match(u),l=o&&n.match(u),a=s&&r.match(h),m=l&&n.match(h),f=a&&t.match(d),g=m&&e.match(p);return f||g?5:a||m?4:i&&!s&&l?3:s||l?2:i||o?1:0}var r=1;for(;r<t.length-1;){if(t[r-1][0]==n&&t[r+1][0]==n){var i=t[r-1][1],o=t[r][1],s=t[r+1][1],l=a(i,o);if(l){var m=o.substring(o.length-l);i=i.substring(0,i.length-l),o=m+o.substring(0,o.length-l),s=m+s}for(var f=i,g=o,b=s,v=e(i,o)+e(o,s);o.charAt(0)===s.charAt(0);){i+=o.charAt(0),o=o.substring(1)+s.charAt(0),s=s.substring(1);var y=e(i,o)+e(o,s);y>=v&&(v=y,f=i,g=o,b=s)}t[r-1][1]!=f&&(f?t[r-1][1]=f:(t.splice(r-1,1),r--),t[r][1]=g,b?t[r+1][1]=b:(t.splice(r+1,1),r--))}r++}})(t),g=1;for(;g<t.length;){if(t[g-1][0]==e&&t[g][0]==r){var w=t[g-1][1],k=t[g][1],q=l(w,k),_=l(k,w);q>=_?(q>=w.length/2||q>=k.length/2)&&(t.splice(g,0,[n,k.substring(0,q)]),t[g-1][1]=w.substring(0,w.length-q),t[g+1][1]=k.substring(q),g++):(_>=w.length/2||_>=k.length/2)&&(t.splice(g,0,[n,w.substring(0,_)]),t[g-1][0]=r,t[g-1][1]=k.substring(0,k.length-_),t[g+1][0]=e,t[g+1][1]=w.substring(_),g++),g++}g++}}(_),_}function o(t,e,r,n){var o=t.substring(0,r),s=e.substring(0,n),l=t.substring(r),a=e.substring(n),c=i(o,s),u=i(l,a);return c.concat(u)}function s(t,e){if(!t||!e||t.charAt(0)!==e.charAt(0))return 0;for(var r=0,n=Math.min(t.length,e.length),i=n,o=0;r<i;)t.substring(o,i)==e.substring(o,i)?o=r=i:n=i,i=Math.floor((n-r)/2+r);return f(t.charCodeAt(i-1))&&i--,i}function l(t,e){var r=t.length,n=e.length;if(0==r||0==n)return 0;r>n?t=t.substring(r-n):r<n&&(e=e.substring(0,r));var i=Math.min(r,n);if(t==e)return i;for(var o=0,s=1;;){var l=t.substring(i-s),a=e.indexOf(l);if(-1==a)return o;s+=a,0!=a&&t.substring(i-s)!=e.substring(0,s)||(o=s,s++)}}function a(t,e){if(!t||!e||t.slice(-1)!==e.slice(-1))return 0;for(var r=0,n=Math.min(t.length,e.length),i=n,o=0;r<i;)t.substring(t.length-i,t.length-o)==e.substring(e.length-i,e.length-o)?o=r=i:n=i,i=Math.floor((n-r)/2+r);return g(t.charCodeAt(t.length-i))&&i--,i}var c=/[^a-zA-Z0-9]/,u=/\s/,h=/[\r\n]/,d=/\n\r?\n$/,p=/^\r?\n\r?\n/;function m(t,i){t.push([n,""]);for(var o,l=0,c=0,u=0,h="",d="";l<t.length;)if(l<t.length-1&&!t[l][1])t.splice(l,1);else switch(t[l][0]){case r:u++,d+=t[l][1],l++;break;case e:c++,h+=t[l][1],l++;break;case n:var p=l-u-c-1;if(i){if(p>=0&&v(t[p][1])){var f=t[p][1].slice(-1);if(t[p][1]=t[p][1].slice(0,-1),h=f+h,d=f+d,!t[p][1]){t.splice(p,1),l--;var g=p-1;t[g]&&t[g][0]===r&&(u++,d=t[g][1]+d,g--),t[g]&&t[g][0]===e&&(c++,h=t[g][1]+h,g--),p=g}}if(b(t[l][1])){f=t[l][1].charAt(0);t[l][1]=t[l][1].slice(1),h+=f,d+=f}}if(l<t.length-1&&!t[l][1]){t.splice(l,1);break}if(h.length>0||d.length>0){h.length>0&&d.length>0&&(0!==(o=s(d,h))&&(p>=0?t[p][1]+=d.substring(0,o):(t.splice(0,0,[n,d.substring(0,o)]),l++),d=d.substring(o),h=h.substring(o)),0!==(o=a(d,h))&&(t[l][1]=d.substring(d.length-o)+t[l][1],d=d.substring(0,d.length-o),h=h.substring(0,h.length-o)));var y=u+c;0===h.length&&0===d.length?(t.splice(l-y,y),l-=y):0===h.length?(t.splice(l-y,y,[r,d]),l=l-y+1):0===d.length?(t.splice(l-y,y,[e,h]),l=l-y+1):(t.splice(l-y,y,[e,h],[r,d]),l=l-y+2)}0!==l&&t[l-1][0]===n?(t[l-1][1]+=t[l][1],t.splice(l,1)):l++,u=0,c=0,h="",d=""}""===t[t.length-1][1]&&t.pop();var x=!1;for(l=1;l<t.length-1;)t[l-1][0]===n&&t[l+1][0]===n&&(t[l][1].substring(t[l][1].length-t[l-1][1].length)===t[l-1][1]?(t[l][1]=t[l-1][1]+t[l][1].substring(0,t[l][1].length-t[l-1][1].length),t[l+1][1]=t[l-1][1]+t[l+1][1],t.splice(l-1,1),x=!0):t[l][1].substring(0,t[l+1][1].length)==t[l+1][1]&&(t[l-1][1]+=t[l+1][1],t[l][1]=t[l][1].substring(t[l+1][1].length)+t[l+1][1],t.splice(l+1,1),x=!0)),l++;x&&m(t,i)}function f(t){return t>=55296&&t<=56319}function g(t){return t>=56320&&t<=57343}function b(t){return g(t.charCodeAt(0))}function v(t){return f(t.charCodeAt(t.length-1))}function y(t,i,o,s){return v(t)||b(s)?null:function(t){for(var e=[],r=0;r<t.length;r++)t[r][1].length>0&&e.push(t[r]);return e}([[n,t],[e,i],[r,o],[n,s]])}function x(t,e,r,n){return i(t,e,r,n,!0)}x.INSERT=r,x.DELETE=e,x.EQUAL=n,t.exports=x},3465:(t,e,r)=>{t=r.nmd(t);var n="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",s="[object Boolean]",l="[object Date]",a="[object Function]",c="[object GeneratorFunction]",u="[object Map]",h="[object Number]",d="[object Object]",p="[object Promise]",m="[object RegExp]",f="[object Set]",g="[object String]",b="[object Symbol]",v="[object WeakMap]",y="[object ArrayBuffer]",x="[object DataView]",w="[object Float32Array]",k="[object Float64Array]",q="[object Int8Array]",_="[object Int16Array]",S="[object Int32Array]",A="[object Uint8Array]",N="[object Uint8ClampedArray]",T="[object Uint16Array]",E="[object Uint32Array]",L=/\w*$/,C=/^\[object .+?Constructor\]$/,M=/^(?:0|[1-9]\d*)$/,O={};O[o]=O["[object Array]"]=O[y]=O[x]=O[s]=O[l]=O[w]=O[k]=O[q]=O[_]=O[S]=O[u]=O[h]=O[d]=O[m]=O[f]=O[g]=O[b]=O[A]=O[N]=O[T]=O[E]=!0,O["[object Error]"]=O[a]=O[v]=!1;var B="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,z="object"==typeof self&&self&&self.Object===Object&&self,P=B||z||Function("return this")(),R=e&&!e.nodeType&&e,Z=R&&t&&!t.nodeType&&t,I=Z&&Z.exports===R;function j(t,e){return t.set(e[0],e[1]),t}function H(t,e){return t.add(e),t}function D(t,e,r,n){var i=-1,o=t?t.length:0;for(n&&o&&(r=t[++i]);++i<o;)r=e(r,t[i],i,t);return r}function $(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}function U(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r}function F(t,e){return function(r){return t(e(r))}}function V(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r}var W,K=Array.prototype,G=Function.prototype,Y=Object.prototype,X=P["__core-js_shared__"],Q=(W=/[^.]+$/.exec(X&&X.keys&&X.keys.IE_PROTO||""))?"Symbol(src)_1."+W:"",J=G.toString,tt=Y.hasOwnProperty,et=Y.toString,rt=RegExp("^"+J.call(tt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),nt=I?P.Buffer:void 0,it=P.Symbol,ot=P.Uint8Array,st=F(Object.getPrototypeOf,Object),lt=Object.create,at=Y.propertyIsEnumerable,ct=K.splice,ut=Object.getOwnPropertySymbols,ht=nt?nt.isBuffer:void 0,dt=F(Object.keys,Object),pt=Zt(P,"DataView"),mt=Zt(P,"Map"),ft=Zt(P,"Promise"),gt=Zt(P,"Set"),bt=Zt(P,"WeakMap"),vt=Zt(Object,"create"),yt=$t(pt),xt=$t(mt),wt=$t(ft),kt=$t(gt),qt=$t(bt),_t=it?it.prototype:void 0,St=_t?_t.valueOf:void 0;function At(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Nt(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Tt(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Et(t){this.__data__=new Nt(t)}function Lt(t,e){var r=Ft(t)||function(t){return function(t){return function(t){return!!t&&"object"==typeof t}(t)&&Vt(t)}(t)&&tt.call(t,"callee")&&(!at.call(t,"callee")||et.call(t)==o)}(t)?function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}(t.length,String):[],n=r.length,i=!!n;for(var s in t)!e&&!tt.call(t,s)||i&&("length"==s||Ht(s,n))||r.push(s);return r}function Ct(t,e,r){var n=t[e];tt.call(t,e)&&Ut(n,r)&&(void 0!==r||e in t)||(t[e]=r)}function Mt(t,e){for(var r=t.length;r--;)if(Ut(t[r][0],e))return r;return-1}function Ot(t,e,r,n,i,p,v){var C;if(n&&(C=p?n(t,i,p,v):n(t)),void 0!==C)return C;if(!Gt(t))return t;var M=Ft(t);if(M){if(C=function(t){var e=t.length,r=t.constructor(e);e&&"string"==typeof t[0]&&tt.call(t,"index")&&(r.index=t.index,r.input=t.input);return r}(t),!e)return function(t,e){var r=-1,n=t.length;e||(e=Array(n));for(;++r<n;)e[r]=t[r];return e}(t,C)}else{var B=jt(t),z=B==a||B==c;if(Wt(t))return function(t,e){if(e)return t.slice();var r=new t.constructor(t.length);return t.copy(r),r}(t,e);if(B==d||B==o||z&&!p){if($(t))return p?t:{};if(C=function(t){return"function"!=typeof t.constructor||Dt(t)?{}:(e=st(t),Gt(e)?lt(e):{});var e}(z?{}:t),!e)return function(t,e){return Pt(t,It(t),e)}(t,function(t,e){return t&&Pt(e,Yt(e),t)}(C,t))}else{if(!O[B])return p?t:{};C=function(t,e,r,n){var i=t.constructor;switch(e){case y:return zt(t);case s:case l:return new i(+t);case x:return function(t,e){var r=e?zt(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}(t,n);case w:case k:case q:case _:case S:case A:case N:case T:case E:return function(t,e){var r=e?zt(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}(t,n);case u:return function(t,e,r){var n=e?r(U(t),!0):U(t);return D(n,j,new t.constructor)}(t,n,r);case h:case g:return new i(t);case m:return function(t){var e=new t.constructor(t.source,L.exec(t));return e.lastIndex=t.lastIndex,e}(t);case f:return function(t,e,r){var n=e?r(V(t),!0):V(t);return D(n,H,new t.constructor)}(t,n,r);case b:return o=t,St?Object(St.call(o)):{}}var o}(t,B,Ot,e)}}v||(v=new Et);var P=v.get(t);if(P)return P;if(v.set(t,C),!M)var R=r?function(t){return function(t,e,r){var n=e(t);return Ft(t)?n:function(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}(n,r(t))}(t,Yt,It)}(t):Yt(t);return function(t,e){for(var r=-1,n=t?t.length:0;++r<n&&!1!==e(t[r],r,t););}(R||t,(function(i,o){R&&(i=t[o=i]),Ct(C,o,Ot(i,e,r,n,o,t,v))})),C}function Bt(t){return!(!Gt(t)||(e=t,Q&&Q in e))&&(Kt(t)||$(t)?rt:C).test($t(t));var e}function zt(t){var e=new t.constructor(t.byteLength);return new ot(e).set(new ot(t)),e}function Pt(t,e,r,n){r||(r={});for(var i=-1,o=e.length;++i<o;){var s=e[i],l=n?n(r[s],t[s],s,r,t):void 0;Ct(r,s,void 0===l?t[s]:l)}return r}function Rt(t,e){var r,n,i=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof e?"string":"hash"]:i.map}function Zt(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return Bt(r)?r:void 0}At.prototype.clear=function(){this.__data__=vt?vt(null):{}},At.prototype.delete=function(t){return this.has(t)&&delete this.__data__[t]},At.prototype.get=function(t){var e=this.__data__;if(vt){var r=e[t];return r===n?void 0:r}return tt.call(e,t)?e[t]:void 0},At.prototype.has=function(t){var e=this.__data__;return vt?void 0!==e[t]:tt.call(e,t)},At.prototype.set=function(t,e){return this.__data__[t]=vt&&void 0===e?n:e,this},Nt.prototype.clear=function(){this.__data__=[]},Nt.prototype.delete=function(t){var e=this.__data__,r=Mt(e,t);return!(r<0)&&(r==e.length-1?e.pop():ct.call(e,r,1),!0)},Nt.prototype.get=function(t){var e=this.__data__,r=Mt(e,t);return r<0?void 0:e[r][1]},Nt.prototype.has=function(t){return Mt(this.__data__,t)>-1},Nt.prototype.set=function(t,e){var r=this.__data__,n=Mt(r,t);return n<0?r.push([t,e]):r[n][1]=e,this},Tt.prototype.clear=function(){this.__data__={hash:new At,map:new(mt||Nt),string:new At}},Tt.prototype.delete=function(t){return Rt(this,t).delete(t)},Tt.prototype.get=function(t){return Rt(this,t).get(t)},Tt.prototype.has=function(t){return Rt(this,t).has(t)},Tt.prototype.set=function(t,e){return Rt(this,t).set(t,e),this},Et.prototype.clear=function(){this.__data__=new Nt},Et.prototype.delete=function(t){return this.__data__.delete(t)},Et.prototype.get=function(t){return this.__data__.get(t)},Et.prototype.has=function(t){return this.__data__.has(t)},Et.prototype.set=function(t,e){var r=this.__data__;if(r instanceof Nt){var n=r.__data__;if(!mt||n.length<199)return n.push([t,e]),this;r=this.__data__=new Tt(n)}return r.set(t,e),this};var It=ut?F(ut,Object):function(){return[]},jt=function(t){return et.call(t)};function Ht(t,e){return!!(e=null==e?i:e)&&("number"==typeof t||M.test(t))&&t>-1&&t%1==0&&t<e}function Dt(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Y)}function $t(t){if(null!=t){try{return J.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Ut(t,e){return t===e||t!=t&&e!=e}(pt&&jt(new pt(new ArrayBuffer(1)))!=x||mt&&jt(new mt)!=u||ft&&jt(ft.resolve())!=p||gt&&jt(new gt)!=f||bt&&jt(new bt)!=v)&&(jt=function(t){var e=et.call(t),r=e==d?t.constructor:void 0,n=r?$t(r):void 0;if(n)switch(n){case yt:return x;case xt:return u;case wt:return p;case kt:return f;case qt:return v}return e});var Ft=Array.isArray;function Vt(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=i}(t.length)&&!Kt(t)}var Wt=ht||function(){return!1};function Kt(t){var e=Gt(t)?et.call(t):"";return e==a||e==c}function Gt(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function Yt(t){return Vt(t)?Lt(t):function(t){if(!Dt(t))return dt(t);var e=[];for(var r in Object(t))tt.call(t,r)&&"constructor"!=r&&e.push(r);return e}(t)}t.exports=function(t){return Ot(t,!0,!0)}},2307:(t,e,r)=>{t=r.nmd(t);var n="__lodash_hash_undefined__",i=1,o=2,s=9007199254740991,l="[object Arguments]",a="[object Array]",c="[object AsyncFunction]",u="[object Boolean]",h="[object Date]",d="[object Error]",p="[object Function]",m="[object GeneratorFunction]",f="[object Map]",g="[object Number]",b="[object Null]",v="[object Object]",y="[object Promise]",x="[object Proxy]",w="[object RegExp]",k="[object Set]",q="[object String]",_="[object Symbol]",S="[object Undefined]",A="[object WeakMap]",N="[object ArrayBuffer]",T="[object DataView]",E=/^\[object .+?Constructor\]$/,L=/^(?:0|[1-9]\d*)$/,C={};C["[object Float32Array]"]=C["[object Float64Array]"]=C["[object Int8Array]"]=C["[object Int16Array]"]=C["[object Int32Array]"]=C["[object Uint8Array]"]=C["[object Uint8ClampedArray]"]=C["[object Uint16Array]"]=C["[object Uint32Array]"]=!0,C[l]=C[a]=C[N]=C[u]=C[T]=C[h]=C[d]=C[p]=C[f]=C[g]=C[v]=C[w]=C[k]=C[q]=C[A]=!1;var M="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,O="object"==typeof self&&self&&self.Object===Object&&self,B=M||O||Function("return this")(),z=e&&!e.nodeType&&e,P=z&&t&&!t.nodeType&&t,R=P&&P.exports===z,Z=R&&M.process,I=function(){try{return Z&&Z.binding&&Z.binding("util")}catch(t){}}(),j=I&&I.isTypedArray;function H(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}function D(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r}function $(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r}var U,F,V,W=Array.prototype,K=Function.prototype,G=Object.prototype,Y=B["__core-js_shared__"],X=K.toString,Q=G.hasOwnProperty,J=(U=/[^.]+$/.exec(Y&&Y.keys&&Y.keys.IE_PROTO||""))?"Symbol(src)_1."+U:"",tt=G.toString,et=RegExp("^"+X.call(Q).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),rt=R?B.Buffer:void 0,nt=B.Symbol,it=B.Uint8Array,ot=G.propertyIsEnumerable,st=W.splice,lt=nt?nt.toStringTag:void 0,at=Object.getOwnPropertySymbols,ct=rt?rt.isBuffer:void 0,ut=(F=Object.keys,V=Object,function(t){return F(V(t))}),ht=It(B,"DataView"),dt=It(B,"Map"),pt=It(B,"Promise"),mt=It(B,"Set"),ft=It(B,"WeakMap"),gt=It(Object,"create"),bt=$t(ht),vt=$t(dt),yt=$t(pt),xt=$t(mt),wt=$t(ft),kt=nt?nt.prototype:void 0,qt=kt?kt.valueOf:void 0;function _t(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function St(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function At(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Nt(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new At;++e<r;)this.add(t[e])}function Tt(t){var e=this.__data__=new St(t);this.size=e.size}function Et(t,e){var r=Vt(t),n=!r&&Ft(t),i=!r&&!n&&Wt(t),o=!r&&!n&&!i&&Qt(t),s=r||n||i||o,l=s?function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}(t.length,String):[],a=l.length;for(var c in t)!e&&!Q.call(t,c)||s&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Dt(c,a))||l.push(c);return l}function Lt(t,e){for(var r=t.length;r--;)if(Ut(t[r][0],e))return r;return-1}function Ct(t){return null==t?void 0===t?S:b:lt&&lt in Object(t)?function(t){var e=Q.call(t,lt),r=t[lt];try{t[lt]=void 0;var n=!0}catch(t){}var i=tt.call(t);n&&(e?t[lt]=r:delete t[lt]);return i}(t):function(t){return tt.call(t)}(t)}function Mt(t){return Xt(t)&&Ct(t)==l}function Ot(t,e,r,n,s){return t===e||(null==t||null==e||!Xt(t)&&!Xt(e)?t!=t&&e!=e:function(t,e,r,n,s,c){var p=Vt(t),m=Vt(e),b=p?a:Ht(t),y=m?a:Ht(e),x=(b=b==l?v:b)==v,S=(y=y==l?v:y)==v,A=b==y;if(A&&Wt(t)){if(!Wt(e))return!1;p=!0,x=!1}if(A&&!x)return c||(c=new Tt),p||Qt(t)?Pt(t,e,r,n,s,c):function(t,e,r,n,s,l,a){switch(r){case T:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case N:return!(t.byteLength!=e.byteLength||!l(new it(t),new it(e)));case u:case h:case g:return Ut(+t,+e);case d:return t.name==e.name&&t.message==e.message;case w:case q:return t==e+"";case f:var c=D;case k:var p=n&i;if(c||(c=$),t.size!=e.size&&!p)return!1;var m=a.get(t);if(m)return m==e;n|=o,a.set(t,e);var b=Pt(c(t),c(e),n,s,l,a);return a.delete(t),b;case _:if(qt)return qt.call(t)==qt.call(e)}return!1}(t,e,b,r,n,s,c);if(!(r&i)){var E=x&&Q.call(t,"__wrapped__"),L=S&&Q.call(e,"__wrapped__");if(E||L){var C=E?t.value():t,M=L?e.value():e;return c||(c=new Tt),s(C,M,r,n,c)}}if(!A)return!1;return c||(c=new Tt),function(t,e,r,n,o,s){var l=r&i,a=Rt(t),c=a.length,u=Rt(e),h=u.length;if(c!=h&&!l)return!1;var d=c;for(;d--;){var p=a[d];if(!(l?p in e:Q.call(e,p)))return!1}var m=s.get(t);if(m&&s.get(e))return m==e;var f=!0;s.set(t,e),s.set(e,t);var g=l;for(;++d<c;){var b=t[p=a[d]],v=e[p];if(n)var y=l?n(v,b,p,e,t,s):n(b,v,p,t,e,s);if(!(void 0===y?b===v||o(b,v,r,n,s):y)){f=!1;break}g||(g="constructor"==p)}if(f&&!g){var x=t.constructor,w=e.constructor;x==w||!("constructor"in t)||!("constructor"in e)||"function"==typeof x&&x instanceof x&&"function"==typeof w&&w instanceof w||(f=!1)}return s.delete(t),s.delete(e),f}(t,e,r,n,s,c)}(t,e,r,n,Ot,s))}function Bt(t){return!(!Yt(t)||function(t){return!!J&&J in t}(t))&&(Kt(t)?et:E).test($t(t))}function zt(t){if(r=(e=t)&&e.constructor,n="function"==typeof r&&r.prototype||G,e!==n)return ut(t);var e,r,n,i=[];for(var o in Object(t))Q.call(t,o)&&"constructor"!=o&&i.push(o);return i}function Pt(t,e,r,n,s,l){var a=r&i,c=t.length,u=e.length;if(c!=u&&!(a&&u>c))return!1;var h=l.get(t);if(h&&l.get(e))return h==e;var d=-1,p=!0,m=r&o?new Nt:void 0;for(l.set(t,e),l.set(e,t);++d<c;){var f=t[d],g=e[d];if(n)var b=a?n(g,f,d,e,t,l):n(f,g,d,t,e,l);if(void 0!==b){if(b)continue;p=!1;break}if(m){if(!H(e,(function(t,e){if(i=e,!m.has(i)&&(f===t||s(f,t,r,n,l)))return m.push(e);var i}))){p=!1;break}}else if(f!==g&&!s(f,g,r,n,l)){p=!1;break}}return l.delete(t),l.delete(e),p}function Rt(t){return function(t,e,r){var n=e(t);return Vt(t)?n:function(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}(n,r(t))}(t,Jt,jt)}function Zt(t,e){var r,n,i=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof e?"string":"hash"]:i.map}function It(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return Bt(r)?r:void 0}_t.prototype.clear=function(){this.__data__=gt?gt(null):{},this.size=0},_t.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},_t.prototype.get=function(t){var e=this.__data__;if(gt){var r=e[t];return r===n?void 0:r}return Q.call(e,t)?e[t]:void 0},_t.prototype.has=function(t){var e=this.__data__;return gt?void 0!==e[t]:Q.call(e,t)},_t.prototype.set=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=gt&&void 0===e?n:e,this},St.prototype.clear=function(){this.__data__=[],this.size=0},St.prototype.delete=function(t){var e=this.__data__,r=Lt(e,t);return!(r<0)&&(r==e.length-1?e.pop():st.call(e,r,1),--this.size,!0)},St.prototype.get=function(t){var e=this.__data__,r=Lt(e,t);return r<0?void 0:e[r][1]},St.prototype.has=function(t){return Lt(this.__data__,t)>-1},St.prototype.set=function(t,e){var r=this.__data__,n=Lt(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this},At.prototype.clear=function(){this.size=0,this.__data__={hash:new _t,map:new(dt||St),string:new _t}},At.prototype.delete=function(t){var e=Zt(this,t).delete(t);return this.size-=e?1:0,e},At.prototype.get=function(t){return Zt(this,t).get(t)},At.prototype.has=function(t){return Zt(this,t).has(t)},At.prototype.set=function(t,e){var r=Zt(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this},Nt.prototype.add=Nt.prototype.push=function(t){return this.__data__.set(t,n),this},Nt.prototype.has=function(t){return this.__data__.has(t)},Tt.prototype.clear=function(){this.__data__=new St,this.size=0},Tt.prototype.delete=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r},Tt.prototype.get=function(t){return this.__data__.get(t)},Tt.prototype.has=function(t){return this.__data__.has(t)},Tt.prototype.set=function(t,e){var r=this.__data__;if(r instanceof St){var n=r.__data__;if(!dt||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new At(n)}return r.set(t,e),this.size=r.size,this};var jt=at?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var r=-1,n=null==t?0:t.length,i=0,o=[];++r<n;){var s=t[r];e(s,r,t)&&(o[i++]=s)}return o}(at(t),(function(e){return ot.call(t,e)})))}:function(){return[]},Ht=Ct;function Dt(t,e){return!!(e=null==e?s:e)&&("number"==typeof t||L.test(t))&&t>-1&&t%1==0&&t<e}function $t(t){if(null!=t){try{return X.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Ut(t,e){return t===e||t!=t&&e!=e}(ht&&Ht(new ht(new ArrayBuffer(1)))!=T||dt&&Ht(new dt)!=f||pt&&Ht(pt.resolve())!=y||mt&&Ht(new mt)!=k||ft&&Ht(new ft)!=A)&&(Ht=function(t){var e=Ct(t),r=e==v?t.constructor:void 0,n=r?$t(r):"";if(n)switch(n){case bt:return T;case vt:return f;case yt:return y;case xt:return k;case wt:return A}return e});var Ft=Mt(function(){return arguments}())?Mt:function(t){return Xt(t)&&Q.call(t,"callee")&&!ot.call(t,"callee")},Vt=Array.isArray;var Wt=ct||function(){return!1};function Kt(t){if(!Yt(t))return!1;var e=Ct(t);return e==p||e==m||e==c||e==x}function Gt(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=s}function Yt(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Xt(t){return null!=t&&"object"==typeof t}var Qt=j?function(t){return function(e){return t(e)}}(j):function(t){return Xt(t)&&Gt(t.length)&&!!C[Ct(t)]};function Jt(t){return null!=(e=t)&&Gt(e.length)&&!Kt(e)?Et(t):zt(t);var e}t.exports=function(t,e){return Ot(t,e)}},1210:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=r(3465),i=r(2307);var o;!function(t){t.compose=function(t={},e={},r=!1){"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});let i=n(e);r||(i=Object.keys(i).reduce(((t,e)=>(null!=i[e]&&(t[e]=i[e]),t)),{}));for(const r in t)void 0!==t[r]&&void 0===e[r]&&(i[r]=t[r]);return Object.keys(i).length>0?i:void 0},t.diff=function(t={},e={}){"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});const r=Object.keys(t).concat(Object.keys(e)).reduce(((r,n)=>(i(t[n],e[n])||(r[n]=void 0===e[n]?null:e[n]),r)),{});return Object.keys(r).length>0?r:void 0},t.invert=function(t={},e={}){t=t||{};const r=Object.keys(e).reduce(((r,n)=>(e[n]!==t[n]&&void 0!==t[n]&&(r[n]=e[n]),r)),{});return Object.keys(t).reduce(((r,n)=>(t[n]!==e[n]&&void 0===e[n]&&(r[n]=null),r)),r)},t.transform=function(t,e,r=!1){if("object"!=typeof t)return e;if("object"!=typeof e)return;if(!r)return e;const n=Object.keys(e).reduce(((r,n)=>(void 0===t[n]&&(r[n]=e[n]),r)),{});return Object.keys(n).length>0?n:void 0}}(o||(o={})),e.default=o},8895:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AttributeMap=e.OpIterator=e.Op=void 0;const n=r(7529),i=r(3465),o=r(2307),s=r(1210);e.AttributeMap=s.default;const l=r(430);e.Op=l.default;const a=r(9534);e.OpIterator=a.default;const c=String.fromCharCode(0),u=(t,e)=>{if("object"!=typeof t||null===t)throw new Error("cannot retain a "+typeof t);if("object"!=typeof e||null===e)throw new Error("cannot retain a "+typeof e);const r=Object.keys(t)[0];if(!r||r!==Object.keys(e)[0])throw new Error(`embed types not matched: ${r} != ${Object.keys(e)[0]}`);return[r,t[r],e[r]]};class h{constructor(t){Array.isArray(t)?this.ops=t:null!=t&&Array.isArray(t.ops)?this.ops=t.ops:this.ops=[]}static registerEmbed(t,e){this.handlers[t]=e}static unregisterEmbed(t){delete this.handlers[t]}static getHandler(t){const e=this.handlers[t];if(!e)throw new Error(`no handlers for embed type "${t}"`);return e}insert(t,e){const r={};return"string"==typeof t&&0===t.length?this:(r.insert=t,null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(r.attributes=e),this.push(r))}delete(t){return t<=0?this:this.push({delete:t})}retain(t,e){if("number"==typeof t&&t<=0)return this;const r={retain:t};return null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(r.attributes=e),this.push(r)}push(t){let e=this.ops.length,r=this.ops[e-1];if(t=i(t),"object"==typeof r){if("number"==typeof t.delete&&"number"==typeof r.delete)return this.ops[e-1]={delete:r.delete+t.delete},this;if("number"==typeof r.delete&&null!=t.insert&&(e-=1,r=this.ops[e-1],"object"!=typeof r))return this.ops.unshift(t),this;if(o(t.attributes,r.attributes)){if("string"==typeof t.insert&&"string"==typeof r.insert)return this.ops[e-1]={insert:r.insert+t.insert},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this;if("number"==typeof t.retain&&"number"==typeof r.retain)return this.ops[e-1]={retain:r.retain+t.retain},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this}}return e===this.ops.length?this.ops.push(t):this.ops.splice(e,0,t),this}chop(){const t=this.ops[this.ops.length-1];return t&&"number"==typeof t.retain&&!t.attributes&&this.ops.pop(),this}filter(t){return this.ops.filter(t)}forEach(t){this.ops.forEach(t)}map(t){return this.ops.map(t)}partition(t){const e=[],r=[];return this.forEach((n=>{(t(n)?e:r).push(n)})),[e,r]}reduce(t,e){return this.ops.reduce(t,e)}changeLength(){return this.reduce(((t,e)=>e.insert?t+l.default.length(e):e.delete?t-e.delete:t),0)}length(){return this.reduce(((t,e)=>t+l.default.length(e)),0)}slice(t=0,e=1/0){const r=[],n=new a.default(this.ops);let i=0;for(;i<e&&n.hasNext();){let o;i<t?o=n.next(t-i):(o=n.next(e-i),r.push(o)),i+=l.default.length(o)}return new h(r)}compose(t){const e=new a.default(this.ops),r=new a.default(t.ops),n=[],i=r.peek();if(null!=i&&"number"==typeof i.retain&&null==i.attributes){let t=i.retain;for(;"insert"===e.peekType()&&e.peekLength()<=t;)t-=e.peekLength(),n.push(e.next());i.retain-t>0&&r.next(i.retain-t)}const l=new h(n);for(;e.hasNext()||r.hasNext();)if("insert"===r.peekType())l.push(r.next());else if("delete"===e.peekType())l.push(e.next());else{const t=Math.min(e.peekLength(),r.peekLength()),n=e.next(t),i=r.next(t);if(i.retain){const a={};if("number"==typeof n.retain)a.retain="number"==typeof i.retain?t:i.retain;else if("number"==typeof i.retain)null==n.retain?a.insert=n.insert:a.retain=n.retain;else{const t=null==n.retain?"insert":"retain",[e,r,o]=u(n[t],i.retain),s=h.getHandler(e);a[t]={[e]:s.compose(r,o,"retain"===t)}}const c=s.default.compose(n.attributes,i.attributes,"number"==typeof n.retain);if(c&&(a.attributes=c),l.push(a),!r.hasNext()&&o(l.ops[l.ops.length-1],a)){const t=new h(e.rest());return l.concat(t).chop()}}else"number"==typeof i.delete&&("number"==typeof n.retain||"object"==typeof n.retain&&null!==n.retain)&&l.push(i)}return l.chop()}concat(t){const e=new h(this.ops.slice());return t.ops.length>0&&(e.push(t.ops[0]),e.ops=e.ops.concat(t.ops.slice(1))),e}diff(t,e){if(this.ops===t.ops)return new h;const r=[this,t].map((e=>e.map((r=>{if(null!=r.insert)return"string"==typeof r.insert?r.insert:c;throw new Error("diff() called "+(e===t?"on":"with")+" non-document")})).join(""))),i=new h,l=n(r[0],r[1],e,!0),u=new a.default(this.ops),d=new a.default(t.ops);return l.forEach((t=>{let e=t[1].length;for(;e>0;){let r=0;switch(t[0]){case n.INSERT:r=Math.min(d.peekLength(),e),i.push(d.next(r));break;case n.DELETE:r=Math.min(e,u.peekLength()),u.next(r),i.delete(r);break;case n.EQUAL:r=Math.min(u.peekLength(),d.peekLength(),e);const t=u.next(r),l=d.next(r);o(t.insert,l.insert)?i.retain(r,s.default.diff(t.attributes,l.attributes)):i.push(l).delete(r)}e-=r}})),i.chop()}eachLine(t,e="\n"){const r=new a.default(this.ops);let n=new h,i=0;for(;r.hasNext();){if("insert"!==r.peekType())return;const o=r.peek(),s=l.default.length(o)-r.peekLength(),a="string"==typeof o.insert?o.insert.indexOf(e,s)-s:-1;if(a<0)n.push(r.next());else if(a>0)n.push(r.next(a));else{if(!1===t(n,r.next(1).attributes||{},i))return;i+=1,n=new h}}n.length()>0&&t(n,{},i)}invert(t){const e=new h;return this.reduce(((r,n)=>{if(n.insert)e.delete(l.default.length(n));else{if("number"==typeof n.retain&&null==n.attributes)return e.retain(n.retain),r+n.retain;if(n.delete||"number"==typeof n.retain){const i=n.delete||n.retain;return t.slice(r,r+i).forEach((t=>{n.delete?e.push(t):n.retain&&n.attributes&&e.retain(l.default.length(t),s.default.invert(n.attributes,t.attributes))})),r+i}if("object"==typeof n.retain&&null!==n.retain){const i=t.slice(r,r+1),o=new a.default(i.ops).next(),[l,c,d]=u(n.retain,o.insert),p=h.getHandler(l);return e.retain({[l]:p.invert(c,d)},s.default.invert(n.attributes,o.attributes)),r+1}}return r}),0),e.chop()}transform(t,e=!1){if(e=!!e,"number"==typeof t)return this.transformPosition(t,e);const r=t,n=new a.default(this.ops),i=new a.default(r.ops),o=new h;for(;n.hasNext()||i.hasNext();)if("insert"!==n.peekType()||!e&&"insert"===i.peekType())if("insert"===i.peekType())o.push(i.next());else{const t=Math.min(n.peekLength(),i.peekLength()),r=n.next(t),l=i.next(t);if(r.delete)continue;if(l.delete)o.push(l);else{const n=r.retain,i=l.retain;let a="object"==typeof i&&null!==i?i:t;if("object"==typeof n&&null!==n&&"object"==typeof i&&null!==i){const t=Object.keys(n)[0];if(t===Object.keys(i)[0]){const r=h.getHandler(t);r&&(a={[t]:r.transform(n[t],i[t],e)})}}o.retain(a,s.default.transform(r.attributes,l.attributes,e))}}else o.retain(l.default.length(n.next()));return o.chop()}transformPosition(t,e=!1){e=!!e;const r=new a.default(this.ops);let n=0;for(;r.hasNext()&&n<=t;){const i=r.peekLength(),o=r.peekType();r.next(),"delete"!==o?("insert"===o&&(n<t||!e)&&(t+=i),n+=i):t-=Math.min(i,t-n)}return t}}h.Op=l.default,h.OpIterator=a.default,h.AttributeMap=s.default,h.handlers={},e.default=h,t.exports=h,t.exports.default=h},430:(t,e)=>{"use strict";var r;Object.defineProperty(e,"__esModule",{value:!0}),function(t){t.length=function(t){return"number"==typeof t.delete?t.delete:"number"==typeof t.retain?t.retain:"object"==typeof t.retain&&null!==t.retain?1:"string"==typeof t.insert?t.insert.length:1}}(r||(r={})),e.default=r},9534:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=r(430);e.default=class{constructor(t){this.ops=t,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(t){t||(t=1/0);const e=this.ops[this.index];if(e){const r=this.offset,i=n.default.length(e);if(t>=i-r?(t=i-r,this.index+=1,this.offset=0):this.offset+=t,"number"==typeof e.delete)return{delete:t};{const n={};return e.attributes&&(n.attributes=e.attributes),"number"==typeof e.retain?n.retain=t:"object"==typeof e.retain&&null!==e.retain?n.retain=e.retain:"string"==typeof e.insert?n.insert=e.insert.substr(r,t):n.insert=e.insert,n}}return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?n.default.length(this.ops[this.index])-this.offset:1/0}peekType(){const t=this.ops[this.index];return t?"number"==typeof t.delete?"delete":"number"==typeof t.retain||"object"==typeof t.retain&&null!==t.retain?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(0===this.offset)return this.ops.slice(this.index);{const t=this.offset,e=this.index,r=this.next(),n=this.ops.slice(this.index);return this.offset=t,this.index=e,[r].concat(n)}}return[]}}},2536:(t,e,r)=>{"use strict";r.d(e,{Z:()=>d});const n=function(){this.__data__=[],this.size=0};var i=r(9651);const o=function(t,e){for(var r=t.length;r--;)if((0,i.Z)(t[r][0],e))return r;return-1};var s=Array.prototype.splice;const l=function(t){var e=this.__data__,r=o(e,t);return!(r<0)&&(r==e.length-1?e.pop():s.call(e,r,1),--this.size,!0)};const a=function(t){var e=this.__data__,r=o(e,t);return r<0?void 0:e[r][1]};const c=function(t){return o(this.__data__,t)>-1};const u=function(t,e){var r=this.__data__,n=o(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};function h(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}h.prototype.clear=n,h.prototype.delete=l,h.prototype.get=a,h.prototype.has=c,h.prototype.set=u;const d=h},6183:(t,e,r)=>{"use strict";r.d(e,{Z:()=>o});var n=r(2119),i=r(6092);const o=(0,n.Z)(i.Z,"Map")},520:(t,e,r)=>{"use strict";r.d(e,{Z:()=>q});const n=(0,r(2119).Z)(Object,"create");const i=function(){this.__data__=n?n(null):{},this.size=0};const o=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e};var s=Object.prototype.hasOwnProperty;const l=function(t){var e=this.__data__;if(n){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return s.call(e,t)?e[t]:void 0};var a=Object.prototype.hasOwnProperty;const c=function(t){var e=this.__data__;return n?void 0!==e[t]:a.call(e,t)};const u=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=n&&void 0===e?"__lodash_hash_undefined__":e,this};function h(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}h.prototype.clear=i,h.prototype.delete=o,h.prototype.get=l,h.prototype.has=c,h.prototype.set=u;const d=h;var p=r(2536),m=r(6183);const f=function(){this.size=0,this.__data__={hash:new d,map:new(m.Z||p.Z),string:new d}};const g=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};const b=function(t,e){var r=t.__data__;return g(e)?r["string"==typeof e?"string":"hash"]:r.map};const v=function(t){var e=b(this,t).delete(t);return this.size-=e?1:0,e};const y=function(t){return b(this,t).get(t)};const x=function(t){return b(this,t).has(t)};const w=function(t,e){var r=b(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};function k(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}k.prototype.clear=f,k.prototype.delete=v,k.prototype.get=y,k.prototype.has=x,k.prototype.set=w;const q=k},5365:(t,e,r)=>{"use strict";r.d(e,{Z:()=>d});var n=r(2536);const i=function(){this.__data__=new n.Z,this.size=0};const o=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r};const s=function(t){return this.__data__.get(t)};const l=function(t){return this.__data__.has(t)};var a=r(6183),c=r(520);const u=function(t,e){var r=this.__data__;if(r instanceof n.Z){var i=r.__data__;if(!a.Z||i.length<199)return i.push([t,e]),this.size=++r.size,this;r=this.__data__=new c.Z(i)}return r.set(t,e),this.size=r.size,this};function h(t){var e=this.__data__=new n.Z(t);this.size=e.size}h.prototype.clear=i,h.prototype.delete=o,h.prototype.get=s,h.prototype.has=l,h.prototype.set=u;const d=h},7685:(t,e,r)=>{"use strict";r.d(e,{Z:()=>n});const n=r(6092).Z.Symbol},4073:(t,e,r)=>{"use strict";r.d(e,{Z:()=>n});const n=r(6092).Z.Uint8Array},9001:(t,e,r)=>{"use strict";r.d(e,{Z:()=>u});const n=function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n};var i=r(4732),o=r(7771),s=r(6706),l=r(6009),a=r(7212),c=Object.prototype.hasOwnProperty;const u=function(t,e){var r=(0,o.Z)(t),u=!r&&(0,i.Z)(t),h=!r&&!u&&(0,s.Z)(t),d=!r&&!u&&!h&&(0,a.Z)(t),p=r||u||h||d,m=p?n(t.length,String):[],f=m.length;for(var g in t)!e&&!c.call(t,g)||p&&("length"==g||h&&("offset"==g||"parent"==g)||d&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||(0,l.Z)(g,f))||m.push(g);return m}},8694:(t,e,r)=>{"use strict";r.d(e,{Z:()=>n});const n=function(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}},2954:(t,e,r)=>{"use strict";r.d(e,{Z:()=>s});var n=r(4752),i=r(9651),o=Object.prototype.hasOwnProperty;const s=function(t,e,r){var s=t[e];o.call(t,e)&&(0,i.Z)(s,r)&&(void 0!==r||e in t)||(0,n.Z)(t,e,r)}},4752:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(7904);const i=function(t,e,r){"__proto__"==e&&n.Z?(0,n.Z)(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}},3327:(t,e,r)=>{"use strict";r.d(e,{Z:()=>o});var n=r(8694),i=r(7771);const o=function(t,e,r){var o=e(t);return(0,i.Z)(t)?o:(0,n.Z)(o,r(t))}},3243:(t,e,r)=>{"use strict";r.d(e,{Z:()=>d});var n=r(7685),i=Object.prototype,o=i.hasOwnProperty,s=i.toString,l=n.Z?n.Z.toStringTag:void 0;const a=function(t){var e=o.call(t,l),r=t[l];try{t[l]=void 0;var n=!0}catch(t){}var i=s.call(t);return n&&(e?t[l]=r:delete t[l]),i};var c=Object.prototype.toString;const u=function(t){return c.call(t)};var h=n.Z?n.Z.toStringTag:void 0;const d=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":h&&h in Object(t)?a(t):u(t)}},1162:(t,e,r)=>{"use strict";r.d(e,{Z:()=>n});const n=function(t){return function(e){return t(e)}}},1884:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(4073);const i=function(t){var e=new t.constructor(t.byteLength);return new n.Z(e).set(new n.Z(t)),e}},1050:(t,e,r)=>{"use strict";r.d(e,{Z:()=>a});var n=r(6092),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=i&&"object"==typeof module&&module&&!module.nodeType&&module,s=o&&o.exports===i?n.Z.Buffer:void 0,l=s?s.allocUnsafe:void 0;const a=function(t,e){if(e)return t.slice();var r=t.length,n=l?l(r):new t.constructor(r);return t.copy(n),n}},2701:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(1884);const i=function(t,e){var r=e?(0,n.Z)(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}},7215:(t,e,r)=>{"use strict";r.d(e,{Z:()=>n});const n=function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}},1899:(t,e,r)=>{"use strict";r.d(e,{Z:()=>o});var n=r(2954),i=r(4752);const o=function(t,e,r,o){var s=!r;r||(r={});for(var l=-1,a=e.length;++l<a;){var c=e[l],u=o?o(r[c],t[c],c,r,t):void 0;void 0===u&&(u=t[c]),s?(0,i.Z)(r,c,u):(0,n.Z)(r,c,u)}return r}},7904:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(2119);const i=function(){try{var t=(0,n.Z)(Object,"defineProperty");return t({},"",{}),t}catch(t){}}()},3413:(t,e,r)=>{"use strict";r.d(e,{Z:()=>n});const n="object"==typeof global&&global&&global.Object===Object&&global},1808:(t,e,r)=>{"use strict";r.d(e,{Z:()=>s});var n=r(3327),i=r(3573),o=r(703);const s=function(t){return(0,n.Z)(t,o.Z,i.Z)}},2119:(t,e,r)=>{"use strict";r.d(e,{Z:()=>v});var n=r(3234);const i=r(6092).Z["__core-js_shared__"];var o,s=(o=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+o:"";const l=function(t){return!!s&&s in t};var a=r(7226),c=r(19),u=/^\[object .+?Constructor\]$/,h=Function.prototype,d=Object.prototype,p=h.toString,m=d.hasOwnProperty,f=RegExp("^"+p.call(m).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const g=function(t){return!(!(0,a.Z)(t)||l(t))&&((0,n.Z)(t)?f:u).test((0,c.Z)(t))};const b=function(t,e){return null==t?void 0:t[e]};const v=function(t,e){var r=b(t,e);return g(r)?r:void 0}},2513:(t,e,r)=>{"use strict";r.d(e,{Z:()=>n});const n=(0,r(1851).Z)(Object.getPrototypeOf,Object)},3573:(t,e,r)=>{"use strict";r.d(e,{Z:()=>l});const n=function(t,e){for(var r=-1,n=null==t?0:t.length,i=0,o=[];++r<n;){var s=t[r];e(s,r,t)&&(o[i++]=s)}return o};var i=r(532),o=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols;const l=s?function(t){return null==t?[]:(t=Object(t),n(s(t),(function(e){return o.call(t,e)})))}:i.Z},4158:(t,e,r)=>{"use strict";r.d(e,{Z:()=>q});var n=r(2119),i=r(6092);const o=(0,n.Z)(i.Z,"DataView");var s=r(6183);const l=(0,n.Z)(i.Z,"Promise");const a=(0,n.Z)(i.Z,"Set");const c=(0,n.Z)(i.Z,"WeakMap");var u=r(3243),h=r(19),d="[object Map]",p="[object Promise]",m="[object Set]",f="[object WeakMap]",g="[object DataView]",b=(0,h.Z)(o),v=(0,h.Z)(s.Z),y=(0,h.Z)(l),x=(0,h.Z)(a),w=(0,h.Z)(c),k=u.Z;(o&&k(new o(new ArrayBuffer(1)))!=g||s.Z&&k(new s.Z)!=d||l&&k(l.resolve())!=p||a&&k(new a)!=m||c&&k(new c)!=f)&&(k=function(t){var e=(0,u.Z)(t),r="[object Object]"==e?t.constructor:void 0,n=r?(0,h.Z)(r):"";if(n)switch(n){case b:return g;case v:return d;case y:return p;case x:return m;case w:return f}return e});const q=k},5418:(t,e,r)=>{"use strict";r.d(e,{Z:()=>a});var n=r(7226),i=Object.create;const o=function(){function t(){}return function(e){if(!(0,n.Z)(e))return{};if(i)return i(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();var s=r(2513),l=r(2764);const a=function(t){return"function"!=typeof t.constructor||(0,l.Z)(t)?{}:o((0,s.Z)(t))}},6009:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=/^(?:0|[1-9]\d*)$/;const i=function(t,e){var r=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&n.test(t))&&t>-1&&t%1==0&&t<e}},2764:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=Object.prototype;const i=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||n)}},8351:(t,e,r)=>{"use strict";r.d(e,{Z:()=>l});var n=r(3413),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=i&&"object"==typeof module&&module&&!module.nodeType&&module,s=o&&o.exports===i&&n.Z.process;const l=function(){try{var t=o&&o.require&&o.require("util").types;return t||s&&s.binding&&s.binding("util")}catch(t){}}()},1851:(t,e,r)=>{"use strict";r.d(e,{Z:()=>n});const n=function(t,e){return function(r){return t(e(r))}}},6092:(t,e,r)=>{"use strict";r.d(e,{Z:()=>o});var n=r(3413),i="object"==typeof self&&self&&self.Object===Object&&self;const o=n.Z||i||Function("return this")()},19:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=Function.prototype.toString;const i=function(t){if(null!=t){try{return n.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},2303:(t,e,r)=>{"use strict";r.d(e,{Z:()=>tt});var n=r(5365);const i=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););return t};var o=r(2954),s=r(1899),l=r(703);const a=function(t,e){return t&&(0,s.Z)(e,(0,l.Z)(e),t)};var c=r(7590);const u=function(t,e){return t&&(0,s.Z)(e,(0,c.Z)(e),t)};var h=r(1050),d=r(7215),p=r(3573);const m=function(t,e){return(0,s.Z)(t,(0,p.Z)(t),e)};var f=r(8694),g=r(2513),b=r(532);const v=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)(0,f.Z)(e,(0,p.Z)(t)),t=(0,g.Z)(t);return e}:b.Z;const y=function(t,e){return(0,s.Z)(t,v(t),e)};var x=r(1808),w=r(3327);const k=function(t){return(0,w.Z)(t,c.Z,v)};var q=r(4158),_=Object.prototype.hasOwnProperty;const S=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&_.call(t,"index")&&(r.index=t.index,r.input=t.input),r};var A=r(1884);const N=function(t,e){var r=e?(0,A.Z)(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)};var T=/\w*$/;const E=function(t){var e=new t.constructor(t.source,T.exec(t));return e.lastIndex=t.lastIndex,e};var L=r(7685),C=L.Z?L.Z.prototype:void 0,M=C?C.valueOf:void 0;const O=function(t){return M?Object(M.call(t)):{}};var B=r(2701);const z=function(t,e,r){var n=t.constructor;switch(e){case"[object ArrayBuffer]":return(0,A.Z)(t);case"[object Boolean]":case"[object Date]":return new n(+t);case"[object DataView]":return N(t,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return(0,B.Z)(t,r);case"[object Map]":case"[object Set]":return new n;case"[object Number]":case"[object String]":return new n(t);case"[object RegExp]":return E(t);case"[object Symbol]":return O(t)}};var P=r(5418),R=r(7771),Z=r(6706),I=r(8533);const j=function(t){return(0,I.Z)(t)&&"[object Map]"==(0,q.Z)(t)};var H=r(1162),D=r(8351),$=D.Z&&D.Z.isMap;const U=$?(0,H.Z)($):j;var F=r(7226);const V=function(t){return(0,I.Z)(t)&&"[object Set]"==(0,q.Z)(t)};var W=D.Z&&D.Z.isSet;const K=W?(0,H.Z)(W):V;var G="[object Arguments]",Y="[object Function]",X="[object Object]",Q={};Q[G]=Q["[object Array]"]=Q["[object ArrayBuffer]"]=Q["[object DataView]"]=Q["[object Boolean]"]=Q["[object Date]"]=Q["[object Float32Array]"]=Q["[object Float64Array]"]=Q["[object Int8Array]"]=Q["[object Int16Array]"]=Q["[object Int32Array]"]=Q["[object Map]"]=Q["[object Number]"]=Q[X]=Q["[object RegExp]"]=Q["[object Set]"]=Q["[object String]"]=Q["[object Symbol]"]=Q["[object Uint8Array]"]=Q["[object Uint8ClampedArray]"]=Q["[object Uint16Array]"]=Q["[object Uint32Array]"]=!0,Q["[object Error]"]=Q[Y]=Q["[object WeakMap]"]=!1;const J=function t(e,r,s,p,f,g){var b,v=1&r,w=2&r,_=4&r;if(s&&(b=f?s(e,p,f,g):s(e)),void 0!==b)return b;if(!(0,F.Z)(e))return e;var A=(0,R.Z)(e);if(A){if(b=S(e),!v)return(0,d.Z)(e,b)}else{var N=(0,q.Z)(e),T=N==Y||"[object GeneratorFunction]"==N;if((0,Z.Z)(e))return(0,h.Z)(e,v);if(N==X||N==G||T&&!f){if(b=w||T?{}:(0,P.Z)(e),!v)return w?y(e,u(b,e)):m(e,a(b,e))}else{if(!Q[N])return f?e:{};b=z(e,N,v)}}g||(g=new n.Z);var E=g.get(e);if(E)return E;g.set(e,b),K(e)?e.forEach((function(n){b.add(t(n,r,s,n,e,g))})):U(e)&&e.forEach((function(n,i){b.set(i,t(n,r,s,i,e,g))}));var L=_?w?k:x.Z:w?c.Z:l.Z,C=A?void 0:L(e);return i(C||e,(function(n,i){C&&(n=e[i=n]),(0,o.Z)(b,i,t(n,r,s,i,e,g))})),b};const tt=function(t){return J(t,5)}},9651:(t,e,r)=>{"use strict";r.d(e,{Z:()=>n});const n=function(t,e){return t===e||t!=t&&e!=e}},4732:(t,e,r)=>{"use strict";r.d(e,{Z:()=>c});var n=r(3243),i=r(8533);const o=function(t){return(0,i.Z)(t)&&"[object Arguments]"==(0,n.Z)(t)};var s=Object.prototype,l=s.hasOwnProperty,a=s.propertyIsEnumerable;const c=o(function(){return arguments}())?o:function(t){return(0,i.Z)(t)&&l.call(t,"callee")&&!a.call(t,"callee")}},7771:(t,e,r)=>{"use strict";r.d(e,{Z:()=>n});const n=Array.isArray},585:(t,e,r)=>{"use strict";r.d(e,{Z:()=>o});var n=r(3234),i=r(1656);const o=function(t){return null!=t&&(0,i.Z)(t.length)&&!(0,n.Z)(t)}},6706:(t,e,r)=>{"use strict";r.d(e,{Z:()=>a});var n=r(6092);const i=function(){return!1};var o="object"==typeof exports&&exports&&!exports.nodeType&&exports,s=o&&"object"==typeof module&&module&&!module.nodeType&&module,l=s&&s.exports===o?n.Z.Buffer:void 0;const a=(l?l.isBuffer:void 0)||i},9469:(t,e,r)=>{"use strict";r.d(e,{Z:()=>B});var n=r(5365),i=r(520);const o=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this};const s=function(t){return this.__data__.has(t)};function l(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new i.Z;++e<r;)this.add(t[e])}l.prototype.add=l.prototype.push=o,l.prototype.has=s;const a=l;const c=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1};const u=function(t,e){return t.has(e)};const h=function(t,e,r,n,i,o){var s=1&r,l=t.length,h=e.length;if(l!=h&&!(s&&h>l))return!1;var d=o.get(t),p=o.get(e);if(d&&p)return d==e&&p==t;var m=-1,f=!0,g=2&r?new a:void 0;for(o.set(t,e),o.set(e,t);++m<l;){var b=t[m],v=e[m];if(n)var y=s?n(v,b,m,e,t,o):n(b,v,m,t,e,o);if(void 0!==y){if(y)continue;f=!1;break}if(g){if(!c(e,(function(t,e){if(!u(g,e)&&(b===t||i(b,t,r,n,o)))return g.push(e)}))){f=!1;break}}else if(b!==v&&!i(b,v,r,n,o)){f=!1;break}}return o.delete(t),o.delete(e),f};var d=r(7685),p=r(4073),m=r(9651);const f=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r};const g=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r};var b=d.Z?d.Z.prototype:void 0,v=b?b.valueOf:void 0;const y=function(t,e,r,n,i,o,s){switch(r){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!o(new p.Z(t),new p.Z(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return(0,m.Z)(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var l=f;case"[object Set]":var a=1&n;if(l||(l=g),t.size!=e.size&&!a)return!1;var c=s.get(t);if(c)return c==e;n|=2,s.set(t,e);var u=h(l(t),l(e),n,i,o,s);return s.delete(t),u;case"[object Symbol]":if(v)return v.call(t)==v.call(e)}return!1};var x=r(1808),w=Object.prototype.hasOwnProperty;const k=function(t,e,r,n,i,o){var s=1&r,l=(0,x.Z)(t),a=l.length;if(a!=(0,x.Z)(e).length&&!s)return!1;for(var c=a;c--;){var u=l[c];if(!(s?u in e:w.call(e,u)))return!1}var h=o.get(t),d=o.get(e);if(h&&d)return h==e&&d==t;var p=!0;o.set(t,e),o.set(e,t);for(var m=s;++c<a;){var f=t[u=l[c]],g=e[u];if(n)var b=s?n(g,f,u,e,t,o):n(f,g,u,t,e,o);if(!(void 0===b?f===g||i(f,g,r,n,o):b)){p=!1;break}m||(m="constructor"==u)}if(p&&!m){var v=t.constructor,y=e.constructor;v==y||!("constructor"in t)||!("constructor"in e)||"function"==typeof v&&v instanceof v&&"function"==typeof y&&y instanceof y||(p=!1)}return o.delete(t),o.delete(e),p};var q=r(4158),_=r(7771),S=r(6706),A=r(7212),N="[object Arguments]",T="[object Array]",E="[object Object]",L=Object.prototype.hasOwnProperty;const C=function(t,e,r,i,o,s){var l=(0,_.Z)(t),a=(0,_.Z)(e),c=l?T:(0,q.Z)(t),u=a?T:(0,q.Z)(e),d=(c=c==N?E:c)==E,p=(u=u==N?E:u)==E,m=c==u;if(m&&(0,S.Z)(t)){if(!(0,S.Z)(e))return!1;l=!0,d=!1}if(m&&!d)return s||(s=new n.Z),l||(0,A.Z)(t)?h(t,e,r,i,o,s):y(t,e,c,r,i,o,s);if(!(1&r)){var f=d&&L.call(t,"__wrapped__"),g=p&&L.call(e,"__wrapped__");if(f||g){var b=f?t.value():t,v=g?e.value():e;return s||(s=new n.Z),o(b,v,r,i,s)}}return!!m&&(s||(s=new n.Z),k(t,e,r,i,o,s))};var M=r(8533);const O=function t(e,r,n,i,o){return e===r||(null==e||null==r||!(0,M.Z)(e)&&!(0,M.Z)(r)?e!=e&&r!=r:C(e,r,n,i,t,o))};const B=function(t,e){return O(t,e)}},3234:(t,e,r)=>{"use strict";r.d(e,{Z:()=>o});var n=r(3243),i=r(7226);const o=function(t){if(!(0,i.Z)(t))return!1;var e=(0,n.Z)(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},1656:(t,e,r)=>{"use strict";r.d(e,{Z:()=>n});const n=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},7226:(t,e,r)=>{"use strict";r.d(e,{Z:()=>n});const n=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},8533:(t,e,r)=>{"use strict";r.d(e,{Z:()=>n});const n=function(t){return null!=t&&"object"==typeof t}},7212:(t,e,r)=>{"use strict";r.d(e,{Z:()=>h});var n=r(3243),i=r(1656),o=r(8533),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1;const l=function(t){return(0,o.Z)(t)&&(0,i.Z)(t.length)&&!!s[(0,n.Z)(t)]};var a=r(1162),c=r(8351),u=c.Z&&c.Z.isTypedArray;const h=u?(0,a.Z)(u):l},703:(t,e,r)=>{"use strict";r.d(e,{Z:()=>c});var n=r(9001),i=r(2764);const o=(0,r(1851).Z)(Object.keys,Object);var s=Object.prototype.hasOwnProperty;const l=function(t){if(!(0,i.Z)(t))return o(t);var e=[];for(var r in Object(t))s.call(t,r)&&"constructor"!=r&&e.push(r);return e};var a=r(585);const c=function(t){return(0,a.Z)(t)?(0,n.Z)(t):l(t)}},7590:(t,e,r)=>{"use strict";r.d(e,{Z:()=>u});var n=r(9001),i=r(7226),o=r(2764);const s=function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e};var l=Object.prototype.hasOwnProperty;const a=function(t){if(!(0,i.Z)(t))return s(t);var e=(0,o.Z)(t),r=[];for(var n in t)("constructor"!=n||!e&&l.call(t,n))&&r.push(n);return r};var c=r(585);const u=function(t){return(0,c.Z)(t)?(0,n.Z)(t,!0):a(t)}},5575:(t,e,r)=>{"use strict";r.d(e,{Z:()=>W});var n=r(5365),i=r(4752),o=r(9651);const s=function(t,e,r){(void 0!==r&&!(0,o.Z)(t[e],r)||void 0===r&&!(e in t))&&(0,i.Z)(t,e,r)};const l=function(t){return function(e,r,n){for(var i=-1,o=Object(e),s=n(e),l=s.length;l--;){var a=s[t?l:++i];if(!1===r(o[a],a,o))break}return e}}();var a=r(1050),c=r(2701),u=r(7215),h=r(5418),d=r(4732),p=r(7771),m=r(585),f=r(8533);const g=function(t){return(0,f.Z)(t)&&(0,m.Z)(t)};var b=r(6706),v=r(3234),y=r(7226),x=r(3243),w=r(2513),k=Function.prototype,q=Object.prototype,_=k.toString,S=q.hasOwnProperty,A=_.call(Object);const N=function(t){if(!(0,f.Z)(t)||"[object Object]"!=(0,x.Z)(t))return!1;var e=(0,w.Z)(t);if(null===e)return!0;var r=S.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&_.call(r)==A};var T=r(7212);const E=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]};var L=r(1899),C=r(7590);const M=function(t){return(0,L.Z)(t,(0,C.Z)(t))};const O=function(t,e,r,n,i,o,l){var m=E(t,r),f=E(e,r),x=l.get(f);if(x)s(t,r,x);else{var w=o?o(m,f,r+"",t,e,l):void 0,k=void 0===w;if(k){var q=(0,p.Z)(f),_=!q&&(0,b.Z)(f),S=!q&&!_&&(0,T.Z)(f);w=f,q||_||S?(0,p.Z)(m)?w=m:g(m)?w=(0,u.Z)(m):_?(k=!1,w=(0,a.Z)(f,!0)):S?(k=!1,w=(0,c.Z)(f,!0)):w=[]:N(f)||(0,d.Z)(f)?(w=m,(0,d.Z)(m)?w=M(m):(0,y.Z)(m)&&!(0,v.Z)(m)||(w=(0,h.Z)(f))):k=!1}k&&(l.set(f,w),i(w,f,n,o,l),l.delete(f)),s(t,r,w)}};const B=function t(e,r,i,o,a){e!==r&&l(r,(function(l,c){if(a||(a=new n.Z),(0,y.Z)(l))O(e,r,c,i,t,o,a);else{var u=o?o(E(e,c),l,c+"",e,r,a):void 0;void 0===u&&(u=l),s(e,c,u)}}),C.Z)};const z=function(t){return t};const P=function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)};var R=Math.max;const Z=function(t,e,r){return e=R(void 0===e?t.length-1:e,0),function(){for(var n=arguments,i=-1,o=R(n.length-e,0),s=Array(o);++i<o;)s[i]=n[e+i];i=-1;for(var l=Array(e+1);++i<e;)l[i]=n[i];return l[e]=r(s),P(t,this,l)}};const I=function(t){return function(){return t}};var j=r(7904);const H=j.Z?function(t,e){return(0,j.Z)(t,"toString",{configurable:!0,enumerable:!1,value:I(e),writable:!0})}:z;var D=Date.now;const $=function(t){var e=0,r=0;return function(){var n=D(),i=16-(n-r);if(r=n,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(H);const U=function(t,e){return $(Z(t,e,z),t+"")};var F=r(6009);const V=function(t,e,r){if(!(0,y.Z)(r))return!1;var n=typeof e;return!!("number"==n?(0,m.Z)(r)&&(0,F.Z)(e,r.length):"string"==n&&e in r)&&(0,o.Z)(r[e],t)};const W=function(t){return U((function(e,r){var n=-1,i=r.length,o=i>1?r[i-1]:void 0,s=i>2?r[2]:void 0;for(o=t.length>3&&"function"==typeof o?(i--,o):void 0,s&&V(r[0],r[1],s)&&(o=i<3?void 0:o,i=1),e=Object(e);++n<i;){var l=r[n];l&&t(e,l,n,o)}return e}))}((function(t,e,r){B(t,e,r)}))},532:(t,e,r)=>{"use strict";r.d(e,{Z:()=>n});const n=function(){return[]}},371:(t,e,r)=>{"use strict";r.r(e),r.d(e,{Attributor:()=>i,AttributorStore:()=>d,BlockBlot:()=>_,ClassAttributor:()=>c,ContainerBlot:()=>A,EmbedBlot:()=>N,InlineBlot:()=>k,LeafBlot:()=>g,ParentBlot:()=>x,Registry:()=>l,Scope:()=>n,ScrollBlot:()=>L,StyleAttributor:()=>h,TextBlot:()=>M});var n=(t=>(t[t.TYPE=3]="TYPE",t[t.LEVEL=12]="LEVEL",t[t.ATTRIBUTE=13]="ATTRIBUTE",t[t.BLOT=14]="BLOT",t[t.INLINE=7]="INLINE",t[t.BLOCK=11]="BLOCK",t[t.BLOCK_BLOT=10]="BLOCK_BLOT",t[t.INLINE_BLOT=6]="INLINE_BLOT",t[t.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",t[t.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",t[t.ANY=15]="ANY",t))(n||{});class i{constructor(t,e,r={}){this.attrName=t,this.keyName=e;const i=n.TYPE&n.ATTRIBUTE;this.scope=null!=r.scope?r.scope&n.LEVEL|i:n.ATTRIBUTE,null!=r.whitelist&&(this.whitelist=r.whitelist)}static keys(t){return Array.from(t.attributes).map((t=>t.name))}add(t,e){return!!this.canAdd(t,e)&&(t.setAttribute(this.keyName,e),!0)}canAdd(t,e){return null==this.whitelist||("string"==typeof e?this.whitelist.indexOf(e.replace(/["']/g,""))>-1:this.whitelist.indexOf(e)>-1)}remove(t){t.removeAttribute(this.keyName)}value(t){const e=t.getAttribute(this.keyName);return this.canAdd(t,e)&&e?e:""}}class o extends Error{constructor(t){super(t="[Parchment] "+t),this.message=t,this.name=this.constructor.name}}const s=class t{constructor(){this.attributes={},this.classes={},this.tags={},this.types={}}static find(t,e=!1){if(null==t)return null;if(this.blots.has(t))return this.blots.get(t)||null;if(e){let r=null;try{r=t.parentNode}catch{return null}return this.find(r,e)}return null}create(e,r,n){const i=this.query(r);if(null==i)throw new o(`Unable to create ${r} blot`);const s=i,l=r instanceof Node||r.nodeType===Node.TEXT_NODE?r:s.create(n),a=new s(e,l,n);return t.blots.set(a.domNode,a),a}find(e,r=!1){return t.find(e,r)}query(t,e=n.ANY){let r;return"string"==typeof t?r=this.types[t]||this.attributes[t]:t instanceof Text||t.nodeType===Node.TEXT_NODE?r=this.types.text:"number"==typeof t?t&n.LEVEL&n.BLOCK?r=this.types.block:t&n.LEVEL&n.INLINE&&(r=this.types.inline):t instanceof Element&&((t.getAttribute("class")||"").split(/\s+/).some((t=>(r=this.classes[t],!!r))),r=r||this.tags[t.tagName]),null==r?null:"scope"in r&&e&n.LEVEL&r.scope&&e&n.TYPE&r.scope?r:null}register(...t){return t.map((t=>{const e="blotName"in t,r="attrName"in t;if(!e&&!r)throw new o("Invalid definition");if(e&&"abstract"===t.blotName)throw new o("Cannot register abstract class");const n=e?t.blotName:r?t.attrName:void 0;return this.types[n]=t,r?"string"==typeof t.keyName&&(this.attributes[t.keyName]=t):e&&(t.className&&(this.classes[t.className]=t),t.tagName&&(Array.isArray(t.tagName)?t.tagName=t.tagName.map((t=>t.toUpperCase())):t.tagName=t.tagName.toUpperCase(),(Array.isArray(t.tagName)?t.tagName:[t.tagName]).forEach((e=>{(null==this.tags[e]||null==t.className)&&(this.tags[e]=t)})))),t}))}};s.blots=new WeakMap;let l=s;function a(t,e){return(t.getAttribute("class")||"").split(/\s+/).filter((t=>0===t.indexOf(`${e}-`)))}const c=class extends i{static keys(t){return(t.getAttribute("class")||"").split(/\s+/).map((t=>t.split("-").slice(0,-1).join("-")))}add(t,e){return!!this.canAdd(t,e)&&(this.remove(t),t.classList.add(`${this.keyName}-${e}`),!0)}remove(t){a(t,this.keyName).forEach((e=>{t.classList.remove(e)})),0===t.classList.length&&t.removeAttribute("class")}value(t){const e=(a(t,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(t,e)?e:""}};function u(t){const e=t.split("-"),r=e.slice(1).map((t=>t[0].toUpperCase()+t.slice(1))).join("");return e[0]+r}const h=class extends i{static keys(t){return(t.getAttribute("style")||"").split(";").map((t=>t.split(":")[0].trim()))}add(t,e){return!!this.canAdd(t,e)&&(t.style[u(this.keyName)]=e,!0)}remove(t){t.style[u(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")}value(t){const e=t.style[u(this.keyName)];return this.canAdd(t,e)?e:""}};const d=class{constructor(t){this.attributes={},this.domNode=t,this.build()}attribute(t,e){e?t.add(this.domNode,e)&&(null!=t.value(this.domNode)?this.attributes[t.attrName]=t:delete this.attributes[t.attrName]):(t.remove(this.domNode),delete this.attributes[t.attrName])}build(){this.attributes={};const t=l.find(this.domNode);if(null==t)return;const e=i.keys(this.domNode),r=c.keys(this.domNode),o=h.keys(this.domNode);e.concat(r).concat(o).forEach((e=>{const r=t.scroll.query(e,n.ATTRIBUTE);r instanceof i&&(this.attributes[r.attrName]=r)}))}copy(t){Object.keys(this.attributes).forEach((e=>{const r=this.attributes[e].value(this.domNode);t.format(e,r)}))}move(t){this.copy(t),Object.keys(this.attributes).forEach((t=>{this.attributes[t].remove(this.domNode)})),this.attributes={}}values(){return Object.keys(this.attributes).reduce(((t,e)=>(t[e]=this.attributes[e].value(this.domNode),t)),{})}},p=class{constructor(t,e){this.scroll=t,this.domNode=e,l.blots.set(e,this),this.prev=null,this.next=null}static create(t){if(null==this.tagName)throw new o("Blot definition missing tagName");let e,r;return Array.isArray(this.tagName)?("string"==typeof t?(r=t.toUpperCase(),parseInt(r,10).toString()===r&&(r=parseInt(r,10))):"number"==typeof t&&(r=t),e="number"==typeof r?document.createElement(this.tagName[r-1]):r&&this.tagName.indexOf(r)>-1?document.createElement(r):document.createElement(this.tagName[0])):e=document.createElement(this.tagName),this.className&&e.classList.add(this.className),e}get statics(){return this.constructor}attach(){}clone(){const t=this.domNode.cloneNode(!1);return this.scroll.create(t)}detach(){null!=this.parent&&this.parent.removeChild(this),l.blots.delete(this.domNode)}deleteAt(t,e){this.isolate(t,e).remove()}formatAt(t,e,r,i){const o=this.isolate(t,e);if(null!=this.scroll.query(r,n.BLOT)&&i)o.wrap(r,i);else if(null!=this.scroll.query(r,n.ATTRIBUTE)){const t=this.scroll.create(this.statics.scope);o.wrap(t),t.format(r,i)}}insertAt(t,e,r){const n=null==r?this.scroll.create("text",e):this.scroll.create(e,r),i=this.split(t);this.parent.insertBefore(n,i||void 0)}isolate(t,e){const r=this.split(t);if(null==r)throw new Error("Attempt to isolate at end");return r.split(e),r}length(){return 1}offset(t=this.parent){return null==this.parent||this===t?0:this.parent.children.offset(this)+this.parent.offset(t)}optimize(t){this.statics.requiredContainer&&!(this.parent instanceof this.statics.requiredContainer)&&this.wrap(this.statics.requiredContainer.blotName)}remove(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()}replaceWith(t,e){const r="string"==typeof t?this.scroll.create(t,e):t;return null!=this.parent&&(this.parent.insertBefore(r,this.next||void 0),this.remove()),r}split(t,e){return 0===t?this:this.next}update(t,e){}wrap(t,e){const r="string"==typeof t?this.scroll.create(t,e):t;if(null!=this.parent&&this.parent.insertBefore(r,this.next||void 0),"function"!=typeof r.appendChild)throw new o(`Cannot wrap ${t}`);return r.appendChild(this),r}};p.blotName="abstract";let m=p;const f=class extends m{static value(t){return!0}index(t,e){return this.domNode===t||this.domNode.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(e,1):-1}position(t,e){let r=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return t>0&&(r+=1),[this.parent.domNode,r]}value(){return{[this.statics.blotName]:this.statics.value(this.domNode)||!0}}};f.scope=n.INLINE_BLOT;const g=f;class b{constructor(){this.head=null,this.tail=null,this.length=0}append(...t){if(this.insertBefore(t[0],null),t.length>1){const e=t.slice(1);this.append(...e)}}at(t){const e=this.iterator();let r=e();for(;r&&t>0;)t-=1,r=e();return r}contains(t){const e=this.iterator();let r=e();for(;r;){if(r===t)return!0;r=e()}return!1}indexOf(t){const e=this.iterator();let r=e(),n=0;for(;r;){if(r===t)return n;n+=1,r=e()}return-1}insertBefore(t,e){null!=t&&(this.remove(t),t.next=e,null!=e?(t.prev=e.prev,null!=e.prev&&(e.prev.next=t),e.prev=t,e===this.head&&(this.head=t)):null!=this.tail?(this.tail.next=t,t.prev=this.tail,this.tail=t):(t.prev=null,this.head=this.tail=t),this.length+=1)}offset(t){let e=0,r=this.head;for(;null!=r;){if(r===t)return e;e+=r.length(),r=r.next}return-1}remove(t){this.contains(t)&&(null!=t.prev&&(t.prev.next=t.next),null!=t.next&&(t.next.prev=t.prev),t===this.head&&(this.head=t.next),t===this.tail&&(this.tail=t.prev),this.length-=1)}iterator(t=this.head){return()=>{const e=t;return null!=t&&(t=t.next),e}}find(t,e=!1){const r=this.iterator();let n=r();for(;n;){const i=n.length();if(t<i||e&&t===i&&(null==n.next||0!==n.next.length()))return[n,t];t-=i,n=r()}return[null,0]}forEach(t){const e=this.iterator();let r=e();for(;r;)t(r),r=e()}forEachAt(t,e,r){if(e<=0)return;const[n,i]=this.find(t);let o=t-i;const s=this.iterator(n);let l=s();for(;l&&o<t+e;){const n=l.length();t>o?r(l,t-o,Math.min(e,o+n-t)):r(l,0,Math.min(n,t+e-o)),o+=n,l=s()}}map(t){return this.reduce(((e,r)=>(e.push(t(r)),e)),[])}reduce(t,e){const r=this.iterator();let n=r();for(;n;)e=t(e,n),n=r();return e}}function v(t,e){const r=e.find(t);if(r)return r;try{return e.create(t)}catch{const r=e.create(n.INLINE);return Array.from(t.childNodes).forEach((t=>{r.domNode.appendChild(t)})),t.parentNode&&t.parentNode.replaceChild(r.domNode,t),r.attach(),r}}const y=class t extends m{constructor(t,e){super(t,e),this.uiNode=null,this.build()}appendChild(t){this.insertBefore(t)}attach(){super.attach(),this.children.forEach((t=>{t.attach()}))}attachUI(e){null!=this.uiNode&&this.uiNode.remove(),this.uiNode=e,t.uiClass&&this.uiNode.classList.add(t.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new b,Array.from(this.domNode.childNodes).filter((t=>t!==this.uiNode)).reverse().forEach((t=>{try{const e=v(t,this.scroll);this.insertBefore(e,this.children.head||void 0)}catch(t){if(t instanceof o)return;throw t}}))}deleteAt(t,e){if(0===t&&e===this.length())return this.remove();this.children.forEachAt(t,e,((t,e,r)=>{t.deleteAt(e,r)}))}descendant(e,r=0){const[n,i]=this.children.find(r);return null==e.blotName&&e(n)||null!=e.blotName&&n instanceof e?[n,i]:n instanceof t?n.descendant(e,i):[null,-1]}descendants(e,r=0,n=Number.MAX_VALUE){let i=[],o=n;return this.children.forEachAt(r,n,((r,n,s)=>{(null==e.blotName&&e(r)||null!=e.blotName&&r instanceof e)&&i.push(r),r instanceof t&&(i=i.concat(r.descendants(e,n,o))),o-=s})),i}detach(){this.children.forEach((t=>{t.detach()})),super.detach()}enforceAllowedChildren(){let e=!1;this.children.forEach((r=>{e||this.statics.allowedChildren.some((t=>r instanceof t))||(r.statics.scope===n.BLOCK_BLOT?(null!=r.next&&this.splitAfter(r),null!=r.prev&&this.splitAfter(r.prev),r.parent.unwrap(),e=!0):r instanceof t?r.unwrap():r.remove())}))}formatAt(t,e,r,n){this.children.forEachAt(t,e,((t,e,i)=>{t.formatAt(e,i,r,n)}))}insertAt(t,e,r){const[n,i]=this.children.find(t);if(n)n.insertAt(i,e,r);else{const t=null==r?this.scroll.create("text",e):this.scroll.create(e,r);this.appendChild(t)}}insertBefore(t,e){null!=t.parent&&t.parent.children.remove(t);let r=null;this.children.insertBefore(t,e||null),t.parent=this,null!=e&&(r=e.domNode),(this.domNode.parentNode!==t.domNode||this.domNode.nextSibling!==r)&&this.domNode.insertBefore(t.domNode,r),t.attach()}length(){return this.children.reduce(((t,e)=>t+e.length()),0)}moveChildren(t,e){this.children.forEach((r=>{t.insertBefore(r,e)}))}optimize(t){if(super.optimize(t),this.enforceAllowedChildren(),null!=this.uiNode&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),0===this.children.length)if(null!=this.statics.defaultChild){const t=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(t)}else this.remove()}path(e,r=!1){const[n,i]=this.children.find(e,r),o=[[this,e]];return n instanceof t?o.concat(n.path(i,r)):(null!=n&&o.push([n,i]),o)}removeChild(t){this.children.remove(t)}replaceWith(e,r){const n="string"==typeof e?this.scroll.create(e,r):e;return n instanceof t&&this.moveChildren(n),super.replaceWith(n)}split(t,e=!1){if(!e){if(0===t)return this;if(t===this.length())return this.next}const r=this.clone();return this.parent&&this.parent.insertBefore(r,this.next||void 0),this.children.forEachAt(t,this.length(),((t,n,i)=>{const o=t.split(n,e);null!=o&&r.appendChild(o)})),r}splitAfter(t){const e=this.clone();for(;null!=t.next;)e.appendChild(t.next);return this.parent&&this.parent.insertBefore(e,this.next||void 0),e}unwrap(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()}update(t,e){const r=[],n=[];t.forEach((t=>{t.target===this.domNode&&"childList"===t.type&&(r.push(...t.addedNodes),n.push(...t.removedNodes))})),n.forEach((t=>{if(null!=t.parentNode&&"IFRAME"!==t.tagName&&document.body.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;const e=this.scroll.find(t);null!=e&&(null==e.domNode.parentNode||e.domNode.parentNode===this.domNode)&&e.detach()})),r.filter((t=>t.parentNode===this.domNode&&t!==this.uiNode)).sort(((t,e)=>t===e?0:t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1)).forEach((t=>{let e=null;null!=t.nextSibling&&(e=this.scroll.find(t.nextSibling));const r=v(t,this.scroll);(r.next!==e||null==r.next)&&(null!=r.parent&&r.parent.removeChild(this),this.insertBefore(r,e||void 0))})),this.enforceAllowedChildren()}};y.uiClass="";const x=y;const w=class t extends x{static create(t){return super.create(t)}static formats(e,r){const n=r.query(t.blotName);if(null==n||e.tagName!==n.tagName){if("string"==typeof this.tagName)return!0;if(Array.isArray(this.tagName))return e.tagName.toLowerCase()}}constructor(t,e){super(t,e),this.attributes=new d(this.domNode)}format(e,r){if(e!==this.statics.blotName||r){const t=this.scroll.query(e,n.INLINE);if(null==t)return;t instanceof i?this.attributes.attribute(t,r):r&&(e!==this.statics.blotName||this.formats()[e]!==r)&&this.replaceWith(e,r)}else this.children.forEach((e=>{e instanceof t||(e=e.wrap(t.blotName,!0)),this.attributes.copy(e)})),this.unwrap()}formats(){const t=this.attributes.values(),e=this.statics.formats(this.domNode,this.scroll);return null!=e&&(t[this.statics.blotName]=e),t}formatAt(t,e,r,i){null!=this.formats()[r]||this.scroll.query(r,n.ATTRIBUTE)?this.isolate(t,e).format(r,i):super.formatAt(t,e,r,i)}optimize(e){super.optimize(e);const r=this.formats();if(0===Object.keys(r).length)return this.unwrap();const n=this.next;n instanceof t&&n.prev===this&&function(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const r in t)if(t[r]!==e[r])return!1;return!0}(r,n.formats())&&(n.moveChildren(this),n.remove())}replaceWith(t,e){const r=super.replaceWith(t,e);return this.attributes.copy(r),r}update(t,e){super.update(t,e),t.some((t=>t.target===this.domNode&&"attributes"===t.type))&&this.attributes.build()}wrap(e,r){const n=super.wrap(e,r);return n instanceof t&&this.attributes.move(n),n}};w.allowedChildren=[w,g],w.blotName="inline",w.scope=n.INLINE_BLOT,w.tagName="SPAN";const k=w,q=class t extends x{static create(t){return super.create(t)}static formats(e,r){const n=r.query(t.blotName);if(null==n||e.tagName!==n.tagName){if("string"==typeof this.tagName)return!0;if(Array.isArray(this.tagName))return e.tagName.toLowerCase()}}constructor(t,e){super(t,e),this.attributes=new d(this.domNode)}format(e,r){const o=this.scroll.query(e,n.BLOCK);null!=o&&(o instanceof i?this.attributes.attribute(o,r):e!==this.statics.blotName||r?r&&(e!==this.statics.blotName||this.formats()[e]!==r)&&this.replaceWith(e,r):this.replaceWith(t.blotName))}formats(){const t=this.attributes.values(),e=this.statics.formats(this.domNode,this.scroll);return null!=e&&(t[this.statics.blotName]=e),t}formatAt(t,e,r,i){null!=this.scroll.query(r,n.BLOCK)?this.format(r,i):super.formatAt(t,e,r,i)}insertAt(t,e,r){if(null==r||null!=this.scroll.query(e,n.INLINE))super.insertAt(t,e,r);else{const n=this.split(t);if(null==n)throw new Error("Attempt to insertAt after block boundaries");{const t=this.scroll.create(e,r);n.parent.insertBefore(t,n)}}}replaceWith(t,e){const r=super.replaceWith(t,e);return this.attributes.copy(r),r}update(t,e){super.update(t,e),t.some((t=>t.target===this.domNode&&"attributes"===t.type))&&this.attributes.build()}};q.blotName="block",q.scope=n.BLOCK_BLOT,q.tagName="P",q.allowedChildren=[k,q,g];const _=q,S=class extends x{checkMerge(){return null!==this.next&&this.next.statics.blotName===this.statics.blotName}deleteAt(t,e){super.deleteAt(t,e),this.enforceAllowedChildren()}formatAt(t,e,r,n){super.formatAt(t,e,r,n),this.enforceAllowedChildren()}insertAt(t,e,r){super.insertAt(t,e,r),this.enforceAllowedChildren()}optimize(t){super.optimize(t),this.children.length>0&&null!=this.next&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}};S.blotName="container",S.scope=n.BLOCK_BLOT;const A=S;const N=class extends g{static formats(t,e){}format(t,e){super.formatAt(0,this.length(),t,e)}formatAt(t,e,r,n){0===t&&e===this.length()?this.format(r,n):super.formatAt(t,e,r,n)}formats(){return this.statics.formats(this.domNode,this.scroll)}},T={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},E=class extends x{constructor(t,e){super(null,e),this.registry=t,this.scroll=this,this.build(),this.observer=new MutationObserver((t=>{this.update(t)})),this.observer.observe(this.domNode,T),this.attach()}create(t,e){return this.registry.create(this,t,e)}find(t,e=!1){const r=this.registry.find(t,e);return r?r.scroll===this?r:e?this.find(r.scroll.domNode.parentNode,!0):null:null}query(t,e=n.ANY){return this.registry.query(t,e)}register(...t){return this.registry.register(...t)}build(){null!=this.scroll&&super.build()}detach(){super.detach(),this.observer.disconnect()}deleteAt(t,e){this.update(),0===t&&e===this.length()?this.children.forEach((t=>{t.remove()})):super.deleteAt(t,e)}formatAt(t,e,r,n){this.update(),super.formatAt(t,e,r,n)}insertAt(t,e,r){this.update(),super.insertAt(t,e,r)}optimize(t=[],e={}){super.optimize(e);const r=e.mutationsMap||new WeakMap;let n=Array.from(this.observer.takeRecords());for(;n.length>0;)t.push(n.pop());const i=(t,e=!0)=>{null==t||t===this||null!=t.domNode.parentNode&&(r.has(t.domNode)||r.set(t.domNode,[]),e&&i(t.parent))},o=t=>{r.has(t.domNode)&&(t instanceof x&&t.children.forEach(o),r.delete(t.domNode),t.optimize(e))};let s=t;for(let e=0;s.length>0;e+=1){if(e>=100)throw new Error("[Parchment] Maximum optimize iterations reached");for(s.forEach((t=>{const e=this.find(t.target,!0);null!=e&&(e.domNode===t.target&&("childList"===t.type?(i(this.find(t.previousSibling,!1)),Array.from(t.addedNodes).forEach((t=>{const e=this.find(t,!1);i(e,!1),e instanceof x&&e.children.forEach((t=>{i(t,!1)}))}))):"attributes"===t.type&&i(e.prev)),i(e))})),this.children.forEach(o),s=Array.from(this.observer.takeRecords()),n=s.slice();n.length>0;)t.push(n.pop())}}update(t,e={}){t=t||this.observer.takeRecords();const r=new WeakMap;t.map((t=>{const e=this.find(t.target,!0);return null==e?null:r.has(e.domNode)?(r.get(e.domNode).push(t),null):(r.set(e.domNode,[t]),e)})).forEach((t=>{null!=t&&t!==this&&r.has(t.domNode)&&t.update(r.get(t.domNode)||[],e)})),e.mutationsMap=r,r.has(this.domNode)&&super.update(r.get(this.domNode),e),this.optimize(t,e)}};E.blotName="scroll",E.defaultChild=_,E.allowedChildren=[_,A],E.scope=n.BLOCK_BLOT,E.tagName="DIV";const L=E,C=class t extends g{static create(t){return document.createTextNode(t)}static value(t){return t.data}constructor(t,e){super(t,e),this.text=this.statics.value(this.domNode)}deleteAt(t,e){this.domNode.data=this.text=this.text.slice(0,t)+this.text.slice(t+e)}index(t,e){return this.domNode===t?e:-1}insertAt(t,e,r){null==r?(this.text=this.text.slice(0,t)+e+this.text.slice(t),this.domNode.data=this.text):super.insertAt(t,e,r)}length(){return this.text.length}optimize(e){super.optimize(e),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof t&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())}position(t,e=!1){return[this.domNode,t]}split(t,e=!1){if(!e){if(0===t)return this;if(t===this.length())return this.next}const r=this.scroll.create(this.domNode.splitText(t));return this.parent.insertBefore(r,this.next||void 0),this.text=this.statics.value(this.domNode),r}update(t,e){t.some((t=>"characterData"===t.type&&t.target===this.domNode))&&(this.text=this.statics.value(this.domNode))}value(){return this.text}};C.blotName="text",C.scope=n.INLINE_BLOT;const M=C},8417:(t,e,r)=>{"use strict";r.d(e,{E2:()=>h,ZP:()=>a,i2:()=>c,qz:()=>u});var n=r(371),i=r(8895),o=r(2610),s=r(1276),l=r(1696);class a extends n.BlockBlot{cache={};delta(){return null==this.cache.delta&&(this.cache.delta=u(this)),this.cache.delta}deleteAt(t,e){super.deleteAt(t,e),this.cache={}}formatAt(t,e,r,i){e<=0||(this.scroll.query(r,n.Scope.BLOCK)?t+e===this.length()&&this.format(r,i):super.formatAt(t,Math.min(e,this.length()-t-1),r,i),this.cache={})}insertAt(t,e,r){if(null!=r)return super.insertAt(t,e,r),void(this.cache={});if(0===e.length)return;const n=e.split("\n"),i=n.shift();i.length>0&&(t<this.length()-1||null==this.children.tail?super.insertAt(Math.min(t,this.length()-1),i):this.children.tail.insertAt(this.children.tail.length(),i),this.cache={});let o=this;n.reduce(((t,e)=>(o=o.split(t,!0),o.insertAt(0,e),e.length)),t+i.length)}insertBefore(t,e){const{head:r}=this.children;super.insertBefore(t,e),r instanceof o.Z&&r.remove(),this.cache={}}length(){return null==this.cache.length&&(this.cache.length=super.length()+1),this.cache.length}moveChildren(t,e){super.moveChildren(t,e),this.cache={}}optimize(t){super.optimize(t),this.cache={}}path(t){return super.path(t,!0)}removeChild(t){super.removeChild(t),this.cache={}}split(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e&&(0===t||t>=this.length()-1)){const e=this.clone();return 0===t?(this.parent.insertBefore(e,this),this):(this.parent.insertBefore(e,this.next),e)}const r=super.split(t,e);return this.cache={},r}}a.blotName="block",a.tagName="P",a.defaultChild=o.Z,a.allowedChildren=[o.Z,s.Z,n.EmbedBlot,l.Z];class c extends n.EmbedBlot{attach(){super.attach(),this.attributes=new n.AttributorStore(this.domNode)}delta(){return(new i).insert(this.value(),{...this.formats(),...this.attributes.values()})}format(t,e){const r=this.scroll.query(t,n.Scope.BLOCK_ATTRIBUTE);null!=r&&this.attributes.attribute(r,e)}formatAt(t,e,r,n){this.format(r,n)}insertAt(t,e,r){if(null!=r)return void super.insertAt(t,e,r);const n=e.split("\n"),i=n.pop(),o=n.map((t=>{const e=this.scroll.create(a.blotName);return e.insertAt(0,t),e})),s=this.split(t);o.forEach((t=>{this.parent.insertBefore(t,s)})),i&&this.parent.insertBefore(this.scroll.create("text",i),s)}}function u(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return t.descendants(n.LeafBlot).reduce(((t,r)=>0===r.length()?t:t.insert(r.value(),h(r,{},e))),new i).insert("\n",h(t))}function h(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return null==t?e:("formats"in t&&"function"==typeof t.formats&&(e={...e,...t.formats()},r&&delete e["code-token"]),null==t.parent||"scroll"===t.parent.statics.blotName||t.parent.statics.scope!==t.statics.scope?e:h(t.parent,e,r))}c.scope=n.Scope.BLOCK_BLOT},2610:(t,e,r)=>{"use strict";r.d(e,{Z:()=>o});var n=r(371);class i extends n.EmbedBlot{static value(){}optimize(){(this.prev||this.next)&&this.remove()}length(){return 0}value(){return""}}i.blotName="break",i.tagName="BR";const o=i},8188:(t,e,r)=>{"use strict";r.d(e,{Z:()=>o});var n=r(371);class i extends n.ContainerBlot{}const o=i},4827:(t,e,r)=>{"use strict";r.d(e,{Z:()=>s});var n=r(371),i=r(1696);class o extends n.EmbedBlot{static blotName="cursor";static className="ql-cursor";static tagName="span";static CONTENTS="\ufeff";static value(){}constructor(t,e,r){super(t,e),this.selection=r,this.textNode=document.createTextNode(o.CONTENTS),this.domNode.appendChild(this.textNode),this.savedLength=0}detach(){null!=this.parent&&this.parent.removeChild(this)}format(t,e){if(0!==this.savedLength)return void super.format(t,e);let r=this,i=0;for(;null!=r&&r.statics.scope!==n.Scope.BLOCK_BLOT;)i+=r.offset(r.parent),r=r.parent;null!=r&&(this.savedLength=o.CONTENTS.length,r.optimize(),r.formatAt(i,o.CONTENTS.length,t,e),this.savedLength=0)}index(t,e){return t===this.textNode?0:super.index(t,e)}length(){return this.savedLength}position(){return[this.textNode,this.textNode.data.length]}remove(){super.remove(),this.parent=null}restore(){if(this.selection.composing||null==this.parent)return null;const t=this.selection.getNativeRange();for(;null!=this.domNode.lastChild&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);const e=this.prev instanceof i.Z?this.prev:null,r=e?e.length():0,n=this.next instanceof i.Z?this.next:null,s=n?n.text:"",{textNode:l}=this,a=l.data.split(o.CONTENTS).join("");let c;if(l.data=o.CONTENTS,e)c=e,(a||n)&&(e.insertAt(e.length(),a+s),n&&n.remove());else if(n)c=n,n.insertAt(0,a);else{const t=document.createTextNode(a);c=this.scroll.create(t),this.parent.insertBefore(c,this)}if(this.remove(),t){const i=(t,i)=>e&&t===e.domNode?i:t===l?r+i-1:n&&t===n.domNode?r+a.length+i:null,o=i(t.start.node,t.start.offset),s=i(t.end.node,t.end.offset);if(null!==o&&null!==s)return{startNode:c.domNode,startOffset:o,endNode:c.domNode,endOffset:s}}return null}update(t,e){if(t.some((t=>"characterData"===t.type&&t.target===this.textNode))){const t=this.restore();t&&(e.range=t)}}optimize(t){super.optimize(t);let{parent:e}=this;for(;e;){if("A"===e.domNode.tagName){this.savedLength=o.CONTENTS.length,e.isolate(this.offset(e),this.length()).unwrap(),this.savedLength=0;break}e=e.parent}}value(){return""}}const s=o},6406:(t,e,r)=>{"use strict";r.d(e,{Z:()=>l});var n=r(371),i=r(1696);const o="\ufeff";class s extends n.EmbedBlot{constructor(t,e){super(t,e),this.contentNode=document.createElement("span"),this.contentNode.setAttribute("contenteditable","false"),Array.from(this.domNode.childNodes).forEach((t=>{this.contentNode.appendChild(t)})),this.leftGuard=document.createTextNode(o),this.rightGuard=document.createTextNode(o),this.domNode.appendChild(this.leftGuard),this.domNode.appendChild(this.contentNode),this.domNode.appendChild(this.rightGuard)}index(t,e){return t===this.leftGuard?0:t===this.rightGuard?1:super.index(t,e)}restore(t){let e,r=null;const n=t.data.split(o).join("");if(t===this.leftGuard)if(this.prev instanceof i.Z){const t=this.prev.length();this.prev.insertAt(t,n),r={startNode:this.prev.domNode,startOffset:t+n.length}}else e=document.createTextNode(n),this.parent.insertBefore(this.scroll.create(e),this),r={startNode:e,startOffset:n.length};else t===this.rightGuard&&(this.next instanceof i.Z?(this.next.insertAt(0,n),r={startNode:this.next.domNode,startOffset:n.length}):(e=document.createTextNode(n),this.parent.insertBefore(this.scroll.create(e),this.next),r={startNode:e,startOffset:n.length}));return t.data=o,r}update(t,e){t.forEach((t=>{if("characterData"===t.type&&(t.target===this.leftGuard||t.target===this.rightGuard)){const r=this.restore(t.target);r&&(e.range=r)}}))}}const l=s},1276:(t,e,r)=>{"use strict";r.d(e,{Z:()=>l});var n=r(371),i=r(2610),o=r(1696);class s extends n.InlineBlot{static allowedChildren=[s,i.Z,n.EmbedBlot,o.Z];static order=["cursor","inline","link","underline","strike","italic","bold","script","code"];static compare(t,e){const r=s.order.indexOf(t),n=s.order.indexOf(e);return r>=0||n>=0?r-n:t===e?0:t<e?-1:1}formatAt(t,e,r,i){if(s.compare(this.statics.blotName,r)<0&&this.scroll.query(r,n.Scope.BLOT)){const n=this.isolate(t,e);i&&n.wrap(r,i)}else super.formatAt(t,e,r,i)}optimize(t){if(super.optimize(t),this.parent instanceof s&&s.compare(this.statics.blotName,this.parent.statics.blotName)>0){const t=this.parent.isolate(this.offset(),this.length());this.moveChildren(t),t.wrap(this)}}}const l=s},1696:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i,b:()=>o});var n=r(371);class i extends n.TextBlot{}function o(t){return t.replace(/[&<>"']/g,(t=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}[t])))}},9196:(t,e,r)=>{"use strict";r.d(e,{Yl:()=>x.Z,wK:()=>n.wK,e6:()=>n.e6,ZP:()=>O});var n=r(4904),i=r(8417),o=r(2610),s=r(8188),l=r(4827),a=r(6406),c=r(1276),u=r(371),h=r(8895),d=r(1637);function p(t){return t instanceof i.ZP||t instanceof i.i2}function m(t){return"function"==typeof t.updateContent}class f extends u.ScrollBlot{static blotName="scroll";static className="ql-editor";static tagName="DIV";static defaultChild=i.ZP;static allowedChildren=[i.ZP,i.i2,s.Z];constructor(t,e,r){let{emitter:n}=r;super(t,e),this.emitter=n,this.batch=!1,this.optimize(),this.enable(),this.domNode.addEventListener("dragstart",(t=>this.handleDragStart(t)))}batchStart(){Array.isArray(this.batch)||(this.batch=[])}batchEnd(){if(!this.batch)return;const t=this.batch;this.batch=!1,this.update(t)}emitMount(t){this.emitter.emit(d.Z.events.SCROLL_BLOT_MOUNT,t)}emitUnmount(t){this.emitter.emit(d.Z.events.SCROLL_BLOT_UNMOUNT,t)}emitEmbedUpdate(t,e){this.emitter.emit(d.Z.events.SCROLL_EMBED_UPDATE,t,e)}deleteAt(t,e){const[r,n]=this.line(t),[s]=this.line(t+e);if(super.deleteAt(t,e),null!=s&&r!==s&&n>0){if(r instanceof i.i2||s instanceof i.i2)return void this.optimize();const t=s.children.head instanceof o.Z?null:s.children.head;r.moveChildren(s,t),r.remove()}this.optimize()}enable(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.domNode.setAttribute("contenteditable",t?"true":"false")}formatAt(t,e,r,n){super.formatAt(t,e,r,n),this.optimize()}insertAt(t,e,r){if(t>=this.length())if(null==r||null==this.scroll.query(e,u.Scope.BLOCK)){const t=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(t),null==r&&e.endsWith("\n")?t.insertAt(0,e.slice(0,-1),r):t.insertAt(0,e,r)}else{const t=this.scroll.create(e,r);this.appendChild(t)}else super.insertAt(t,e,r);this.optimize()}insertBefore(t,e){if(t.statics.scope===u.Scope.INLINE_BLOT){const r=this.scroll.create(this.statics.defaultChild.blotName);r.appendChild(t),super.insertBefore(r,e)}else super.insertBefore(t,e)}insertContents(t,e){const r=this.deltaToRenderBlocks(e.concat((new h).insert("\n"))),n=r.pop();if(null==n)return;this.batchStart();const o=r.shift();if(o){const e="block"===o.type&&(0===o.delta.length()||!this.descendant(i.i2,t)[0]&&t<this.length()),r="block"===o.type?o.delta:(new h).insert({[o.key]:o.value});g(this,t,r);const n="block"===o.type?1:0,s=t+r.length()+n;e&&this.insertAt(s-1,"\n");const l=(0,i.E2)(this.line(t)[0]),a=h.AttributeMap.diff(l,o.attributes)||{};Object.keys(a).forEach((t=>{this.formatAt(s-1,1,t,a[t])})),t=s}let[s,l]=this.children.find(t);if(r.length&&(s&&(s=s.split(l),l=0),r.forEach((t=>{if("block"===t.type){g(this.createBlock(t.attributes,s||void 0),0,t.delta)}else{const e=this.create(t.key,t.value);this.insertBefore(e,s||void 0),Object.keys(t.attributes).forEach((r=>{e.format(r,t.attributes[r])}))}}))),"block"===n.type&&n.delta.length()){g(this,s?s.offset(s.scroll)+l:this.length(),n.delta)}this.batchEnd(),this.optimize()}isEnabled(){return"true"===this.domNode.getAttribute("contenteditable")}leaf(t){const e=this.path(t).pop();if(!e)return[null,-1];const[r,n]=e;return r instanceof u.LeafBlot?[r,n]:[null,-1]}line(t){return t===this.length()?this.line(t-1):this.descendant(p,t)}lines(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;const r=(t,e,n)=>{let i=[],o=n;return t.children.forEachAt(e,n,((t,e,n)=>{p(t)?i.push(t):t instanceof u.ContainerBlot&&(i=i.concat(r(t,e,o))),o-=n})),i};return r(this,t,e)}optimize(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.batch||(super.optimize(t,e),t.length>0&&this.emitter.emit(d.Z.events.SCROLL_OPTIMIZE,t,e))}path(t){return super.path(t).slice(1)}remove(){}update(t){if(this.batch)return void(Array.isArray(t)&&(this.batch=this.batch.concat(t)));let e=d.Z.sources.USER;"string"==typeof t&&(e=t),Array.isArray(t)||(t=this.observer.takeRecords()),(t=t.filter((t=>{let{target:e}=t;const r=this.find(e,!0);return r&&!m(r)}))).length>0&&this.emitter.emit(d.Z.events.SCROLL_BEFORE_UPDATE,e,t),super.update(t.concat([])),t.length>0&&this.emitter.emit(d.Z.events.SCROLL_UPDATE,e,t)}updateEmbedAt(t,e,r){const[n]=this.descendant((t=>t instanceof i.i2),t);n&&n.statics.blotName===e&&m(n)&&n.updateContent(r)}handleDragStart(t){t.preventDefault()}deltaToRenderBlocks(t){const e=[];let r=new h;return t.forEach((t=>{const n=t?.insert;if(n)if("string"==typeof n){const i=n.split("\n");i.slice(0,-1).forEach((n=>{r.insert(n,t.attributes),e.push({type:"block",delta:r,attributes:t.attributes??{}}),r=new h}));const o=i[i.length-1];o&&r.insert(o,t.attributes)}else{const i=Object.keys(n)[0];if(!i)return;this.query(i,u.Scope.INLINE)?r.push(t):(r.length()&&e.push({type:"block",delta:r,attributes:{}}),r=new h,e.push({type:"blockEmbed",key:i,value:n[i],attributes:t.attributes??{}}))}})),r.length()&&e.push({type:"block",delta:r,attributes:{}}),e}createBlock(t,e){let r;const n={};Object.entries(t).forEach((t=>{let[e,i]=t;null!=this.query(e,u.Scope.BLOCK&u.Scope.BLOT)?r=e:n[e]=i}));const i=this.create(r||this.statics.defaultChild.blotName,r?t[r]:void 0);this.insertBefore(i,e||void 0);const o=i.length();return Object.entries(n).forEach((t=>{let[e,r]=t;i.formatAt(0,o,e,r)})),i}}function g(t,e,r){r.reduce(((e,r)=>{const n=h.Op.length(r);let o=r.attributes||{};if(null!=r.insert)if("string"==typeof r.insert){const n=r.insert;t.insertAt(e,n);const[s]=t.descendant(u.LeafBlot,e),l=(0,i.E2)(s);o=h.AttributeMap.diff(l,o)||{}}else if("object"==typeof r.insert){const n=Object.keys(r.insert)[0];if(null==n)return e;t.insertAt(e,n,r.insert[n]);if(null!=t.scroll.query(n,u.Scope.INLINE)){const[r]=t.descendant(u.LeafBlot,e),n=(0,i.E2)(r);o=h.AttributeMap.diff(n,o)||{}}}return Object.keys(o).forEach((r=>{t.formatAt(e,n,r,o[r])})),e+n}),e)}const b=f;var v=r(1696),y=r(9978),x=r(6067);class w extends x.Z{static DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};lastRecorded=0;ignoreChange=!1;stack={undo:[],redo:[]};currentRange=null;constructor(t,e){super(t,e),this.quill.on(n.ZP.events.EDITOR_CHANGE,((t,e,r,i)=>{t===n.ZP.events.SELECTION_CHANGE?e&&i!==n.ZP.sources.SILENT&&(this.currentRange=e):t===n.ZP.events.TEXT_CHANGE&&(this.ignoreChange||(this.options.userOnly&&i!==n.ZP.sources.USER?this.transform(e):this.record(e,r)),this.currentRange=q(this.currentRange,e))})),this.quill.keyboard.addBinding({key:"z",shortKey:!0},this.undo.bind(this)),this.quill.keyboard.addBinding({key:["z","Z"],shortKey:!0,shiftKey:!0},this.redo.bind(this)),/Win/i.test(navigator.platform)&&this.quill.keyboard.addBinding({key:"y",shortKey:!0},this.redo.bind(this)),this.quill.root.addEventListener("beforeinput",(t=>{"historyUndo"===t.inputType?(this.undo(),t.preventDefault()):"historyRedo"===t.inputType&&(this.redo(),t.preventDefault())}))}change(t,e){if(0===this.stack[t].length)return;const r=this.stack[t].pop();if(!r)return;const i=this.quill.getContents(),o=r.delta.invert(i);this.stack[e].push({delta:o,range:q(r.range,o)}),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(r.delta,n.ZP.sources.USER),this.ignoreChange=!1,this.restoreSelection(r)}clear(){this.stack={undo:[],redo:[]}}cutoff(){this.lastRecorded=0}record(t,e){if(0===t.ops.length)return;this.stack.redo=[];let r=t.invert(e),n=this.currentRange;const i=Date.now();if(this.lastRecorded+this.options.delay>i&&this.stack.undo.length>0){const t=this.stack.undo.pop();t&&(r=r.compose(t.delta),n=t.range)}else this.lastRecorded=i;0!==r.length()&&(this.stack.undo.push({delta:r,range:n}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift())}redo(){this.change("redo","undo")}transform(t){k(this.stack.undo,t),k(this.stack.redo,t)}undo(){this.change("undo","redo")}restoreSelection(t){if(t.range)this.quill.setSelection(t.range,n.ZP.sources.USER);else{const e=function(t,e){const r=e.reduce(((t,e)=>t+(e.delete||0)),0);let n=e.length()-r;(function(t,e){const r=e.ops[e.ops.length-1];if(null==r)return!1;if(null!=r.insert)return"string"==typeof r.insert&&r.insert.endsWith("\n");if(null!=r.attributes)return Object.keys(r.attributes).some((e=>null!=t.query(e,u.Scope.BLOCK)));return!1})(t,e)&&(n-=1);return n}(this.quill.scroll,t.delta);this.quill.setSelection(e,n.ZP.sources.USER)}}}function k(t,e){let r=e;for(let e=t.length-1;e>=0;e-=1){const n=t[e];t[e]={delta:r.transform(n.delta,!0),range:n.range&&q(n.range,r)},r=n.delta.transform(r),0===t[e].delta.length()&&t.splice(e,1)}}function q(t,e){if(!t)return t;const r=e.transformPosition(t.index);return{index:r,length:e.transformPosition(t.index+t.length)-r}}var _=r(9476);class S extends x.Z{constructor(t,e){super(t,e),t.root.addEventListener("drop",(e=>{e.preventDefault();let r=null;if(document.caretRangeFromPoint)r=document.caretRangeFromPoint(e.clientX,e.clientY);else if(document.caretPositionFromPoint){const t=document.caretPositionFromPoint(e.clientX,e.clientY);r=document.createRange(),r.setStart(t.offsetNode,t.offset),r.setEnd(t.offsetNode,t.offset)}const n=r&&t.selection.normalizeNative(r);if(n){const r=t.selection.normalizedToRange(n);e.dataTransfer?.files&&this.upload(r,e.dataTransfer.files)}}))}upload(t,e){const r=[];Array.from(e).forEach((t=>{t&&this.options.mimetypes?.includes(t.type)&&r.push(t)})),r.length>0&&this.options.handler.call(this,t,r)}}S.DEFAULTS={mimetypes:["image/png","image/jpeg"],handler(t,e){if(!this.quill.scroll.query("image"))return;const r=e.map((t=>new Promise((e=>{const r=new FileReader;r.onload=()=>{e(r.result)},r.readAsDataURL(t)}))));Promise.all(r).then((e=>{const r=e.reduce(((t,e)=>t.insert({image:e})),(new h).retain(t.index).delete(t.length));this.quill.updateContents(r,d.Z.sources.USER),this.quill.setSelection(t.index+e.length,d.Z.sources.SILENT)}))}};const A=S,N=["insertText","insertReplacementText"];class T extends x.Z{constructor(t,e){super(t,e),t.root.addEventListener("beforeinput",(t=>{this.handleBeforeInput(t)})),/Android/i.test(navigator.userAgent)||t.on(n.ZP.events.COMPOSITION_BEFORE_START,(()=>{this.handleCompositionStart()}))}deleteRange(t){(0,_.WQ)({range:t,quill:this.quill})}replaceText(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(0===t.length)return!1;if(e){const r=this.quill.getFormat(t.index,1);this.deleteRange(t),this.quill.updateContents((new h).retain(t.index).insert(e,r),n.ZP.sources.USER)}else this.deleteRange(t);return this.quill.setSelection(t.index+e.length,0,n.ZP.sources.SILENT),!0}handleBeforeInput(t){if(this.quill.composition.isComposing||t.defaultPrevented||!N.includes(t.inputType))return;const e=t.getTargetRanges?t.getTargetRanges()[0]:null;if(!e||!0===e.collapsed)return;const r=function(t){if("string"==typeof t.data)return t.data;if(t.dataTransfer?.types.includes("text/plain"))return t.dataTransfer.getData("text/plain");return null}(t);if(null==r)return;const n=this.quill.selection.normalizeNative(e),i=n?this.quill.selection.normalizedToRange(n):null;i&&this.replaceText(i,r)&&t.preventDefault()}handleCompositionStart(){const t=this.quill.getSelection();t&&this.replaceText(t)}}const E=T,L=/Mac/i.test(navigator.platform);class C extends x.Z{isListening=!1;selectionChangeDeadline=0;constructor(t,e){super(t,e),this.handleArrowKeys(),this.handleNavigationShortcuts()}handleArrowKeys(){this.quill.keyboard.addBinding({key:["ArrowLeft","ArrowRight"],offset:0,shiftKey:null,handler(t,e){let{line:r,event:i}=e;if(!(r instanceof u.ParentBlot&&r.uiNode))return!0;const o="rtl"===getComputedStyle(r.domNode).direction;return!!(o&&"ArrowRight"!==i.key||!o&&"ArrowLeft"!==i.key)||(this.quill.setSelection(t.index-1,t.length+(i.shiftKey?1:0),n.ZP.sources.USER),!1)}})}handleNavigationShortcuts(){this.quill.root.addEventListener("keydown",(t=>{!t.defaultPrevented&&(t=>"ArrowLeft"===t.key||"ArrowRight"===t.key||"ArrowUp"===t.key||"ArrowDown"===t.key||"Home"===t.key||!(!L||"a"!==t.key||!0!==t.ctrlKey))(t)&&this.ensureListeningToSelectionChange()}))}ensureListeningToSelectionChange(){if(this.selectionChangeDeadline=Date.now()+100,this.isListening)return;this.isListening=!0;document.addEventListener("selectionchange",(()=>{this.isListening=!1,Date.now()<=this.selectionChangeDeadline&&this.handleSelectionChange()}),{once:!0})}handleSelectionChange(){const t=document.getSelection();if(!t)return;const e=t.getRangeAt(0);if(!0!==e.collapsed||0!==e.startOffset)return;const r=this.quill.scroll.find(e.startContainer);if(!(r instanceof u.ParentBlot&&r.uiNode))return;const n=document.createRange();n.setStartAfter(r.uiNode),n.setEndAfter(r.uiNode),t.removeAllRanges(),t.addRange(n)}}const M=C;n.ZP.register({"blots/block":i.ZP,"blots/block/embed":i.i2,"blots/break":o.Z,"blots/container":s.Z,"blots/cursor":l.Z,"blots/embed":a.Z,"blots/inline":c.Z,"blots/scroll":b,"blots/text":v.Z,"modules/clipboard":y.ZP,"modules/history":w,"modules/keyboard":_.ZP,"modules/uploader":A,"modules/input":E,"modules/uiNode":M});const O=n.ZP},1637:(t,e,r)=>{"use strict";r.d(e,{Z:()=>s});var n=r(6729);var i=r(5743);const o=(0,r(3160).Z)("quill:events");["selectionchange","mousedown","mouseup","click"].forEach((t=>{document.addEventListener(t,(function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];Array.from(document.querySelectorAll(".ql-container")).forEach((t=>{const r=i.Z.get(t);r&&r.emitter&&r.emitter.handleDOM(...e)}))}))}));const s=class extends n{static events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_BLOT_MOUNT:"scroll-blot-mount",SCROLL_BLOT_UNMOUNT:"scroll-blot-unmount",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SCROLL_EMBED_UPDATE:"scroll-embed-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change",COMPOSITION_BEFORE_START:"composition-before-start",COMPOSITION_START:"composition-start",COMPOSITION_BEFORE_END:"composition-before-end",COMPOSITION_END:"composition-end"};static sources={API:"api",SILENT:"silent",USER:"user"};constructor(){super(),this.domListeners={},this.on("error",o.error)}emit(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return o.log.call(o,...e),super.emit(...e)}handleDOM(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];(this.domListeners[t.type]||[]).forEach((e=>{let{node:n,handler:i}=e;(t.target===n||n.contains(t.target))&&i(t,...r)}))}listenDOM(t,e,r){this.domListeners[t]||(this.domListeners[t]=[]),this.domListeners[t].push({node:e,handler:r})}}},5743:(t,e,r)=>{"use strict";r.d(e,{Z:()=>n});const n=new WeakMap},3160:(t,e,r)=>{"use strict";r.d(e,{Z:()=>l});const n=["error","warn","log","info"];let i="warn";function o(t){if(i&&n.indexOf(t)<=n.indexOf(i)){for(var e=arguments.length,r=new Array(e>1?e-1:0),o=1;o<e;o++)r[o-1]=arguments[o];console[t](...r)}}function s(t){return n.reduce(((e,r)=>(e[r]=o.bind(console,r,t),e)),{})}s.level=t=>{i=t},o.level=s.level;const l=s},6067:(t,e,r)=>{"use strict";r.d(e,{Z:()=>n});const n=class{static DEFAULTS={};constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.quill=t,this.options=e}}},4904:(t,e,r)=>{"use strict";r.d(e,{wK:()=>i,e6:()=>d.e,ZP:()=>P});var n=r(5575),i=r(371),o=r(8895),s=r(2303),l=r(9469),a=r(8417),c=r(2610),u=r(4827),h=r(1696),d=r(936);const p=/^[ -~]*$/;function m(t,e,r){if(0===t.length){const[t]=b(r.pop());return e<=0?`</li></${t}>`:`</li></${t}>${m([],e-1,r)}`}const[{child:n,offset:i,length:o,indent:s,type:l},...a]=t,[c,u]=b(l);if(s>e)return r.push(l),s===e+1?`<${c}><li${u}>${f(n,i,o)}${m(a,s,r)}`:`<${c}><li>${m(t,e+1,r)}`;const h=r[r.length-1];if(s===e&&l===h)return`</li><li${u}>${f(n,i,o)}${m(a,s,r)}`;const[d]=b(r.pop());return`</li></${d}>${m(t,e-1,r)}`}function f(t,e,r){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("html"in t&&"function"==typeof t.html)return t.html(e,r);if(t instanceof h.Z)return(0,h.b)(t.value().slice(e,e+r));if(t instanceof i.ParentBlot){if("list-container"===t.statics.blotName){const n=[];return t.children.forEachAt(e,r,((t,e,r)=>{const i="formats"in t&&"function"==typeof t.formats?t.formats():{};n.push({child:t,offset:e,length:r,indent:i.indent||0,type:i.list})})),m(n,-1,[])}const i=[];if(t.children.forEachAt(e,r,((t,e,r)=>{i.push(f(t,e,r))})),n||"list"===t.statics.blotName)return i.join("");const{outerHTML:o,innerHTML:s}=t.domNode,[l,a]=o.split(`>${s}<`);return"<table"===l?`<table style="border: 1px solid #000;">${i.join("")}<${a}`:`${l}>${i.join("")}<${a}`}return t.domNode instanceof Element?t.domNode.outerHTML:""}function g(t,e){return Object.keys(e).reduce(((r,n)=>{if(null==t[n])return r;const i=e[n];return i===t[n]?r[n]=i:Array.isArray(i)?i.indexOf(t[n])<0?r[n]=i.concat([t[n]]):r[n]=i:r[n]=[i,t[n]],r}),{})}function b(t){const e="ordered"===t?"ol":"ul";switch(t){case"checked":return[e,' data-list="checked"'];case"unchecked":return[e,' data-list="unchecked"'];default:return[e,""]}}function v(t){return t.reduce(((t,e)=>{if("string"==typeof e.insert){const r=e.insert.replace(/\r\n/g,"\n").replace(/\r/g,"\n");return t.insert(r,e.attributes)}return t.push(e)}),new o)}function y(t,e){let{index:r,length:n}=t;return new d.e(r+e,n)}const x=class{constructor(t){this.scroll=t,this.delta=this.getDelta()}applyDelta(t){this.scroll.update();let e=this.scroll.length();this.scroll.batchStart();const r=v(t),s=new o;return function(t){const e=[];return t.forEach((t=>{if("string"==typeof t.insert){t.insert.split("\n").forEach(((r,n)=>{n&&e.push({insert:"\n",attributes:t.attributes}),r&&e.push({insert:r,attributes:t.attributes})}))}else e.push(t)})),e}(r.ops.slice()).reduce(((t,r)=>{const l=o.Op.length(r);let c=r.attributes||{},u=!1,d=!1;if(null!=r.insert){if(s.retain(l),"string"==typeof r.insert){const s=r.insert;d=!s.endsWith("\n")&&(e<=t||!!this.scroll.descendant(a.i2,t)[0]),this.scroll.insertAt(t,s);const[l,u]=this.scroll.line(t);let h=(0,n.Z)({},(0,a.E2)(l));if(l instanceof a.ZP){const[t]=l.descendant(i.LeafBlot,u);t&&(h=(0,n.Z)(h,(0,a.E2)(t)))}c=o.AttributeMap.diff(h,c)||{}}else if("object"==typeof r.insert){const s=Object.keys(r.insert)[0];if(null==s)return t;const l=null!=this.scroll.query(s,i.Scope.INLINE);if(l)(e<=t||this.scroll.descendant(a.i2,t)[0])&&(d=!0);else if(t>0){const[e,r]=this.scroll.descendant(i.LeafBlot,t-1);if(e instanceof h.Z){"\n"!==e.value()[r]&&(u=!0)}else e instanceof i.EmbedBlot&&e.statics.scope===i.Scope.INLINE_BLOT&&(u=!0)}if(this.scroll.insertAt(t,s,r.insert[s]),l){const[e]=this.scroll.descendant(i.LeafBlot,t);if(e){const t=(0,n.Z)({},(0,a.E2)(e));c=o.AttributeMap.diff(t,c)||{}}}}e+=l}else if(s.push(r),null!==r.retain&&"object"==typeof r.retain){const e=Object.keys(r.retain)[0];if(null==e)return t;this.scroll.updateEmbedAt(t,e,r.retain[e])}Object.keys(c).forEach((e=>{this.scroll.formatAt(t,l,e,c[e])}));const p=u?1:0,m=d?1:0;return e+=p+m,s.retain(p),s.delete(m),t+l+p+m}),0),s.reduce(((t,e)=>"number"==typeof e.delete?(this.scroll.deleteAt(t,e.delete),t):t+o.Op.length(e)),0),this.scroll.batchEnd(),this.scroll.optimize(),this.update(r)}deleteText(t,e){return this.scroll.deleteAt(t,e),this.update((new o).retain(t).delete(e))}formatLine(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.scroll.update(),Object.keys(r).forEach((n=>{this.scroll.lines(t,Math.max(e,1)).forEach((t=>{t.format(n,r[n])}))})),this.scroll.optimize();const n=(new o).retain(t).retain(e,(0,s.Z)(r));return this.update(n)}formatText(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.keys(r).forEach((n=>{this.scroll.formatAt(t,e,n,r[n])}));const n=(new o).retain(t).retain(e,(0,s.Z)(r));return this.update(n)}getContents(t,e){return this.delta.slice(t,t+e)}getDelta(){return this.scroll.lines().reduce(((t,e)=>t.concat(e.delta())),new o)}getFormat(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=[],n=[];0===e?this.scroll.path(t).forEach((t=>{const[e]=t;e instanceof a.ZP?r.push(e):e instanceof i.LeafBlot&&n.push(e)})):(r=this.scroll.lines(t,e),n=this.scroll.descendants(i.LeafBlot,t,e));const[o,s]=[r,n].map((t=>{const e=t.shift();if(null==e)return{};let r=(0,a.E2)(e);for(;Object.keys(r).length>0;){const e=t.shift();if(null==e)return r;r=g((0,a.E2)(e),r)}return r}));return{...o,...s}}getHTML(t,e){const[r,n]=this.scroll.line(t);if(r){const i=r.length();return!(r.length()>=n+e)||0===n&&e===i?f(this.scroll,t,e,!0):f(r,n,e,!0)}return""}getText(t,e){return this.getContents(t,e).filter((t=>"string"==typeof t.insert)).map((t=>t.insert)).join("")}insertContents(t,e){const r=v(e),n=(new o).retain(t).concat(r);return this.scroll.insertContents(t,r),this.update(n)}insertEmbed(t,e,r){return this.scroll.insertAt(t,e,r),this.update((new o).retain(t).insert({[e]:r}))}insertText(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e=e.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(t,e),Object.keys(r).forEach((n=>{this.scroll.formatAt(t,e.length,n,r[n])})),this.update((new o).retain(t).insert(e,(0,s.Z)(r)))}isBlank(){if(0===this.scroll.children.length)return!0;if(this.scroll.children.length>1)return!1;const t=this.scroll.children.head;if(t?.statics.blotName!==a.ZP.blotName)return!1;const e=t;return!(e.children.length>1)&&e.children.head instanceof c.Z}removeFormat(t,e){const r=this.getText(t,e),[n,i]=this.scroll.line(t+e);let s=0,l=new o;null!=n&&(s=n.length()-i,l=n.delta().slice(i,i+s-1).insert("\n"));const a=this.getContents(t,e+s).diff((new o).insert(r).concat(l)),c=(new o).retain(t).concat(a);return this.applyDelta(c)}update(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;const n=this.delta;if(1===e.length&&"characterData"===e[0].type&&e[0].target.data.match(p)&&this.scroll.find(e[0].target)){const i=this.scroll.find(e[0].target),s=(0,a.E2)(i),l=i.offset(this.scroll),c=e[0].oldValue.replace(u.Z.CONTENTS,""),h=(new o).insert(c),d=(new o).insert(i.value()),p=r&&{oldRange:y(r.oldRange,-l),newRange:y(r.newRange,-l)};t=(new o).retain(l).concat(h.diff(d,p)).reduce(((t,e)=>e.insert?t.insert(e.insert,s):t.push(e)),new o),this.delta=n.compose(t)}else this.delta=this.getDelta(),t&&(0,l.Z)(n.compose(t),this.delta)||(t=n.diff(this.delta,r));return t}};var w=r(1637),k=r(5743),q=r(3160),_=r(6067),S=r(6406);const A=class{isComposing=!1;constructor(t,e){this.scroll=t,this.emitter=e,this.setupListeners()}setupListeners(){this.scroll.domNode.addEventListener("compositionstart",(t=>{this.isComposing||this.handleCompositionStart(t)})),this.scroll.domNode.addEventListener("compositionend",(t=>{this.isComposing&&queueMicrotask((()=>{this.handleCompositionEnd(t)}))}))}handleCompositionStart(t){const e=t.target instanceof Node?this.scroll.find(t.target,!0):null;!e||e instanceof S.Z||(this.emitter.emit(w.Z.events.COMPOSITION_BEFORE_START,t),this.scroll.batchStart(),this.emitter.emit(w.Z.events.COMPOSITION_START,t),this.isComposing=!0)}handleCompositionEnd(t){this.emitter.emit(w.Z.events.COMPOSITION_BEFORE_END,t),this.scroll.batchEnd(),this.emitter.emit(w.Z.events.COMPOSITION_END,t),this.isComposing=!1}};var N=r(625);const T=t=>{const e=t.getBoundingClientRect(),r="offsetWidth"in t&&Math.abs(e.width)/t.offsetWidth||1,n="offsetHeight"in t&&Math.abs(e.height)/t.offsetHeight||1;return{top:e.top,right:e.left+t.clientWidth*r,bottom:e.top+t.clientHeight*n,left:e.left}},E=t=>{const e=parseInt(t,10);return Number.isNaN(e)?0:e},L=(t,e,r,n,i,o)=>t<r&&e>n?0:t<r?-(r-t+i):e>n?e-t>n-r?t+i-r:e-n+o:0,C=(t,e)=>{const r=t.ownerDocument;let n=e,i=t;for(;i;){const t=i===r.body,e=t?{top:0,right:window.visualViewport?.width??r.documentElement.clientWidth,bottom:window.visualViewport?.height??r.documentElement.clientHeight,left:0}:T(i),s=getComputedStyle(i),l=L(n.left,n.right,e.left,e.right,E(s.scrollPaddingLeft),E(s.scrollPaddingRight)),a=L(n.top,n.bottom,e.top,e.bottom,E(s.scrollPaddingTop),E(s.scrollPaddingBottom));if(l||a)if(t)r.defaultView?.scrollBy(l,a);else{const{scrollLeft:t,scrollTop:e}=i;a&&(i.scrollTop+=a),l&&(i.scrollLeft+=l);const r=i.scrollLeft-t,o=i.scrollTop-e;n={left:n.left-r,top:n.top-o,right:n.right-r,bottom:n.bottom-o}}i=t||"fixed"===s.position?null:(o=i).parentElement||o.getRootNode().host||null}var o},M=["block","break","cursor","inline","scroll","text"],O=(t,e,r)=>{const n=new i.Registry;return M.forEach((t=>{const r=e.query(t);r&&n.register(r)})),t.forEach((t=>{let i=e.query(t);i||r.error(`Cannot register "${t}" specified in "formats" config. Are you sure it was registered?`);let o=0;for(;i;)if(n.register(i),i="blotName"in i?i.requiredContainer??null:null,o+=1,o>100){r.error(`Cycle detected in registering blot requiredContainer: "${t}"`);break}})),n},B=(0,q.Z)("quill"),z=new i.Registry;i.ParentBlot.uiClass="ql-ui";class P{static DEFAULTS={bounds:null,modules:{clipboard:!0,keyboard:!0,history:!0,uploader:!0},placeholder:"",readOnly:!1,registry:z,theme:"default"};static events=w.Z.events;static sources=w.Z.sources;static version="2.0.2";static imports={delta:o,parchment:i,"core/module":_.Z,"core/theme":N.Z};static debug(t){!0===t&&(t="log"),q.Z.level(t)}static find(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return k.Z.get(t)||z.find(t,e)}static import(t){return null==this.imports[t]&&B.error(`Cannot import ${t}. Are you sure it was registered?`),this.imports[t]}static register(){if("string"!=typeof(arguments.length<=0?void 0:arguments[0])){const t=arguments.length<=0?void 0:arguments[0],e=!!(arguments.length<=1?void 0:arguments[1]),r="attrName"in t?t.attrName:t.blotName;"string"==typeof r?this.register(`formats/${r}`,t,e):Object.keys(t).forEach((r=>{this.register(r,t[r],e)}))}else{const t=arguments.length<=0?void 0:arguments[0],e=arguments.length<=1?void 0:arguments[1],r=!!(arguments.length<=2?void 0:arguments[2]);null==this.imports[t]||r||B.warn(`Overwriting ${t} with`,e),this.imports[t]=e,(t.startsWith("blots/")||t.startsWith("formats/"))&&e&&"boolean"!=typeof e&&"abstract"!==e.blotName&&z.register(e),"function"==typeof e.register&&e.register(z)}}constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.options=function(t,e){const r=R(t);if(!r)throw new Error("Invalid Quill container");const i=!e.theme||e.theme===P.DEFAULTS.theme,o=i?N.Z:P.import(`themes/${e.theme}`);if(!o)throw new Error(`Invalid theme ${e.theme}. Did you register it?`);const{modules:s,...l}=P.DEFAULTS,{modules:a,...c}=o.DEFAULTS;let u=Z(e.modules);null!=u&&u.toolbar&&u.toolbar.constructor!==Object&&(u={...u,toolbar:{container:u.toolbar}});const h=(0,n.Z)({},Z(s),Z(a),u),d={...l,...I(c),...I(e)};let p=e.registry;p?e.formats&&B.warn('Ignoring "formats" option because "registry" is specified'):p=e.formats?O(e.formats,d.registry,B):d.registry;return{...d,registry:p,container:r,theme:o,modules:Object.entries(h).reduce(((t,e)=>{let[r,i]=e;if(!i)return t;const o=P.import(`modules/${r}`);return null==o?(B.error(`Cannot load ${r} module. Are you sure you registered it?`),t):{...t,[r]:(0,n.Z)({},o.DEFAULTS||{},i)}}),{}),bounds:R(d.bounds)}}(t,e),this.container=this.options.container,null==this.container)return void B.error("Invalid Quill container",t);this.options.debug&&P.debug(this.options.debug);const r=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",k.Z.set(this.container,this),this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.emitter=new w.Z;const s=i.ScrollBlot.blotName,l=this.options.registry.query(s);if(!l||!("blotName"in l))throw new Error(`Cannot initialize Quill without "${s}" blot`);if(this.scroll=new l(this.options.registry,this.root,{emitter:this.emitter}),this.editor=new x(this.scroll),this.selection=new d.Z(this.scroll,this.emitter),this.composition=new A(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.uploader=this.theme.addModule("uploader"),this.theme.addModule("input"),this.theme.addModule("uiNode"),this.theme.init(),this.emitter.on(w.Z.events.EDITOR_CHANGE,(t=>{t===w.Z.events.TEXT_CHANGE&&this.root.classList.toggle("ql-blank",this.editor.isBlank())})),this.emitter.on(w.Z.events.SCROLL_UPDATE,((t,e)=>{const r=this.selection.lastRange,[n]=this.selection.getRange(),i=r&&n?{oldRange:r,newRange:n}:void 0;j.call(this,(()=>this.editor.update(null,e,i)),t)})),this.emitter.on(w.Z.events.SCROLL_EMBED_UPDATE,((t,e)=>{const r=this.selection.lastRange,[n]=this.selection.getRange(),i=r&&n?{oldRange:r,newRange:n}:void 0;j.call(this,(()=>{const r=(new o).retain(t.offset(this)).retain({[t.statics.blotName]:e});return this.editor.update(r,[],i)}),P.sources.USER)})),r){const t=this.clipboard.convert({html:`${r}<p><br></p>`,text:"\n"});this.setContents(t)}this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable(),this.allowReadOnlyEdits=!1}addContainer(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof t){const e=t;(t=document.createElement("div")).classList.add(e)}return this.container.insertBefore(t,e),t}blur(){this.selection.setRange(null)}deleteText(t,e,r){return[t,e,,r]=H(t,e,r),j.call(this,(()=>this.editor.deleteText(t,e)),r,t,-1*e)}disable(){this.enable(!1)}editReadOnly(t){this.allowReadOnlyEdits=!0;const e=t();return this.allowReadOnlyEdits=!1,e}enable(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.scroll.enable(t),this.container.classList.toggle("ql-disabled",!t)}focus(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.selection.focus(),t.preventScroll||this.scrollSelectionIntoView()}format(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:w.Z.sources.API;return j.call(this,(()=>{const r=this.getSelection(!0);let n=new o;if(null==r)return n;if(this.scroll.query(t,i.Scope.BLOCK))n=this.editor.formatLine(r.index,r.length,{[t]:e});else{if(0===r.length)return this.selection.format(t,e),n;n=this.editor.formatText(r.index,r.length,{[t]:e})}return this.setSelection(r,w.Z.sources.SILENT),n}),r)}formatLine(t,e,r,n,i){let o;return[t,e,o,i]=H(t,e,r,n,i),j.call(this,(()=>this.editor.formatLine(t,e,o)),i,t,0)}formatText(t,e,r,n,i){let o;return[t,e,o,i]=H(t,e,r,n,i),j.call(this,(()=>this.editor.formatText(t,e,o)),i,t,0)}getBounds(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=null;if(r="number"==typeof t?this.selection.getBounds(t,e):this.selection.getBounds(t.index,t.length),!r)return null;const n=this.container.getBoundingClientRect();return{bottom:r.bottom-n.top,height:r.height,left:r.left-n.left,right:r.right-n.left,top:r.top-n.top,width:r.width}}getContents(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-t;return[t,e]=H(t,e),this.editor.getContents(t,e)}getFormat(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getSelection(!0),e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"number"==typeof t?this.editor.getFormat(t,e):this.editor.getFormat(t.index,t.length)}getIndex(t){return t.offset(this.scroll)}getLength(){return this.scroll.length()}getLeaf(t){return this.scroll.leaf(t)}getLine(t){return this.scroll.line(t)}getLines(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return"number"!=typeof t?this.scroll.lines(t.index,t.length):this.scroll.lines(t,e)}getModule(t){return this.theme.modules[t]}getSelection(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&this.focus(),this.update(),this.selection.getRange()[0]}getSemanticHTML(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1?arguments[1]:void 0;return"number"==typeof t&&(e=e??this.getLength()-t),[t,e]=H(t,e),this.editor.getHTML(t,e)}getText(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1?arguments[1]:void 0;return"number"==typeof t&&(e=e??this.getLength()-t),[t,e]=H(t,e),this.editor.getText(t,e)}hasFocus(){return this.selection.hasFocus()}insertEmbed(t,e,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:P.sources.API;return j.call(this,(()=>this.editor.insertEmbed(t,e,r)),n,t)}insertText(t,e,r,n,i){let o;return[t,,o,i]=H(t,0,r,n,i),j.call(this,(()=>this.editor.insertText(t,e,o)),i,t,e.length)}isEnabled(){return this.scroll.isEnabled()}off(){return this.emitter.off(...arguments)}on(){return this.emitter.on(...arguments)}once(){return this.emitter.once(...arguments)}removeFormat(t,e,r){return[t,e,,r]=H(t,e,r),j.call(this,(()=>this.editor.removeFormat(t,e)),r,t)}scrollRectIntoView(t){C(this.root,t)}scrollIntoView(){console.warn("Quill#scrollIntoView() has been deprecated and will be removed in the near future. Please use Quill#scrollSelectionIntoView() instead."),this.scrollSelectionIntoView()}scrollSelectionIntoView(){const t=this.selection.lastRange,e=t&&this.selection.getBounds(t.index,t.length);e&&this.scrollRectIntoView(e)}setContents(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:w.Z.sources.API;return j.call(this,(()=>{t=new o(t);const e=this.getLength(),r=this.editor.deleteText(0,e),n=this.editor.insertContents(0,t),i=this.editor.deleteText(this.getLength()-1,1);return r.compose(n).compose(i)}),e)}setSelection(t,e,r){null==t?this.selection.setRange(null,e||P.sources.API):([t,e,,r]=H(t,e,r),this.selection.setRange(new d.e(Math.max(0,t),e),r),r!==w.Z.sources.SILENT&&this.scrollSelectionIntoView())}setText(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:w.Z.sources.API;const r=(new o).insert(t);return this.setContents(r,e)}update(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:w.Z.sources.USER;const e=this.scroll.update(t);return this.selection.update(t),e}updateContents(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:w.Z.sources.API;return j.call(this,(()=>(t=new o(t),this.editor.applyDelta(t))),e,!0)}}function R(t){return"string"==typeof t?document.querySelector(t):t}function Z(t){return Object.entries(t??{}).reduce(((t,e)=>{let[r,n]=e;return{...t,[r]:!0===n?{}:n}}),{})}function I(t){return Object.fromEntries(Object.entries(t).filter((t=>void 0!==t[1])))}function j(t,e,r,n){if(!this.isEnabled()&&e===w.Z.sources.USER&&!this.allowReadOnlyEdits)return new o;let i=null==r?null:this.getSelection();const s=this.editor.delta,l=t();if(null!=i&&(!0===r&&(r=i.index),null==n?i=D(i,l,e):0!==n&&(i=D(i,r,n,e)),this.setSelection(i,w.Z.sources.SILENT)),l.length()>0){const t=[w.Z.events.TEXT_CHANGE,l,s,e];this.emitter.emit(w.Z.events.EDITOR_CHANGE,...t),e!==w.Z.sources.SILENT&&this.emitter.emit(...t)}return l}function H(t,e,r,n,i){let o={};return"number"==typeof t.index&&"number"==typeof t.length?"number"!=typeof e?(i=n,n=r,r=e,e=t.length,t=t.index):(e=t.length,t=t.index):"number"!=typeof e&&(i=n,n=r,r=e,e=0),"object"==typeof r?(o=r,i=n):"string"==typeof r&&(null!=n?o[r]=n:i=r),[t,e,o,i=i||w.Z.sources.API]}function D(t,e,r,n){const i="number"==typeof r?r:0;if(null==t)return null;let o,s;return e&&"function"==typeof e.transformPosition?[o,s]=[t.index,t.index+t.length].map((t=>e.transformPosition(t,n!==w.Z.sources.USER))):[o,s]=[t.index,t.index+t.length].map((t=>t<e||t===e&&n===w.Z.sources.USER?t:i>=0?t+i:Math.max(e,t+i))),new d.e(o,s-o)}},936:(t,e,r)=>{"use strict";r.d(e,{Z:()=>u,e:()=>a});var n=r(371),i=r(9469),o=r(2303),s=r(1637);const l=(0,r(3160).Z)("quill:selection");class a{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.index=t,this.length=e}}function c(t,e){try{e.parentNode}catch(t){return!1}return t.contains(e)}const u=class{constructor(t,e){this.emitter=e,this.scroll=t,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=this.scroll.create("cursor",this),this.savedRange=new a(0,0),this.lastRange=this.savedRange,this.lastNative=null,this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,(()=>{this.mouseDown||this.composing||setTimeout(this.update.bind(this,s.Z.sources.USER),1)})),this.emitter.on(s.Z.events.SCROLL_BEFORE_UPDATE,(()=>{if(!this.hasFocus())return;const t=this.getNativeRange();null!=t&&t.start.node!==this.cursor.textNode&&this.emitter.once(s.Z.events.SCROLL_UPDATE,((e,r)=>{try{this.root.contains(t.start.node)&&this.root.contains(t.end.node)&&this.setNativeRange(t.start.node,t.start.offset,t.end.node,t.end.offset);const n=r.some((t=>"characterData"===t.type||"childList"===t.type||"attributes"===t.type&&t.target===this.root));this.update(n?s.Z.sources.SILENT:e)}catch(t){}}))})),this.emitter.on(s.Z.events.SCROLL_OPTIMIZE,((t,e)=>{if(e.range){const{startNode:t,startOffset:r,endNode:n,endOffset:i}=e.range;this.setNativeRange(t,r,n,i),this.update(s.Z.sources.SILENT)}})),this.update(s.Z.sources.SILENT)}handleComposition(){this.emitter.on(s.Z.events.COMPOSITION_BEFORE_START,(()=>{this.composing=!0})),this.emitter.on(s.Z.events.COMPOSITION_END,(()=>{if(this.composing=!1,this.cursor.parent){const t=this.cursor.restore();if(!t)return;setTimeout((()=>{this.setNativeRange(t.startNode,t.startOffset,t.endNode,t.endOffset)}),1)}}))}handleDragging(){this.emitter.listenDOM("mousedown",document.body,(()=>{this.mouseDown=!0})),this.emitter.listenDOM("mouseup",document.body,(()=>{this.mouseDown=!1,this.update(s.Z.sources.USER)}))}focus(){this.hasFocus()||(this.root.focus({preventScroll:!0}),this.setRange(this.savedRange))}format(t,e){this.scroll.update();const r=this.getNativeRange();if(null!=r&&r.native.collapsed&&!this.scroll.query(t,n.Scope.BLOCK)){if(r.start.node!==this.cursor.textNode){const t=this.scroll.find(r.start.node,!1);if(null==t)return;if(t instanceof n.LeafBlot){const e=t.split(r.start.offset);t.parent.insertBefore(this.cursor,e)}else t.insertBefore(this.cursor,r.start.node);this.cursor.attach()}this.cursor.format(t,e),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}getBounds(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const r=this.scroll.length();let n;t=Math.min(t,r-1),e=Math.min(t+e,r-1)-t;let[i,o]=this.scroll.leaf(t);if(null==i)return null;if(e>0&&o===i.length()){const[e]=this.scroll.leaf(t+1);if(e){const[r]=this.scroll.line(t),[n]=this.scroll.line(t+1);r===n&&(i=e,o=0)}}[n,o]=i.position(o,!0);const s=document.createRange();if(e>0)return s.setStart(n,o),[i,o]=this.scroll.leaf(t+e),null==i?null:([n,o]=i.position(o,!0),s.setEnd(n,o),s.getBoundingClientRect());let l,a="left";if(n instanceof Text){if(!n.data.length)return null;o<n.data.length?(s.setStart(n,o),s.setEnd(n,o+1)):(s.setStart(n,o-1),s.setEnd(n,o),a="right"),l=s.getBoundingClientRect()}else{if(!(i.domNode instanceof Element))return null;l=i.domNode.getBoundingClientRect(),o>0&&(a="right")}return{bottom:l.top+l.height,height:l.height,left:l[a],right:l[a],top:l.top,width:0}}getNativeRange(){const t=document.getSelection();if(null==t||t.rangeCount<=0)return null;const e=t.getRangeAt(0);if(null==e)return null;const r=this.normalizeNative(e);return l.info("getNativeRange",r),r}getRange(){const t=this.scroll.domNode;if("isConnected"in t&&!t.isConnected)return[null,null];const e=this.getNativeRange();if(null==e)return[null,null];return[this.normalizedToRange(e),e]}hasFocus(){return document.activeElement===this.root||null!=document.activeElement&&c(this.root,document.activeElement)}normalizedToRange(t){const e=[[t.start.node,t.start.offset]];t.native.collapsed||e.push([t.end.node,t.end.offset]);const r=e.map((t=>{const[e,r]=t,i=this.scroll.find(e,!0),o=i.offset(this.scroll);return 0===r?o:i instanceof n.LeafBlot?o+i.index(e,r):o+i.length()})),i=Math.min(Math.max(...r),this.scroll.length()-1),o=Math.min(i,...r);return new a(o,i-o)}normalizeNative(t){if(!c(this.root,t.startContainer)||!t.collapsed&&!c(this.root,t.endContainer))return null;const e={start:{node:t.startContainer,offset:t.startOffset},end:{node:t.endContainer,offset:t.endOffset},native:t};return[e.start,e.end].forEach((t=>{let{node:e,offset:r}=t;for(;!(e instanceof Text)&&e.childNodes.length>0;)if(e.childNodes.length>r)e=e.childNodes[r],r=0;else{if(e.childNodes.length!==r)break;e=e.lastChild,r=e instanceof Text?e.data.length:e.childNodes.length>0?e.childNodes.length:e.childNodes.length+1}t.node=e,t.offset=r})),e}rangeToNative(t){const e=this.scroll.length(),r=(t,r)=>{t=Math.min(e-1,t);const[n,i]=this.scroll.leaf(t);return n?n.position(i,r):[null,-1]};return[...r(t.index,!1),...r(t.index+t.length,!0)]}setNativeRange(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e,i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(l.info("setNativeRange",t,e,r,n),null!=t&&(null==this.root.parentNode||null==t.parentNode||null==r.parentNode))return;const o=document.getSelection();if(null!=o)if(null!=t){this.hasFocus()||this.root.focus({preventScroll:!0});const{native:s}=this.getNativeRange()||{};if(null==s||i||t!==s.startContainer||e!==s.startOffset||r!==s.endContainer||n!==s.endOffset){t instanceof Element&&"BR"===t.tagName&&(e=Array.from(t.parentNode.childNodes).indexOf(t),t=t.parentNode),r instanceof Element&&"BR"===r.tagName&&(n=Array.from(r.parentNode.childNodes).indexOf(r),r=r.parentNode);const i=document.createRange();i.setStart(t,e),i.setEnd(r,n),o.removeAllRanges(),o.addRange(i)}}else o.removeAllRanges(),this.root.blur()}setRange(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s.Z.sources.API;if("string"==typeof e&&(r=e,e=!1),l.info("setRange",t),null!=t){const r=this.rangeToNative(t);this.setNativeRange(...r,e)}else this.setNativeRange(null);this.update(r)}update(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s.Z.sources.USER;const e=this.lastRange,[r,n]=this.getRange();if(this.lastRange=r,this.lastNative=n,null!=this.lastRange&&(this.savedRange=this.lastRange),!(0,i.Z)(e,this.lastRange)){if(!this.composing&&null!=n&&n.native.collapsed&&n.start.node!==this.cursor.textNode){const t=this.cursor.restore();t&&this.setNativeRange(t.startNode,t.startOffset,t.endNode,t.endOffset)}const r=[s.Z.events.SELECTION_CHANGE,(0,o.Z)(this.lastRange),(0,o.Z)(e),t];this.emitter.emit(s.Z.events.EDITOR_CHANGE,...r),t!==s.Z.sources.SILENT&&this.emitter.emit(...r)}}}},625:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});class n{static DEFAULTS={modules:{}};static themes={default:n};modules={};constructor(t,e){this.quill=t,this.options=e}init(){Object.keys(this.options.modules).forEach((t=>{null==this.modules[t]&&this.addModule(t)}))}addModule(t){const e=this.quill.constructor.import(`modules/${t}`);return this.modules[t]=new e(this.quill,this.options.modules[t]||{}),this.modules[t]}}const i=n},7028:(t,e,r)=>{"use strict";r.d(e,{HE:()=>l,dk:()=>s,if:()=>o});var n=r(371);const i={scope:n.Scope.BLOCK,whitelist:["right","center","justify"]},o=new n.Attributor("align","align",i),s=new n.ClassAttributor("align","ql-align",i),l=new n.StyleAttributor("align","text-align",i)},1195:(t,e,r)=>{"use strict";r.d(e,{Y:()=>o,w:()=>s});var n=r(371),i=r(9649);const o=new n.ClassAttributor("background","ql-bg",{scope:n.Scope.INLINE}),s=new i.OO("background","background-color",{scope:n.Scope.INLINE})},4489:(t,e,r)=>{"use strict";r.d(e,{Z:()=>o});var n=r(1276);class i extends n.Z{static blotName="bold";static tagName=["STRONG","B"];static create(){return super.create()}static formats(){return!0}optimize(t){super.optimize(t),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}const o=i},4453:(t,e,r)=>{"use strict";r.d(e,{EK:()=>d,ZP:()=>h,se:()=>u});var n=r(8417),i=r(2610),o=r(4827),s=r(1276),l=r(1696),a=r(8188),c=r(4904);class u extends a.Z{static create(t){const e=super.create(t);return e.setAttribute("spellcheck","false"),e}code(t,e){return this.children.map((t=>t.length()<=1?"":t.domNode.innerText)).join("\n").slice(t,t+e)}html(t,e){return`<pre>\n${(0,l.b)(this.code(t,e))}\n</pre>`}}class h extends n.ZP{static TAB=" ";static register(){c.ZP.register(u)}}class d extends s.Z{}d.blotName="code",d.tagName="CODE",h.blotName="code-block",h.className="ql-code-block",h.tagName="DIV",u.blotName="code-block-container",u.className="ql-code-block-container",u.tagName="DIV",u.allowedChildren=[h],h.allowedChildren=[l.Z,i.Z,o.Z],h.requiredContainer=u},9649:(t,e,r)=>{"use strict";r.d(e,{HQ:()=>s,Hn:()=>o,OO:()=>i});var n=r(371);class i extends n.StyleAttributor{value(t){let e=super.value(t);if(!e.startsWith("rgb("))return e;e=e.replace(/^[^\d]+/,"").replace(/[^\d]+$/,"");return`#${e.split(",").map((t=>`00${parseInt(t,10).toString(16)}`.slice(-2))).join("")}`}}const o=new n.ClassAttributor("color","ql-color",{scope:n.Scope.INLINE}),s=new i("color","color",{scope:n.Scope.INLINE})},4566:(t,e,r)=>{"use strict";r.d(e,{H8:()=>l,IF:()=>o,hY:()=>s});var n=r(371);const i={scope:n.Scope.BLOCK,whitelist:["rtl"]},o=new n.Attributor("direction","dir",i),s=new n.ClassAttributor("direction","ql-direction",i),l=new n.StyleAttributor("direction","direction",i)},8746:(t,e,r)=>{"use strict";r.d(e,{H:()=>l,_:()=>o});var n=r(371);const i={scope:n.Scope.INLINE,whitelist:["serif","monospace"]},o=new n.ClassAttributor("font","ql-font",i);class s extends n.StyleAttributor{value(t){return super.value(t).replace(/["']/g,"")}}const l=new s("font","font-family",i)},2589:(t,e,r)=>{"use strict";r.d(e,{Z:()=>o});var n=r(6406);class i extends n.Z{static blotName="formula";static className="ql-formula";static tagName="SPAN";static create(t){if(null==window.katex)throw new Error("Formula module requires KaTeX.");const e=super.create(t);return"string"==typeof t&&(window.katex.render(t,e,{throwOnError:!1,errorColor:"#f00"}),e.setAttribute("data-value",t)),e}static value(t){return t.getAttribute("data-value")}html(){const{formula:t}=this.value();return`<span>${t}</span>`}}const o=i},7363:(t,e,r)=>{"use strict";r.d(e,{Z:()=>o});var n=r(4489);class i extends n.Z{static blotName="italic";static tagName=["EM","I"]}const o=i},1487:(t,e,r)=>{"use strict";r.d(e,{N:()=>o,Z:()=>i});var n=r(1276);class i extends n.Z{static blotName="link";static tagName="A";static SANITIZED_URL="about:blank";static PROTOCOL_WHITELIST=["http","https","mailto","tel","sms"];static create(t){const e=super.create(t);return e.setAttribute("href",this.sanitize(t)),e.setAttribute("rel","noopener noreferrer"),e.setAttribute("target","_blank"),e}static formats(t){return t.getAttribute("href")}static sanitize(t){return o(t,this.PROTOCOL_WHITELIST)?t:this.SANITIZED_URL}format(t,e){t===this.statics.blotName&&e?this.domNode.setAttribute("href",this.constructor.sanitize(e)):super.format(t,e)}}function o(t,e){const r=document.createElement("a");r.href=t;const n=r.href.slice(0,r.href.indexOf(":"));return e.indexOf(n)>-1}},4899:(t,e,r)=>{"use strict";r.d(e,{V:()=>s,Z:()=>l});var n=r(8417),i=r(8188),o=r(4904);class s extends i.Z{}s.blotName="list-container",s.tagName="OL";class l extends n.ZP{static create(t){const e=super.create();return e.setAttribute("data-list",t),e}static formats(t){return t.getAttribute("data-list")||void 0}static register(){o.ZP.register(s)}constructor(t,e){super(t,e);const r=e.ownerDocument.createElement("span"),n=r=>{if(!t.isEnabled())return;const n=this.statics.formats(e,t);"checked"===n?(this.format("list","unchecked"),r.preventDefault()):"unchecked"===n&&(this.format("list","checked"),r.preventDefault())};r.addEventListener("mousedown",n),r.addEventListener("touchstart",n),this.attachUI(r)}format(t,e){t===this.statics.blotName&&e?this.domNode.setAttribute("data-list",e):super.format(t,e)}}l.blotName="list",l.tagName="LI",s.allowedChildren=[l],l.requiredContainer=s},7592:(t,e,r)=>{"use strict";r.d(e,{Z:()=>o,m:()=>i});var n=r(371);const i=new n.ClassAttributor("size","ql-size",{scope:n.Scope.INLINE,whitelist:["small","large","huge"]}),o=new n.StyleAttributor("size","font-size",{scope:n.Scope.INLINE,whitelist:["10px","18px","32px"]})},4854:(t,e,r)=>{"use strict";r.d(e,{Z:()=>o});var n=r(4489);class i extends n.Z{static blotName="strike";static tagName=["S","STRIKE"]}const o=i},5:(t,e,r)=>{"use strict";r.d(e,{Z:()=>o});var n=r(1276);class i extends n.Z{static blotName="underline";static tagName="U"}const o=i},9978:(t,e,r)=>{"use strict";r.d(e,{ZP:()=>L,fw:()=>P});var n=r(371),i=r(8895),o=r(8417),s=r(3160),l=r(6067),a=r(4904),c=r(7028),u=r(1195),h=r(4453),d=r(9649),p=r(4566),m=r(8746),f=r(7592),g=r(9476);const b=/font-weight:\s*normal/,v=["P","OL","UL"],y=t=>t&&v.includes(t.tagName);const x=/\bmso-list:[^;]*ignore/i,w=/\bmso-list:[^;]*\bl(\d+)/i,k=/\bmso-list:[^;]*\blevel(\d+)/i,q=t=>{const e=Array.from(t.querySelectorAll("[style*=mso-list]")),r=[],n=[];e.forEach((t=>{(t.getAttribute("style")||"").match(x)?r.push(t):n.push(t)})),r.forEach((t=>t.parentNode?.removeChild(t)));const i=t.documentElement.innerHTML,o=n.map((t=>((t,e)=>{const r=t.getAttribute("style"),n=r?.match(w);if(!n)return null;const i=Number(n[1]),o=r?.match(k),s=o?Number(o[1]):1,l=new RegExp(`@list l${i}:level${s}\\s*\\{[^\\}]*mso-level-number-format:\\s*([\\w-]+)`,"i"),a=e.match(l);return{id:i,indent:s,type:a&&"bullet"===a[1]?"bullet":"ordered",element:t}})(t,i))).filter((t=>t));for(;o.length;){const t=[];let e=o.shift();for(;e;)t.push(e),e=o.length&&o[0]?.element===e.element.nextElementSibling&&o[0].id===e.id?o.shift():null;const r=document.createElement("ul");t.forEach((t=>{const e=document.createElement("li");e.setAttribute("data-list",t.type),t.indent>1&&e.setAttribute("class","ql-indent-"+(t.indent-1)),e.innerHTML=t.element.innerHTML,r.appendChild(e)}));const n=t[0]?.element,{parentNode:i}=n??{};n&&i?.replaceChild(r,n),t.slice(1).forEach((t=>{let{element:e}=t;i?.removeChild(e)}))}};const _=[function(t){"urn:schemas-microsoft-com:office:word"===t.documentElement.getAttribute("xmlns:w")&&q(t)},function(t){t.querySelector('[id^="docs-internal-guid-"]')&&((t=>{Array.from(t.querySelectorAll('b[style*="font-weight"]')).filter((t=>t.getAttribute("style")?.match(b))).forEach((e=>{const r=t.createDocumentFragment();r.append(...e.childNodes),e.parentNode?.replaceChild(r,e)}))})(t),(t=>{Array.from(t.querySelectorAll("br")).filter((t=>y(t.previousElementSibling)&&y(t.nextElementSibling))).forEach((t=>{t.parentNode?.removeChild(t)}))})(t))}],S=t=>{t.documentElement&&_.forEach((e=>{e(t)}))},A=(0,s.Z)("quill:clipboard"),N=[[Node.TEXT_NODE,function(t,e,r){let n=t.data;if("O:P"===t.parentElement?.tagName)return e.insert(n.trim());if(!z(t)){if(0===n.trim().length&&n.includes("\n")&&!function(t,e){return t.previousElementSibling&&t.nextElementSibling&&!O(t.previousElementSibling,e)&&!O(t.nextElementSibling,e)}(t,r))return e;const i=(t,e)=>{const r=e.replace(/[^\u00a0]/g,"");return r.length<1&&t?" ":r};n=n.replace(/\r\n/g," ").replace(/\n/g," "),n=n.replace(/\s\s+/g,i.bind(i,!0)),(null==t.previousSibling&&null!=t.parentElement&&O(t.parentElement,r)||t.previousSibling instanceof Element&&O(t.previousSibling,r))&&(n=n.replace(/^\s+/,i.bind(i,!1))),(null==t.nextSibling&&null!=t.parentElement&&O(t.parentElement,r)||t.nextSibling instanceof Element&&O(t.nextSibling,r))&&(n=n.replace(/\s+$/,i.bind(i,!1)))}return e.insert(n)}],[Node.TEXT_NODE,Z],["br",function(t,e){M(e,"\n")||e.insert("\n");return e}],[Node.ELEMENT_NODE,Z],[Node.ELEMENT_NODE,function(t,e,r){const o=r.query(t);if(null==o)return e;if(o.prototype instanceof n.EmbedBlot){const e={},n=o.value(t);if(null!=n)return e[o.blotName]=n,(new i).insert(e,o.formats(t,r))}else if(o.prototype instanceof n.BlockBlot&&!M(e,"\n")&&e.insert("\n"),"blotName"in o&&"formats"in o&&"function"==typeof o.formats)return C(e,o.blotName,o.formats(t,r),r);return e}],[Node.ELEMENT_NODE,function(t,e,r){const i=n.Attributor.keys(t),o=n.ClassAttributor.keys(t),s=n.StyleAttributor.keys(t),l={};return i.concat(o).concat(s).forEach((e=>{let i=r.query(e,n.Scope.ATTRIBUTE);null!=i&&(l[i.attrName]=i.value(t),l[i.attrName])||(i=T[e],null==i||i.attrName!==e&&i.keyName!==e||(l[i.attrName]=i.value(t)||void 0),i=E[e],null==i||i.attrName!==e&&i.keyName!==e||(i=E[e],l[i.attrName]=i.value(t)||void 0))})),Object.entries(l).reduce(((t,e)=>{let[n,i]=e;return C(t,n,i,r)}),e)}],[Node.ELEMENT_NODE,function(t,e,r){const n={},o=t.style||{};"italic"===o.fontStyle&&(n.italic=!0);"underline"===o.textDecoration&&(n.underline=!0);"line-through"===o.textDecoration&&(n.strike=!0);(o.fontWeight?.startsWith("bold")||parseInt(o.fontWeight,10)>=700)&&(n.bold=!0);if(e=Object.entries(n).reduce(((t,e)=>{let[n,i]=e;return C(t,n,i,r)}),e),parseFloat(o.textIndent||0)>0)return(new i).insert("\t").concat(e);return e}],["li",function(t,e,r){const n=r.query(t);if(null==n||"list"!==n.blotName||!M(e,"\n"))return e;let o=-1,s=t.parentNode;for(;null!=s;)["OL","UL"].includes(s.tagName)&&(o+=1),s=s.parentNode;return o<=0?e:e.reduce(((t,e)=>e.insert?e.attributes&&"number"==typeof e.attributes.indent?t.push(e):t.insert(e.insert,{indent:o,...e.attributes||{}}):t),new i)}],["ol, ul",function(t,e,r){const n=t;let i="OL"===n.tagName?"ordered":"bullet";const o=n.getAttribute("data-checked");o&&(i="true"===o?"checked":"unchecked");return C(e,"list",i,r)}],["pre",function(t,e,r){const n=r.query("code-block"),i=!n||!("formats"in n)||"function"!=typeof n.formats||n.formats(t,r);return C(e,"code-block",i,r)}],["tr",function(t,e,r){const n="TABLE"===t.parentElement?.tagName?t.parentElement:t.parentElement?.parentElement;if(null!=n){return C(e,"table",Array.from(n.querySelectorAll("tr")).indexOf(t)+1,r)}return e}],["b",R("bold")],["i",R("italic")],["strike",R("strike")],["style",function(){return new i}]],T=[c.if,p.IF].reduce(((t,e)=>(t[e.keyName]=e,t)),{}),E=[c.HE,u.w,d.HQ,p.H8,m.H,f.Z].reduce(((t,e)=>(t[e.keyName]=e,t)),{});class L extends l.Z{static DEFAULTS={matchers:[]};constructor(t,e){super(t,e),this.quill.root.addEventListener("copy",(t=>this.onCaptureCopy(t,!1))),this.quill.root.addEventListener("cut",(t=>this.onCaptureCopy(t,!0))),this.quill.root.addEventListener("paste",this.onCapturePaste.bind(this)),this.matchers=[],N.concat(this.options.matchers??[]).forEach((t=>{let[e,r]=t;this.addMatcher(e,r)}))}addMatcher(t,e){this.matchers.push([t,e])}convert(t){let{html:e,text:r}=t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(n[h.ZP.blotName])return(new i).insert(r||"",{[h.ZP.blotName]:n[h.ZP.blotName]});if(!e)return(new i).insert(r||"",n);const o=this.convertHTML(e);return M(o,"\n")&&(null==o.ops[o.ops.length-1].attributes||n.table)?o.compose((new i).retain(o.length()-1).delete(1)):o}normalizeHTML(t){S(t)}convertHTML(t){const e=(new DOMParser).parseFromString(t,"text/html");this.normalizeHTML(e);const r=e.body,n=new WeakMap,[i,o]=this.prepareMatching(r,n);return P(this.quill.scroll,r,i,o,n)}dangerouslyPasteHTML(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a.ZP.sources.API;if("string"==typeof t){const r=this.convert({html:t,text:""});this.quill.setContents(r,e),this.quill.setSelection(0,a.ZP.sources.SILENT)}else{const n=this.convert({html:e,text:""});this.quill.updateContents((new i).retain(t).concat(n),r),this.quill.setSelection(t+n.length(),a.ZP.sources.SILENT)}}onCaptureCopy(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t.defaultPrevented)return;t.preventDefault();const[r]=this.quill.selection.getRange();if(null==r)return;const{html:n,text:i}=this.onCopy(r,e);t.clipboardData?.setData("text/plain",i),t.clipboardData?.setData("text/html",n),e&&(0,g.WQ)({range:r,quill:this.quill})}normalizeURIList(t){return t.split(/\r?\n/).filter((t=>"#"!==t[0])).join("\n")}onCapturePaste(t){if(t.defaultPrevented||!this.quill.isEnabled())return;t.preventDefault();const e=this.quill.getSelection(!0);if(null==e)return;const r=t.clipboardData?.getData("text/html");let n=t.clipboardData?.getData("text/plain");if(!r&&!n){const e=t.clipboardData?.getData("text/uri-list");e&&(n=this.normalizeURIList(e))}const i=Array.from(t.clipboardData?.files||[]);if(!r&&i.length>0)this.quill.uploader.upload(e,i);else{if(r&&i.length>0){const t=(new DOMParser).parseFromString(r,"text/html");if(1===t.body.childElementCount&&"IMG"===t.body.firstElementChild?.tagName)return void this.quill.uploader.upload(e,i)}this.onPaste(e,{html:r,text:n})}}onCopy(t){const e=this.quill.getText(t);return{html:this.quill.getSemanticHTML(t),text:e}}onPaste(t,e){let{text:r,html:n}=e;const o=this.quill.getFormat(t.index),s=this.convert({text:r,html:n},o);A.log("onPaste",s,{text:r,html:n});const l=(new i).retain(t.index).delete(t.length).concat(s);this.quill.updateContents(l,a.ZP.sources.USER),this.quill.setSelection(l.length()-t.length,a.ZP.sources.SILENT),this.quill.scrollSelectionIntoView()}prepareMatching(t,e){const r=[],n=[];return this.matchers.forEach((i=>{const[o,s]=i;switch(o){case Node.TEXT_NODE:n.push(s);break;case Node.ELEMENT_NODE:r.push(s);break;default:Array.from(t.querySelectorAll(o)).forEach((t=>{if(e.has(t)){const r=e.get(t);r?.push(s)}else e.set(t,[s])}))}})),[r,n]}}function C(t,e,r,n){return n.query(e)?t.reduce(((t,n)=>{if(!n.insert)return t;if(n.attributes&&n.attributes[e])return t.push(n);const i=r?{[e]:r}:{};return t.insert(n.insert,{...i,...n.attributes})}),new i):t}function M(t,e){let r="";for(let n=t.ops.length-1;n>=0&&r.length<e.length;--n){const e=t.ops[n];if("string"!=typeof e.insert)break;r=e.insert+r}return r.slice(-1*e.length)===e}function O(t,e){if(!(t instanceof Element))return!1;const r=e.query(t);return!(r&&r.prototype instanceof n.EmbedBlot)&&["address","article","blockquote","canvas","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","iframe","li","main","nav","ol","output","p","pre","section","table","td","tr","ul","video"].includes(t.tagName.toLowerCase())}const B=new WeakMap;function z(t){return null!=t&&(B.has(t)||("PRE"===t.tagName?B.set(t,!0):B.set(t,z(t.parentNode))),B.get(t))}function P(t,e,r,n,o){return e.nodeType===e.TEXT_NODE?n.reduce(((r,n)=>n(e,r,t)),new i):e.nodeType===e.ELEMENT_NODE?Array.from(e.childNodes||[]).reduce(((i,s)=>{let l=P(t,s,r,n,o);return s.nodeType===e.ELEMENT_NODE&&(l=r.reduce(((e,r)=>r(s,e,t)),l),l=(o.get(s)||[]).reduce(((e,r)=>r(s,e,t)),l)),i.concat(l)}),new i):new i}function R(t){return(e,r,n)=>C(r,t,!0,n)}function Z(t,e,r){if(!M(e,"\n")){if(O(t,r)&&(t.childNodes.length>0||t instanceof HTMLParagraphElement))return e.insert("\n");if(e.length()>0&&t.nextSibling){let n=t.nextSibling;for(;null!=n;){if(O(n,r))return e.insert("\n");const t=r.query(n);if(t&&t.prototype instanceof o.i2)return e.insert("\n");n=n.firstChild}}}return e}},9476:(t,e,r)=>{"use strict";r.d(e,{WQ:()=>v,ZP:()=>d});var n=r(9469),i=r(2303),o=r(8895),s=r(371),l=r(4904),a=r(3160),c=r(6067);const u=(0,a.Z)("quill:keyboard"),h=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey";class d extends c.Z{static match(t,e){return!["altKey","ctrlKey","metaKey","shiftKey"].some((r=>!!e[r]!==t[r]&&null!==e[r]))&&(e.key===t.key||e.key===t.which)}constructor(t,e){super(t,e),this.bindings={},Object.keys(this.options.bindings).forEach((t=>{this.options.bindings[t]&&this.addBinding(this.options.bindings[t])})),this.addBinding({key:"Enter",shiftKey:null},this.handleEnter),this.addBinding({key:"Enter",metaKey:null,ctrlKey:null,altKey:null},(()=>{})),/Firefox/i.test(navigator.userAgent)?(this.addBinding({key:"Backspace"},{collapsed:!0},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0},this.handleDelete)):(this.addBinding({key:"Backspace"},{collapsed:!0,prefix:/^.?$/},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0,suffix:/^.?$/},this.handleDelete)),this.addBinding({key:"Backspace"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Delete"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Backspace",altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},this.handleBackspace),this.listen()}addBinding(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=function(t){if("string"==typeof t||"number"==typeof t)t={key:t};else{if("object"!=typeof t)return null;t=(0,i.Z)(t)}t.shortKey&&(t[h]=t.shortKey,delete t.shortKey);return t}(t);if(null==n)return void u.warn("Attempted to add invalid keyboard binding",n);"function"==typeof e&&(e={handler:e}),"function"==typeof r&&(r={handler:r});(Array.isArray(n.key)?n.key:[n.key]).forEach((t=>{const i={...n,key:t,...e,...r};this.bindings[i.key]=this.bindings[i.key]||[],this.bindings[i.key].push(i)}))}listen(){this.quill.root.addEventListener("keydown",(t=>{if(t.defaultPrevented||t.isComposing)return;if(229===t.keyCode&&("Enter"===t.key||"Backspace"===t.key))return;const e=(this.bindings[t.key]||[]).concat(this.bindings[t.which]||[]).filter((e=>d.match(t,e)));if(0===e.length)return;const r=l.ZP.find(t.target,!0);if(r&&r.scroll!==this.quill.scroll)return;const i=this.quill.getSelection();if(null==i||!this.quill.hasFocus())return;const[o,a]=this.quill.getLine(i.index),[c,u]=this.quill.getLeaf(i.index),[h,p]=0===i.length?[c,u]:this.quill.getLeaf(i.index+i.length),m=c instanceof s.TextBlot?c.value().slice(0,u):"",f=h instanceof s.TextBlot?h.value().slice(p):"",g={collapsed:0===i.length,empty:0===i.length&&o.length()<=1,format:this.quill.getFormat(i),line:o,offset:a,prefix:m,suffix:f,event:t};e.some((t=>{if(null!=t.collapsed&&t.collapsed!==g.collapsed)return!1;if(null!=t.empty&&t.empty!==g.empty)return!1;if(null!=t.offset&&t.offset!==g.offset)return!1;if(Array.isArray(t.format)){if(t.format.every((t=>null==g.format[t])))return!1}else if("object"==typeof t.format&&!Object.keys(t.format).every((e=>!0===t.format[e]?null!=g.format[e]:!1===t.format[e]?null==g.format[e]:(0,n.Z)(t.format[e],g.format[e]))))return!1;return!(null!=t.prefix&&!t.prefix.test(g.prefix))&&(!(null!=t.suffix&&!t.suffix.test(g.suffix))&&!0!==t.handler.call(this,i,g,t))}))&&t.preventDefault()}))}handleBackspace(t,e){const r=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(e.prefix)?2:1;if(0===t.index||this.quill.getLength()<=1)return;let n={};const[i]=this.quill.getLine(t.index);let s=(new o).retain(t.index-r).delete(r);if(0===e.offset){const[e]=this.quill.getLine(t.index-1);if(e){if(!("block"===e.statics.blotName&&e.length()<=1)){const e=i.formats(),r=this.quill.getFormat(t.index-1,1);if(n=o.AttributeMap.diff(e,r)||{},Object.keys(n).length>0){const e=(new o).retain(t.index+i.length()-2).retain(1,n);s=s.compose(e)}}}}this.quill.updateContents(s,l.ZP.sources.USER),this.quill.focus()}handleDelete(t,e){const r=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(e.suffix)?2:1;if(t.index>=this.quill.getLength()-r)return;let n={};const[i]=this.quill.getLine(t.index);let s=(new o).retain(t.index).delete(r);if(e.offset>=i.length()-1){const[e]=this.quill.getLine(t.index+1);if(e){const r=i.formats(),l=this.quill.getFormat(t.index,1);n=o.AttributeMap.diff(r,l)||{},Object.keys(n).length>0&&(s=s.retain(e.length()-1).retain(1,n))}}this.quill.updateContents(s,l.ZP.sources.USER),this.quill.focus()}handleDeleteRange(t){v({range:t,quill:this.quill}),this.quill.focus()}handleEnter(t,e){const r=Object.keys(e.format).reduce(((t,r)=>(this.quill.scroll.query(r,s.Scope.BLOCK)&&!Array.isArray(e.format[r])&&(t[r]=e.format[r]),t)),{}),n=(new o).retain(t.index).delete(t.length).insert("\n",r);this.quill.updateContents(n,l.ZP.sources.USER),this.quill.setSelection(t.index+1,l.ZP.sources.SILENT),this.quill.focus()}}const p={bindings:{bold:g("bold"),italic:g("italic"),underline:g("underline"),indent:{key:"Tab",format:["blockquote","indent","list"],handler(t,e){return!(!e.collapsed||0===e.offset)||(this.quill.format("indent","+1",l.ZP.sources.USER),!1)}},outdent:{key:"Tab",shiftKey:!0,format:["blockquote","indent","list"],handler(t,e){return!(!e.collapsed||0===e.offset)||(this.quill.format("indent","-1",l.ZP.sources.USER),!1)}},"outdent backspace":{key:"Backspace",collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler(t,e){null!=e.format.indent?this.quill.format("indent","-1",l.ZP.sources.USER):null!=e.format.list&&this.quill.format("list",!1,l.ZP.sources.USER)}},"indent code-block":m(!0),"outdent code-block":m(!1),"remove tab":{key:"Tab",shiftKey:!0,collapsed:!0,prefix:/\t$/,handler(t){this.quill.deleteText(t.index-1,1,l.ZP.sources.USER)}},tab:{key:"Tab",handler(t,e){if(e.format.table)return!0;this.quill.history.cutoff();const r=(new o).retain(t.index).delete(t.length).insert("\t");return this.quill.updateContents(r,l.ZP.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index+1,l.ZP.sources.SILENT),!1}},"blockquote empty enter":{key:"Enter",collapsed:!0,format:["blockquote"],empty:!0,handler(){this.quill.format("blockquote",!1,l.ZP.sources.USER)}},"list empty enter":{key:"Enter",collapsed:!0,format:["list"],empty:!0,handler(t,e){const r={list:!1};e.format.indent&&(r.indent=!1),this.quill.formatLine(t.index,t.length,r,l.ZP.sources.USER)}},"checklist enter":{key:"Enter",collapsed:!0,format:{list:"checked"},handler(t){const[e,r]=this.quill.getLine(t.index),n={...e.formats(),list:"checked"},i=(new o).retain(t.index).insert("\n",n).retain(e.length()-r-1).retain(1,{list:"unchecked"});this.quill.updateContents(i,l.ZP.sources.USER),this.quill.setSelection(t.index+1,l.ZP.sources.SILENT),this.quill.scrollSelectionIntoView()}},"header enter":{key:"Enter",collapsed:!0,format:["header"],suffix:/^$/,handler(t,e){const[r,n]=this.quill.getLine(t.index),i=(new o).retain(t.index).insert("\n",e.format).retain(r.length()-n-1).retain(1,{header:null});this.quill.updateContents(i,l.ZP.sources.USER),this.quill.setSelection(t.index+1,l.ZP.sources.SILENT),this.quill.scrollSelectionIntoView()}},"table backspace":{key:"Backspace",format:["table"],collapsed:!0,offset:0,handler(){}},"table delete":{key:"Delete",format:["table"],collapsed:!0,suffix:/^$/,handler(){}},"table enter":{key:"Enter",shiftKey:null,format:["table"],handler(t){const e=this.quill.getModule("table");if(e){const[r,n,i,s]=e.getTable(t),a=function(t,e,r,n){if(null==e.prev&&null==e.next)return null==r.prev&&null==r.next?0===n?-1:1:null==r.prev?-1:1;if(null==e.prev)return-1;if(null==e.next)return 1;return null}(0,n,i,s);if(null==a)return;let c=r.offset();if(a<0){const e=(new o).retain(c).insert("\n");this.quill.updateContents(e,l.ZP.sources.USER),this.quill.setSelection(t.index+1,t.length,l.ZP.sources.SILENT)}else if(a>0){c+=r.length();const t=(new o).retain(c).insert("\n");this.quill.updateContents(t,l.ZP.sources.USER),this.quill.setSelection(c,l.ZP.sources.USER)}}}},"table tab":{key:"Tab",shiftKey:null,format:["table"],handler(t,e){const{event:r,line:n}=e,i=n.offset(this.quill.scroll);r.shiftKey?this.quill.setSelection(i-1,l.ZP.sources.USER):this.quill.setSelection(i+n.length(),l.ZP.sources.USER)}},"list autofill":{key:" ",shiftKey:null,collapsed:!0,format:{"code-block":!1,blockquote:!1,table:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler(t,e){if(null==this.quill.scroll.query("list"))return!0;const{length:r}=e.prefix,[n,i]=this.quill.getLine(t.index);if(i>r)return!0;let s;switch(e.prefix.trim()){case"[]":case"[ ]":s="unchecked";break;case"[x]":s="checked";break;case"-":case"*":s="bullet";break;default:s="ordered"}this.quill.insertText(t.index," ",l.ZP.sources.USER),this.quill.history.cutoff();const a=(new o).retain(t.index-i).delete(r+1).retain(n.length()-2-i).retain(1,{list:s});return this.quill.updateContents(a,l.ZP.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index-r,l.ZP.sources.SILENT),!1}},"code exit":{key:"Enter",collapsed:!0,format:["code-block"],prefix:/^$/,suffix:/^\s*$/,handler(t){const[e,r]=this.quill.getLine(t.index);let n=2,i=e;for(;null!=i&&i.length()<=1&&i.formats()["code-block"];)if(i=i.prev,n-=1,n<=0){const n=(new o).retain(t.index+e.length()-r-2).retain(1,{"code-block":null}).delete(1);return this.quill.updateContents(n,l.ZP.sources.USER),this.quill.setSelection(t.index-1,l.ZP.sources.SILENT),!1}return!0}},"embed left":f("ArrowLeft",!1),"embed left shift":f("ArrowLeft",!0),"embed right":f("ArrowRight",!1),"embed right shift":f("ArrowRight",!0),"table down":b(!1),"table up":b(!0)}};function m(t){return{key:"Tab",shiftKey:!t,format:{"code-block":!0},handler(e,r){let{event:n}=r;const i=this.quill.scroll.query("code-block"),{TAB:o}=i;if(0===e.length&&!n.shiftKey)return this.quill.insertText(e.index,o,l.ZP.sources.USER),void this.quill.setSelection(e.index+o.length,l.ZP.sources.SILENT);const s=0===e.length?this.quill.getLines(e.index,1):this.quill.getLines(e);let{index:a,length:c}=e;s.forEach(((e,r)=>{t?(e.insertAt(0,o),0===r?a+=o.length:c+=o.length):e.domNode.textContent.startsWith(o)&&(e.deleteAt(0,o.length),0===r?a-=o.length:c-=o.length)})),this.quill.update(l.ZP.sources.USER),this.quill.setSelection(a,c,l.ZP.sources.SILENT)}}}function f(t,e){return{key:t,shiftKey:e,altKey:null,["ArrowLeft"===t?"prefix":"suffix"]:/^$/,handler(r){let{index:n}=r;"ArrowRight"===t&&(n+=r.length+1);const[i]=this.quill.getLeaf(n);return!(i instanceof s.EmbedBlot)||("ArrowLeft"===t?e?this.quill.setSelection(r.index-1,r.length+1,l.ZP.sources.USER):this.quill.setSelection(r.index-1,l.ZP.sources.USER):e?this.quill.setSelection(r.index,r.length+1,l.ZP.sources.USER):this.quill.setSelection(r.index+r.length+1,l.ZP.sources.USER),!1)}}}function g(t){return{key:t[0],shortKey:!0,handler(e,r){this.quill.format(t,!r.format[t],l.ZP.sources.USER)}}}function b(t){return{key:t?"ArrowUp":"ArrowDown",collapsed:!0,format:["table"],handler(e,r){const n=t?"prev":"next",i=r.line,o=i.parent[n];if(null!=o){if("table-row"===o.statics.blotName){let t=o.children.head,e=i;for(;null!=e.prev;)e=e.prev,t=t.next;const n=t.offset(this.quill.scroll)+Math.min(r.offset,t.length()-1);this.quill.setSelection(n,0,l.ZP.sources.USER)}}else{const e=i.table()[n];null!=e&&(t?this.quill.setSelection(e.offset(this.quill.scroll)+e.length()-1,0,l.ZP.sources.USER):this.quill.setSelection(e.offset(this.quill.scroll),0,l.ZP.sources.USER))}return!1}}}function v(t){let{quill:e,range:r}=t;const n=e.getLines(r);let i={};if(n.length>1){const t=n[0].formats(),e=n[n.length-1].formats();i=o.AttributeMap.diff(e,t)||{}}e.deleteText(r,l.ZP.sources.USER),Object.keys(i).length>0&&e.formatLine(r.index,1,i,l.ZP.sources.USER),e.setSelection(r.index,l.ZP.sources.SILENT)}d.DEFAULTS=p},6865:(t,e,r)=>{"use strict";r.r(e),r.d(e,{Module:()=>n.Yl,Parchment:()=>n.wK,Range:()=>n.e6,default:()=>Ct});var n=r(9196),i=r(7028),o=r(4566),s=r(371);class l extends s.ClassAttributor{add(t,e){let r=0;if("+1"===e||"-1"===e){const n=this.value(t)||0;r="+1"===e?n+1:n-1}else"number"==typeof e&&(r=e);return 0===r?(this.remove(t),!0):super.add(t,r.toString())}canAdd(t,e){return super.canAdd(t,e)||super.canAdd(t,parseInt(e,10))}value(t){return parseInt(super.value(t),10)||void 0}}const a=new l("indent","ql-indent",{scope:s.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});var c=r(8417);class u extends c.ZP{static blotName="blockquote";static tagName="blockquote"}const h=u;class d extends c.ZP{static blotName="header";static tagName=["H1","H2","H3","H4","H5","H6"];static formats(t){return this.tagName.indexOf(t.tagName)+1}}const p=d;var m=r(4899),f=r(1195),g=r(9649),b=r(8746),v=r(7592),y=r(4489),x=r(7363),w=r(1487),k=r(1276);class q extends k.Z{static blotName="script";static tagName=["SUB","SUP"];static create(t){return"super"===t?document.createElement("sup"):"sub"===t?document.createElement("sub"):super.create(t)}static formats(t){return"SUB"===t.tagName?"sub":"SUP"===t.tagName?"super":void 0}}const _=q;var S=r(4854),A=r(5),N=r(2589);const T=["alt","height","width"];class E extends s.EmbedBlot{static blotName="image";static tagName="IMG";static create(t){const e=super.create(t);return"string"==typeof t&&e.setAttribute("src",this.sanitize(t)),e}static formats(t){return T.reduce(((e,r)=>(t.hasAttribute(r)&&(e[r]=t.getAttribute(r)),e)),{})}static match(t){return/\.(jpe?g|gif|png)$/.test(t)||/^data:image\/.+;base64/.test(t)}static sanitize(t){return(0,w.N)(t,["http","https","data"])?t:"//:0"}static value(t){return t.getAttribute("src")}format(t,e){T.indexOf(t)>-1?e?this.domNode.setAttribute(t,e):this.domNode.removeAttribute(t):super.format(t,e)}}const L=E,C=["height","width"];class M extends c.i2{static blotName="video";static className="ql-video";static tagName="IFRAME";static create(t){const e=super.create(t);return e.setAttribute("frameborder","0"),e.setAttribute("allowfullscreen","true"),e.setAttribute("src",this.sanitize(t)),e}static formats(t){return C.reduce(((e,r)=>(t.hasAttribute(r)&&(e[r]=t.getAttribute(r)),e)),{})}static sanitize(t){return w.Z.sanitize(t)}static value(t){return t.getAttribute("src")}format(t,e){C.indexOf(t)>-1?e?this.domNode.setAttribute(t,e):this.domNode.removeAttribute(t):super.format(t,e)}html(){const{video:t}=this.value();return`<a href="${t}">${t}</a>`}}const O=M;var B=r(4453),z=r(8895),P=r(4904),R=r(6067),Z=r(2610),I=r(4827),j=r(1696),H=r(9978);const D=new s.ClassAttributor("code-token","hljs",{scope:s.Scope.INLINE});class $ extends k.Z{static formats(t,e){for(;null!=t&&t!==e.domNode;){if(t.classList&&t.classList.contains(B.ZP.className))return super.formats(t,e);t=t.parentNode}}constructor(t,e,r){super(t,e,r),D.add(this.domNode,r)}format(t,e){t!==$.blotName?super.format(t,e):e?D.add(this.domNode,e):(D.remove(this.domNode),this.domNode.classList.remove(this.statics.className))}optimize(){super.optimize(...arguments),D.value(this.domNode)||this.unwrap()}}$.blotName="code-token",$.className="ql-token";class U extends B.ZP{static create(t){const e=super.create(t);return"string"==typeof t&&e.setAttribute("data-language",t),e}static formats(t){return t.getAttribute("data-language")||"plain"}static register(){}format(t,e){t===this.statics.blotName&&e?this.domNode.setAttribute("data-language",e):super.format(t,e)}replaceWith(t,e){return this.formatAt(0,this.length(),$.blotName,!1),super.replaceWith(t,e)}}class F extends B.se{attach(){super.attach(),this.forceNext=!1,this.scroll.emitMount(this)}format(t,e){t===U.blotName&&(this.forceNext=!0,this.children.forEach((r=>{r.format(t,e)})))}formatAt(t,e,r,n){r===U.blotName&&(this.forceNext=!0),super.formatAt(t,e,r,n)}highlight(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(null==this.children.head)return;const r=`${Array.from(this.domNode.childNodes).filter((t=>t!==this.uiNode)).map((t=>t.textContent)).join("\n")}\n`,n=U.formats(this.children.head.domNode);if(e||this.forceNext||this.cachedText!==r){if(r.trim().length>0||null==this.cachedText){const e=this.children.reduce(((t,e)=>t.concat((0,c.qz)(e,!1))),new z),i=t(r,n);e.diff(i).reduce(((t,e)=>{let{retain:r,attributes:n}=e;return r?(n&&Object.keys(n).forEach((e=>{[U.blotName,$.blotName].includes(e)&&this.formatAt(t,r,e,n[e])})),t+r):t}),0)}this.cachedText=r,this.forceNext=!1}}html(t,e){const[r]=this.children.find(t);return`<pre data-language="${r?U.formats(r.domNode):"plain"}">\n${(0,j.b)(this.code(t,e))}\n</pre>`}optimize(t){if(super.optimize(t),null!=this.parent&&null!=this.children.head&&null!=this.uiNode){const t=U.formats(this.children.head.domNode);t!==this.uiNode.value&&(this.uiNode.value=t)}}}F.allowedChildren=[U],U.requiredContainer=F,U.allowedChildren=[$,I.Z,j.Z,Z.Z];class V extends R.Z{static register(){P.ZP.register($,!0),P.ZP.register(U,!0),P.ZP.register(F,!0)}constructor(t,e){if(super(t,e),null==this.options.hljs)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");this.languages=this.options.languages.reduce(((t,e)=>{let{key:r}=e;return t[r]=!0,t}),{}),this.highlightBlot=this.highlightBlot.bind(this),this.initListener(),this.initTimer()}initListener(){this.quill.on(P.ZP.events.SCROLL_BLOT_MOUNT,(t=>{if(!(t instanceof F))return;const e=this.quill.root.ownerDocument.createElement("select");this.options.languages.forEach((t=>{let{key:r,label:n}=t;const i=e.ownerDocument.createElement("option");i.textContent=n,i.setAttribute("value",r),e.appendChild(i)})),e.addEventListener("change",(()=>{t.format(U.blotName,e.value),this.quill.root.focus(),this.highlight(t,!0)})),null==t.uiNode&&(t.attachUI(e),t.children.head&&(e.value=U.formats(t.children.head.domNode)))}))}initTimer(){let t=null;this.quill.on(P.ZP.events.SCROLL_OPTIMIZE,(()=>{t&&clearTimeout(t),t=setTimeout((()=>{this.highlight(),t=null}),this.options.interval)}))}highlight(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.quill.selection.composing)return;this.quill.update(P.ZP.sources.USER);const r=this.quill.getSelection();(null==t?this.quill.scroll.descendants(F):[t]).forEach((t=>{t.highlight(this.highlightBlot,e)})),this.quill.update(P.ZP.sources.SILENT),null!=r&&this.quill.setSelection(r,P.ZP.sources.SILENT)}highlightBlot(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"plain";if(e=this.languages[e]?e:"plain","plain"===e)return(0,j.b)(t).split("\n").reduce(((t,r,n)=>(0!==n&&t.insert("\n",{[B.ZP.blotName]:e}),t.insert(r))),new z);const r=this.quill.root.ownerDocument.createElement("div");return r.classList.add(B.ZP.className),r.innerHTML=((t,e,r)=>{if("string"==typeof t.versionString){const n=t.versionString.split(".")[0];if(parseInt(n,10)>=11)return t.highlight(r,{language:e}).value}return t.highlight(e,r).value})(this.options.hljs,e,t),(0,H.fw)(this.quill.scroll,r,[(t,e)=>{const r=D.value(t);return r?e.compose((new z).retain(e.length(),{[$.blotName]:r})):e}],[(t,r)=>t.data.split("\n").reduce(((t,r,n)=>(0!==n&&t.insert("\n",{[B.ZP.blotName]:e}),t.insert(r))),r)],new WeakMap)}}V.DEFAULTS={hljs:window.hljs,interval:1e3,languages:[{key:"plain",label:"Plain"},{key:"bash",label:"Bash"},{key:"cpp",label:"C++"},{key:"cs",label:"C#"},{key:"css",label:"CSS"},{key:"diff",label:"Diff"},{key:"xml",label:"HTML/XML"},{key:"java",label:"Java"},{key:"javascript",label:"JavaScript"},{key:"markdown",label:"Markdown"},{key:"php",label:"PHP"},{key:"python",label:"Python"},{key:"ruby",label:"Ruby"},{key:"sql",label:"SQL"}]};var W=r(8188);class K extends c.ZP{static blotName="table";static tagName="TD";static create(t){const e=super.create();return t?e.setAttribute("data-row",t):e.setAttribute("data-row",Q()),e}static formats(t){if(t.hasAttribute("data-row"))return t.getAttribute("data-row")}cellOffset(){return this.parent?this.parent.children.indexOf(this):-1}format(t,e){t===K.blotName&&e?this.domNode.setAttribute("data-row",e):super.format(t,e)}row(){return this.parent}rowOffset(){return this.row()?this.row().rowOffset():-1}table(){return this.row()&&this.row().table()}}class G extends W.Z{static blotName="table-row";static tagName="TR";checkMerge(){if(super.checkMerge()&&null!=this.next.children.head){const t=this.children.head.formats(),e=this.children.tail.formats(),r=this.next.children.head.formats(),n=this.next.children.tail.formats();return t.table===e.table&&t.table===r.table&&t.table===n.table}return!1}optimize(t){super.optimize(t),this.children.forEach((t=>{if(null==t.next)return;const e=t.formats(),r=t.next.formats();if(e.table!==r.table){const e=this.splitAfter(t);e&&e.optimize(),this.prev&&this.prev.optimize()}}))}rowOffset(){return this.parent?this.parent.children.indexOf(this):-1}table(){return this.parent&&this.parent.parent}}class Y extends W.Z{static blotName="table-body";static tagName="TBODY"}class X extends W.Z{static blotName="table-container";static tagName="TABLE";balanceCells(){const t=this.descendants(G),e=t.reduce(((t,e)=>Math.max(e.children.length,t)),0);t.forEach((t=>{new Array(e-t.children.length).fill(0).forEach((()=>{let e;null!=t.children.head&&(e=K.formats(t.children.head.domNode));const r=this.scroll.create(K.blotName,e);t.appendChild(r),r.optimize()}))}))}cells(t){return this.rows().map((e=>e.children.at(t)))}deleteColumn(t){const[e]=this.descendant(Y);null!=e&&null!=e.children.head&&e.children.forEach((e=>{const r=e.children.at(t);null!=r&&r.remove()}))}insertColumn(t){const[e]=this.descendant(Y);null!=e&&null!=e.children.head&&e.children.forEach((e=>{const r=e.children.at(t),n=K.formats(e.children.head.domNode),i=this.scroll.create(K.blotName,n);e.insertBefore(i,r)}))}insertRow(t){const[e]=this.descendant(Y);if(null==e||null==e.children.head)return;const r=Q(),n=this.scroll.create(G.blotName);e.children.head.children.forEach((()=>{const t=this.scroll.create(K.blotName,r);n.appendChild(t)}));const i=e.children.at(t);e.insertBefore(n,i)}rows(){const t=this.children.head;return null==t?[]:t.children.map((t=>t))}}function Q(){return`row-${Math.random().toString(36).slice(2,6)}`}X.allowedChildren=[Y],Y.requiredContainer=X,Y.allowedChildren=[G],G.requiredContainer=Y,G.allowedChildren=[K],K.requiredContainer=G;class J extends R.Z{static register(){P.ZP.register(K),P.ZP.register(G),P.ZP.register(Y),P.ZP.register(X)}constructor(){super(...arguments),this.listenBalanceCells()}balanceTables(){this.quill.scroll.descendants(X).forEach((t=>{t.balanceCells()}))}deleteColumn(){const[t,,e]=this.getTable();null!=e&&(t.deleteColumn(e.cellOffset()),this.quill.update(P.ZP.sources.USER))}deleteRow(){const[,t]=this.getTable();null!=t&&(t.remove(),this.quill.update(P.ZP.sources.USER))}deleteTable(){const[t]=this.getTable();if(null==t)return;const e=t.offset();t.remove(),this.quill.update(P.ZP.sources.USER),this.quill.setSelection(e,P.ZP.sources.SILENT)}getTable(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.quill.getSelection();if(null==t)return[null,null,null,-1];const[e,r]=this.quill.getLine(t.index);if(null==e||e.statics.blotName!==K.blotName)return[null,null,null,-1];const n=e.parent;return[n.parent.parent,n,e,r]}insertColumn(t){const e=this.quill.getSelection();if(!e)return;const[r,n,i]=this.getTable(e);if(null==i)return;const o=i.cellOffset();r.insertColumn(o+t),this.quill.update(P.ZP.sources.USER);let s=n.rowOffset();0===t&&(s+=1),this.quill.setSelection(e.index+s,e.length,P.ZP.sources.SILENT)}insertColumnLeft(){this.insertColumn(0)}insertColumnRight(){this.insertColumn(1)}insertRow(t){const e=this.quill.getSelection();if(!e)return;const[r,n,i]=this.getTable(e);if(null==i)return;const o=n.rowOffset();r.insertRow(o+t),this.quill.update(P.ZP.sources.USER),t>0?this.quill.setSelection(e,P.ZP.sources.SILENT):this.quill.setSelection(e.index+n.children.length,e.length,P.ZP.sources.SILENT)}insertRowAbove(){this.insertRow(0)}insertRowBelow(){this.insertRow(1)}insertTable(t,e){const r=this.quill.getSelection();if(null==r)return;const n=new Array(t).fill(0).reduce((t=>{const r=new Array(e).fill("\n").join("");return t.insert(r,{table:Q()})}),(new z).retain(r.index));this.quill.updateContents(n,P.ZP.sources.USER),this.quill.setSelection(r.index,P.ZP.sources.SILENT),this.balanceTables()}listenBalanceCells(){this.quill.on(P.ZP.events.SCROLL_OPTIMIZE,(t=>{t.some((t=>!!["TD","TR","TBODY","TABLE"].includes(t.target.tagName)&&(this.quill.once(P.ZP.events.TEXT_CHANGE,((t,e,r)=>{r===P.ZP.sources.USER&&this.balanceTables()})),!0)))}))}}const tt=J;const et=(0,r(3160).Z)("quill:toolbar");class rt extends R.Z{constructor(t,e){if(super(t,e),Array.isArray(this.options.container)){const e=document.createElement("div");e.setAttribute("role","toolbar"),function(t,e){Array.isArray(e[0])||(e=[e]);e.forEach((e=>{const r=document.createElement("span");r.classList.add("ql-formats"),e.forEach((t=>{if("string"==typeof t)nt(r,t);else{const e=Object.keys(t)[0],n=t[e];Array.isArray(n)?function(t,e,r){const n=document.createElement("select");n.classList.add(`ql-${e}`),r.forEach((t=>{const e=document.createElement("option");!1!==t?e.setAttribute("value",String(t)):e.setAttribute("selected","selected"),n.appendChild(e)})),t.appendChild(n)}(r,e,n):nt(r,e,n)}})),t.appendChild(r)}))}(e,this.options.container),t.container?.parentNode?.insertBefore(e,t.container),this.container=e}else"string"==typeof this.options.container?this.container=document.querySelector(this.options.container):this.container=this.options.container;this.container instanceof HTMLElement?(this.container.classList.add("ql-toolbar"),this.controls=[],this.handlers={},this.options.handlers&&Object.keys(this.options.handlers).forEach((t=>{const e=this.options.handlers?.[t];e&&this.addHandler(t,e)})),Array.from(this.container.querySelectorAll("button, select")).forEach((t=>{this.attach(t)})),this.quill.on(P.ZP.events.EDITOR_CHANGE,(()=>{const[t]=this.quill.selection.getRange();this.update(t)}))):et.error("Container required for toolbar",this.options)}addHandler(t,e){this.handlers[t]=e}attach(t){let e=Array.from(t.classList).find((t=>0===t.indexOf("ql-")));if(!e)return;if(e=e.slice(3),"BUTTON"===t.tagName&&t.setAttribute("type","button"),null==this.handlers[e]&&null==this.quill.scroll.query(e))return void et.warn("ignoring attaching to nonexistent format",e,t);const r="SELECT"===t.tagName?"change":"click";t.addEventListener(r,(r=>{let n;if("SELECT"===t.tagName){if(t.selectedIndex<0)return;const e=t.options[t.selectedIndex];n=!e.hasAttribute("selected")&&(e.value||!1)}else n=!t.classList.contains("ql-active")&&(t.value||!t.hasAttribute("value")),r.preventDefault();this.quill.focus();const[i]=this.quill.selection.getRange();if(null!=this.handlers[e])this.handlers[e].call(this,n);else if(this.quill.scroll.query(e).prototype instanceof s.EmbedBlot){if(n=prompt(`Enter ${e}`),!n)return;this.quill.updateContents((new z).retain(i.index).delete(i.length).insert({[e]:n}),P.ZP.sources.USER)}else this.quill.format(e,n,P.ZP.sources.USER);this.update(i)})),this.controls.push([e,t])}update(t){const e=null==t?{}:this.quill.getFormat(t);this.controls.forEach((r=>{const[n,i]=r;if("SELECT"===i.tagName){let r=null;if(null==t)r=null;else if(null==e[n])r=i.querySelector("option[selected]");else if(!Array.isArray(e[n])){let t=e[n];"string"==typeof t&&(t=t.replace(/"/g,'\\"')),r=i.querySelector(`option[value="${t}"]`)}null==r?(i.value="",i.selectedIndex=-1):r.selected=!0}else if(null==t)i.classList.remove("ql-active"),i.setAttribute("aria-pressed","false");else if(i.hasAttribute("value")){const t=e[n],r=t===i.getAttribute("value")||null!=t&&t.toString()===i.getAttribute("value")||null==t&&!i.getAttribute("value");i.classList.toggle("ql-active",r),i.setAttribute("aria-pressed",r.toString())}else{const t=null!=e[n];i.classList.toggle("ql-active",t),i.setAttribute("aria-pressed",t.toString())}}))}}function nt(t,e,r){const n=document.createElement("button");n.setAttribute("type","button"),n.classList.add(`ql-${e}`),n.setAttribute("aria-pressed","false"),null!=r?(n.value=r,n.setAttribute("aria-label",`${e}: ${r}`)):n.setAttribute("aria-label",e),t.appendChild(n)}rt.DEFAULTS={},rt.DEFAULTS={container:null,handlers:{clean(){const t=this.quill.getSelection();if(null!=t)if(0===t.length){const t=this.quill.getFormat();Object.keys(t).forEach((t=>{null!=this.quill.scroll.query(t,s.Scope.INLINE)&&this.quill.format(t,!1,P.ZP.sources.USER)}))}else this.quill.removeFormat(t.index,t.length,P.ZP.sources.USER)},direction(t){const{align:e}=this.quill.getFormat();"rtl"===t&&null==e?this.quill.format("align","right",P.ZP.sources.USER):t||"right"!==e||this.quill.format("align",!1,P.ZP.sources.USER),this.quill.format("direction",t,P.ZP.sources.USER)},indent(t){const e=this.quill.getSelection(),r=this.quill.getFormat(e),n=parseInt(r.indent||0,10);if("+1"===t||"-1"===t){let e="+1"===t?1:-1;"rtl"===r.direction&&(e*=-1),this.quill.format("indent",n+e,P.ZP.sources.USER)}},link(t){!0===t&&(t=prompt("Enter link URL:")),this.quill.format("link",t,P.ZP.sources.USER)},list(t){const e=this.quill.getSelection(),r=this.quill.getFormat(e);"check"===t?"checked"===r.list||"unchecked"===r.list?this.quill.format("list",!1,P.ZP.sources.USER):this.quill.format("list","unchecked",P.ZP.sources.USER):this.quill.format("list",t,P.ZP.sources.USER)}}};const it='<svg viewbox="0 0 18 18"><polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"/><polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"/><line class="ql-stroke" x1="10" x2="8" y1="5" y2="13"/></svg>',ot={align:{"":'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="13" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="9" y1="4" y2="4"/></svg>',center:'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="14" x2="4" y1="14" y2="14"/><line class="ql-stroke" x1="12" x2="6" y1="4" y2="4"/></svg>',right:'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="5" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="9" y1="4" y2="4"/></svg>',justify:'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="3" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="3" y1="4" y2="4"/></svg>'},background:'<svg viewbox="0 0 18 18"><g class="ql-fill ql-color-label"><polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"/><rect height="1" width="1" x="4" y="4"/><polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"/><rect height="1" width="1" x="2" y="6"/><rect height="1" width="1" x="3" y="5"/><rect height="1" width="1" x="4" y="7"/><polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"/><rect height="1" width="1" x="2" y="12"/><rect height="1" width="1" x="2" y="9"/><rect height="1" width="1" x="2" y="15"/><polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"/><rect height="1" width="1" x="3" y="8"/><path d="M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z"/><path d="M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z"/><path d="M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z"/><rect height="1" width="1" x="12" y="2"/><rect height="1" width="1" x="11" y="3"/><path d="M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z"/><rect height="1" width="1" x="2" y="3"/><rect height="1" width="1" x="6" y="2"/><rect height="1" width="1" x="3" y="2"/><rect height="1" width="1" x="5" y="3"/><rect height="1" width="1" x="9" y="2"/><rect height="1" width="1" x="15" y="14"/><polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"/><rect height="1" width="1" x="13" y="7"/><rect height="1" width="1" x="15" y="5"/><rect height="1" width="1" x="14" y="6"/><rect height="1" width="1" x="15" y="8"/><rect height="1" width="1" x="14" y="9"/><path d="M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z"/><rect height="1" width="1" x="14" y="3"/><polygon points="12 6.868 12 6 11.62 6 12 6.868"/><rect height="1" width="1" x="15" y="2"/><rect height="1" width="1" x="12" y="5"/><rect height="1" width="1" x="13" y="4"/><polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"/><rect height="1" width="1" x="9" y="14"/><rect height="1" width="1" x="8" y="15"/><path d="M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z"/><rect height="1" width="1" x="5" y="15"/><path d="M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z"/><rect height="1" width="1" x="11" y="15"/><path d="M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z"/><rect height="1" width="1" x="14" y="15"/><rect height="1" width="1" x="15" y="11"/></g><polyline class="ql-stroke" points="5.5 13 9 5 12.5 13"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="11" y2="11"/></svg>',blockquote:'<svg viewbox="0 0 18 18"><rect class="ql-fill ql-stroke" height="3" width="3" x="4" y="5"/><rect class="ql-fill ql-stroke" height="3" width="3" x="11" y="5"/><path class="ql-even ql-fill ql-stroke" d="M7,8c0,4.031-3,5-3,5"/><path class="ql-even ql-fill ql-stroke" d="M14,8c0,4.031-3,5-3,5"/></svg>',bold:'<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z"/><path class="ql-stroke" d="M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z"/></svg>',clean:'<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="5" x2="13" y1="3" y2="3"/><line class="ql-stroke" x1="6" x2="9.35" y1="12" y2="3"/><line class="ql-stroke" x1="11" x2="15" y1="11" y2="15"/><line class="ql-stroke" x1="15" x2="11" y1="11" y2="15"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="7" x="2" y="14"/></svg>',code:it,"code-block":it,color:'<svg viewbox="0 0 18 18"><line class="ql-color-label ql-stroke ql-transparent" x1="3" x2="15" y1="15" y2="15"/><polyline class="ql-stroke" points="5.5 11 9 3 12.5 11"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="9" y2="9"/></svg>',direction:{"":'<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"/><line class="ql-stroke ql-fill" x1="15" x2="11" y1="4" y2="4"/><path class="ql-fill" d="M11,3a3,3,0,0,0,0,6h1V3H11Z"/><rect class="ql-fill" height="11" width="1" x="11" y="4"/><rect class="ql-fill" height="11" width="1" x="13" y="4"/></svg>',rtl:'<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"/><line class="ql-stroke ql-fill" x1="9" x2="5" y1="4" y2="4"/><path class="ql-fill" d="M5,3A3,3,0,0,0,5,9H6V3H5Z"/><rect class="ql-fill" height="11" width="1" x="5" y="4"/><rect class="ql-fill" height="11" width="1" x="7" y="4"/></svg>'},formula:'<svg viewbox="0 0 18 18"><path class="ql-fill" d="M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z"/><rect class="ql-fill" height="1.6" rx="0.8" ry="0.8" width="5" x="5.15" y="6.2"/><path class="ql-fill" d="M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z"/></svg>',header:{1:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z"/></svg>',2:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',3:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.65186,12.30664a2.6742,2.6742,0,0,1-2.915,2.68457,3.96592,3.96592,0,0,1-2.25537-.6709.56007.56007,0,0,1-.13232-.83594L11.64648,13c.209-.34082.48389-.36328.82471-.1543a2.32654,2.32654,0,0,0,1.12256.33008c.71484,0,1.12207-.35156,1.12207-.78125,0-.61523-.61621-.86816-1.46338-.86816H13.2085a.65159.65159,0,0,1-.68213-.41895l-.05518-.10937a.67114.67114,0,0,1,.14307-.78125l.71533-.86914a8.55289,8.55289,0,0,1,.68213-.7373V8.58887a3.93913,3.93913,0,0,1-.748.05469H11.9873a.54085.54085,0,0,1-.605-.60547V7.59863a.54085.54085,0,0,1,.605-.60547h3.75146a.53773.53773,0,0,1,.60547.59375v.17676a1.03723,1.03723,0,0,1-.27539.748L14.74854,10.0293A2.31132,2.31132,0,0,1,16.65186,12.30664ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',4:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm7.05371,7.96582v.38477c0,.39648-.165.60547-.46191.60547h-.47314v1.29785a.54085.54085,0,0,1-.605.60547h-.69336a.54085.54085,0,0,1-.605-.60547V12.95605H11.333a.5412.5412,0,0,1-.60547-.60547v-.15332a1.199,1.199,0,0,1,.22021-.748l2.56348-4.05957a.7819.7819,0,0,1,.72607-.39648h1.27637a.54085.54085,0,0,1,.605.60547v3.7627h.33008A.54055.54055,0,0,1,17.05371,11.96582ZM14.28125,8.7207h-.022a4.18969,4.18969,0,0,1-.38525.81348l-1.188,1.80469v.02246h1.5293V9.60059A7.04058,7.04058,0,0,1,14.28125,8.7207Z"/></svg>',5:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.74023,12.18555a2.75131,2.75131,0,0,1-2.91553,2.80566,3.908,3.908,0,0,1-2.25537-.68164.54809.54809,0,0,1-.13184-.8252L11.73438,13c.209-.34082.48389-.36328.8252-.1543a2.23757,2.23757,0,0,0,1.1001.33008,1.01827,1.01827,0,0,0,1.1001-.96777c0-.61621-.53906-.97949-1.25439-.97949a2.15554,2.15554,0,0,0-.64893.09961,1.15209,1.15209,0,0,1-.814.01074l-.12109-.04395a.64116.64116,0,0,1-.45117-.71484l.231-3.00391a.56666.56666,0,0,1,.62744-.583H15.541a.54085.54085,0,0,1,.605.60547v.43945a.54085.54085,0,0,1-.605.60547H13.41748l-.04395.72559a1.29306,1.29306,0,0,1-.04395.30859h.022a2.39776,2.39776,0,0,1,.57227-.07715A2.53266,2.53266,0,0,1,16.74023,12.18555ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',6:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M14.51758,9.64453a1.85627,1.85627,0,0,0-1.24316.38477H13.252a1.73532,1.73532,0,0,1,1.72754-1.4082,2.66491,2.66491,0,0,1,.5498.06641c.35254.05469.57227.01074.70508-.40723l.16406-.5166a.53393.53393,0,0,0-.373-.75977,4.83723,4.83723,0,0,0-1.17773-.14258c-2.43164,0-3.7627,2.17773-3.7627,4.43359,0,2.47559,1.60645,3.69629,3.19043,3.69629A2.70585,2.70585,0,0,0,16.96,12.19727,2.43861,2.43861,0,0,0,14.51758,9.64453Zm-.23047,3.58691c-.67187,0-1.22168-.81445-1.22168-1.45215,0-.47363.30762-.583.72559-.583.96875,0,1.27734.59375,1.27734,1.12207A.82182.82182,0,0,1,14.28711,13.23145ZM10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Z"/></svg>'},italic:'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="13" y1="4" y2="4"/><line class="ql-stroke" x1="5" x2="11" y1="14" y2="14"/><line class="ql-stroke" x1="8" x2="10" y1="14" y2="4"/></svg>',image:'<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="10" width="12" x="3" y="4"/><circle class="ql-fill" cx="6" cy="7" r="1"/><polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"/></svg>',indent:{"+1":'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"/></svg>',"-1":'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="5 7 5 11 3 9 5 7"/></svg>'},link:'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="11" y1="7" y2="11"/><path class="ql-even ql-stroke" d="M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z"/><path class="ql-even ql-stroke" d="M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z"/></svg>',list:{bullet:'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="6" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="6" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="6" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="3" y1="4" y2="4"/><line class="ql-stroke" x1="3" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="3" y1="14" y2="14"/></svg>',check:'<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="9" x2="15" y1="4" y2="4"/><polyline class="ql-stroke" points="3 4 4 5 6 3"/><line class="ql-stroke" x1="9" x2="15" y1="14" y2="14"/><polyline class="ql-stroke" points="3 14 4 15 6 13"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="3 9 4 10 6 8"/></svg>',ordered:'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="7" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="7" x2="15" y1="14" y2="14"/><line class="ql-stroke ql-thin" x1="2.5" x2="4.5" y1="5.5" y2="5.5"/><path class="ql-fill" d="M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z"/><path class="ql-stroke ql-thin" d="M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156"/><path class="ql-stroke ql-thin" d="M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109"/></svg>'},script:{sub:'<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z"/><path class="ql-fill" d="M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z"/></svg>',super:'<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z"/><path class="ql-fill" d="M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z"/></svg>'},strike:'<svg viewbox="0 0 18 18"><line class="ql-stroke ql-thin" x1="15.5" x2="2.5" y1="8.5" y2="9.5"/><path class="ql-fill" d="M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z"/><path class="ql-fill" d="M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z"/></svg>',table:'<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="2" width="3" x="5" y="5"/><rect class="ql-fill" height="2" width="4" x="9" y="5"/><g class="ql-fill ql-transparent"><rect height="2" width="3" x="5" y="8"/><rect height="2" width="4" x="9" y="8"/><rect height="2" width="3" x="5" y="11"/><rect height="2" width="4" x="9" y="11"/></g></svg>',underline:'<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="12" x="3" y="15"/></svg>',video:'<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="12" width="1" x="5" y="3"/><rect class="ql-fill" height="12" width="1" x="12" y="3"/><rect class="ql-fill" height="2" width="8" x="5" y="8"/><rect class="ql-fill" height="1" width="3" x="3" y="5"/><rect class="ql-fill" height="1" width="3" x="3" y="7"/><rect class="ql-fill" height="1" width="3" x="3" y="10"/><rect class="ql-fill" height="1" width="3" x="3" y="12"/><rect class="ql-fill" height="1" width="3" x="12" y="5"/><rect class="ql-fill" height="1" width="3" x="12" y="7"/><rect class="ql-fill" height="1" width="3" x="12" y="10"/><rect class="ql-fill" height="1" width="3" x="12" y="12"/></svg>'};let st=0;function lt(t,e){t.setAttribute(e,`${!("true"===t.getAttribute(e))}`)}const at=class{constructor(t){this.select=t,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",(()=>{this.togglePicker()})),this.label.addEventListener("keydown",(t=>{switch(t.key){case"Enter":this.togglePicker();break;case"Escape":this.escape(),t.preventDefault()}})),this.select.addEventListener("change",this.update.bind(this))}togglePicker(){this.container.classList.toggle("ql-expanded"),lt(this.label,"aria-expanded"),lt(this.options,"aria-hidden")}buildItem(t){const e=document.createElement("span");e.tabIndex="0",e.setAttribute("role","button"),e.classList.add("ql-picker-item");const r=t.getAttribute("value");return r&&e.setAttribute("data-value",r),t.textContent&&e.setAttribute("data-label",t.textContent),e.addEventListener("click",(()=>{this.selectItem(e,!0)})),e.addEventListener("keydown",(t=>{switch(t.key){case"Enter":this.selectItem(e,!0),t.preventDefault();break;case"Escape":this.escape(),t.preventDefault()}})),e}buildLabel(){const t=document.createElement("span");return t.classList.add("ql-picker-label"),t.innerHTML='<svg viewbox="0 0 18 18"><polygon class="ql-stroke" points="7 11 9 13 11 11 7 11"/><polygon class="ql-stroke" points="7 7 9 5 11 7 7 7"/></svg>',t.tabIndex="0",t.setAttribute("role","button"),t.setAttribute("aria-expanded","false"),this.container.appendChild(t),t}buildOptions(){const t=document.createElement("span");t.classList.add("ql-picker-options"),t.setAttribute("aria-hidden","true"),t.tabIndex="-1",t.id=`ql-picker-options-${st}`,st+=1,this.label.setAttribute("aria-controls",t.id),this.options=t,Array.from(this.select.options).forEach((e=>{const r=this.buildItem(e);t.appendChild(r),!0===e.selected&&this.selectItem(r)})),this.container.appendChild(t)}buildPicker(){Array.from(this.select.attributes).forEach((t=>{this.container.setAttribute(t.name,t.value)})),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}escape(){this.close(),setTimeout((()=>this.label.focus()),1)}close(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}selectItem(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const r=this.container.querySelector(".ql-selected");t!==r&&(null!=r&&r.classList.remove("ql-selected"),null!=t&&(t.classList.add("ql-selected"),this.select.selectedIndex=Array.from(t.parentNode.children).indexOf(t),t.hasAttribute("data-value")?this.label.setAttribute("data-value",t.getAttribute("data-value")):this.label.removeAttribute("data-value"),t.hasAttribute("data-label")?this.label.setAttribute("data-label",t.getAttribute("data-label")):this.label.removeAttribute("data-label"),e&&(this.select.dispatchEvent(new Event("change")),this.close())))}update(){let t;if(this.select.selectedIndex>-1){const e=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];t=this.select.options[this.select.selectedIndex],this.selectItem(e)}else this.selectItem(null);const e=null!=t&&t!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",e)}};const ct=class extends at{constructor(t,e){super(t),this.label.innerHTML=e,this.container.classList.add("ql-color-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).slice(0,7).forEach((t=>{t.classList.add("ql-primary")}))}buildItem(t){const e=super.buildItem(t);return e.style.backgroundColor=t.getAttribute("value")||"",e}selectItem(t,e){super.selectItem(t,e);const r=this.label.querySelector(".ql-color-label"),n=t&&t.getAttribute("data-value")||"";r&&("line"===r.tagName?r.style.stroke=n:r.style.fill=n)}};const ut=class extends at{constructor(t,e){super(t),this.container.classList.add("ql-icon-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).forEach((t=>{t.innerHTML=e[t.getAttribute("data-value")||""]})),this.defaultItem=this.container.querySelector(".ql-selected"),this.selectItem(this.defaultItem)}selectItem(t,e){super.selectItem(t,e);const r=t||this.defaultItem;if(null!=r){if(this.label.innerHTML===r.innerHTML)return;this.label.innerHTML=r.innerHTML}}};const ht=class{constructor(t,e){this.quill=t,this.boundsContainer=e||document.body,this.root=t.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,(t=>{const{overflowY:e}=getComputedStyle(t,null);return"visible"!==e&&"clip"!==e})(this.quill.root)&&this.quill.root.addEventListener("scroll",(()=>{this.root.style.marginTop=-1*this.quill.root.scrollTop+"px"})),this.hide()}hide(){this.root.classList.add("ql-hidden")}position(t){const e=t.left+t.width/2-this.root.offsetWidth/2,r=t.bottom+this.quill.root.scrollTop;this.root.style.left=`${e}px`,this.root.style.top=`${r}px`,this.root.classList.remove("ql-flip");const n=this.boundsContainer.getBoundingClientRect(),i=this.root.getBoundingClientRect();let o=0;if(i.right>n.right&&(o=n.right-i.right,this.root.style.left=`${e+o}px`),i.left<n.left&&(o=n.left-i.left,this.root.style.left=`${e+o}px`),i.bottom>n.bottom){const e=i.bottom-i.top,n=t.bottom-t.top+e;this.root.style.top=r-n+"px",this.root.classList.add("ql-flip")}return o}show(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}};var dt=r(5575),pt=r(1637),mt=r(625);const ft=[!1,"center","right","justify"],gt=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],bt=[!1,"serif","monospace"],vt=["1","2","3",!1],yt=["small",!1,"large","huge"];class xt extends mt.Z{constructor(t,e){super(t,e);const r=e=>{document.body.contains(t.root)?(null==this.tooltip||this.tooltip.root.contains(e.target)||document.activeElement===this.tooltip.textbox||this.quill.hasFocus()||this.tooltip.hide(),null!=this.pickers&&this.pickers.forEach((t=>{t.container.contains(e.target)||t.close()}))):document.body.removeEventListener("click",r)};t.emitter.listenDOM("click",document.body,r)}addModule(t){const e=super.addModule(t);return"toolbar"===t&&this.extendToolbar(e),e}buildButtons(t,e){Array.from(t).forEach((t=>{(t.getAttribute("class")||"").split(/\s+/).forEach((r=>{if(r.startsWith("ql-")&&(r=r.slice(3),null!=e[r]))if("direction"===r)t.innerHTML=e[r][""]+e[r].rtl;else if("string"==typeof e[r])t.innerHTML=e[r];else{const n=t.value||"";null!=n&&e[r][n]&&(t.innerHTML=e[r][n])}}))}))}buildPickers(t,e){this.pickers=Array.from(t).map((t=>{if(t.classList.contains("ql-align")&&(null==t.querySelector("option")&&kt(t,ft),"object"==typeof e.align))return new ut(t,e.align);if(t.classList.contains("ql-background")||t.classList.contains("ql-color")){const r=t.classList.contains("ql-background")?"background":"color";return null==t.querySelector("option")&&kt(t,gt,"background"===r?"#ffffff":"#000000"),new ct(t,e[r])}return null==t.querySelector("option")&&(t.classList.contains("ql-font")?kt(t,bt):t.classList.contains("ql-header")?kt(t,vt):t.classList.contains("ql-size")&&kt(t,yt)),new at(t)}));this.quill.on(pt.Z.events.EDITOR_CHANGE,(()=>{this.pickers.forEach((t=>{t.update()}))}))}}xt.DEFAULTS=(0,dt.Z)({},mt.Z.DEFAULTS,{modules:{toolbar:{handlers:{formula(){this.quill.theme.tooltip.edit("formula")},image(){let t=this.container.querySelector("input.ql-image[type=file]");null==t&&(t=document.createElement("input"),t.setAttribute("type","file"),t.setAttribute("accept",this.quill.uploader.options.mimetypes.join(", ")),t.classList.add("ql-image"),t.addEventListener("change",(()=>{const e=this.quill.getSelection(!0);this.quill.uploader.upload(e,t.files),t.value=""})),this.container.appendChild(t)),t.click()},video(){this.quill.theme.tooltip.edit("video")}}}}});class wt extends ht{constructor(t,e){super(t,e),this.textbox=this.root.querySelector('input[type="text"]'),this.listen()}listen(){this.textbox.addEventListener("keydown",(t=>{"Enter"===t.key?(this.save(),t.preventDefault()):"Escape"===t.key&&(this.cancel(),t.preventDefault())}))}cancel(){this.hide(),this.restoreFocus()}edit(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"link",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),null==this.textbox)return;null!=e?this.textbox.value=e:t!==this.root.getAttribute("data-mode")&&(this.textbox.value="");const r=this.quill.getBounds(this.quill.selection.savedRange);null!=r&&this.position(r),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute(`data-${t}`)||""),this.root.setAttribute("data-mode",t)}restoreFocus(){this.quill.focus({preventScroll:!0})}save(){let{value:t}=this.textbox;switch(this.root.getAttribute("data-mode")){case"link":{const{scrollTop:e}=this.quill.root;this.linkRange?(this.quill.formatText(this.linkRange,"link",t,pt.Z.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",t,pt.Z.sources.USER)),this.quill.root.scrollTop=e;break}case"video":t=function(t){let e=t.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||t.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);if(e)return`${e[1]||"https"}://www.youtube.com/embed/${e[2]}?showinfo=0`;if(e=t.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))return`${e[1]||"https"}://player.vimeo.com/video/${e[2]}/`;return t}(t);case"formula":{if(!t)break;const e=this.quill.getSelection(!0);if(null!=e){const r=e.index+e.length;this.quill.insertEmbed(r,this.root.getAttribute("data-mode"),t,pt.Z.sources.USER),"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(r+1," ",pt.Z.sources.USER),this.quill.setSelection(r+2,pt.Z.sources.USER)}break}}this.textbox.value="",this.hide()}}function kt(t,e){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];e.forEach((e=>{const n=document.createElement("option");e===r?n.setAttribute("selected","selected"):n.setAttribute("value",String(e)),t.appendChild(n)}))}var qt=r(936);const _t=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]];class St extends wt{static TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join("");constructor(t,e){super(t,e),this.quill.on(pt.Z.events.EDITOR_CHANGE,((t,e,r,n)=>{if(t===pt.Z.events.SELECTION_CHANGE)if(null!=e&&e.length>0&&n===pt.Z.sources.USER){this.show(),this.root.style.left="0px",this.root.style.width="",this.root.style.width=`${this.root.offsetWidth}px`;const t=this.quill.getLines(e.index,e.length);if(1===t.length){const t=this.quill.getBounds(e);null!=t&&this.position(t)}else{const r=t[t.length-1],n=this.quill.getIndex(r),i=Math.min(r.length()-1,e.index+e.length-n),o=this.quill.getBounds(new qt.e(n,i));null!=o&&this.position(o)}}else document.activeElement!==this.textbox&&this.quill.hasFocus()&&this.hide()}))}listen(){super.listen(),this.root.querySelector(".ql-close").addEventListener("click",(()=>{this.root.classList.remove("ql-editing")})),this.quill.on(pt.Z.events.SCROLL_OPTIMIZE,(()=>{setTimeout((()=>{if(this.root.classList.contains("ql-hidden"))return;const t=this.quill.getSelection();if(null!=t){const e=this.quill.getBounds(t);null!=e&&this.position(e)}}),1)}))}cancel(){this.show()}position(t){const e=super.position(t),r=this.root.querySelector(".ql-tooltip-arrow");return r.style.marginLeft="",0!==e&&(r.style.marginLeft=-1*e-r.offsetWidth/2+"px"),e}}class At extends xt{constructor(t,e){null!=e.modules.toolbar&&null==e.modules.toolbar.container&&(e.modules.toolbar.container=_t),super(t,e),this.quill.container.classList.add("ql-bubble")}extendToolbar(t){this.tooltip=new St(this.quill,this.options.bounds),null!=t.container&&(this.tooltip.root.appendChild(t.container),this.buildButtons(t.container.querySelectorAll("button"),ot),this.buildPickers(t.container.querySelectorAll("select"),ot))}}At.DEFAULTS=(0,dt.Z)({},xt.DEFAULTS,{modules:{toolbar:{handlers:{link(t){t?this.quill.theme.tooltip.edit():this.quill.format("link",!1,P.ZP.sources.USER)}}}}});const Nt=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]];class Tt extends wt{static TEMPLATE=['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join("");preview=this.root.querySelector("a.ql-preview");listen(){super.listen(),this.root.querySelector("a.ql-action").addEventListener("click",(t=>{this.root.classList.contains("ql-editing")?this.save():this.edit("link",this.preview.textContent),t.preventDefault()})),this.root.querySelector("a.ql-remove").addEventListener("click",(t=>{if(null!=this.linkRange){const t=this.linkRange;this.restoreFocus(),this.quill.formatText(t,"link",!1,pt.Z.sources.USER),delete this.linkRange}t.preventDefault(),this.hide()})),this.quill.on(pt.Z.events.SELECTION_CHANGE,((t,e,r)=>{if(null!=t){if(0===t.length&&r===pt.Z.sources.USER){const[e,r]=this.quill.scroll.descendant(w.Z,t.index);if(null!=e){this.linkRange=new qt.e(t.index-r,e.length());const n=w.Z.formats(e.domNode);this.preview.textContent=n,this.preview.setAttribute("href",n),this.show();const i=this.quill.getBounds(this.linkRange);return void(null!=i&&this.position(i))}}else delete this.linkRange;this.hide()}}))}show(){super.show(),this.root.removeAttribute("data-mode")}}class Et extends xt{constructor(t,e){null!=e.modules.toolbar&&null==e.modules.toolbar.container&&(e.modules.toolbar.container=Nt),super(t,e),this.quill.container.classList.add("ql-snow")}extendToolbar(t){null!=t.container&&(t.container.classList.add("ql-snow"),this.buildButtons(t.container.querySelectorAll("button"),ot),this.buildPickers(t.container.querySelectorAll("select"),ot),this.tooltip=new Tt(this.quill,this.options.bounds),t.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"k",shortKey:!0},((e,r)=>{t.handlers.link.call(t,!r.format.link)})))}}Et.DEFAULTS=(0,dt.Z)({},xt.DEFAULTS,{modules:{toolbar:{handlers:{link(t){if(t){const t=this.quill.getSelection();if(null==t||0===t.length)return;let e=this.quill.getText(t);/^\S+@\S+\.\S+$/.test(e)&&0!==e.indexOf("mailto:")&&(e=`mailto:${e}`);const{tooltip:r}=this.quill.theme;r.edit("link",e)}else this.quill.format("link",!1,P.ZP.sources.USER)}}}}});const Lt=Et;n.ZP.register({"attributors/attribute/direction":o.IF,"attributors/class/align":i.dk,"attributors/class/background":f.Y,"attributors/class/color":g.Hn,"attributors/class/direction":o.hY,"attributors/class/font":b._,"attributors/class/size":v.m,"attributors/style/align":i.HE,"attributors/style/background":f.w,"attributors/style/color":g.HQ,"attributors/style/direction":o.H8,"attributors/style/font":b.H,"attributors/style/size":v.Z},!0),n.ZP.register({"formats/align":i.dk,"formats/direction":o.hY,"formats/indent":a,"formats/background":f.w,"formats/color":g.HQ,"formats/font":b._,"formats/size":v.m,"formats/blockquote":h,"formats/code-block":B.ZP,"formats/header":p,"formats/list":m.Z,"formats/bold":y.Z,"formats/code":B.EK,"formats/italic":x.Z,"formats/link":w.Z,"formats/script":_,"formats/strike":S.Z,"formats/underline":A.Z,"formats/formula":N.Z,"formats/image":L,"formats/video":O,"modules/syntax":V,"modules/table":tt,"modules/toolbar":rt,"themes/bubble":At,"themes/snow":Lt,"ui/icons":ot,"ui/picker":at,"ui/icon-picker":ut,"ui/color-picker":ct,"ui/tooltip":ht},!0);const Ct=n.ZP}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={id:n,loaded:!1,exports:{}};return t[n](o,o.exports,r),o.loaded=!0,o.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var n={};(()=>{"use strict";r.d(n,{Z:()=>Wo});var t=r(9196),e=r(9929),i=r.n(e);class o{constructor(t,e,r){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=t,this.start=e,this.end=r}static range(t,e){return e?t&&t.loc&&e.loc&&t.loc.lexer===e.loc.lexer?new o(t.loc.lexer,t.loc.start,e.loc.end):null:t&&t.loc}}class s{constructor(t,e){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=t,this.loc=e}range(t,e){return new s(e,o.range(this,t))}}class l{constructor(t,e){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var r,n,i="KaTeX parse error: "+t,o=e&&e.loc;if(o&&o.start<=o.end){var s=o.lexer.input;r=o.start,n=o.end,r===s.length?i+=" at end of input: ":i+=" at position "+(r+1)+": ";var a=s.slice(r,n).replace(/[^]/g,"$&̲");i+=(r>15?"…"+s.slice(r-15,r):s.slice(0,r))+a+(n+15<s.length?s.slice(n,n+15)+"…":s.slice(n))}var c=new Error(i);return c.name="ParseError",c.__proto__=l.prototype,c.position=r,null!=r&&null!=n&&(c.length=n-r),c.rawMessage=t,c}}l.prototype.__proto__=Error.prototype;var a=/([A-Z])/g,c={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},u=/[&><"']/g;var h=function t(e){return"ordgroup"===e.type||"color"===e.type?1===e.body.length?t(e.body[0]):e:"font"===e.type?t(e.body):e},d={contains:function(t,e){return-1!==t.indexOf(e)},deflt:function(t,e){return void 0===t?e:t},escape:function(t){return String(t).replace(u,(t=>c[t]))},hyphenate:function(t){return t.replace(a,"-$1").toLowerCase()},getBaseElem:h,isCharacterBox:function(t){var e=h(t);return"mathord"===e.type||"textord"===e.type||"atom"===e.type},protocolFromUrl:function(t){var e=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(t);return e?":"!==e[2]?null:/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(e[1])?e[1].toLowerCase():null:"_relative"}},p={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:t=>"#"+t},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:(t,e)=>(e.push(t),e)},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:t=>Math.max(0,t),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:t=>Math.max(0,t),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:t=>Math.max(0,t),cli:"-e, --max-expand <n>",cliProcessor:t=>"Infinity"===t?1/0:parseInt(t)},globalGroup:{type:"boolean",cli:!1}};function m(t){if(t.default)return t.default;var e=t.type,r=Array.isArray(e)?e[0]:e;if("string"!=typeof r)return r.enum[0];switch(r){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class f{constructor(t){for(var e 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,t=t||{},p)if(p.hasOwnProperty(e)){var r=p[e];this[e]=void 0!==t[e]?r.processor?r.processor(t[e]):t[e]:m(r)}}reportNonstrict(t,e,r){var n=this.strict;if("function"==typeof n&&(n=n(t,e,r)),n&&"ignore"!==n){if(!0===n||"error"===n)throw new l("LaTeX-incompatible input and strict mode is set to 'error': "+e+" ["+t+"]",r);"warn"===n?"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+e+" ["+t+"]"):"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+n+"': "+e+" ["+t+"]")}}useStrictBehavior(t,e,r){var n=this.strict;if("function"==typeof n)try{n=n(t,e,r)}catch(t){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': "+e+" ["+t+"]"),!1):("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+n+"': "+e+" ["+t+"]"),!1)))}isTrusted(t){if(t.url&&!t.protocol){var e=d.protocolFromUrl(t.url);if(null==e)return!1;t.protocol=e}var r="function"==typeof this.trust?this.trust(t):this.trust;return Boolean(r)}}class g{constructor(t,e,r){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=t,this.size=e,this.cramped=r}sup(){return b[v[this.id]]}sub(){return b[y[this.id]]}fracNum(){return b[x[this.id]]}fracDen(){return b[w[this.id]]}cramp(){return b[k[this.id]]}text(){return b[q[this.id]]}isTight(){return this.size>=2}}var b=[new g(0,0,!1),new g(1,0,!0),new g(2,1,!1),new g(3,1,!0),new g(4,2,!1),new g(5,2,!0),new g(6,3,!1),new g(7,3,!0)],v=[4,5,4,5,6,7,6,7],y=[5,5,5,5,7,7,7,7],x=[2,3,4,5,6,7,6,7],w=[3,3,5,5,7,7,7,7],k=[1,1,3,3,5,5,7,7],q=[0,1,2,3,2,3,2,3],_={DISPLAY:b[0],TEXT:b[2],SCRIPT:b[4],SCRIPTSCRIPT:b[6]},S=[{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]]}];var A=[];function N(t){for(var e=0;e<A.length;e+=2)if(t>=A[e]&&t<=A[e+1])return!0;return!1}S.forEach((t=>t.blocks.forEach((t=>A.push(...t)))));var T=80,E={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"};class L{constructor(t){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=t,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(t){return d.contains(this.classes,t)}toNode(){for(var t=document.createDocumentFragment(),e=0;e<this.children.length;e++)t.appendChild(this.children[e].toNode());return t}toMarkup(){for(var t="",e=0;e<this.children.length;e++)t+=this.children[e].toMarkup();return t}toText(){return this.children.map((t=>t.toText())).join("")}}var C={"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]}},M={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]},O={Å:"A",Ð:"D",Þ:"o",å:"a",ð:"d",þ:"o",А:"A",Б:"B",В:"B",Г:"F",Д:"A",Е:"E",Ж:"K",З:"3",И:"N",Й:"N",К:"K",Л:"N",М:"M",Н:"H",О:"O",П:"N",Р:"P",С:"C",Т:"T",У:"y",Ф:"O",Х:"X",Ц:"U",Ч:"h",Ш:"W",Щ:"W",Ъ:"B",Ы:"X",Ь:"B",Э:"3",Ю:"X",Я:"R",а:"a",б:"b",в:"a",г:"r",д:"y",е:"e",ж:"m",з:"e",и:"n",й:"n",к:"n",л:"n",м:"m",н:"n",о:"o",п:"n",р:"p",с:"c",т:"o",у:"y",ф:"b",х:"x",ц:"n",ч:"n",ш:"w",щ:"w",ъ:"a",ы:"m",ь:"a",э:"e",ю:"m",я:"r"};function B(t,e,r){if(!C[e])throw new Error("Font metrics not found for font: "+e+".");var n=t.charCodeAt(0),i=C[e][n];if(!i&&t[0]in O&&(n=O[t[0]].charCodeAt(0),i=C[e][n]),i||"text"!==r||N(n)&&(i=C[e][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}var z={};var P=[[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],Z=function(t,e){return e.size<2?t:P[t-1][e.size-1]};class I{constructor(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||I.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}extend(t){var e={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 r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return new I(e)}havingStyle(t){return this.style===t?this:this.extend({style:t,size:Z(this.textSize,t)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(t){return this.size===t&&this.textSize===t?this:this.extend({style:this.style.text(),size:t,textSize:t,sizeMultiplier:R[t-1]})}havingBaseStyle(t){t=t||this.style.text();var e=Z(I.BASESIZE,t);return this.size===e&&this.textSize===I.BASESIZE&&this.style===t?this:this.extend({style:t,size:e})}havingBaseSizing(){var t;switch(this.style.id){case 4:case 5:t=3;break;case 6:case 7:t=1;break;default:t=6}return this.extend({style:this.style.text(),size:t})}withColor(t){return this.extend({color:t})}withPhantom(){return this.extend({phantom:!0})}withFont(t){return this.extend({font:t})}withTextFontFamily(t){return this.extend({fontFamily:t,font:""})}withTextFontWeight(t){return this.extend({fontWeight:t,font:""})}withTextFontShape(t){return this.extend({fontShape:t,font:""})}sizingClasses(t){return t.size!==this.size?["sizing","reset-size"+t.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==I.BASESIZE?["sizing","reset-size"+this.size,"size"+I.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=function(t){var e;if(!z[e=t>=5?0:t>=3?1:2]){var r=z[e]={cssEmPerMu:M.quad[e]/18};for(var n in M)M.hasOwnProperty(n)&&(r[n]=M[n][e])}return z[e]}(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}I.BASESIZE=6;var j={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},H={ex:!0,em:!0,mu:!0},D=function(t){return"string"!=typeof t&&(t=t.unit),t in j||t in H||"ex"===t},$=function(t,e){var r;if(t.unit in j)r=j[t.unit]/e.fontMetrics().ptPerEm/e.sizeMultiplier;else if("mu"===t.unit)r=e.fontMetrics().cssEmPerMu;else{var n;if(n=e.style.isTight()?e.havingStyle(e.style.text()):e,"ex"===t.unit)r=n.fontMetrics().xHeight;else{if("em"!==t.unit)throw new l("Invalid unit: '"+t.unit+"'");r=n.fontMetrics().quad}n!==e&&(r*=n.sizeMultiplier/e.sizeMultiplier)}return Math.min(t.number*r,e.maxSize)},U=function(t){return+t.toFixed(4)+"em"},F=function(t){return t.filter((t=>t)).join(" ")},V=function(t,e,r){if(this.classes=t||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},e){e.style.isTight()&&this.classes.push("mtight");var n=e.getColor();n&&(this.style.color=n)}},W=function(t){var e=document.createElement(t);for(var r in e.className=F(this.classes),this.style)this.style.hasOwnProperty(r)&&(e.style[r]=this.style[r]);for(var n in this.attributes)this.attributes.hasOwnProperty(n)&&e.setAttribute(n,this.attributes[n]);for(var i=0;i<this.children.length;i++)e.appendChild(this.children[i].toNode());return e},K=function(t){var e="<"+t;this.classes.length&&(e+=' class="'+d.escape(F(this.classes))+'"');var r="";for(var n in this.style)this.style.hasOwnProperty(n)&&(r+=d.hyphenate(n)+":"+this.style[n]+";");for(var i in r&&(e+=' style="'+d.escape(r)+'"'),this.attributes)this.attributes.hasOwnProperty(i)&&(e+=" "+i+'="'+d.escape(this.attributes[i])+'"');e+=">";for(var o=0;o<this.children.length;o++)e+=this.children[o].toMarkup();return e+="</"+t+">"};class G{constructor(t,e,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,V.call(this,t,r,n),this.children=e||[]}setAttribute(t,e){this.attributes[t]=e}hasClass(t){return d.contains(this.classes,t)}toNode(){return W.call(this,"span")}toMarkup(){return K.call(this,"span")}}class Y{constructor(t,e,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,V.call(this,e,n),this.children=r||[],this.setAttribute("href",t)}setAttribute(t,e){this.attributes[t]=e}hasClass(t){return d.contains(this.classes,t)}toNode(){return W.call(this,"a")}toMarkup(){return K.call(this,"a")}}class X{constructor(t,e,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=e,this.src=t,this.classes=["mord"],this.style=r}hasClass(t){return d.contains(this.classes,t)}toNode(){var t=document.createElement("img");for(var e in t.src=this.src,t.alt=this.alt,t.className="mord",this.style)this.style.hasOwnProperty(e)&&(t.style[e]=this.style[e]);return t}toMarkup(){var t='<img src="'+d.escape(this.src)+'" alt="'+d.escape(this.alt)+'"',e="";for(var r in this.style)this.style.hasOwnProperty(r)&&(e+=d.hyphenate(r)+":"+this.style[r]+";");return e&&(t+=' style="'+d.escape(e)+'"'),t+="'/>"}}var Q={î:"ı̂",ï:"ı̈",í:"ı́",ì:"ı̀"};class J{constructor(t,e,r,n,i,o,s,l){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=t,this.height=e||0,this.depth=r||0,this.italic=n||0,this.skew=i||0,this.width=o||0,this.classes=s||[],this.style=l||{},this.maxFontSize=0;var a=function(t){for(var e=0;e<S.length;e++)for(var r=S[e],n=0;n<r.blocks.length;n++){var i=r.blocks[n];if(t>=i[0]&&t<=i[1])return r.name}return null}(this.text.charCodeAt(0));a&&this.classes.push(a+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=Q[this.text])}hasClass(t){return d.contains(this.classes,t)}toNode(){var t=document.createTextNode(this.text),e=null;for(var r in this.italic>0&&((e=document.createElement("span")).style.marginRight=U(this.italic)),this.classes.length>0&&((e=e||document.createElement("span")).className=F(this.classes)),this.style)this.style.hasOwnProperty(r)&&((e=e||document.createElement("span")).style[r]=this.style[r]);return e?(e.appendChild(t),e):t}toMarkup(){var t=!1,e="<span";this.classes.length&&(t=!0,e+=' class="',e+=d.escape(F(this.classes)),e+='"');var r="";for(var n in this.italic>0&&(r+="margin-right:"+this.italic+"em;"),this.style)this.style.hasOwnProperty(n)&&(r+=d.hyphenate(n)+":"+this.style[n]+";");r&&(t=!0,e+=' style="'+d.escape(r)+'"');var i=d.escape(this.text);return t?(e+=">",e+=i,e+="</span>"):i}}class tt{constructor(t,e){this.children=void 0,this.attributes=void 0,this.children=t||[],this.attributes=e||{}}toNode(){var t=document.createElementNS("http://www.w3.org/2000/svg","svg");for(var e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&t.setAttribute(e,this.attributes[e]);for(var r=0;r<this.children.length;r++)t.appendChild(this.children[r].toNode());return t}toMarkup(){var t='<svg xmlns="http://www.w3.org/2000/svg"';for(var e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&(t+=" "+e+'="'+d.escape(this.attributes[e])+'"');t+=">";for(var r=0;r<this.children.length;r++)t+=this.children[r].toMarkup();return t+="</svg>"}}class et{constructor(t,e){this.pathName=void 0,this.alternate=void 0,this.pathName=t,this.alternate=e}toNode(){var t=document.createElementNS("http://www.w3.org/2000/svg","path");return this.alternate?t.setAttribute("d",this.alternate):t.setAttribute("d",E[this.pathName]),t}toMarkup(){return this.alternate?'<path d="'+d.escape(this.alternate)+'"/>':'<path d="'+d.escape(E[this.pathName])+'"/>'}}class rt{constructor(t){this.attributes=void 0,this.attributes=t||{}}toNode(){var t=document.createElementNS("http://www.w3.org/2000/svg","line");for(var e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&t.setAttribute(e,this.attributes[e]);return t}toMarkup(){var t="<line";for(var e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&(t+=" "+e+'="'+d.escape(this.attributes[e])+'"');return t+="/>"}}function nt(t){if(t instanceof J)return t;throw new Error("Expected symbolNode but got "+String(t)+".")}var it={bin:1,close:1,inner:1,open:1,punct:1,rel:1},ot={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},st={math:{},text:{}};function lt(t,e,r,n,i,o){st[t][i]={font:e,group:r,replace:n},o&&n&&(st[t][n]=st[t][i])}var at="math",ct="text",ut="main",ht="ams",dt="accent-token",pt="bin",mt="close",ft="inner",gt="mathord",bt="op-token",vt="open",yt="punct",xt="rel",wt="spacing",kt="textord";lt(at,ut,xt,"≡","\\equiv",!0),lt(at,ut,xt,"≺","\\prec",!0),lt(at,ut,xt,"≻","\\succ",!0),lt(at,ut,xt,"","\\sim",!0),lt(at,ut,xt,"⊥","\\perp"),lt(at,ut,xt,"⪯","\\preceq",!0),lt(at,ut,xt,"⪰","\\succeq",!0),lt(at,ut,xt,"≃","\\simeq",!0),lt(at,ut,xt,"","\\mid",!0),lt(at,ut,xt,"≪","\\ll",!0),lt(at,ut,xt,"≫","\\gg",!0),lt(at,ut,xt,"≍","\\asymp",!0),lt(at,ut,xt,"∥","\\parallel"),lt(at,ut,xt,"⋈","\\bowtie",!0),lt(at,ut,xt,"⌣","\\smile",!0),lt(at,ut,xt,"⊑","\\sqsubseteq",!0),lt(at,ut,xt,"⊒","\\sqsupseteq",!0),lt(at,ut,xt,"≐","\\doteq",!0),lt(at,ut,xt,"⌢","\\frown",!0),lt(at,ut,xt,"∋","\\ni",!0),lt(at,ut,xt,"∝","\\propto",!0),lt(at,ut,xt,"⊢","\\vdash",!0),lt(at,ut,xt,"⊣","\\dashv",!0),lt(at,ut,xt,"∋","\\owns"),lt(at,ut,yt,".","\\ldotp"),lt(at,ut,yt,"⋅","\\cdotp"),lt(at,ut,kt,"#","\\#"),lt(ct,ut,kt,"#","\\#"),lt(at,ut,kt,"&","\\&"),lt(ct,ut,kt,"&","\\&"),lt(at,ut,kt,"ℵ","\\aleph",!0),lt(at,ut,kt,"∀","\\forall",!0),lt(at,ut,kt,"ℏ","\\hbar",!0),lt(at,ut,kt,"∃","\\exists",!0),lt(at,ut,kt,"∇","\\nabla",!0),lt(at,ut,kt,"♭","\\flat",!0),lt(at,ut,kt,"","\\ell",!0),lt(at,ut,kt,"♮","\\natural",!0),lt(at,ut,kt,"♣","\\clubsuit",!0),lt(at,ut,kt,"℘","\\wp",!0),lt(at,ut,kt,"♯","\\sharp",!0),lt(at,ut,kt,"♢","\\diamondsuit",!0),lt(at,ut,kt,"","\\Re",!0),lt(at,ut,kt,"♡","\\heartsuit",!0),lt(at,ut,kt,"","\\Im",!0),lt(at,ut,kt,"♠","\\spadesuit",!0),lt(at,ut,kt,"§","\\S",!0),lt(ct,ut,kt,"§","\\S"),lt(at,ut,kt,"¶","\\P",!0),lt(ct,ut,kt,"¶","\\P"),lt(at,ut,kt,"†","\\dag"),lt(ct,ut,kt,"†","\\dag"),lt(ct,ut,kt,"†","\\textdagger"),lt(at,ut,kt,"‡","\\ddag"),lt(ct,ut,kt,"‡","\\ddag"),lt(ct,ut,kt,"‡","\\textdaggerdbl"),lt(at,ut,mt,"⎱","\\rmoustache",!0),lt(at,ut,vt,"⎰","\\lmoustache",!0),lt(at,ut,mt,"⟯","\\rgroup",!0),lt(at,ut,vt,"⟮","\\lgroup",!0),lt(at,ut,pt,"∓","\\mp",!0),lt(at,ut,pt,"⊖","\\ominus",!0),lt(at,ut,pt,"⊎","\\uplus",!0),lt(at,ut,pt,"⊓","\\sqcap",!0),lt(at,ut,pt,"","\\ast"),lt(at,ut,pt,"⊔","\\sqcup",!0),lt(at,ut,pt,"◯","\\bigcirc",!0),lt(at,ut,pt,"∙","\\bullet",!0),lt(at,ut,pt,"‡","\\ddagger"),lt(at,ut,pt,"≀","\\wr",!0),lt(at,ut,pt,"⨿","\\amalg"),lt(at,ut,pt,"&","\\And"),lt(at,ut,xt,"⟵","\\longleftarrow",!0),lt(at,ut,xt,"⇐","\\Leftarrow",!0),lt(at,ut,xt,"⟸","\\Longleftarrow",!0),lt(at,ut,xt,"⟶","\\longrightarrow",!0),lt(at,ut,xt,"⇒","\\Rightarrow",!0),lt(at,ut,xt,"⟹","\\Longrightarrow",!0),lt(at,ut,xt,"↔","\\leftrightarrow",!0),lt(at,ut,xt,"⟷","\\longleftrightarrow",!0),lt(at,ut,xt,"⇔","\\Leftrightarrow",!0),lt(at,ut,xt,"⟺","\\Longleftrightarrow",!0),lt(at,ut,xt,"↦","\\mapsto",!0),lt(at,ut,xt,"⟼","\\longmapsto",!0),lt(at,ut,xt,"↗","\\nearrow",!0),lt(at,ut,xt,"↩","\\hookleftarrow",!0),lt(at,ut,xt,"↪","\\hookrightarrow",!0),lt(at,ut,xt,"↘","\\searrow",!0),lt(at,ut,xt,"↼","\\leftharpoonup",!0),lt(at,ut,xt,"⇀","\\rightharpoonup",!0),lt(at,ut,xt,"↙","\\swarrow",!0),lt(at,ut,xt,"↽","\\leftharpoondown",!0),lt(at,ut,xt,"⇁","\\rightharpoondown",!0),lt(at,ut,xt,"↖","\\nwarrow",!0),lt(at,ut,xt,"⇌","\\rightleftharpoons",!0),lt(at,ht,xt,"≮","\\nless",!0),lt(at,ht,xt,"","\\@nleqslant"),lt(at,ht,xt,"","\\@nleqq"),lt(at,ht,xt,"⪇","\\lneq",!0),lt(at,ht,xt,"≨","\\lneqq",!0),lt(at,ht,xt,"","\\@lvertneqq"),lt(at,ht,xt,"⋦","\\lnsim",!0),lt(at,ht,xt,"⪉","\\lnapprox",!0),lt(at,ht,xt,"⊀","\\nprec",!0),lt(at,ht,xt,"⋠","\\npreceq",!0),lt(at,ht,xt,"⋨","\\precnsim",!0),lt(at,ht,xt,"⪹","\\precnapprox",!0),lt(at,ht,xt,"≁","\\nsim",!0),lt(at,ht,xt,"","\\@nshortmid"),lt(at,ht,xt,"∤","\\nmid",!0),lt(at,ht,xt,"⊬","\\nvdash",!0),lt(at,ht,xt,"⊭","\\nvDash",!0),lt(at,ht,xt,"⋪","\\ntriangleleft"),lt(at,ht,xt,"⋬","\\ntrianglelefteq",!0),lt(at,ht,xt,"⊊","\\subsetneq",!0),lt(at,ht,xt,"","\\@varsubsetneq"),lt(at,ht,xt,"⫋","\\subsetneqq",!0),lt(at,ht,xt,"","\\@varsubsetneqq"),lt(at,ht,xt,"≯","\\ngtr",!0),lt(at,ht,xt,"","\\@ngeqslant"),lt(at,ht,xt,"","\\@ngeqq"),lt(at,ht,xt,"⪈","\\gneq",!0),lt(at,ht,xt,"≩","\\gneqq",!0),lt(at,ht,xt,"","\\@gvertneqq"),lt(at,ht,xt,"⋧","\\gnsim",!0),lt(at,ht,xt,"⪊","\\gnapprox",!0),lt(at,ht,xt,"⊁","\\nsucc",!0),lt(at,ht,xt,"⋡","\\nsucceq",!0),lt(at,ht,xt,"⋩","\\succnsim",!0),lt(at,ht,xt,"⪺","\\succnapprox",!0),lt(at,ht,xt,"≆","\\ncong",!0),lt(at,ht,xt,"","\\@nshortparallel"),lt(at,ht,xt,"∦","\\nparallel",!0),lt(at,ht,xt,"⊯","\\nVDash",!0),lt(at,ht,xt,"⋫","\\ntriangleright"),lt(at,ht,xt,"⋭","\\ntrianglerighteq",!0),lt(at,ht,xt,"","\\@nsupseteqq"),lt(at,ht,xt,"⊋","\\supsetneq",!0),lt(at,ht,xt,"","\\@varsupsetneq"),lt(at,ht,xt,"⫌","\\supsetneqq",!0),lt(at,ht,xt,"","\\@varsupsetneqq"),lt(at,ht,xt,"⊮","\\nVdash",!0),lt(at,ht,xt,"⪵","\\precneqq",!0),lt(at,ht,xt,"⪶","\\succneqq",!0),lt(at,ht,xt,"","\\@nsubseteqq"),lt(at,ht,pt,"⊴","\\unlhd"),lt(at,ht,pt,"⊵","\\unrhd"),lt(at,ht,xt,"↚","\\nleftarrow",!0),lt(at,ht,xt,"↛","\\nrightarrow",!0),lt(at,ht,xt,"⇍","\\nLeftarrow",!0),lt(at,ht,xt,"⇏","\\nRightarrow",!0),lt(at,ht,xt,"↮","\\nleftrightarrow",!0),lt(at,ht,xt,"⇎","\\nLeftrightarrow",!0),lt(at,ht,xt,"△","\\vartriangle"),lt(at,ht,kt,"ℏ","\\hslash"),lt(at,ht,kt,"▽","\\triangledown"),lt(at,ht,kt,"◊","\\lozenge"),lt(at,ht,kt,"Ⓢ","\\circledS"),lt(at,ht,kt,"®","\\circledR"),lt(ct,ht,kt,"®","\\circledR"),lt(at,ht,kt,"∡","\\measuredangle",!0),lt(at,ht,kt,"∄","\\nexists"),lt(at,ht,kt,"℧","\\mho"),lt(at,ht,kt,"Ⅎ","\\Finv",!0),lt(at,ht,kt,"⅁","\\Game",!0),lt(at,ht,kt,"","\\backprime"),lt(at,ht,kt,"▲","\\blacktriangle"),lt(at,ht,kt,"▼","\\blacktriangledown"),lt(at,ht,kt,"■","\\blacksquare"),lt(at,ht,kt,"⧫","\\blacklozenge"),lt(at,ht,kt,"★","\\bigstar"),lt(at,ht,kt,"∢","\\sphericalangle",!0),lt(at,ht,kt,"∁","\\complement",!0),lt(at,ht,kt,"ð","\\eth",!0),lt(ct,ut,kt,"ð","ð"),lt(at,ht,kt,"","\\diagup"),lt(at,ht,kt,"╲","\\diagdown"),lt(at,ht,kt,"□","\\square"),lt(at,ht,kt,"□","\\Box"),lt(at,ht,kt,"◊","\\Diamond"),lt(at,ht,kt,"¥","\\yen",!0),lt(ct,ht,kt,"¥","\\yen",!0),lt(at,ht,kt,"✓","\\checkmark",!0),lt(ct,ht,kt,"✓","\\checkmark"),lt(at,ht,kt,"ℶ","\\beth",!0),lt(at,ht,kt,"ℸ","\\daleth",!0),lt(at,ht,kt,"ℷ","\\gimel",!0),lt(at,ht,kt,"ϝ","\\digamma",!0),lt(at,ht,kt,"ϰ","\\varkappa"),lt(at,ht,vt,"┌","\\@ulcorner",!0),lt(at,ht,mt,"┐","\\@urcorner",!0),lt(at,ht,vt,"└","\\@llcorner",!0),lt(at,ht,mt,"┘","\\@lrcorner",!0),lt(at,ht,xt,"≦","\\leqq",!0),lt(at,ht,xt,"⩽","\\leqslant",!0),lt(at,ht,xt,"⪕","\\eqslantless",!0),lt(at,ht,xt,"≲","\\lesssim",!0),lt(at,ht,xt,"⪅","\\lessapprox",!0),lt(at,ht,xt,"≊","\\approxeq",!0),lt(at,ht,pt,"⋖","\\lessdot"),lt(at,ht,xt,"⋘","\\lll",!0),lt(at,ht,xt,"≶","\\lessgtr",!0),lt(at,ht,xt,"⋚","\\lesseqgtr",!0),lt(at,ht,xt,"⪋","\\lesseqqgtr",!0),lt(at,ht,xt,"≑","\\doteqdot"),lt(at,ht,xt,"≓","\\risingdotseq",!0),lt(at,ht,xt,"≒","\\fallingdotseq",!0),lt(at,ht,xt,"∽","\\backsim",!0),lt(at,ht,xt,"⋍","\\backsimeq",!0),lt(at,ht,xt,"⫅","\\subseteqq",!0),lt(at,ht,xt,"⋐","\\Subset",!0),lt(at,ht,xt,"⊏","\\sqsubset",!0),lt(at,ht,xt,"≼","\\preccurlyeq",!0),lt(at,ht,xt,"⋞","\\curlyeqprec",!0),lt(at,ht,xt,"≾","\\precsim",!0),lt(at,ht,xt,"⪷","\\precapprox",!0),lt(at,ht,xt,"⊲","\\vartriangleleft"),lt(at,ht,xt,"⊴","\\trianglelefteq"),lt(at,ht,xt,"⊨","\\vDash",!0),lt(at,ht,xt,"⊪","\\Vvdash",!0),lt(at,ht,xt,"⌣","\\smallsmile"),lt(at,ht,xt,"⌢","\\smallfrown"),lt(at,ht,xt,"≏","\\bumpeq",!0),lt(at,ht,xt,"≎","\\Bumpeq",!0),lt(at,ht,xt,"≧","\\geqq",!0),lt(at,ht,xt,"⩾","\\geqslant",!0),lt(at,ht,xt,"⪖","\\eqslantgtr",!0),lt(at,ht,xt,"≳","\\gtrsim",!0),lt(at,ht,xt,"⪆","\\gtrapprox",!0),lt(at,ht,pt,"⋗","\\gtrdot"),lt(at,ht,xt,"⋙","\\ggg",!0),lt(at,ht,xt,"≷","\\gtrless",!0),lt(at,ht,xt,"⋛","\\gtreqless",!0),lt(at,ht,xt,"⪌","\\gtreqqless",!0),lt(at,ht,xt,"≖","\\eqcirc",!0),lt(at,ht,xt,"≗","\\circeq",!0),lt(at,ht,xt,"≜","\\triangleq",!0),lt(at,ht,xt,"","\\thicksim"),lt(at,ht,xt,"≈","\\thickapprox"),lt(at,ht,xt,"⫆","\\supseteqq",!0),lt(at,ht,xt,"⋑","\\Supset",!0),lt(at,ht,xt,"⊐","\\sqsupset",!0),lt(at,ht,xt,"≽","\\succcurlyeq",!0),lt(at,ht,xt,"⋟","\\curlyeqsucc",!0),lt(at,ht,xt,"≿","\\succsim",!0),lt(at,ht,xt,"⪸","\\succapprox",!0),lt(at,ht,xt,"⊳","\\vartriangleright"),lt(at,ht,xt,"⊵","\\trianglerighteq"),lt(at,ht,xt,"⊩","\\Vdash",!0),lt(at,ht,xt,"","\\shortmid"),lt(at,ht,xt,"∥","\\shortparallel"),lt(at,ht,xt,"≬","\\between",!0),lt(at,ht,xt,"⋔","\\pitchfork",!0),lt(at,ht,xt,"∝","\\varpropto"),lt(at,ht,xt,"◀","\\blacktriangleleft"),lt(at,ht,xt,"∴","\\therefore",!0),lt(at,ht,xt,"∍","\\backepsilon"),lt(at,ht,xt,"▶","\\blacktriangleright"),lt(at,ht,xt,"∵","\\because",!0),lt(at,ht,xt,"⋘","\\llless"),lt(at,ht,xt,"⋙","\\gggtr"),lt(at,ht,pt,"⊲","\\lhd"),lt(at,ht,pt,"⊳","\\rhd"),lt(at,ht,xt,"≂","\\eqsim",!0),lt(at,ut,xt,"⋈","\\Join"),lt(at,ht,xt,"≑","\\Doteq",!0),lt(at,ht,pt,"∔","\\dotplus",!0),lt(at,ht,pt,"","\\smallsetminus"),lt(at,ht,pt,"⋒","\\Cap",!0),lt(at,ht,pt,"⋓","\\Cup",!0),lt(at,ht,pt,"⩞","\\doublebarwedge",!0),lt(at,ht,pt,"⊟","\\boxminus",!0),lt(at,ht,pt,"⊞","\\boxplus",!0),lt(at,ht,pt,"⋇","\\divideontimes",!0),lt(at,ht,pt,"⋉","\\ltimes",!0),lt(at,ht,pt,"⋊","\\rtimes",!0),lt(at,ht,pt,"⋋","\\leftthreetimes",!0),lt(at,ht,pt,"⋌","\\rightthreetimes",!0),lt(at,ht,pt,"⋏","\\curlywedge",!0),lt(at,ht,pt,"⋎","\\curlyvee",!0),lt(at,ht,pt,"⊝","\\circleddash",!0),lt(at,ht,pt,"⊛","\\circledast",!0),lt(at,ht,pt,"⋅","\\centerdot"),lt(at,ht,pt,"⊺","\\intercal",!0),lt(at,ht,pt,"⋒","\\doublecap"),lt(at,ht,pt,"⋓","\\doublecup"),lt(at,ht,pt,"⊠","\\boxtimes",!0),lt(at,ht,xt,"⇢","\\dashrightarrow",!0),lt(at,ht,xt,"⇠","\\dashleftarrow",!0),lt(at,ht,xt,"⇇","\\leftleftarrows",!0),lt(at,ht,xt,"⇆","\\leftrightarrows",!0),lt(at,ht,xt,"⇚","\\Lleftarrow",!0),lt(at,ht,xt,"↞","\\twoheadleftarrow",!0),lt(at,ht,xt,"↢","\\leftarrowtail",!0),lt(at,ht,xt,"↫","\\looparrowleft",!0),lt(at,ht,xt,"⇋","\\leftrightharpoons",!0),lt(at,ht,xt,"↶","\\curvearrowleft",!0),lt(at,ht,xt,"↺","\\circlearrowleft",!0),lt(at,ht,xt,"↰","\\Lsh",!0),lt(at,ht,xt,"⇈","\\upuparrows",!0),lt(at,ht,xt,"↿","\\upharpoonleft",!0),lt(at,ht,xt,"⇃","\\downharpoonleft",!0),lt(at,ut,xt,"⊶","\\origof",!0),lt(at,ut,xt,"⊷","\\imageof",!0),lt(at,ht,xt,"⊸","\\multimap",!0),lt(at,ht,xt,"↭","\\leftrightsquigarrow",!0),lt(at,ht,xt,"⇉","\\rightrightarrows",!0),lt(at,ht,xt,"⇄","\\rightleftarrows",!0),lt(at,ht,xt,"↠","\\twoheadrightarrow",!0),lt(at,ht,xt,"↣","\\rightarrowtail",!0),lt(at,ht,xt,"↬","\\looparrowright",!0),lt(at,ht,xt,"↷","\\curvearrowright",!0),lt(at,ht,xt,"↻","\\circlearrowright",!0),lt(at,ht,xt,"↱","\\Rsh",!0),lt(at,ht,xt,"⇊","\\downdownarrows",!0),lt(at,ht,xt,"↾","\\upharpoonright",!0),lt(at,ht,xt,"⇂","\\downharpoonright",!0),lt(at,ht,xt,"⇝","\\rightsquigarrow",!0),lt(at,ht,xt,"⇝","\\leadsto"),lt(at,ht,xt,"⇛","\\Rrightarrow",!0),lt(at,ht,xt,"↾","\\restriction"),lt(at,ut,kt,"","`"),lt(at,ut,kt,"$","\\$"),lt(ct,ut,kt,"$","\\$"),lt(ct,ut,kt,"$","\\textdollar"),lt(at,ut,kt,"%","\\%"),lt(ct,ut,kt,"%","\\%"),lt(at,ut,kt,"_","\\_"),lt(ct,ut,kt,"_","\\_"),lt(ct,ut,kt,"_","\\textunderscore"),lt(at,ut,kt,"∠","\\angle",!0),lt(at,ut,kt,"∞","\\infty",!0),lt(at,ut,kt,"","\\prime"),lt(at,ut,kt,"△","\\triangle"),lt(at,ut,kt,"Γ","\\Gamma",!0),lt(at,ut,kt,"Δ","\\Delta",!0),lt(at,ut,kt,"Θ","\\Theta",!0),lt(at,ut,kt,"Λ","\\Lambda",!0),lt(at,ut,kt,"Ξ","\\Xi",!0),lt(at,ut,kt,"Π","\\Pi",!0),lt(at,ut,kt,"Σ","\\Sigma",!0),lt(at,ut,kt,"Υ","\\Upsilon",!0),lt(at,ut,kt,"Φ","\\Phi",!0),lt(at,ut,kt,"Ψ","\\Psi",!0),lt(at,ut,kt,"Ω","\\Omega",!0),lt(at,ut,kt,"A","Α"),lt(at,ut,kt,"B","Β"),lt(at,ut,kt,"E","Ε"),lt(at,ut,kt,"Z","Ζ"),lt(at,ut,kt,"H","Η"),lt(at,ut,kt,"I","Ι"),lt(at,ut,kt,"K","Κ"),lt(at,ut,kt,"M","Μ"),lt(at,ut,kt,"N","Ν"),lt(at,ut,kt,"O","Ο"),lt(at,ut,kt,"P","Ρ"),lt(at,ut,kt,"T","Τ"),lt(at,ut,kt,"X","Χ"),lt(at,ut,kt,"¬","\\neg",!0),lt(at,ut,kt,"¬","\\lnot"),lt(at,ut,kt,"","\\top"),lt(at,ut,kt,"⊥","\\bot"),lt(at,ut,kt,"∅","\\emptyset"),lt(at,ht,kt,"∅","\\varnothing"),lt(at,ut,gt,"α","\\alpha",!0),lt(at,ut,gt,"β","\\beta",!0),lt(at,ut,gt,"γ","\\gamma",!0),lt(at,ut,gt,"δ","\\delta",!0),lt(at,ut,gt,"ϵ","\\epsilon",!0),lt(at,ut,gt,"ζ","\\zeta",!0),lt(at,ut,gt,"η","\\eta",!0),lt(at,ut,gt,"θ","\\theta",!0),lt(at,ut,gt,"ι","\\iota",!0),lt(at,ut,gt,"κ","\\kappa",!0),lt(at,ut,gt,"λ","\\lambda",!0),lt(at,ut,gt,"μ","\\mu",!0),lt(at,ut,gt,"ν","\\nu",!0),lt(at,ut,gt,"ξ","\\xi",!0),lt(at,ut,gt,"ο","\\omicron",!0),lt(at,ut,gt,"π","\\pi",!0),lt(at,ut,gt,"ρ","\\rho",!0),lt(at,ut,gt,"σ","\\sigma",!0),lt(at,ut,gt,"τ","\\tau",!0),lt(at,ut,gt,"υ","\\upsilon",!0),lt(at,ut,gt,"ϕ","\\phi",!0),lt(at,ut,gt,"χ","\\chi",!0),lt(at,ut,gt,"ψ","\\psi",!0),lt(at,ut,gt,"ω","\\omega",!0),lt(at,ut,gt,"ε","\\varepsilon",!0),lt(at,ut,gt,"ϑ","\\vartheta",!0),lt(at,ut,gt,"ϖ","\\varpi",!0),lt(at,ut,gt,"ϱ","\\varrho",!0),lt(at,ut,gt,"ς","\\varsigma",!0),lt(at,ut,gt,"φ","\\varphi",!0),lt(at,ut,pt,"","*",!0),lt(at,ut,pt,"+","+"),lt(at,ut,pt,"","-",!0),lt(at,ut,pt,"⋅","\\cdot",!0),lt(at,ut,pt,"∘","\\circ",!0),lt(at,ut,pt,"÷","\\div",!0),lt(at,ut,pt,"±","\\pm",!0),lt(at,ut,pt,"×","\\times",!0),lt(at,ut,pt,"∩","\\cap",!0),lt(at,ut,pt,"","\\cup",!0),lt(at,ut,pt,"","\\setminus",!0),lt(at,ut,pt,"∧","\\land"),lt(at,ut,pt,"","\\lor"),lt(at,ut,pt,"∧","\\wedge",!0),lt(at,ut,pt,"","\\vee",!0),lt(at,ut,kt,"√","\\surd"),lt(at,ut,vt,"⟨","\\langle",!0),lt(at,ut,vt,"","\\lvert"),lt(at,ut,vt,"∥","\\lVert"),lt(at,ut,mt,"?","?"),lt(at,ut,mt,"!","!"),lt(at,ut,mt,"⟩","\\rangle",!0),lt(at,ut,mt,"","\\rvert"),lt(at,ut,mt,"∥","\\rVert"),lt(at,ut,xt,"=","="),lt(at,ut,xt,":",":"),lt(at,ut,xt,"≈","\\approx",!0),lt(at,ut,xt,"≅","\\cong",!0),lt(at,ut,xt,"≥","\\ge"),lt(at,ut,xt,"≥","\\geq",!0),lt(at,ut,xt,"←","\\gets"),lt(at,ut,xt,">","\\gt",!0),lt(at,ut,xt,"∈","\\in",!0),lt(at,ut,xt,"","\\@not"),lt(at,ut,xt,"⊂","\\subset",!0),lt(at,ut,xt,"⊃","\\supset",!0),lt(at,ut,xt,"⊆","\\subseteq",!0),lt(at,ut,xt,"⊇","\\supseteq",!0),lt(at,ht,xt,"⊈","\\nsubseteq",!0),lt(at,ht,xt,"⊉","\\nsupseteq",!0),lt(at,ut,xt,"⊨","\\models"),lt(at,ut,xt,"←","\\leftarrow",!0),lt(at,ut,xt,"≤","\\le"),lt(at,ut,xt,"≤","\\leq",!0),lt(at,ut,xt,"<","\\lt",!0),lt(at,ut,xt,"→","\\rightarrow",!0),lt(at,ut,xt,"→","\\to"),lt(at,ht,xt,"≱","\\ngeq",!0),lt(at,ht,xt,"≰","\\nleq",!0),lt(at,ut,wt," ","\\ "),lt(at,ut,wt," ","\\space"),lt(at,ut,wt," ","\\nobreakspace"),lt(ct,ut,wt," ","\\ "),lt(ct,ut,wt," "," "),lt(ct,ut,wt," ","\\space"),lt(ct,ut,wt," ","\\nobreakspace"),lt(at,ut,wt,null,"\\nobreak"),lt(at,ut,wt,null,"\\allowbreak"),lt(at,ut,yt,",",","),lt(at,ut,yt,";",";"),lt(at,ht,pt,"⊼","\\barwedge",!0),lt(at,ht,pt,"⊻","\\veebar",!0),lt(at,ut,pt,"⊙","\\odot",!0),lt(at,ut,pt,"⊕","\\oplus",!0),lt(at,ut,pt,"⊗","\\otimes",!0),lt(at,ut,kt,"∂","\\partial",!0),lt(at,ut,pt,"⊘","\\oslash",!0),lt(at,ht,pt,"⊚","\\circledcirc",!0),lt(at,ht,pt,"⊡","\\boxdot",!0),lt(at,ut,pt,"△","\\bigtriangleup"),lt(at,ut,pt,"▽","\\bigtriangledown"),lt(at,ut,pt,"†","\\dagger"),lt(at,ut,pt,"⋄","\\diamond"),lt(at,ut,pt,"⋆","\\star"),lt(at,ut,pt,"◃","\\triangleleft"),lt(at,ut,pt,"▹","\\triangleright"),lt(at,ut,vt,"{","\\{"),lt(ct,ut,kt,"{","\\{"),lt(ct,ut,kt,"{","\\textbraceleft"),lt(at,ut,mt,"}","\\}"),lt(ct,ut,kt,"}","\\}"),lt(ct,ut,kt,"}","\\textbraceright"),lt(at,ut,vt,"{","\\lbrace"),lt(at,ut,mt,"}","\\rbrace"),lt(at,ut,vt,"[","\\lbrack",!0),lt(ct,ut,kt,"[","\\lbrack",!0),lt(at,ut,mt,"]","\\rbrack",!0),lt(ct,ut,kt,"]","\\rbrack",!0),lt(at,ut,vt,"(","\\lparen",!0),lt(at,ut,mt,")","\\rparen",!0),lt(ct,ut,kt,"<","\\textless",!0),lt(ct,ut,kt,">","\\textgreater",!0),lt(at,ut,vt,"⌊","\\lfloor",!0),lt(at,ut,mt,"⌋","\\rfloor",!0),lt(at,ut,vt,"⌈","\\lceil",!0),lt(at,ut,mt,"⌉","\\rceil",!0),lt(at,ut,kt,"\\","\\backslash"),lt(at,ut,kt,"","|"),lt(at,ut,kt,"","\\vert"),lt(ct,ut,kt,"|","\\textbar",!0),lt(at,ut,kt,"∥","\\|"),lt(at,ut,kt,"∥","\\Vert"),lt(ct,ut,kt,"∥","\\textbardbl"),lt(ct,ut,kt,"~","\\textasciitilde"),lt(ct,ut,kt,"\\","\\textbackslash"),lt(ct,ut,kt,"^","\\textasciicircum"),lt(at,ut,xt,"↑","\\uparrow",!0),lt(at,ut,xt,"⇑","\\Uparrow",!0),lt(at,ut,xt,"↓","\\downarrow",!0),lt(at,ut,xt,"⇓","\\Downarrow",!0),lt(at,ut,xt,"↕","\\updownarrow",!0),lt(at,ut,xt,"⇕","\\Updownarrow",!0),lt(at,ut,bt,"∐","\\coprod"),lt(at,ut,bt,"","\\bigvee"),lt(at,ut,bt,"⋀","\\bigwedge"),lt(at,ut,bt,"⨄","\\biguplus"),lt(at,ut,bt,"⋂","\\bigcap"),lt(at,ut,bt,"","\\bigcup"),lt(at,ut,bt,"∫","\\int"),lt(at,ut,bt,"∫","\\intop"),lt(at,ut,bt,"∬","\\iint"),lt(at,ut,bt,"∭","\\iiint"),lt(at,ut,bt,"∏","\\prod"),lt(at,ut,bt,"∑","\\sum"),lt(at,ut,bt,"⨂","\\bigotimes"),lt(at,ut,bt,"⨁","\\bigoplus"),lt(at,ut,bt,"⨀","\\bigodot"),lt(at,ut,bt,"∮","\\oint"),lt(at,ut,bt,"∯","\\oiint"),lt(at,ut,bt,"∰","\\oiiint"),lt(at,ut,bt,"⨆","\\bigsqcup"),lt(at,ut,bt,"∫","\\smallint"),lt(ct,ut,ft,"…","\\textellipsis"),lt(at,ut,ft,"…","\\mathellipsis"),lt(ct,ut,ft,"…","\\ldots",!0),lt(at,ut,ft,"…","\\ldots",!0),lt(at,ut,ft,"⋯","\\@cdots",!0),lt(at,ut,ft,"⋱","\\ddots",!0),lt(at,ut,kt,"⋮","\\varvdots"),lt(at,ut,dt,"ˊ","\\acute"),lt(at,ut,dt,"ˋ","\\grave"),lt(at,ut,dt,"¨","\\ddot"),lt(at,ut,dt,"~","\\tilde"),lt(at,ut,dt,"ˉ","\\bar"),lt(at,ut,dt,"˘","\\breve"),lt(at,ut,dt,"ˇ","\\check"),lt(at,ut,dt,"^","\\hat"),lt(at,ut,dt,"⃗","\\vec"),lt(at,ut,dt,"˙","\\dot"),lt(at,ut,dt,"˚","\\mathring"),lt(at,ut,gt,"","\\@imath"),lt(at,ut,gt,"","\\@jmath"),lt(at,ut,kt,"ı","ı"),lt(at,ut,kt,"ȷ","ȷ"),lt(ct,ut,kt,"ı","\\i",!0),lt(ct,ut,kt,"ȷ","\\j",!0),lt(ct,ut,kt,"ß","\\ss",!0),lt(ct,ut,kt,"æ","\\ae",!0),lt(ct,ut,kt,"œ","\\oe",!0),lt(ct,ut,kt,"ø","\\o",!0),lt(ct,ut,kt,"Æ","\\AE",!0),lt(ct,ut,kt,"Œ","\\OE",!0),lt(ct,ut,kt,"Ø","\\O",!0),lt(ct,ut,dt,"ˊ","\\'"),lt(ct,ut,dt,"ˋ","\\`"),lt(ct,ut,dt,"ˆ","\\^"),lt(ct,ut,dt,"˜","\\~"),lt(ct,ut,dt,"ˉ","\\="),lt(ct,ut,dt,"˘","\\u"),lt(ct,ut,dt,"˙","\\."),lt(ct,ut,dt,"¸","\\c"),lt(ct,ut,dt,"˚","\\r"),lt(ct,ut,dt,"ˇ","\\v"),lt(ct,ut,dt,"¨",'\\"'),lt(ct,ut,dt,"˝","\\H"),lt(ct,ut,dt,"◯","\\textcircled");var qt={"--":!0,"---":!0,"``":!0,"''":!0};lt(ct,ut,kt,"","--",!0),lt(ct,ut,kt,"","\\textendash"),lt(ct,ut,kt,"—","---",!0),lt(ct,ut,kt,"—","\\textemdash"),lt(ct,ut,kt,"","`",!0),lt(ct,ut,kt,"","\\textquoteleft"),lt(ct,ut,kt,"","'",!0),lt(ct,ut,kt,"","\\textquoteright"),lt(ct,ut,kt,"“","``",!0),lt(ct,ut,kt,"“","\\textquotedblleft"),lt(ct,ut,kt,"”","''",!0),lt(ct,ut,kt,"”","\\textquotedblright"),lt(at,ut,kt,"°","\\degree",!0),lt(ct,ut,kt,"°","\\degree"),lt(ct,ut,kt,"°","\\textdegree",!0),lt(at,ut,kt,"£","\\pounds"),lt(at,ut,kt,"£","\\mathsterling",!0),lt(ct,ut,kt,"£","\\pounds"),lt(ct,ut,kt,"£","\\textsterling",!0),lt(at,ht,kt,"✠","\\maltese"),lt(ct,ht,kt,"✠","\\maltese");for(var _t='0123456789/@."',St=0;St<14;St++){var At=_t.charAt(St);lt(at,ut,kt,At,At)}for(var Nt='0123456789!@*()-=+";:?/.,',Tt=0;Tt<25;Tt++){var Et=Nt.charAt(Tt);lt(ct,ut,kt,Et,Et)}for(var Lt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Ct=0;Ct<52;Ct++){var Mt=Lt.charAt(Ct);lt(at,ut,gt,Mt,Mt),lt(ct,ut,kt,Mt,Mt)}lt(at,ht,kt,"C",""),lt(ct,ht,kt,"C",""),lt(at,ht,kt,"H",""),lt(ct,ht,kt,"H",""),lt(at,ht,kt,"N",""),lt(ct,ht,kt,"N",""),lt(at,ht,kt,"P",""),lt(ct,ht,kt,"P",""),lt(at,ht,kt,"Q",""),lt(ct,ht,kt,"Q",""),lt(at,ht,kt,"R",""),lt(ct,ht,kt,"R",""),lt(at,ht,kt,"Z",""),lt(ct,ht,kt,"Z",""),lt(at,ut,gt,"h",""),lt(ct,ut,gt,"h","");for(var Ot="",Bt=0;Bt<52;Bt++){var zt=Lt.charAt(Bt);lt(at,ut,gt,zt,Ot=String.fromCharCode(55349,56320+Bt)),lt(ct,ut,kt,zt,Ot),lt(at,ut,gt,zt,Ot=String.fromCharCode(55349,56372+Bt)),lt(ct,ut,kt,zt,Ot),lt(at,ut,gt,zt,Ot=String.fromCharCode(55349,56424+Bt)),lt(ct,ut,kt,zt,Ot),lt(at,ut,gt,zt,Ot=String.fromCharCode(55349,56580+Bt)),lt(ct,ut,kt,zt,Ot),lt(at,ut,gt,zt,Ot=String.fromCharCode(55349,56684+Bt)),lt(ct,ut,kt,zt,Ot),lt(at,ut,gt,zt,Ot=String.fromCharCode(55349,56736+Bt)),lt(ct,ut,kt,zt,Ot),lt(at,ut,gt,zt,Ot=String.fromCharCode(55349,56788+Bt)),lt(ct,ut,kt,zt,Ot),lt(at,ut,gt,zt,Ot=String.fromCharCode(55349,56840+Bt)),lt(ct,ut,kt,zt,Ot),lt(at,ut,gt,zt,Ot=String.fromCharCode(55349,56944+Bt)),lt(ct,ut,kt,zt,Ot),Bt<26&&(lt(at,ut,gt,zt,Ot=String.fromCharCode(55349,56632+Bt)),lt(ct,ut,kt,zt,Ot),lt(at,ut,gt,zt,Ot=String.fromCharCode(55349,56476+Bt)),lt(ct,ut,kt,zt,Ot))}lt(at,ut,gt,"k",Ot=String.fromCharCode(55349,56668)),lt(ct,ut,kt,"k",Ot);for(var Pt=0;Pt<10;Pt++){var Rt=Pt.toString();lt(at,ut,gt,Rt,Ot=String.fromCharCode(55349,57294+Pt)),lt(ct,ut,kt,Rt,Ot),lt(at,ut,gt,Rt,Ot=String.fromCharCode(55349,57314+Pt)),lt(ct,ut,kt,Rt,Ot),lt(at,ut,gt,Rt,Ot=String.fromCharCode(55349,57324+Pt)),lt(ct,ut,kt,Rt,Ot),lt(at,ut,gt,Rt,Ot=String.fromCharCode(55349,57334+Pt)),lt(ct,ut,kt,Rt,Ot)}for(var Zt="ÐÞþ",It=0;It<3;It++){var jt=Zt.charAt(It);lt(at,ut,gt,jt,jt),lt(ct,ut,kt,jt,jt)}var Ht=[["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"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathboldfrak","textboldfrak","Fraktur-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"]],Dt=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],$t=function(t,e,r){return st[r][t]&&st[r][t].replace&&(t=st[r][t].replace),{value:t,metrics:B(t,e,r)}},Ut=function(t,e,r,n,i){var o,s=$t(t,e,r),l=s.metrics;if(t=s.value,l){var a=l.italic;("text"===r||n&&"mathit"===n.font)&&(a=0),o=new J(t,l.height,l.depth,a,l.skew,l.width,i)}else"undefined"!=typeof console&&console.warn("No character metrics for '"+t+"' in style '"+e+"' and mode '"+r+"'"),o=new J(t,0,0,0,0,0,i);if(n){o.maxFontSize=n.sizeMultiplier,n.style.isTight()&&o.classes.push("mtight");var c=n.getColor();c&&(o.style.color=c)}return o},Ft=(t,e)=>{if(F(t.classes)!==F(e.classes)||t.skew!==e.skew||t.maxFontSize!==e.maxFontSize)return!1;if(1===t.classes.length){var r=t.classes[0];if("mbin"===r||"mord"===r)return!1}for(var n in t.style)if(t.style.hasOwnProperty(n)&&t.style[n]!==e.style[n])return!1;for(var i in e.style)if(e.style.hasOwnProperty(i)&&t.style[i]!==e.style[i])return!1;return!0},Vt=function(t){for(var e=0,r=0,n=0,i=0;i<t.children.length;i++){var o=t.children[i];o.height>e&&(e=o.height),o.depth>r&&(r=o.depth),o.maxFontSize>n&&(n=o.maxFontSize)}t.height=e,t.depth=r,t.maxFontSize=n},Wt=function(t,e,r,n){var i=new G(t,e,r,n);return Vt(i),i},Kt=(t,e,r,n)=>new G(t,e,r,n),Gt=function(t){var e=new L(t);return Vt(e),e},Yt=function(t,e,r){var n="";switch(t){case"amsrm":n="AMS";break;case"textrm":n="Main";break;case"textsf":n="SansSerif";break;case"texttt":n="Typewriter";break;default:n=t}return n+"-"+("textbf"===e&&"textit"===r?"BoldItalic":"textbf"===e?"Bold":"textit"===e?"Italic":"Regular")},Xt={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"}},Qt={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},Jt={fontMap:Xt,makeSymbol:Ut,mathsym:function(t,e,r,n){return void 0===n&&(n=[]),"boldsymbol"===r.font&&$t(t,"Main-Bold",e).metrics?Ut(t,"Main-Bold",e,r,n.concat(["mathbf"])):"\\"===t||"main"===st[e][t].font?Ut(t,"Main-Regular",e,r,n):Ut(t,"AMS-Regular",e,r,n.concat(["amsrm"]))},makeSpan:Wt,makeSvgSpan:Kt,makeLineSpan:function(t,e,r){var n=Wt([t],[],e);return n.height=Math.max(r||e.fontMetrics().defaultRuleThickness,e.minRuleThickness),n.style.borderBottomWidth=U(n.height),n.maxFontSize=1,n},makeAnchor:function(t,e,r,n){var i=new Y(t,e,r,n);return Vt(i),i},makeFragment:Gt,wrapFragment:function(t,e){return t instanceof L?Wt([],[t],e):t},makeVList:function(t,e){for(var{children:r,depth:n}=function(t){if("individualShift"===t.positionType){for(var e=t.children,r=[e[0]],n=-e[0].shift-e[0].elem.depth,i=n,o=1;o<e.length;o++){var s=-e[o].shift-i-e[o].elem.depth,l=s-(e[o-1].elem.height+e[o-1].elem.depth);i+=s,r.push({type:"kern",size:l}),r.push(e[o])}return{children:r,depth:n}}var a;if("top"===t.positionType){for(var c=t.positionData,u=0;u<t.children.length;u++){var h=t.children[u];c-="kern"===h.type?h.size:h.elem.height+h.elem.depth}a=c}else if("bottom"===t.positionType)a=-t.positionData;else{var d=t.children[0];if("elem"!==d.type)throw new Error('First child must have type "elem".');if("shift"===t.positionType)a=-d.elem.depth-t.positionData;else{if("firstBaseline"!==t.positionType)throw new Error("Invalid positionType "+t.positionType+".");a=-d.elem.depth}}return{children:t.children,depth:a}}(t),i=0,o=0;o<r.length;o++){var s=r[o];if("elem"===s.type){var l=s.elem;i=Math.max(i,l.maxFontSize,l.height)}}i+=2;var a=Wt(["pstrut"],[]);a.style.height=U(i);for(var c=[],u=n,h=n,d=n,p=0;p<r.length;p++){var m=r[p];if("kern"===m.type)d+=m.size;else{var f=m.elem,g=m.wrapperClasses||[],b=m.wrapperStyle||{},v=Wt(g,[a,f],void 0,b);v.style.top=U(-i-d-f.depth),m.marginLeft&&(v.style.marginLeft=m.marginLeft),m.marginRight&&(v.style.marginRight=m.marginRight),c.push(v),d+=f.height+f.depth}u=Math.min(u,d),h=Math.max(h,d)}var y,x=Wt(["vlist"],c);if(x.style.height=U(h),u<0){var w=Wt([],[]),k=Wt(["vlist"],[w]);k.style.height=U(-u);var q=Wt(["vlist-s"],[new J("")]);y=[Wt(["vlist-r"],[x,q]),Wt(["vlist-r"],[k])]}else y=[Wt(["vlist-r"],[x])];var _=Wt(["vlist-t"],y);return 2===y.length&&_.classes.push("vlist-t2"),_.height=h,_.depth=-u,_},makeOrd:function(t,e,r){var n=t.mode,i=t.text,o=["mord"],s="math"===n||"text"===n&&e.font,a=s?e.font:e.fontFamily,c="",u="";if(55349===i.charCodeAt(0)&&([c,u]=function(t,e){var r=1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536,n="math"===e?0:1;if(119808<=r&&r<120484){var i=Math.floor((r-119808)/26);return[Ht[i][2],Ht[i][n]]}if(120782<=r&&r<=120831){var o=Math.floor((r-120782)/10);return[Dt[o][2],Dt[o][n]]}if(120485===r||120486===r)return[Ht[0][2],Ht[0][n]];if(120486<r&&r<120782)return["",""];throw new l("Unsupported character: "+t)}(i,n)),c.length>0)return Ut(i,c,n,e,o.concat(u));if(a){var h,d;if("boldsymbol"===a){var p=function(t,e,r,n,i){return"textord"!==i&&$t(t,"Math-BoldItalic",e).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}}(i,n,0,0,r);h=p.fontName,d=[p.fontClass]}else s?(h=Xt[a].fontName,d=[a]):(h=Yt(a,e.fontWeight,e.fontShape),d=[a,e.fontWeight,e.fontShape]);if($t(i,h,n).metrics)return Ut(i,h,n,e,o.concat(d));if(qt.hasOwnProperty(i)&&"Typewriter"===h.slice(0,10)){for(var m=[],f=0;f<i.length;f++)m.push(Ut(i[f],h,n,e,o.concat(d)));return Gt(m)}}if("mathord"===r)return Ut(i,"Math-Italic",n,e,o.concat(["mathnormal"]));if("textord"===r){var g=st[n][i]&&st[n][i].font;if("ams"===g){var b=Yt("amsrm",e.fontWeight,e.fontShape);return Ut(i,b,n,e,o.concat("amsrm",e.fontWeight,e.fontShape))}if("main"!==g&&g){var v=Yt(g,e.fontWeight,e.fontShape);return Ut(i,v,n,e,o.concat(v,e.fontWeight,e.fontShape))}var y=Yt("textrm",e.fontWeight,e.fontShape);return Ut(i,y,n,e,o.concat(e.fontWeight,e.fontShape))}throw new Error("unexpected type: "+r+" in makeOrd")},makeGlue:(t,e)=>{var r=Wt(["mspace"],[],e),n=$(t,e);return r.style.marginRight=U(n),r},staticSvg:function(t,e){var[r,n,i]=Qt[t],o=new et(r),s=new tt([o],{width:U(n),height:U(i),style:"width:"+U(n),viewBox:"0 0 "+1e3*n+" "+1e3*i,preserveAspectRatio:"xMinYMin"}),l=Kt(["overlay"],[s],e);return l.height=i,l.style.height=U(i),l.style.width=U(n),l},svgData:Qt,tryCombineChars:t=>{for(var e=0;e<t.length-1;e++){var r=t[e],n=t[e+1];r instanceof J&&n instanceof J&&Ft(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,t.splice(e+1,1),e--)}return t}},te={number:3,unit:"mu"},ee={number:4,unit:"mu"},re={number:5,unit:"mu"},ne={mord:{mop:te,mbin:ee,mrel:re,minner:te},mop:{mord:te,mop:te,mrel:re,minner:te},mbin:{mord:ee,mop:ee,mopen:ee,minner:ee},mrel:{mord:re,mop:re,mopen:re,minner:re},mopen:{},mclose:{mop:te,mbin:ee,mrel:re,minner:te},mpunct:{mord:te,mop:te,mrel:re,mopen:te,mclose:te,mpunct:te,minner:te},minner:{mord:te,mop:te,mbin:ee,mrel:re,mopen:te,mpunct:te,minner:te}},ie={mord:{mop:te},mop:{mord:te,mop:te},mbin:{},mrel:{},mopen:{},mclose:{mop:te},mpunct:{},minner:{mop:te}},oe={},se={},le={};function ae(t){for(var{type:e,names:r,props:n,handler:i,htmlBuilder:o,mathmlBuilder:s}=t,l={type:e,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:i},a=0;a<r.length;++a)oe[r[a]]=l;e&&(o&&(se[e]=o),s&&(le[e]=s))}function ce(t){var{type:e,htmlBuilder:r,mathmlBuilder:n}=t;ae({type:e,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:r,mathmlBuilder:n})}var ue=function(t){return"ordgroup"===t.type&&1===t.body.length?t.body[0]:t},he=function(t){return"ordgroup"===t.type?t.body:[t]},de=Jt.makeSpan,pe=["leftmost","mbin","mopen","mrel","mop","mpunct"],me=["rightmost","mrel","mclose","mpunct"],fe={display:_.DISPLAY,text:_.TEXT,script:_.SCRIPT,scriptscript:_.SCRIPTSCRIPT},ge={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},be=function(t,e,r,n){void 0===n&&(n=[null,null]);for(var i=[],o=0;o<t.length;o++){var s=qe(t[o],e);if(s instanceof L){var l=s.children;i.push(...l)}else i.push(s)}if(Jt.tryCombineChars(i),!r)return i;var a=e;if(1===t.length){var c=t[0];"sizing"===c.type?a=e.havingSize(c.size):"styling"===c.type&&(a=e.havingStyle(fe[c.style]))}var u=de([n[0]||"leftmost"],[],e),h=de([n[1]||"rightmost"],[],e),p="root"===r;return ve(i,((t,e)=>{var r=e.classes[0],n=t.classes[0];"mbin"===r&&d.contains(me,n)?e.classes[0]="mord":"mbin"===n&&d.contains(pe,r)&&(t.classes[0]="mord")}),{node:u},h,p),ve(i,((t,e)=>{var r=we(e),n=we(t),i=r&&n?t.hasClass("mtight")?ie[r][n]:ne[r][n]:null;if(i)return Jt.makeGlue(i,a)}),{node:u},h,p),i},ve=function t(e,r,n,i,o){i&&e.push(i);for(var s=0;s<e.length;s++){var l=e[s],a=ye(l);if(a)t(a.children,r,n,null,o);else{var c=!l.hasClass("mspace");if(c){var u=r(l,n.node);u&&(n.insertAfter?n.insertAfter(u):(e.unshift(u),s++))}c?n.node=l:o&&l.hasClass("newline")&&(n.node=de(["leftmost"])),n.insertAfter=(t=>r=>{e.splice(t+1,0,r),s++})(s)}}i&&e.pop()},ye=function(t){return t instanceof L||t instanceof Y||t instanceof G&&t.hasClass("enclosing")?t:null},xe=function t(e,r){var n=ye(e);if(n){var i=n.children;if(i.length){if("right"===r)return t(i[i.length-1],"right");if("left"===r)return t(i[0],"left")}}return e},we=function(t,e){return t?(e&&(t=xe(t,e)),ge[t.classes[0]]||null):null},ke=function(t,e){var r=["nulldelimiter"].concat(t.baseSizingClasses());return de(e.concat(r))},qe=function(t,e,r){if(!t)return de();if(se[t.type]){var n=se[t.type](t,e);if(r&&e.size!==r.size){n=de(e.sizingClasses(r),[n],e);var i=e.sizeMultiplier/r.sizeMultiplier;n.height*=i,n.depth*=i}return n}throw new l("Got group of unknown type: '"+t.type+"'")};function _e(t,e){var r=de(["base"],t,e),n=de(["strut"]);return n.style.height=U(r.height+r.depth),r.depth&&(n.style.verticalAlign=U(-r.depth)),r.children.unshift(n),r}function Se(t,e){var r=null;1===t.length&&"tag"===t[0].type&&(r=t[0].tag,t=t[0].body);var n,i=be(t,e,"root");2===i.length&&i[1].hasClass("tag")&&(n=i.pop());for(var o,s=[],l=[],a=0;a<i.length;a++)if(l.push(i[a]),i[a].hasClass("mbin")||i[a].hasClass("mrel")||i[a].hasClass("allowbreak")){for(var c=!1;a<i.length-1&&i[a+1].hasClass("mspace")&&!i[a+1].hasClass("newline");)a++,l.push(i[a]),i[a].hasClass("nobreak")&&(c=!0);c||(s.push(_e(l,e)),l=[])}else i[a].hasClass("newline")&&(l.pop(),l.length>0&&(s.push(_e(l,e)),l=[]),s.push(i[a]));l.length>0&&s.push(_e(l,e)),r?((o=_e(be(r,e,!0))).classes=["tag"],s.push(o)):n&&s.push(n);var u=de(["katex-html"],s);if(u.setAttribute("aria-hidden","true"),o){var h=o.children[0];h.style.height=U(u.height+u.depth),u.depth&&(h.style.verticalAlign=U(-u.depth))}return u}function Ae(t){return new L(t)}class Ne{constructor(t,e,r){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=t,this.attributes={},this.children=e||[],this.classes=r||[]}setAttribute(t,e){this.attributes[t]=e}getAttribute(t){return this.attributes[t]}toNode(){var t=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&t.setAttribute(e,this.attributes[e]);this.classes.length>0&&(t.className=F(this.classes));for(var r=0;r<this.children.length;r++)t.appendChild(this.children[r].toNode());return t}toMarkup(){var t="<"+this.type;for(var e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&(t+=" "+e+'="',t+=d.escape(this.attributes[e]),t+='"');this.classes.length>0&&(t+=' class ="'+d.escape(F(this.classes))+'"'),t+=">";for(var r=0;r<this.children.length;r++)t+=this.children[r].toMarkup();return t+="</"+this.type+">"}toText(){return this.children.map((t=>t.toText())).join("")}}class Te{constructor(t){this.text=void 0,this.text=t}toNode(){return document.createTextNode(this.text)}toMarkup(){return d.escape(this.toText())}toText(){return this.text}}var Ee={MathNode:Ne,TextNode:Te,SpaceNode:class{constructor(t){this.width=void 0,this.character=void 0,this.width=t,this.character=t>=.05555&&t<=.05556?"":t>=.1666&&t<=.1667?"":t>=.2222&&t<=.2223?"":t>=.2777&&t<=.2778?"":t>=-.05556&&t<=-.05555?"":t>=-.1667&&t<=-.1666?"":t>=-.2223&&t<=-.2222?"":t>=-.2778&&t<=-.2777?"":null}toNode(){if(this.character)return document.createTextNode(this.character);var t=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return t.setAttribute("width",U(this.width)),t}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+U(this.width)+'"/>'}toText(){return this.character?this.character:" "}},newDocumentFragment:Ae},Le=function(t,e,r){return!st[e][t]||!st[e][t].replace||55349===t.charCodeAt(0)||qt.hasOwnProperty(t)&&r&&(r.fontFamily&&"tt"===r.fontFamily.slice(4,6)||r.font&&"tt"===r.font.slice(4,6))||(t=st[e][t].replace),new Ee.TextNode(t)},Ce=function(t){return 1===t.length?t[0]:new Ee.MathNode("mrow",t)},Me=function(t,e){if("texttt"===e.fontFamily)return"monospace";if("textsf"===e.fontFamily)return"textit"===e.fontShape&&"textbf"===e.fontWeight?"sans-serif-bold-italic":"textit"===e.fontShape?"sans-serif-italic":"textbf"===e.fontWeight?"bold-sans-serif":"sans-serif";if("textit"===e.fontShape&&"textbf"===e.fontWeight)return"bold-italic";if("textit"===e.fontShape)return"italic";if("textbf"===e.fontWeight)return"bold";var r=e.font;if(!r||"mathnormal"===r)return null;var n=t.mode;if("mathit"===r)return"italic";if("boldsymbol"===r)return"textord"===t.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 i=t.text;return d.contains(["\\imath","\\jmath"],i)?null:(st[n][i]&&st[n][i].replace&&(i=st[n][i].replace),B(i,Jt.fontMap[r].fontName,n)?Jt.fontMap[r].variant:null)},Oe=function(t,e,r){if(1===t.length){var n=ze(t[0],e);return r&&n instanceof Ne&&"mo"===n.type&&(n.setAttribute("lspace","0em"),n.setAttribute("rspace","0em")),[n]}for(var i,o=[],s=0;s<t.length;s++){var l=ze(t[s],e);if(l instanceof Ne&&i instanceof Ne){if("mtext"===l.type&&"mtext"===i.type&&l.getAttribute("mathvariant")===i.getAttribute("mathvariant")){i.children.push(...l.children);continue}if("mn"===l.type&&"mn"===i.type){i.children.push(...l.children);continue}if("mi"===l.type&&1===l.children.length&&"mn"===i.type){var a=l.children[0];if(a instanceof Te&&"."===a.text){i.children.push(...l.children);continue}}else if("mi"===i.type&&1===i.children.length){var c=i.children[0];if(c instanceof Te&&"̸"===c.text&&("mo"===l.type||"mi"===l.type||"mn"===l.type)){var u=l.children[0];u instanceof Te&&u.text.length>0&&(u.text=u.text.slice(0,1)+"̸"+u.text.slice(1),o.pop())}}}o.push(l),i=l}return o},Be=function(t,e,r){return Ce(Oe(t,e,r))},ze=function(t,e){if(!t)return new Ee.MathNode("mrow");if(le[t.type])return le[t.type](t,e);throw new l("Got group of unknown type: '"+t.type+"'")};function Pe(t,e,r,n,i){var o,s=Oe(t,r);o=1===s.length&&s[0]instanceof Ne&&d.contains(["mrow","mtable"],s[0].type)?s[0]:new Ee.MathNode("mrow",s);var l=new Ee.MathNode("annotation",[new Ee.TextNode(e)]);l.setAttribute("encoding","application/x-tex");var a=new Ee.MathNode("semantics",[o,l]),c=new Ee.MathNode("math",[a]);c.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&c.setAttribute("display","block");var u=i?"katex":"katex-mathml";return Jt.makeSpan([u],[c])}var Re=function(t){return new I({style:t.displayMode?_.DISPLAY:_.TEXT,maxSize:t.maxSize,minRuleThickness:t.minRuleThickness})},Ze=function(t,e){if(e.displayMode){var r=["katex-display"];e.leqno&&r.push("leqno"),e.fleqn&&r.push("fleqn"),t=Jt.makeSpan(r,[t])}return t},Ie={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},je={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]},He=function(t,e,r,n,i){var o,s=t.height+t.depth+r+n;if(/fbox|color|angl/.test(e)){if(o=Jt.makeSpan(["stretchy",e],[],i),"fbox"===e){var l=i.color&&i.getColor();l&&(o.style.borderColor=l)}}else{var a=[];/^[bx]cancel$/.test(e)&&a.push(new rt({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(e)&&a.push(new rt({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var c=new tt(a,{width:"100%",height:U(s)});o=Jt.makeSvgSpan([],[c],i)}return o.height=s,o.style.height=U(s),o},De=function(t){var e=new Ee.MathNode("mo",[new Ee.TextNode(Ie[t.replace(/^\\/,"")])]);return e.setAttribute("stretchy","true"),e},$e=function(t,e){var{span:r,minWidth:n,height:i}=function(){var r=4e5,n=t.label.slice(1);if(d.contains(["widehat","widecheck","widetilde","utilde"],n)){var i,o,s,l="ordgroup"===(m=t.base).type?m.body.length:1;if(l>5)"widehat"===n||"widecheck"===n?(i=420,r=2364,s=.42,o=n+"4"):(i=312,r=2340,s=.34,o="tilde4");else{var a=[1,1,2,2,3,3][l];"widehat"===n||"widecheck"===n?(r=[0,1062,2364,2364,2364][a],i=[0,239,300,360,420][a],s=[0,.24,.3,.3,.36,.42][a],o=n+a):(r=[0,600,1033,2339,2340][a],i=[0,260,286,306,312][a],s=[0,.26,.286,.3,.306,.34][a],o="tilde"+a)}var c=new et(o),u=new tt([c],{width:"100%",height:U(s),viewBox:"0 0 "+r+" "+i,preserveAspectRatio:"none"});return{span:Jt.makeSvgSpan([],[u],e),minWidth:0,height:s}}var h,p,m,f=[],g=je[n],[b,v,y]=g,x=y/1e3,w=b.length;if(1===w)h=["hide-tail"],p=[g[3]];else if(2===w)h=["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.");h=["brace-left","brace-center","brace-right"],p=["xMinYMin","xMidYMin","xMaxYMin"]}for(var k=0;k<w;k++){var q=new et(b[k]),_=new tt([q],{width:"400em",height:U(x),viewBox:"0 0 "+r+" "+y,preserveAspectRatio:p[k]+" slice"}),S=Jt.makeSvgSpan([h[k]],[_],e);if(1===w)return{span:S,minWidth:v,height:x};S.style.height=U(x),f.push(S)}return{span:Jt.makeSpan(["stretchy"],f,e),minWidth:v,height:x}}();return r.height=i,r.style.height=U(i),n>0&&(r.style.minWidth=U(n)),r};function Ue(t,e){if(!t||t.type!==e)throw new Error("Expected node of type "+e+", but got "+(t?"node of type "+t.type:String(t)));return t}function Fe(t){var e=Ve(t);if(!e)throw new Error("Expected node of symbol group type, but got "+(t?"node of type "+t.type:String(t)));return e}function Ve(t){return t&&("atom"===t.type||ot.hasOwnProperty(t.type))?t:null}var We=(t,e)=>{var r,n,i;t&&"supsub"===t.type?(r=(n=Ue(t.base,"accent")).base,t.base=r,i=function(t){if(t instanceof G)return t;throw new Error("Expected span<HtmlDomNode> but got "+String(t)+".")}(qe(t,e)),t.base=n):r=(n=Ue(t,"accent")).base;var o=qe(r,e.havingCrampedStyle()),s=0;if(n.isShifty&&d.isCharacterBox(r)){var l=d.getBaseElem(r);s=nt(qe(l,e.havingCrampedStyle())).skew}var a,c="\\c"===n.label,u=c?o.height+o.depth:Math.min(o.height,e.fontMetrics().xHeight);if(n.isStretchy)a=$e(n,e),a=Jt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"elem",elem:a,wrapperClasses:["svg-align"],wrapperStyle:s>0?{width:"calc(100% - "+U(2*s)+")",marginLeft:U(2*s)}:void 0}]},e);else{var h,p;"\\vec"===n.label?(h=Jt.staticSvg("vec",e),p=Jt.svgData.vec[1]):((h=nt(h=Jt.makeOrd({mode:n.mode,text:n.label},e,"textord"))).italic=0,p=h.width,c&&(u+=h.depth)),a=Jt.makeSpan(["accent-body"],[h]);var m="\\textcircled"===n.label;m&&(a.classes.push("accent-full"),u=o.height);var f=s;m||(f-=p/2),a.style.left=U(f),"\\textcircled"===n.label&&(a.style.top=".2em"),a=Jt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:-u},{type:"elem",elem:a}]},e)}var g=Jt.makeSpan(["mord","accent"],[a],e);return i?(i.children[0]=g,i.height=Math.max(g.height,i.height),i.classes[0]="mord",i):g},Ke=(t,e)=>{var r=t.isStretchy?De(t.label):new Ee.MathNode("mo",[Le(t.label,t.mode)]),n=new Ee.MathNode("mover",[ze(t.base,e),r]);return n.setAttribute("accent","true"),n},Ge=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map((t=>"\\"+t)).join("|"));ae({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:(t,e)=>{var r=ue(e[0]),n=!Ge.test(t.funcName),i=!n||"\\widehat"===t.funcName||"\\widetilde"===t.funcName||"\\widecheck"===t.funcName;return{type:"accent",mode:t.parser.mode,label:t.funcName,isStretchy:n,isShifty:i,base:r}},htmlBuilder:We,mathmlBuilder:Ke}),ae({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(t,e)=>{var r=e[0],n=t.parser.mode;return"math"===n&&(t.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+t.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:t.funcName,isStretchy:!1,isShifty:!0,base:r}},htmlBuilder:We,mathmlBuilder:Ke}),ae({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0];return{type:"accentUnder",mode:r.mode,label:n,base:i}},htmlBuilder:(t,e)=>{var r=qe(t.base,e),n=$e(t,e),i="\\utilde"===t.label?.12:0,o=Jt.makeVList({positionType:"top",positionData:r.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:i},{type:"elem",elem:r}]},e);return Jt.makeSpan(["mord","accentunder"],[o],e)},mathmlBuilder:(t,e)=>{var r=De(t.label),n=new Ee.MathNode("munder",[ze(t.base,e),r]);return n.setAttribute("accentunder","true"),n}});var Ye=t=>{var e=new Ee.MathNode("mpadded",t?[t]:[]);return e.setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e};ae({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(t,e,r){var{parser:n,funcName:i}=t;return{type:"xArrow",mode:n.mode,label:i,body:e[0],below:r[0]}},htmlBuilder(t,e){var r,n=e.style,i=e.havingStyle(n.sup()),o=Jt.wrapFragment(qe(t.body,i,e),e),s="\\x"===t.label.slice(0,2)?"x":"cd";o.classes.push(s+"-arrow-pad"),t.below&&(i=e.havingStyle(n.sub()),(r=Jt.wrapFragment(qe(t.below,i,e),e)).classes.push(s+"-arrow-pad"));var l,a=$e(t,e),c=-e.fontMetrics().axisHeight+.5*a.height,u=-e.fontMetrics().axisHeight-.5*a.height-.111;if((o.depth>.25||"\\xleftequilibrium"===t.label)&&(u-=o.depth),r){var h=-e.fontMetrics().axisHeight+r.height+.5*a.height+.111;l=Jt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:u},{type:"elem",elem:a,shift:c},{type:"elem",elem:r,shift:h}]},e)}else l=Jt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:u},{type:"elem",elem:a,shift:c}]},e);return l.children[0].children[0].children[1].classes.push("svg-align"),Jt.makeSpan(["mrel","x-arrow"],[l],e)},mathmlBuilder(t,e){var r,n=De(t.label);if(n.setAttribute("minsize","x"===t.label.charAt(0)?"1.75em":"3.0em"),t.body){var i=Ye(ze(t.body,e));if(t.below){var o=Ye(ze(t.below,e));r=new Ee.MathNode("munderover",[n,o,i])}else r=new Ee.MathNode("mover",[n,i])}else if(t.below){var s=Ye(ze(t.below,e));r=new Ee.MathNode("munder",[n,s])}else r=Ye(),r=new Ee.MathNode("mover",[n,r]);return r}});var Xe=Jt.makeSpan;function Qe(t,e){var r=be(t.body,e,!0);return Xe([t.mclass],r,e)}function Je(t,e){var r,n=Oe(t.body,e);return"minner"===t.mclass?r=new Ee.MathNode("mpadded",n):"mord"===t.mclass?t.isCharacterBox?(r=n[0]).type="mi":r=new Ee.MathNode("mi",n):(t.isCharacterBox?(r=n[0]).type="mo":r=new Ee.MathNode("mo",n),"mbin"===t.mclass?(r.attributes.lspace="0.22em",r.attributes.rspace="0.22em"):"mpunct"===t.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0.17em"):"mopen"===t.mclass||"mclose"===t.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0em"):"minner"===t.mclass&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em")),r}ae({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(t,e){var{parser:r,funcName:n}=t,i=e[0];return{type:"mclass",mode:r.mode,mclass:"m"+n.slice(5),body:he(i),isCharacterBox:d.isCharacterBox(i)}},htmlBuilder:Qe,mathmlBuilder:Je});var tr=t=>{var e="ordgroup"===t.type&&t.body.length?t.body[0]:t;return"atom"!==e.type||"bin"!==e.family&&"rel"!==e.family?"mord":"m"+e.family};ae({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(t,e){var{parser:r}=t;return{type:"mclass",mode:r.mode,mclass:tr(e[0]),body:he(e[1]),isCharacterBox:d.isCharacterBox(e[1])}}}),ae({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(t,e){var r,{parser:n,funcName:i}=t,o=e[1],s=e[0];r="\\stackrel"!==i?tr(o):"mrel";var l={type:"op",mode:o.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==i,body:he(o)},a={type:"supsub",mode:s.mode,base:l,sup:"\\underset"===i?null:s,sub:"\\underset"===i?s:null};return{type:"mclass",mode:n.mode,mclass:r,body:[a],isCharacterBox:d.isCharacterBox(a)}},htmlBuilder:Qe,mathmlBuilder:Je}),ae({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:r}=t;return{type:"pmb",mode:r.mode,mclass:tr(e[0]),body:he(e[0])}},htmlBuilder(t,e){var r=be(t.body,e,!0),n=Jt.makeSpan([t.mclass],r,e);return n.style.textShadow="0.02em 0.01em 0.04px",n},mathmlBuilder(t,e){var r=Oe(t.body,e),n=new Ee.MathNode("mstyle",r);return n.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),n}});var er={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},rr=t=>"textord"===t.type&&"@"===t.text;function nr(t,e,r){var n=er[t];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(n,[e[0]],[e[1]]);case"\\uparrow":case"\\downarrow":var i={type:"atom",text:n,mode:"math",family:"rel"},o={type:"ordgroup",mode:"math",body:[r.callFunction("\\\\cdleft",[e[0]],[]),r.callFunction("\\Big",[i],[]),r.callFunction("\\\\cdright",[e[1]],[])]};return r.callFunction("\\\\cdparent",[o],[]);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"}}}ae({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(t,e){var{parser:r,funcName:n}=t;return{type:"cdlabel",mode:r.mode,side:n.slice(4),label:e[0]}},htmlBuilder(t,e){var r=e.havingStyle(e.style.sup()),n=Jt.wrapFragment(qe(t.label,r,e),e);return n.classes.push("cd-label-"+t.side),n.style.bottom=U(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder(t,e){var r=new Ee.MathNode("mrow",[ze(t.label,e)]);return(r=new Ee.MathNode("mpadded",[r])).setAttribute("width","0"),"left"===t.side&&r.setAttribute("lspace","-1width"),r.setAttribute("voffset","0.7em"),(r=new Ee.MathNode("mstyle",[r])).setAttribute("displaystyle","false"),r.setAttribute("scriptlevel","1"),r}}),ae({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(t,e){var{parser:r}=t;return{type:"cdlabelparent",mode:r.mode,fragment:e[0]}},htmlBuilder(t,e){var r=Jt.wrapFragment(qe(t.fragment,e),e);return r.classes.push("cd-vert-arrow"),r},mathmlBuilder:(t,e)=>new Ee.MathNode("mrow",[ze(t.fragment,e)])}),ae({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(t,e){for(var{parser:r}=t,n=Ue(e[0],"ordgroup").body,i="",o=0;o<n.length;o++){i+=Ue(n[o],"textord").text}var s,a=parseInt(i);if(isNaN(a))throw new l("\\@char has non-numeric argument "+i);if(a<0||a>=1114111)throw new l("\\@char with invalid code point "+i);return a<=65535?s=String.fromCharCode(a):(a-=65536,s=String.fromCharCode(55296+(a>>10),56320+(1023&a))),{type:"textord",mode:r.mode,text:s}}});var ir=(t,e)=>{var r=be(t.body,e.withColor(t.color),!1);return Jt.makeFragment(r)},or=(t,e)=>{var r=Oe(t.body,e.withColor(t.color)),n=new Ee.MathNode("mstyle",r);return n.setAttribute("mathcolor",t.color),n};ae({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(t,e){var{parser:r}=t,n=Ue(e[0],"color-token").color,i=e[1];return{type:"color",mode:r.mode,color:n,body:he(i)}},htmlBuilder:ir,mathmlBuilder:or}),ae({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(t,e){var{parser:r,breakOnTokenText:n}=t,i=Ue(e[0],"color-token").color;r.gullet.macros.set("\\current@color",i);var o=r.parseExpression(!0,n);return{type:"color",mode:r.mode,color:i,body:o}},htmlBuilder:ir,mathmlBuilder:or}),ae({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(t,e,r){var{parser:n}=t,i="["===n.gullet.future().text?n.parseSizeGroup(!0):null,o=!n.settings.displayMode||!n.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:n.mode,newLine:o,size:i&&Ue(i,"size").value}},htmlBuilder(t,e){var r=Jt.makeSpan(["mspace"],[],e);return t.newLine&&(r.classes.push("newline"),t.size&&(r.style.marginTop=U($(t.size,e)))),r},mathmlBuilder(t,e){var r=new Ee.MathNode("mspace");return t.newLine&&(r.setAttribute("linebreak","newline"),t.size&&r.setAttribute("height",U($(t.size,e)))),r}});var sr={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},lr=t=>{var e=t.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new l("Expected a control sequence",t);return e},ar=(t,e,r,n)=>{var i=t.gullet.macros.get(r.text);null==i&&(r.noexpand=!0,i={tokens:[r],numArgs:0,unexpandable:!t.gullet.isExpandable(r.text)}),t.gullet.macros.set(e,i,n)};ae({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(t){var{parser:e,funcName:r}=t;e.consumeSpaces();var n=e.fetch();if(sr[n.text])return"\\global"!==r&&"\\\\globallong"!==r||(n.text=sr[n.text]),Ue(e.parseFunction(),"internal");throw new l("Invalid token after macro prefix",n)}}),ae({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:r}=t,n=e.gullet.popToken(),i=n.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new l("Expected a control sequence",n);for(var o,s=0,a=[[]];"{"!==e.gullet.future().text;)if("#"===(n=e.gullet.popToken()).text){if("{"===e.gullet.future().text){o=e.gullet.future(),a[s].push("{");break}if(n=e.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new l('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==s+1)throw new l('Argument number "'+n.text+'" out of order');s++,a.push([])}else{if("EOF"===n.text)throw new l("Expected a macro definition");a[s].push(n.text)}var{tokens:c}=e.gullet.consumeArg();return o&&c.unshift(o),"\\edef"!==r&&"\\xdef"!==r||(c=e.gullet.expandTokens(c)).reverse(),e.gullet.macros.set(i,{tokens:c,numArgs:s,delimiters:a},r===sr[r]),{type:"internal",mode:e.mode}}}),ae({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:r}=t,n=lr(e.gullet.popToken());e.gullet.consumeSpaces();var i=(t=>{var e=t.gullet.popToken();return"="===e.text&&" "===(e=t.gullet.popToken()).text&&(e=t.gullet.popToken()),e})(e);return ar(e,n,i,"\\\\globallet"===r),{type:"internal",mode:e.mode}}}),ae({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:r}=t,n=lr(e.gullet.popToken()),i=e.gullet.popToken(),o=e.gullet.popToken();return ar(e,n,o,"\\\\globalfuture"===r),e.gullet.pushToken(o),e.gullet.pushToken(i),{type:"internal",mode:e.mode}}});var cr=function(t,e,r){var n=B(st.math[t]&&st.math[t].replace||t,e,r);if(!n)throw new Error("Unsupported symbol "+t+" and font size "+e+".");return n},ur=function(t,e,r,n){var i=r.havingBaseStyle(e),o=Jt.makeSpan(n.concat(i.sizingClasses(r)),[t],r),s=i.sizeMultiplier/r.sizeMultiplier;return o.height*=s,o.depth*=s,o.maxFontSize=i.sizeMultiplier,o},hr=function(t,e,r){var n=e.havingBaseStyle(r),i=(1-e.sizeMultiplier/n.sizeMultiplier)*e.fontMetrics().axisHeight;t.classes.push("delimcenter"),t.style.top=U(i),t.height-=i,t.depth+=i},dr=function(t,e,r,n,i,o){var s=function(t,e,r,n){return Jt.makeSymbol(t,"Size"+e+"-Regular",r,n)}(t,e,i,n),l=ur(Jt.makeSpan(["delimsizing","size"+e],[s],n),_.TEXT,n,o);return r&&hr(l,n,_.TEXT),l},pr=function(t,e,r){var n;return n="Size1-Regular"===e?"delim-size1":"delim-size4",{type:"elem",elem:Jt.makeSpan(["delimsizinginner",n],[Jt.makeSpan([],[Jt.makeSymbol(t,e,r)])])}},mr=function(t,e,r){var n=C["Size4-Regular"][t.charCodeAt(0)]?C["Size4-Regular"][t.charCodeAt(0)][4]:C["Size1-Regular"][t.charCodeAt(0)][4],i=new et("inner",function(t,e){switch(t){case"⎜":return"M291 0 H417 V"+e+" H291z M291 0 H417 V"+e+" H291z";case"":return"M145 0 H188 V"+e+" H145z M145 0 H188 V"+e+" H145z";case"∥":return"M145 0 H188 V"+e+" H145z M145 0 H188 V"+e+" H145zM367 0 H410 V"+e+" H367z M367 0 H410 V"+e+" H367z";case"⎟":return"M457 0 H583 V"+e+" H457z M457 0 H583 V"+e+" H457z";case"⎢":return"M319 0 H403 V"+e+" H319z M319 0 H403 V"+e+" H319z";case"⎥":return"M263 0 H347 V"+e+" H263z M263 0 H347 V"+e+" H263z";case"⎪":return"M384 0 H504 V"+e+" H384z M384 0 H504 V"+e+" H384z";case"⏐":return"M312 0 H355 V"+e+" H312z M312 0 H355 V"+e+" H312z";case"‖":return"M257 0 H300 V"+e+" H257z M257 0 H300 V"+e+" H257zM478 0 H521 V"+e+" H478z M478 0 H521 V"+e+" H478z";default:return""}}(t,Math.round(1e3*e))),o=new tt([i],{width:U(n),height:U(e),style:"width:"+U(n),viewBox:"0 0 "+1e3*n+" "+Math.round(1e3*e),preserveAspectRatio:"xMinYMin"}),s=Jt.makeSvgSpan([],[o],r);return s.height=e,s.style.height=U(e),s.style.width=U(n),{type:"elem",elem:s}},fr={type:"kern",size:-.008},gr=["|","\\lvert","\\rvert","\\vert"],br=["\\|","\\lVert","\\rVert","\\Vert"],vr=function(t,e,r,n,i,o){var s,l,a,c,u="",h=0;s=a=c=t,l=null;var p="Size1-Regular";"\\uparrow"===t?a=c="⏐":"\\Uparrow"===t?a=c="‖":"\\downarrow"===t?s=a="⏐":"\\Downarrow"===t?s=a="‖":"\\updownarrow"===t?(s="\\uparrow",a="⏐",c="\\downarrow"):"\\Updownarrow"===t?(s="\\Uparrow",a="‖",c="\\Downarrow"):d.contains(gr,t)?(a="",u="vert",h=333):d.contains(br,t)?(a="∥",u="doublevert",h=556):"["===t||"\\lbrack"===t?(s="⎡",a="⎢",c="⎣",p="Size4-Regular",u="lbrack",h=667):"]"===t||"\\rbrack"===t?(s="⎤",a="⎥",c="⎦",p="Size4-Regular",u="rbrack",h=667):"\\lfloor"===t||"⌊"===t?(a=s="⎢",c="⎣",p="Size4-Regular",u="lfloor",h=667):"\\lceil"===t||"⌈"===t?(s="⎡",a=c="⎢",p="Size4-Regular",u="lceil",h=667):"\\rfloor"===t||"⌋"===t?(a=s="⎥",c="⎦",p="Size4-Regular",u="rfloor",h=667):"\\rceil"===t||"⌉"===t?(s="⎤",a=c="⎥",p="Size4-Regular",u="rceil",h=667):"("===t||"\\lparen"===t?(s="⎛",a="⎜",c="⎝",p="Size4-Regular",u="lparen",h=875):")"===t||"\\rparen"===t?(s="⎞",a="⎟",c="⎠",p="Size4-Regular",u="rparen",h=875):"\\{"===t||"\\lbrace"===t?(s="⎧",l="⎨",c="⎩",a="⎪",p="Size4-Regular"):"\\}"===t||"\\rbrace"===t?(s="⎫",l="⎬",c="⎭",a="⎪",p="Size4-Regular"):"\\lgroup"===t||"⟮"===t?(s="⎧",c="⎩",a="⎪",p="Size4-Regular"):"\\rgroup"===t||"⟯"===t?(s="⎫",c="⎭",a="⎪",p="Size4-Regular"):"\\lmoustache"===t||"⎰"===t?(s="⎧",c="⎭",a="⎪",p="Size4-Regular"):"\\rmoustache"!==t&&"⎱"!==t||(s="⎫",c="⎩",a="⎪",p="Size4-Regular");var m=cr(s,p,i),f=m.height+m.depth,g=cr(a,p,i),b=g.height+g.depth,v=cr(c,p,i),y=v.height+v.depth,x=0,w=1;if(null!==l){var k=cr(l,p,i);x=k.height+k.depth,w=2}var q=f+y+x,S=q+Math.max(0,Math.ceil((e-q)/(w*b)))*w*b,A=n.fontMetrics().axisHeight;r&&(A*=n.sizeMultiplier);var N=S/2-A,T=[];if(u.length>0){var E=S-f-y,L=Math.round(1e3*S),C=function(t,e){switch(t){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+e+" v1759 h347 v-84\nH403z M403 1759 V0 H319 V1759 v"+e+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+e+" v1759 H0 v84 H347z\nM347 1759 V0 H263 V1759 v"+e+" v1759 h84z";case"vert":return"M145 15 v585 v"+e+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-e+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+e+" v585 h43z";case"doublevert":return"M145 15 v585 v"+e+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-e+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+e+" v585 h43z\nM367 15 v585 v"+e+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-e+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M410 15 H367 v585 v"+e+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+e+" v1715 h263 v84 H319z\nMM319 602 V0 H403 V602 v"+e+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+e+" v1799 H0 v-84 H319z\nMM319 602 V0 H403 V602 v"+e+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+e+" v602 h84z\nM403 1759 V0 H319 V1759 v"+e+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+e+" v602 h84z\nM347 1759 V0 h-84 V1759 v"+e+" v602 h84z";case"lparen":return"M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1\nc-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,\n-36,557 l0,"+(e+84)+"c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,\n949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9\nc0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,\n-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189\nl0,-"+(e+92)+"c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,\n-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z";case"rparen":return"M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,\n63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5\nc11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,"+(e+9)+"\nc-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664\nc-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11\nc0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17\nc242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558\nl0,-"+(e+144)+"c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,\n-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z";default:throw new Error("Unknown stretchy delimiter.")}}(u,Math.round(1e3*E)),M=new et(u,C),O=(h/1e3).toFixed(3)+"em",B=(L/1e3).toFixed(3)+"em",z=new tt([M],{width:O,height:B,viewBox:"0 0 "+h+" "+L}),P=Jt.makeSvgSpan([],[z],n);P.height=L/1e3,P.style.width=O,P.style.height=B,T.push({type:"elem",elem:P})}else{if(T.push(pr(c,p,i)),T.push(fr),null===l){var R=S-f-y+.016;T.push(mr(a,R,n))}else{var Z=(S-f-y-x)/2+.016;T.push(mr(a,Z,n)),T.push(fr),T.push(pr(l,p,i)),T.push(fr),T.push(mr(a,Z,n))}T.push(fr),T.push(pr(s,p,i))}var I=n.havingBaseStyle(_.TEXT),j=Jt.makeVList({positionType:"bottom",positionData:N,children:T},I);return ur(Jt.makeSpan(["delimsizing","mult"],[j],I),_.TEXT,n,o)},yr=.08,xr=function(t,e,r,n,i){var o=function(t,e,r){e*=1e3;var n="";switch(t){case"sqrtMain":n=function(t,e){return"M95,"+(622+t+e)+"\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"+t/2.075+" -"+t+"\nc5.3,-9.3,12,-14,20,-14\nH400000v"+(40+t)+"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+t)+" "+e+"h400000v"+(40+t)+"h-400000z"}(e,T);break;case"sqrtSize1":n=function(t,e){return"M263,"+(601+t+e)+"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"+t/2.084+" -"+t+"\nc4.7,-7.3,11,-11,19,-11\nH40000v"+(40+t)+"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+t)+" "+e+"h400000v"+(40+t)+"h-400000z"}(e,T);break;case"sqrtSize2":n=function(t,e){return"M983 "+(10+t+e)+"\nl"+t/3.13+" -"+t+"\nc4,-6.7,10,-10,18,-10 H400000v"+(40+t)+"\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+t)+" "+e+"h400000v"+(40+t)+"h-400000z"}(e,T);break;case"sqrtSize3":n=function(t,e){return"M424,"+(2398+t+e)+"\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"+t/4.223+" -"+t+"c4,-6.7,10,-10,18,-10 H400000\nv"+(40+t)+"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+t)+" "+e+"\nh400000v"+(40+t)+"h-400000z"}(e,T);break;case"sqrtSize4":n=function(t,e){return"M473,"+(2713+t+e)+"\nc339.3,-1799.3,509.3,-2700,510,-2702 l"+t/5.298+" -"+t+"\nc3.3,-7.3,9.3,-11,18,-11 H400000v"+(40+t)+"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+t)+" "+e+"h400000v"+(40+t)+"H1017.7z"}(e,T);break;case"sqrtTall":n=function(t,e,r){return"M702 "+(t+e)+"H400000"+(40+t)+"\nH742v"+(r-54-e-t)+"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 "+e+"H400000v"+(40+t)+"H742z"}(e,T,r)}return n}(t,n,r),s=new et(t,o),l=new tt([s],{width:"400em",height:U(e),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return Jt.makeSvgSpan(["hide-tail"],[l],i)},wr=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],kr=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],qr=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],_r=[0,1.2,1.8,2.4,3],Sr=[{type:"small",style:_.SCRIPTSCRIPT},{type:"small",style:_.SCRIPT},{type:"small",style:_.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Ar=[{type:"small",style:_.SCRIPTSCRIPT},{type:"small",style:_.SCRIPT},{type:"small",style:_.TEXT},{type:"stack"}],Nr=[{type:"small",style:_.SCRIPTSCRIPT},{type:"small",style:_.SCRIPT},{type:"small",style:_.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],Tr=function(t){if("small"===t.type)return"Main-Regular";if("large"===t.type)return"Size"+t.size+"-Regular";if("stack"===t.type)return"Size4-Regular";throw new Error("Add support for delim type '"+t.type+"' here.")},Er=function(t,e,r,n){for(var i=Math.min(2,3-n.style.size);i<r.length&&"stack"!==r[i].type;i++){var o=cr(t,Tr(r[i]),"math"),s=o.height+o.depth;if("small"===r[i].type&&(s*=n.havingBaseStyle(r[i].style).sizeMultiplier),s>e)return r[i]}return r[r.length-1]},Lr=function(t,e,r,n,i,o){var s;"<"===t||"\\lt"===t||"⟨"===t?t="\\langle":">"!==t&&"\\gt"!==t&&"⟩"!==t||(t="\\rangle"),s=d.contains(qr,t)?Sr:d.contains(wr,t)?Nr:Ar;var l=Er(t,e,s,n);return"small"===l.type?function(t,e,r,n,i,o){var s=Jt.makeSymbol(t,"Main-Regular",i,n),l=ur(s,e,n,o);return r&&hr(l,n,e),l}(t,l.style,r,n,i,o):"large"===l.type?dr(t,l.size,r,n,i,o):vr(t,e,r,n,i,o)},Cr={sqrtImage:function(t,e){var r,n,i=e.havingBaseSizing(),o=Er("\\surd",t*i.sizeMultiplier,Nr,i),s=i.sizeMultiplier,l=Math.max(0,e.minRuleThickness-e.fontMetrics().sqrtRuleThickness),a=0,c=0,u=0;return"small"===o.type?(t<1?s=1:t<1.4&&(s=.7),c=(1+l)/s,(r=xr("sqrtMain",a=(1+l+yr)/s,u=1e3+1e3*l+80,l,e)).style.minWidth="0.853em",n=.833/s):"large"===o.type?(u=1080*_r[o.size],c=(_r[o.size]+l)/s,a=(_r[o.size]+l+yr)/s,(r=xr("sqrtSize"+o.size,a,u,l,e)).style.minWidth="1.02em",n=1/s):(a=t+l+yr,c=t+l,u=Math.floor(1e3*t+l)+80,(r=xr("sqrtTall",a,u,l,e)).style.minWidth="0.742em",n=1.056),r.height=c,r.style.height=U(a),{span:r,advanceWidth:n,ruleWidth:(e.fontMetrics().sqrtRuleThickness+l)*s}},sizedDelim:function(t,e,r,n,i){if("<"===t||"\\lt"===t||"⟨"===t?t="\\langle":">"!==t&&"\\gt"!==t&&"⟩"!==t||(t="\\rangle"),d.contains(wr,t)||d.contains(qr,t))return dr(t,e,!1,r,n,i);if(d.contains(kr,t))return vr(t,_r[e],!1,r,n,i);throw new l("Illegal delimiter: '"+t+"'")},sizeToMaxHeight:_r,customSizedDelim:Lr,leftRightDelim:function(t,e,r,n,i,o){var s=n.fontMetrics().axisHeight*n.sizeMultiplier,l=5/n.fontMetrics().ptPerEm,a=Math.max(e-s,r+s),c=Math.max(a/500*901,2*a-l);return Lr(t,c,!0,n,i,o)}},Mr={"\\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}},Or=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function Br(t,e){var r=Ve(t);if(r&&d.contains(Or,r.text))return r;throw new l(r?"Invalid delimiter '"+r.text+"' after '"+e.funcName+"'":"Invalid delimiter type '"+t.type+"'",t)}function zr(t){if(!t.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}ae({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:(t,e)=>{var r=Br(e[0],t);return{type:"delimsizing",mode:t.parser.mode,size:Mr[t.funcName].size,mclass:Mr[t.funcName].mclass,delim:r.text}},htmlBuilder:(t,e)=>"."===t.delim?Jt.makeSpan([t.mclass]):Cr.sizedDelim(t.delim,t.size,e,t.mode,[t.mclass]),mathmlBuilder:t=>{var e=[];"."!==t.delim&&e.push(Le(t.delim,t.mode));var r=new Ee.MathNode("mo",e);"mopen"===t.mclass||"mclose"===t.mclass?r.setAttribute("fence","true"):r.setAttribute("fence","false"),r.setAttribute("stretchy","true");var n=U(Cr.sizeToMaxHeight[t.size]);return r.setAttribute("minsize",n),r.setAttribute("maxsize",n),r}}),ae({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var r=t.parser.gullet.macros.get("\\current@color");if(r&&"string"!=typeof r)throw new l("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:t.parser.mode,delim:Br(e[0],t).text,color:r}}}),ae({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var r=Br(e[0],t),n=t.parser;++n.leftrightDepth;var i=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var o=Ue(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:i,left:r.text,right:o.delim,rightColor:o.color}},htmlBuilder:(t,e)=>{zr(t);for(var r,n,i=be(t.body,e,!0,["mopen","mclose"]),o=0,s=0,l=!1,a=0;a<i.length;a++)i[a].isMiddle?l=!0:(o=Math.max(i[a].height,o),s=Math.max(i[a].depth,s));if(o*=e.sizeMultiplier,s*=e.sizeMultiplier,r="."===t.left?ke(e,["mopen"]):Cr.leftRightDelim(t.left,o,s,e,t.mode,["mopen"]),i.unshift(r),l)for(var c=1;c<i.length;c++){var u=i[c].isMiddle;u&&(i[c]=Cr.leftRightDelim(u.delim,o,s,u.options,t.mode,[]))}if("."===t.right)n=ke(e,["mclose"]);else{var h=t.rightColor?e.withColor(t.rightColor):e;n=Cr.leftRightDelim(t.right,o,s,h,t.mode,["mclose"])}return i.push(n),Jt.makeSpan(["minner"],i,e)},mathmlBuilder:(t,e)=>{zr(t);var r=Oe(t.body,e);if("."!==t.left){var n=new Ee.MathNode("mo",[Le(t.left,t.mode)]);n.setAttribute("fence","true"),r.unshift(n)}if("."!==t.right){var i=new Ee.MathNode("mo",[Le(t.right,t.mode)]);i.setAttribute("fence","true"),t.rightColor&&i.setAttribute("mathcolor",t.rightColor),r.push(i)}return Ce(r)}}),ae({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var r=Br(e[0],t);if(!t.parser.leftrightDepth)throw new l("\\middle without preceding \\left",r);return{type:"middle",mode:t.parser.mode,delim:r.text}},htmlBuilder:(t,e)=>{var r;if("."===t.delim)r=ke(e,[]);else{r=Cr.sizedDelim(t.delim,1,e,t.mode,[]);var n={delim:t.delim,options:e};r.isMiddle=n}return r},mathmlBuilder:(t,e)=>{var r="\\vert"===t.delim||"|"===t.delim?Le("|","text"):Le(t.delim,t.mode),n=new Ee.MathNode("mo",[r]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n}});var Pr=(t,e)=>{var r,n,i,o=Jt.wrapFragment(qe(t.body,e),e),s=t.label.slice(1),l=e.sizeMultiplier,a=0,c=d.isCharacterBox(t.body);if("sout"===s)(r=Jt.makeSpan(["stretchy","sout"])).height=e.fontMetrics().defaultRuleThickness/l,a=-.5*e.fontMetrics().xHeight;else if("phase"===s){var u=$({number:.6,unit:"pt"},e),h=$({number:.35,unit:"ex"},e);l/=e.havingBaseSizing().sizeMultiplier;var p=o.height+o.depth+u+h;o.style.paddingLeft=U(p/2+u);var m=Math.floor(1e3*p*l),f="M400000 "+(n=m)+" H0 L"+n/2+" 0 l65 45 L145 "+(n-80)+" H400000z",g=new tt([new et("phase",f)],{width:"400em",height:U(m/1e3),viewBox:"0 0 400000 "+m,preserveAspectRatio:"xMinYMin slice"});(r=Jt.makeSvgSpan(["hide-tail"],[g],e)).style.height=U(p),a=o.depth+u+h}else{/cancel/.test(s)?c||o.classes.push("cancel-pad"):"angl"===s?o.classes.push("anglpad"):o.classes.push("boxpad");var b=0,v=0,y=0;/box/.test(s)?(y=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness),v=b=e.fontMetrics().fboxsep+("colorbox"===s?0:y)):"angl"===s?(b=4*(y=Math.max(e.fontMetrics().defaultRuleThickness,e.minRuleThickness)),v=Math.max(0,.25-o.depth)):v=b=c?.2:0,r=He(o,s,b,v,e),/fbox|boxed|fcolorbox/.test(s)?(r.style.borderStyle="solid",r.style.borderWidth=U(y)):"angl"===s&&.049!==y&&(r.style.borderTopWidth=U(y),r.style.borderRightWidth=U(y)),a=o.depth+v,t.backgroundColor&&(r.style.backgroundColor=t.backgroundColor,t.borderColor&&(r.style.borderColor=t.borderColor))}if(t.backgroundColor)i=Jt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:a},{type:"elem",elem:o,shift:0}]},e);else{var x=/cancel|phase/.test(s)?["svg-align"]:[];i=Jt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:0},{type:"elem",elem:r,shift:a,wrapperClasses:x}]},e)}return/cancel/.test(s)&&(i.height=o.height,i.depth=o.depth),/cancel/.test(s)&&!c?Jt.makeSpan(["mord","cancel-lap"],[i],e):Jt.makeSpan(["mord"],[i],e)},Rr=(t,e)=>{var r=0,n=new Ee.MathNode(t.label.indexOf("colorbox")>-1?"mpadded":"menclose",[ze(t.body,e)]);switch(t.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=e.fontMetrics().fboxsep*e.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"===t.label){var i=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness);n.setAttribute("style","border: "+i+"em solid "+String(t.borderColor))}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return t.backgroundColor&&n.setAttribute("mathbackground",t.backgroundColor),n};ae({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(t,e,r){var{parser:n,funcName:i}=t,o=Ue(e[0],"color-token").color,s=e[1];return{type:"enclose",mode:n.mode,label:i,backgroundColor:o,body:s}},htmlBuilder:Pr,mathmlBuilder:Rr}),ae({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(t,e,r){var{parser:n,funcName:i}=t,o=Ue(e[0],"color-token").color,s=Ue(e[1],"color-token").color,l=e[2];return{type:"enclose",mode:n.mode,label:i,backgroundColor:s,borderColor:o,body:l}},htmlBuilder:Pr,mathmlBuilder:Rr}),ae({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(t,e){var{parser:r}=t;return{type:"enclose",mode:r.mode,label:"\\fbox",body:e[0]}}}),ae({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(t,e){var{parser:r,funcName:n}=t,i=e[0];return{type:"enclose",mode:r.mode,label:n,body:i}},htmlBuilder:Pr,mathmlBuilder:Rr}),ae({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(t,e){var{parser:r}=t;return{type:"enclose",mode:r.mode,label:"\\angl",body:e[0]}}});var Zr={};function Ir(t){for(var{type:e,names:r,props:n,handler:i,htmlBuilder:o,mathmlBuilder:s}=t,l={type:e,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},a=0;a<r.length;++a)Zr[r[a]]=l;o&&(se[e]=o),s&&(le[e]=s)}var jr={};function Hr(t,e){jr[t]=e}function Dr(t){var e=[];t.consumeSpaces();var r=t.fetch().text;for("\\relax"===r&&(t.consume(),t.consumeSpaces(),r=t.fetch().text);"\\hline"===r||"\\hdashline"===r;)t.consume(),e.push("\\hdashline"===r),t.consumeSpaces(),r=t.fetch().text;return e}var $r=t=>{if(!t.parser.settings.displayMode)throw new l("{"+t.envName+"} can be used only in display mode.")};function Ur(t){if(-1===t.indexOf("ed"))return-1===t.indexOf("*")}function Fr(t,e,r){var{hskipBeforeAndAfter:n,addJot:i,cols:o,arraystretch:a,colSeparationType:c,autoTag:u,singleRow:h,emptySingleRow:d,maxNumCols:p,leqno:m}=e;if(t.gullet.beginGroup(),h||t.gullet.macros.set("\\cr","\\\\\\relax"),!a){var f=t.gullet.expandMacroAsText("\\arraystretch");if(null==f)a=1;else if(!(a=parseFloat(f))||a<0)throw new l("Invalid \\arraystretch: "+f)}t.gullet.beginGroup();var g=[],b=[g],v=[],y=[],x=null!=u?[]:void 0;function w(){u&&t.gullet.macros.set("\\@eqnsw","1",!0)}function k(){x&&(t.gullet.macros.get("\\df@tag")?(x.push(t.subparse([new s("\\df@tag")])),t.gullet.macros.set("\\df@tag",void 0,!0)):x.push(Boolean(u)&&"1"===t.gullet.macros.get("\\@eqnsw")))}for(w(),y.push(Dr(t));;){var q=t.parseExpression(!1,h?"\\end":"\\\\");t.gullet.endGroup(),t.gullet.beginGroup(),q={type:"ordgroup",mode:t.mode,body:q},r&&(q={type:"styling",mode:t.mode,style:r,body:[q]}),g.push(q);var _=t.fetch().text;if("&"===_){if(p&&g.length===p){if(h||c)throw new l("Too many tab characters: &",t.nextToken);t.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}t.consume()}else{if("\\end"===_){k(),1===g.length&&"styling"===q.type&&0===q.body[0].body.length&&(b.length>1||!d)&&b.pop(),y.length<b.length+1&&y.push([]);break}if("\\\\"!==_)throw new l("Expected & or \\\\ or \\cr or \\end",t.nextToken);t.consume();var S=void 0;" "!==t.gullet.future().text&&(S=t.parseSizeGroup(!0)),v.push(S?S.value:null),k(),y.push(Dr(t)),g=[],b.push(g),w()}}return t.gullet.endGroup(),t.gullet.endGroup(),{type:"array",mode:t.mode,addJot:i,arraystretch:a,body:b,cols:o,rowGaps:v,hskipBeforeAndAfter:n,hLinesBeforeRow:y,colSeparationType:c,tags:x,leqno:m}}function Vr(t){return"d"===t.slice(0,1)?"display":"text"}var Wr=function(t,e){var r,n,i=t.body.length,o=t.hLinesBeforeRow,s=0,a=new Array(i),c=[],u=Math.max(e.fontMetrics().arrayRuleWidth,e.minRuleThickness),h=1/e.fontMetrics().ptPerEm,p=5*h;t.colSeparationType&&"small"===t.colSeparationType&&(p=e.havingStyle(_.SCRIPT).sizeMultiplier/e.sizeMultiplier*.2778);var m="CD"===t.colSeparationType?$({number:3,unit:"ex"},e):12*h,f=3*h,g=t.arraystretch*m,b=.7*g,v=.3*g,y=0;function x(t){for(var e=0;e<t.length;++e)e>0&&(y+=.25),c.push({pos:y,isDashed:t[e]})}for(x(o[0]),r=0;r<t.body.length;++r){var w=t.body[r],k=b,q=v;s<w.length&&(s=w.length);var S=new Array(w.length);for(n=0;n<w.length;++n){var A=qe(w[n],e);q<A.depth&&(q=A.depth),k<A.height&&(k=A.height),S[n]=A}var N=t.rowGaps[r],T=0;N&&(T=$(N,e))>0&&(q<(T+=v)&&(q=T),T=0),t.addJot&&(q+=f),S.height=k,S.depth=q,y+=k,S.pos=y,y+=q+T,a[r]=S,x(o[r+1])}var E,L,C=y/2+e.fontMetrics().axisHeight,M=t.cols||[],O=[],B=[];if(t.tags&&t.tags.some((t=>t)))for(r=0;r<i;++r){var z=a[r],P=z.pos-C,R=t.tags[r],Z=void 0;(Z=!0===R?Jt.makeSpan(["eqn-num"],[],e):!1===R?Jt.makeSpan([],[],e):Jt.makeSpan([],be(R,e,!0),e)).depth=z.depth,Z.height=z.height,B.push({type:"elem",elem:Z,shift:P})}for(n=0,L=0;n<s||L<M.length;++n,++L){for(var I=M[L]||{},j=!0;"separator"===I.type;){if(j||((E=Jt.makeSpan(["arraycolsep"],[])).style.width=U(e.fontMetrics().doubleRuleSep),O.push(E)),"|"!==I.separator&&":"!==I.separator)throw new l("Invalid separator type: "+I.separator);var H="|"===I.separator?"solid":"dashed",D=Jt.makeSpan(["vertical-separator"],[],e);D.style.height=U(y),D.style.borderRightWidth=U(u),D.style.borderRightStyle=H,D.style.margin="0 "+U(-u/2);var F=y-C;F&&(D.style.verticalAlign=U(-F)),O.push(D),I=M[++L]||{},j=!1}if(!(n>=s)){var V=void 0;(n>0||t.hskipBeforeAndAfter)&&0!==(V=d.deflt(I.pregap,p))&&((E=Jt.makeSpan(["arraycolsep"],[])).style.width=U(V),O.push(E));var W=[];for(r=0;r<i;++r){var K=a[r],G=K[n];if(G){var Y=K.pos-C;G.depth=K.depth,G.height=K.height,W.push({type:"elem",elem:G,shift:Y})}}W=Jt.makeVList({positionType:"individualShift",children:W},e),W=Jt.makeSpan(["col-align-"+(I.align||"c")],[W]),O.push(W),(n<s-1||t.hskipBeforeAndAfter)&&0!==(V=d.deflt(I.postgap,p))&&((E=Jt.makeSpan(["arraycolsep"],[])).style.width=U(V),O.push(E))}}if(a=Jt.makeSpan(["mtable"],O),c.length>0){for(var X=Jt.makeLineSpan("hline",e,u),Q=Jt.makeLineSpan("hdashline",e,u),J=[{type:"elem",elem:a,shift:0}];c.length>0;){var tt=c.pop(),et=tt.pos-C;tt.isDashed?J.push({type:"elem",elem:Q,shift:et}):J.push({type:"elem",elem:X,shift:et})}a=Jt.makeVList({positionType:"individualShift",children:J},e)}if(0===B.length)return Jt.makeSpan(["mord"],[a],e);var rt=Jt.makeVList({positionType:"individualShift",children:B},e);return rt=Jt.makeSpan(["tag"],[rt],e),Jt.makeFragment([a,rt])},Kr={c:"center ",l:"left ",r:"right "},Gr=function(t,e){for(var r=[],n=new Ee.MathNode("mtd",[],["mtr-glue"]),i=new Ee.MathNode("mtd",[],["mml-eqn-num"]),o=0;o<t.body.length;o++){for(var s=t.body[o],l=[],a=0;a<s.length;a++)l.push(new Ee.MathNode("mtd",[ze(s[a],e)]));t.tags&&t.tags[o]&&(l.unshift(n),l.push(n),t.leqno?l.unshift(i):l.push(i)),r.push(new Ee.MathNode("mtr",l))}var c=new Ee.MathNode("mtable",r),u=.5===t.arraystretch?.1:.16+t.arraystretch-1+(t.addJot?.09:0);c.setAttribute("rowspacing",U(u));var h="",d="";if(t.cols&&t.cols.length>0){var p=t.cols,m="",f=!1,g=0,b=p.length;"separator"===p[0].type&&(h+="top ",g=1),"separator"===p[p.length-1].type&&(h+="bottom ",b-=1);for(var v=g;v<b;v++)"align"===p[v].type?(d+=Kr[p[v].align],f&&(m+="none "),f=!0):"separator"===p[v].type&&f&&(m+="|"===p[v].separator?"solid ":"dashed ",f=!1);c.setAttribute("columnalign",d.trim()),/[sd]/.test(m)&&c.setAttribute("columnlines",m.trim())}if("align"===t.colSeparationType){for(var y=t.cols||[],x="",w=1;w<y.length;w++)x+=w%2?"0em ":"1em ";c.setAttribute("columnspacing",x.trim())}else"alignat"===t.colSeparationType||"gather"===t.colSeparationType?c.setAttribute("columnspacing","0em"):"small"===t.colSeparationType?c.setAttribute("columnspacing","0.2778em"):"CD"===t.colSeparationType?c.setAttribute("columnspacing","0.5em"):c.setAttribute("columnspacing","1em");var k="",q=t.hLinesBeforeRow;h+=q[0].length>0?"left ":"",h+=q[q.length-1].length>0?"right ":"";for(var _=1;_<q.length-1;_++)k+=0===q[_].length?"none ":q[_][0]?"dashed ":"solid ";return/[sd]/.test(k)&&c.setAttribute("rowlines",k.trim()),""!==h&&(c=new Ee.MathNode("menclose",[c])).setAttribute("notation",h.trim()),t.arraystretch&&t.arraystretch<1&&(c=new Ee.MathNode("mstyle",[c])).setAttribute("scriptlevel","1"),c},Yr=function(t,e){-1===t.envName.indexOf("ed")&&$r(t);var r,n=[],i=t.envName.indexOf("at")>-1?"alignat":"align",o="split"===t.envName,s=Fr(t.parser,{cols:n,addJot:!0,autoTag:o?void 0:Ur(t.envName),emptySingleRow:!0,colSeparationType:i,maxNumCols:o?2:void 0,leqno:t.parser.settings.leqno},"display"),a=0,c={type:"ordgroup",mode:t.mode,body:[]};if(e[0]&&"ordgroup"===e[0].type){for(var u="",h=0;h<e[0].body.length;h++){u+=Ue(e[0].body[h],"textord").text}r=Number(u),a=2*r}var d=!a;s.body.forEach((function(t){for(var e=1;e<t.length;e+=2){var n=Ue(t[e],"styling");Ue(n.body[0],"ordgroup").body.unshift(c)}if(d)a<t.length&&(a=t.length);else{var i=t.length/2;if(r<i)throw new l("Too many math in a row: expected "+r+", but got "+i,t[0])}}));for(var p=0;p<a;++p){var m="r",f=0;p%2==1?m="l":p>0&&d&&(f=1),n[p]={type:"align",align:m,pregap:f,postgap:0}}return s.colSeparationType=d?"align":"alignat",s};Ir({type:"array",names:["array","darray"],props:{numArgs:1},handler(t,e){var r=(Ve(e[0])?[e[0]]:Ue(e[0],"ordgroup").body).map((function(t){var e=Fe(t).text;if(-1!=="lcr".indexOf(e))return{type:"align",align:e};if("|"===e)return{type:"separator",separator:"|"};if(":"===e)return{type:"separator",separator:":"};throw new l("Unknown column alignment: "+e,t)})),n={cols:r,hskipBeforeAndAfter:!0,maxNumCols:r.length};return Fr(t.parser,n,Vr(t.envName))},htmlBuilder:Wr,mathmlBuilder:Gr}),Ir({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(t){var e={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[t.envName.replace("*","")],r="c",n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if("*"===t.envName.charAt(t.envName.length-1)){var i=t.parser;if(i.consumeSpaces(),"["===i.fetch().text){if(i.consume(),i.consumeSpaces(),r=i.fetch().text,-1==="lcr".indexOf(r))throw new l("Expected l or c or r",i.nextToken);i.consume(),i.consumeSpaces(),i.expect("]"),i.consume(),n.cols=[{type:"align",align:r}]}}var o=Fr(t.parser,n,Vr(t.envName)),s=Math.max(0,...o.body.map((t=>t.length)));return o.cols=new Array(s).fill({type:"align",align:r}),e?{type:"leftright",mode:t.mode,body:[o],left:e[0],right:e[1],rightColor:void 0}:o},htmlBuilder:Wr,mathmlBuilder:Gr}),Ir({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(t){var e=Fr(t.parser,{arraystretch:.5},"script");return e.colSeparationType="small",e},htmlBuilder:Wr,mathmlBuilder:Gr}),Ir({type:"array",names:["subarray"],props:{numArgs:1},handler(t,e){var r=(Ve(e[0])?[e[0]]:Ue(e[0],"ordgroup").body).map((function(t){var e=Fe(t).text;if(-1!=="lc".indexOf(e))return{type:"align",align:e};throw new l("Unknown column alignment: "+e,t)}));if(r.length>1)throw new l("{subarray} can contain only one column");var n={cols:r,hskipBeforeAndAfter:!1,arraystretch:.5};if((n=Fr(t.parser,n,"script")).body.length>0&&n.body[0].length>1)throw new l("{subarray} can contain only one column");return n},htmlBuilder:Wr,mathmlBuilder:Gr}),Ir({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(t){var e=Fr(t.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},Vr(t.envName));return{type:"leftright",mode:t.mode,body:[e],left:t.envName.indexOf("r")>-1?".":"\\{",right:t.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:Wr,mathmlBuilder:Gr}),Ir({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:Yr,htmlBuilder:Wr,mathmlBuilder:Gr}),Ir({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(t){d.contains(["gather","gather*"],t.envName)&&$r(t);var e={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Ur(t.envName),emptySingleRow:!0,leqno:t.parser.settings.leqno};return Fr(t.parser,e,"display")},htmlBuilder:Wr,mathmlBuilder:Gr}),Ir({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:Yr,htmlBuilder:Wr,mathmlBuilder:Gr}),Ir({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(t){$r(t);var e={autoTag:Ur(t.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:t.parser.settings.leqno};return Fr(t.parser,e,"display")},htmlBuilder:Wr,mathmlBuilder:Gr}),Ir({type:"array",names:["CD"],props:{numArgs:0},handler:t=>($r(t),function(t){var e=[];for(t.gullet.beginGroup(),t.gullet.macros.set("\\cr","\\\\\\relax"),t.gullet.beginGroup();;){e.push(t.parseExpression(!1,"\\\\")),t.gullet.endGroup(),t.gullet.beginGroup();var r=t.fetch().text;if("&"!==r&&"\\\\"!==r){if("\\end"===r){0===e[e.length-1].length&&e.pop();break}throw new l("Expected \\\\ or \\cr or \\end",t.nextToken)}t.consume()}for(var n,i,o=[],s=[o],a=0;a<e.length;a++){for(var c=e[a],u={type:"styling",body:[],mode:"math",style:"display"},h=0;h<c.length;h++)if(rr(c[h])){o.push(u);var d=Fe(c[h+=1]).text,p=new Array(2);if(p[0]={type:"ordgroup",mode:"math",body:[]},p[1]={type:"ordgroup",mode:"math",body:[]},"=|.".indexOf(d)>-1);else{if(!("<>AV".indexOf(d)>-1))throw new l('Expected one of "<>AV=|." after @',c[h]);for(var m=0;m<2;m++){for(var f=!0,g=h+1;g<c.length;g++){if(i=d,("mathord"===(n=c[g]).type||"atom"===n.type)&&n.text===i){f=!1,h=g;break}if(rr(c[g]))throw new l("Missing a "+d+" character to complete a CD arrow.",c[g]);p[m].body.push(c[g])}if(f)throw new l("Missing a "+d+" character to complete a CD arrow.",c[h])}}var b={type:"styling",body:[nr(d,p,t)],mode:"math",style:"display"};o.push(b),u={type:"styling",body:[],mode:"math",style:"display"}}else u.body.push(c[h]);a%2==0?o.push(u):o.shift(),o=[],s.push(o)}return t.gullet.endGroup(),t.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([])}}(t.parser)),htmlBuilder:Wr,mathmlBuilder:Gr}),Hr("\\nonumber","\\gdef\\@eqnsw{0}"),Hr("\\notag","\\nonumber"),ae({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(t,e){throw new l(t.funcName+" valid only within array environment")}});var Xr=Zr;ae({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(t,e){var{parser:r,funcName:n}=t,i=e[0];if("ordgroup"!==i.type)throw new l("Invalid environment name",i);for(var o="",s=0;s<i.body.length;++s)o+=Ue(i.body[s],"textord").text;if("\\begin"===n){if(!Xr.hasOwnProperty(o))throw new l("No such environment: "+o,i);var a=Xr[o],{args:c,optArgs:u}=r.parseArguments("\\begin{"+o+"}",a),h={mode:r.mode,envName:o,parser:r},d=a.handler(h,c,u);r.expect("\\end",!1);var p=r.nextToken,m=Ue(r.parseFunction(),"environment");if(m.name!==o)throw new l("Mismatch: \\begin{"+o+"} matched by \\end{"+m.name+"}",p);return d}return{type:"environment",mode:r.mode,name:o,nameGroup:i}}});var Qr=(t,e)=>{var r=t.font,n=e.withFont(r);return qe(t.body,n)},Jr=(t,e)=>{var r=t.font,n=e.withFont(r);return ze(t.body,n)},tn={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};ae({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=ue(e[0]),o=n;return o in tn&&(o=tn[o]),{type:"font",mode:r.mode,font:o.slice(1),body:i}},htmlBuilder:Qr,mathmlBuilder:Jr}),ae({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(t,e)=>{var{parser:r}=t,n=e[0],i=d.isCharacterBox(n);return{type:"mclass",mode:r.mode,mclass:tr(n),body:[{type:"font",mode:r.mode,font:"boldsymbol",body:n}],isCharacterBox:i}}}),ae({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(t,e)=>{var{parser:r,funcName:n,breakOnTokenText:i}=t,{mode:o}=r,s=r.parseExpression(!0,i);return{type:"font",mode:o,font:"math"+n.slice(1),body:{type:"ordgroup",mode:r.mode,body:s}}},htmlBuilder:Qr,mathmlBuilder:Jr});var en=(t,e)=>{var r=e;return"display"===t?r=r.id>=_.SCRIPT.id?r.text():_.DISPLAY:"text"===t&&r.size===_.DISPLAY.size?r=_.TEXT:"script"===t?r=_.SCRIPT:"scriptscript"===t&&(r=_.SCRIPTSCRIPT),r},rn=(t,e)=>{var r,n=en(t.size,e.style),i=n.fracNum(),o=n.fracDen();r=e.havingStyle(i);var s=qe(t.numer,r,e);if(t.continued){var l=8.5/e.fontMetrics().ptPerEm,a=3.5/e.fontMetrics().ptPerEm;s.height=s.height<l?l:s.height,s.depth=s.depth<a?a:s.depth}r=e.havingStyle(o);var c,u,h,d,p,m,f,g,b,v,y=qe(t.denom,r,e);if(t.hasBarLine?(t.barSize?(u=$(t.barSize,e),c=Jt.makeLineSpan("frac-line",e,u)):c=Jt.makeLineSpan("frac-line",e),u=c.height,h=c.height):(c=null,u=0,h=e.fontMetrics().defaultRuleThickness),n.size===_.DISPLAY.size||"display"===t.size?(d=e.fontMetrics().num1,p=u>0?3*h:7*h,m=e.fontMetrics().denom1):(u>0?(d=e.fontMetrics().num2,p=h):(d=e.fontMetrics().num3,p=3*h),m=e.fontMetrics().denom2),c){var x=e.fontMetrics().axisHeight;d-s.depth-(x+.5*u)<p&&(d+=p-(d-s.depth-(x+.5*u))),x-.5*u-(y.height-m)<p&&(m+=p-(x-.5*u-(y.height-m)));var w=-(x-.5*u);f=Jt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:y,shift:m},{type:"elem",elem:c,shift:w},{type:"elem",elem:s,shift:-d}]},e)}else{var k=d-s.depth-(y.height-m);k<p&&(d+=.5*(p-k),m+=.5*(p-k)),f=Jt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:y,shift:m},{type:"elem",elem:s,shift:-d}]},e)}return r=e.havingStyle(n),f.height*=r.sizeMultiplier/e.sizeMultiplier,f.depth*=r.sizeMultiplier/e.sizeMultiplier,g=n.size===_.DISPLAY.size?e.fontMetrics().delim1:n.size===_.SCRIPTSCRIPT.size?e.havingStyle(_.SCRIPT).fontMetrics().delim2:e.fontMetrics().delim2,b=null==t.leftDelim?ke(e,["mopen"]):Cr.customSizedDelim(t.leftDelim,g,!0,e.havingStyle(n),t.mode,["mopen"]),v=t.continued?Jt.makeSpan([]):null==t.rightDelim?ke(e,["mclose"]):Cr.customSizedDelim(t.rightDelim,g,!0,e.havingStyle(n),t.mode,["mclose"]),Jt.makeSpan(["mord"].concat(r.sizingClasses(e)),[b,Jt.makeSpan(["mfrac"],[f]),v],e)},nn=(t,e)=>{var r=new Ee.MathNode("mfrac",[ze(t.numer,e),ze(t.denom,e)]);if(t.hasBarLine){if(t.barSize){var n=$(t.barSize,e);r.setAttribute("linethickness",U(n))}}else r.setAttribute("linethickness","0px");var i=en(t.size,e.style);if(i.size!==e.style.size){r=new Ee.MathNode("mstyle",[r]);var o=i.size===_.DISPLAY.size?"true":"false";r.setAttribute("displaystyle",o),r.setAttribute("scriptlevel","0")}if(null!=t.leftDelim||null!=t.rightDelim){var s=[];if(null!=t.leftDelim){var l=new Ee.MathNode("mo",[new Ee.TextNode(t.leftDelim.replace("\\",""))]);l.setAttribute("fence","true"),s.push(l)}if(s.push(r),null!=t.rightDelim){var a=new Ee.MathNode("mo",[new Ee.TextNode(t.rightDelim.replace("\\",""))]);a.setAttribute("fence","true"),s.push(a)}return Ce(s)}return r};ae({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(t,e)=>{var r,{parser:n,funcName:i}=t,o=e[0],s=e[1],l=null,a=null,c="auto";switch(i){case"\\dfrac":case"\\frac":case"\\tfrac":r=!0;break;case"\\\\atopfrac":r=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":r=!1,l="(",a=")";break;case"\\\\bracefrac":r=!1,l="\\{",a="\\}";break;case"\\\\brackfrac":r=!1,l="[",a="]";break;default:throw new Error("Unrecognized genfrac command")}switch(i){case"\\dfrac":case"\\dbinom":c="display";break;case"\\tfrac":case"\\tbinom":c="text"}return{type:"genfrac",mode:n.mode,continued:!1,numer:o,denom:s,hasBarLine:r,leftDelim:l,rightDelim:a,size:c,barSize:null}},htmlBuilder:rn,mathmlBuilder:nn}),ae({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0],o=e[1];return{type:"genfrac",mode:r.mode,continued:!0,numer:i,denom:o,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}}),ae({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(t){var e,{parser:r,funcName:n,token:i}=t;switch(n){case"\\over":e="\\frac";break;case"\\choose":e="\\binom";break;case"\\atop":e="\\\\atopfrac";break;case"\\brace":e="\\\\bracefrac";break;case"\\brack":e="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:r.mode,replaceWith:e,token:i}}});var on=["display","text","script","scriptscript"],sn=function(t){var e=null;return t.length>0&&(e="."===(e=t)?null:e),e};ae({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(t,e){var r,{parser:n}=t,i=e[4],o=e[5],s=ue(e[0]),l="atom"===s.type&&"open"===s.family?sn(s.text):null,a=ue(e[1]),c="atom"===a.type&&"close"===a.family?sn(a.text):null,u=Ue(e[2],"size"),h=null;r=!!u.isBlank||(h=u.value).number>0;var d="auto",p=e[3];if("ordgroup"===p.type){if(p.body.length>0){var m=Ue(p.body[0],"textord");d=on[Number(m.text)]}}else p=Ue(p,"textord"),d=on[Number(p.text)];return{type:"genfrac",mode:n.mode,numer:i,denom:o,continued:!1,hasBarLine:r,barSize:h,leftDelim:l,rightDelim:c,size:d}},htmlBuilder:rn,mathmlBuilder:nn}),ae({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(t,e){var{parser:r,funcName:n,token:i}=t;return{type:"infix",mode:r.mode,replaceWith:"\\\\abovefrac",size:Ue(e[0],"size").value,token:i}}}),ae({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0],o=function(t){if(!t)throw new Error("Expected non-null, but got "+String(t));return t}(Ue(e[1],"infix").size),s=e[2],l=o.number>0;return{type:"genfrac",mode:r.mode,numer:i,denom:s,continued:!1,hasBarLine:l,barSize:o,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:rn,mathmlBuilder:nn});var ln=(t,e)=>{var r,n,i=e.style;"supsub"===t.type?(r=t.sup?qe(t.sup,e.havingStyle(i.sup()),e):qe(t.sub,e.havingStyle(i.sub()),e),n=Ue(t.base,"horizBrace")):n=Ue(t,"horizBrace");var o,s=qe(n.base,e.havingBaseStyle(_.DISPLAY)),l=$e(n,e);if(n.isOver?(o=Jt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:l}]},e)).children[0].children[0].children[1].classes.push("svg-align"):(o=Jt.makeVList({positionType:"bottom",positionData:s.depth+.1+l.height,children:[{type:"elem",elem:l},{type:"kern",size:.1},{type:"elem",elem:s}]},e)).children[0].children[0].children[0].classes.push("svg-align"),r){var a=Jt.makeSpan(["mord",n.isOver?"mover":"munder"],[o],e);o=n.isOver?Jt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:.2},{type:"elem",elem:r}]},e):Jt.makeVList({positionType:"bottom",positionData:a.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:a}]},e)}return Jt.makeSpan(["mord",n.isOver?"mover":"munder"],[o],e)};ae({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(t,e){var{parser:r,funcName:n}=t;return{type:"horizBrace",mode:r.mode,label:n,isOver:/^\\over/.test(n),base:e[0]}},htmlBuilder:ln,mathmlBuilder:(t,e)=>{var r=De(t.label);return new Ee.MathNode(t.isOver?"mover":"munder",[ze(t.base,e),r])}}),ae({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=e[1],i=Ue(e[0],"url").url;return r.settings.isTrusted({command:"\\href",url:i})?{type:"href",mode:r.mode,href:i,body:he(n)}:r.formatUnsupportedCmd("\\href")},htmlBuilder:(t,e)=>{var r=be(t.body,e,!1);return Jt.makeAnchor(t.href,[],r,e)},mathmlBuilder:(t,e)=>{var r=Be(t.body,e);return r instanceof Ne||(r=new Ne("mrow",[r])),r.setAttribute("href",t.href),r}}),ae({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=Ue(e[0],"url").url;if(!r.settings.isTrusted({command:"\\url",url:n}))return r.formatUnsupportedCmd("\\url");for(var i=[],o=0;o<n.length;o++){var s=n[o];"~"===s&&(s="\\textasciitilde"),i.push({type:"textord",mode:"text",text:s})}var l={type:"text",mode:r.mode,font:"\\texttt",body:i};return{type:"href",mode:r.mode,href:n,body:he(l)}}}),ae({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(t,e){var{parser:r}=t;return{type:"hbox",mode:r.mode,body:he(e[0])}},htmlBuilder(t,e){var r=be(t.body,e,!1);return Jt.makeFragment(r)},mathmlBuilder:(t,e)=>new Ee.MathNode("mrow",Oe(t.body,e))}),ae({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(t,e)=>{var r,{parser:n,funcName:i,token:o}=t,s=Ue(e[0],"raw").string,a=e[1];n.settings.strict&&n.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var c={};switch(i){case"\\htmlClass":c.class=s,r={command:"\\htmlClass",class:s};break;case"\\htmlId":c.id=s,r={command:"\\htmlId",id:s};break;case"\\htmlStyle":c.style=s,r={command:"\\htmlStyle",style:s};break;case"\\htmlData":for(var u=s.split(","),h=0;h<u.length;h++){var d=u[h].split("=");if(2!==d.length)throw new l("Error parsing key-value for \\htmlData");c["data-"+d[0].trim()]=d[1].trim()}r={command:"\\htmlData",attributes:c};break;default:throw new Error("Unrecognized html command")}return n.settings.isTrusted(r)?{type:"html",mode:n.mode,attributes:c,body:he(a)}:n.formatUnsupportedCmd(i)},htmlBuilder:(t,e)=>{var r=be(t.body,e,!1),n=["enclosing"];t.attributes.class&&n.push(...t.attributes.class.trim().split(/\s+/));var i=Jt.makeSpan(n,r,e);for(var o in t.attributes)"class"!==o&&t.attributes.hasOwnProperty(o)&&i.setAttribute(o,t.attributes[o]);return i},mathmlBuilder:(t,e)=>Be(t.body,e)}),ae({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(t,e)=>{var{parser:r}=t;return{type:"htmlmathml",mode:r.mode,html:he(e[0]),mathml:he(e[1])}},htmlBuilder:(t,e)=>{var r=be(t.html,e,!1);return Jt.makeFragment(r)},mathmlBuilder:(t,e)=>Be(t.mathml,e)});var an=function(t){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(t))return{number:+t,unit:"bp"};var e=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t);if(!e)throw new l("Invalid size: '"+t+"' in \\includegraphics");var r={number:+(e[1]+e[2]),unit:e[3]};if(!D(r))throw new l("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r};ae({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(t,e,r)=>{var{parser:n}=t,i={number:0,unit:"em"},o={number:.9,unit:"em"},s={number:0,unit:"em"},a="";if(r[0])for(var c=Ue(r[0],"raw").string.split(","),u=0;u<c.length;u++){var h=c[u].split("=");if(2===h.length){var d=h[1].trim();switch(h[0].trim()){case"alt":a=d;break;case"width":i=an(d);break;case"height":o=an(d);break;case"totalheight":s=an(d);break;default:throw new l("Invalid key: '"+h[0]+"' in \\includegraphics.")}}}var p=Ue(e[0],"url").url;return""===a&&(a=(a=(a=p).replace(/^.*[\\/]/,"")).substring(0,a.lastIndexOf("."))),n.settings.isTrusted({command:"\\includegraphics",url:p})?{type:"includegraphics",mode:n.mode,alt:a,width:i,height:o,totalheight:s,src:p}:n.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(t,e)=>{var r=$(t.height,e),n=0;t.totalheight.number>0&&(n=$(t.totalheight,e)-r);var i=0;t.width.number>0&&(i=$(t.width,e));var o={height:U(r+n)};i>0&&(o.width=U(i)),n>0&&(o.verticalAlign=U(-n));var s=new X(t.src,t.alt,o);return s.height=r,s.depth=n,s},mathmlBuilder:(t,e)=>{var r=new Ee.MathNode("mglyph",[]);r.setAttribute("alt",t.alt);var n=$(t.height,e),i=0;if(t.totalheight.number>0&&(i=$(t.totalheight,e)-n,r.setAttribute("valign",U(-i))),r.setAttribute("height",U(n+i)),t.width.number>0){var o=$(t.width,e);r.setAttribute("width",U(o))}return r.setAttribute("src",t.src),r}}),ae({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(t,e){var{parser:r,funcName:n}=t,i=Ue(e[0],"size");if(r.settings.strict){var o="m"===n[1],s="mu"===i.value.unit;o?(s||r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, not "+i.value.unit+" units"),"math"!==r.mode&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):s&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:r.mode,dimension:i.value}},htmlBuilder:(t,e)=>Jt.makeGlue(t.dimension,e),mathmlBuilder(t,e){var r=$(t.dimension,e);return new Ee.SpaceNode(r)}}),ae({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0];return{type:"lap",mode:r.mode,alignment:n.slice(5),body:i}},htmlBuilder:(t,e)=>{var r;"clap"===t.alignment?(r=Jt.makeSpan([],[qe(t.body,e)]),r=Jt.makeSpan(["inner"],[r],e)):r=Jt.makeSpan(["inner"],[qe(t.body,e)]);var n=Jt.makeSpan(["fix"],[]),i=Jt.makeSpan([t.alignment],[r,n],e),o=Jt.makeSpan(["strut"]);return o.style.height=U(i.height+i.depth),i.depth&&(o.style.verticalAlign=U(-i.depth)),i.children.unshift(o),i=Jt.makeSpan(["thinbox"],[i],e),Jt.makeSpan(["mord","vbox"],[i],e)},mathmlBuilder:(t,e)=>{var r=new Ee.MathNode("mpadded",[ze(t.body,e)]);if("rlap"!==t.alignment){var n="llap"===t.alignment?"-1":"-0.5";r.setAttribute("lspace",n+"width")}return r.setAttribute("width","0px"),r}}),ae({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){var{funcName:r,parser:n}=t,i=n.mode;n.switchMode("math");var o="\\("===r?"\\)":"$",s=n.parseExpression(!1,o);return n.expect(o),n.switchMode(i),{type:"styling",mode:n.mode,style:"text",body:s}}}),ae({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){throw new l("Mismatched "+t.funcName)}});var cn=(t,e)=>{switch(e.style.size){case _.DISPLAY.size:return t.display;case _.TEXT.size:return t.text;case _.SCRIPT.size:return t.script;case _.SCRIPTSCRIPT.size:return t.scriptscript;default:return t.text}};ae({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(t,e)=>{var{parser:r}=t;return{type:"mathchoice",mode:r.mode,display:he(e[0]),text:he(e[1]),script:he(e[2]),scriptscript:he(e[3])}},htmlBuilder:(t,e)=>{var r=cn(t,e),n=be(r,e,!1);return Jt.makeFragment(n)},mathmlBuilder:(t,e)=>{var r=cn(t,e);return Be(r,e)}});var un=(t,e,r,n,i,o,s)=>{t=Jt.makeSpan([],[t]);var l,a,c,u=r&&d.isCharacterBox(r);if(e){var h=qe(e,n.havingStyle(i.sup()),n);a={elem:h,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-h.depth)}}if(r){var p=qe(r,n.havingStyle(i.sub()),n);l={elem:p,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-p.height)}}if(a&&l){var m=n.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+t.depth+s;c=Jt.makeVList({positionType:"bottom",positionData:m,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:U(-o)},{type:"kern",size:l.kern},{type:"elem",elem:t},{type:"kern",size:a.kern},{type:"elem",elem:a.elem,marginLeft:U(o)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else if(l){var f=t.height-s;c=Jt.makeVList({positionType:"top",positionData:f,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:U(-o)},{type:"kern",size:l.kern},{type:"elem",elem:t}]},n)}else{if(!a)return t;var g=t.depth+s;c=Jt.makeVList({positionType:"bottom",positionData:g,children:[{type:"elem",elem:t},{type:"kern",size:a.kern},{type:"elem",elem:a.elem,marginLeft:U(o)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}var b=[c];if(l&&0!==o&&!u){var v=Jt.makeSpan(["mspace"],[],n);v.style.marginRight=U(o),b.unshift(v)}return Jt.makeSpan(["mop","op-limits"],b,n)},hn=["\\smallint"],dn=(t,e)=>{var r,n,i,o=!1;"supsub"===t.type?(r=t.sup,n=t.sub,i=Ue(t.base,"op"),o=!0):i=Ue(t,"op");var s,l=e.style,a=!1;if(l.size===_.DISPLAY.size&&i.symbol&&!d.contains(hn,i.name)&&(a=!0),i.symbol){var c=a?"Size2-Regular":"Size1-Regular",u="";if("\\oiint"!==i.name&&"\\oiiint"!==i.name||(u=i.name.slice(1),i.name="oiint"===u?"\\iint":"\\iiint"),s=Jt.makeSymbol(i.name,c,"math",e,["mop","op-symbol",a?"large-op":"small-op"]),u.length>0){var h=s.italic,p=Jt.staticSvg(u+"Size"+(a?"2":"1"),e);s=Jt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:s,shift:0},{type:"elem",elem:p,shift:a?.08:0}]},e),i.name="\\"+u,s.classes.unshift("mop"),s.italic=h}}else if(i.body){var m=be(i.body,e,!0);1===m.length&&m[0]instanceof J?(s=m[0]).classes[0]="mop":s=Jt.makeSpan(["mop"],m,e)}else{for(var f=[],g=1;g<i.name.length;g++)f.push(Jt.mathsym(i.name[g],i.mode,e));s=Jt.makeSpan(["mop"],f,e)}var b=0,v=0;return(s instanceof J||"\\oiint"===i.name||"\\oiiint"===i.name)&&!i.suppressBaseShift&&(b=(s.height-s.depth)/2-e.fontMetrics().axisHeight,v=s.italic),o?un(s,r,n,e,l,v,b):(b&&(s.style.position="relative",s.style.top=U(b)),s)},pn=(t,e)=>{var r;if(t.symbol)r=new Ne("mo",[Le(t.name,t.mode)]),d.contains(hn,t.name)&&r.setAttribute("largeop","false");else if(t.body)r=new Ne("mo",Oe(t.body,e));else{r=new Ne("mi",[new Te(t.name.slice(1))]);var n=new Ne("mo",[Le("","text")]);r=t.parentIsSupSub?new Ne("mrow",[r,n]):Ae([r,n])}return r},mn={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","":"\\bigvee","⋂":"\\bigcap","":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};ae({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","","⋂","","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=n;return 1===i.length&&(i=mn[i]),{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:i}},htmlBuilder:dn,mathmlBuilder:pn}),ae({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:he(n)}},htmlBuilder:dn,mathmlBuilder:pn});var fn={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};ae({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(t){var{parser:e,funcName:r}=t;return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:dn,mathmlBuilder:pn}),ae({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(t){var{parser:e,funcName:r}=t;return{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:dn,mathmlBuilder:pn}),ae({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(t){var{parser:e,funcName:r}=t,n=r;return 1===n.length&&(n=fn[n]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:dn,mathmlBuilder:pn});var gn=(t,e)=>{var r,n,i,o,s=!1;if("supsub"===t.type?(r=t.sup,n=t.sub,i=Ue(t.base,"operatorname"),s=!0):i=Ue(t,"operatorname"),i.body.length>0){for(var l=i.body.map((t=>{var e=t.text;return"string"==typeof e?{type:"textord",mode:t.mode,text:e}:t})),a=be(l,e.withFont("mathrm"),!0),c=0;c<a.length;c++){var u=a[c];u instanceof J&&(u.text=u.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}o=Jt.makeSpan(["mop"],a,e)}else o=Jt.makeSpan(["mop"],[],e);return s?un(o,r,n,e,e.style,0,0):o};function bn(t,e,r){for(var n=be(t,e,!1),i=e.sizeMultiplier/r.sizeMultiplier,o=0;o<n.length;o++){var s=n[o].classes.indexOf("sizing");s<0?Array.prototype.push.apply(n[o].classes,e.sizingClasses(r)):n[o].classes[s+1]==="reset-size"+e.size&&(n[o].classes[s+1]="reset-size"+r.size),n[o].height*=i,n[o].depth*=i}return Jt.makeFragment(n)}ae({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0];return{type:"operatorname",mode:r.mode,body:he(i),alwaysHandleSupSub:"\\operatornamewithlimits"===n,limits:!1,parentIsSupSub:!1}},htmlBuilder:gn,mathmlBuilder:(t,e)=>{for(var r=Oe(t.body,e.withFont("mathrm")),n=!0,i=0;i<r.length;i++){var o=r[i];if(o instanceof Ee.SpaceNode);else if(o instanceof Ee.MathNode)switch(o.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":var s=o.children[0];1===o.children.length&&s instanceof Ee.TextNode?s.text=s.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):n=!1;break;default:n=!1}else n=!1}if(n){var l=r.map((t=>t.toText())).join("");r=[new Ee.TextNode(l)]}var a=new Ee.MathNode("mi",r);a.setAttribute("mathvariant","normal");var c=new Ee.MathNode("mo",[Le("","text")]);return t.parentIsSupSub?new Ee.MathNode("mrow",[a,c]):Ee.newDocumentFragment([a,c])}}),Hr("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),ce({type:"ordgroup",htmlBuilder:(t,e)=>t.semisimple?Jt.makeFragment(be(t.body,e,!1)):Jt.makeSpan(["mord"],be(t.body,e,!0),e),mathmlBuilder:(t,e)=>Be(t.body,e,!0)}),ae({type:"overline",names:["\\overline"],props:{numArgs:1},handler(t,e){var{parser:r}=t,n=e[0];return{type:"overline",mode:r.mode,body:n}},htmlBuilder(t,e){var r=qe(t.body,e.havingCrampedStyle()),n=Jt.makeLineSpan("overline-line",e),i=e.fontMetrics().defaultRuleThickness,o=Jt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:3*i},{type:"elem",elem:n},{type:"kern",size:i}]},e);return Jt.makeSpan(["mord","overline"],[o],e)},mathmlBuilder(t,e){var r=new Ee.MathNode("mo",[new Ee.TextNode("‾")]);r.setAttribute("stretchy","true");var n=new Ee.MathNode("mover",[ze(t.body,e),r]);return n.setAttribute("accent","true"),n}}),ae({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"phantom",mode:r.mode,body:he(n)}},htmlBuilder:(t,e)=>{var r=be(t.body,e.withPhantom(),!1);return Jt.makeFragment(r)},mathmlBuilder:(t,e)=>{var r=Oe(t.body,e);return new Ee.MathNode("mphantom",r)}}),ae({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"hphantom",mode:r.mode,body:n}},htmlBuilder:(t,e)=>{var r=Jt.makeSpan([],[qe(t.body,e.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=Jt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r}]},e),Jt.makeSpan(["mord"],[r],e)},mathmlBuilder:(t,e)=>{var r=Oe(he(t.body),e),n=new Ee.MathNode("mphantom",r),i=new Ee.MathNode("mpadded",[n]);return i.setAttribute("height","0px"),i.setAttribute("depth","0px"),i}}),ae({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"vphantom",mode:r.mode,body:n}},htmlBuilder:(t,e)=>{var r=Jt.makeSpan(["inner"],[qe(t.body,e.withPhantom())]),n=Jt.makeSpan(["fix"],[]);return Jt.makeSpan(["mord","rlap"],[r,n],e)},mathmlBuilder:(t,e)=>{var r=Oe(he(t.body),e),n=new Ee.MathNode("mphantom",r),i=new Ee.MathNode("mpadded",[n]);return i.setAttribute("width","0px"),i}}),ae({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(t,e){var{parser:r}=t,n=Ue(e[0],"size").value,i=e[1];return{type:"raisebox",mode:r.mode,dy:n,body:i}},htmlBuilder(t,e){var r=qe(t.body,e),n=$(t.dy,e);return Jt.makeVList({positionType:"shift",positionData:-n,children:[{type:"elem",elem:r}]},e)},mathmlBuilder(t,e){var r=new Ee.MathNode("mpadded",[ze(t.body,e)]),n=t.dy.number+t.dy.unit;return r.setAttribute("voffset",n),r}}),ae({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0},handler(t){var{parser:e}=t;return{type:"internal",mode:e.mode}}}),ae({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler(t,e,r){var{parser:n}=t,i=r[0],o=Ue(e[0],"size"),s=Ue(e[1],"size");return{type:"rule",mode:n.mode,shift:i&&Ue(i,"size").value,width:o.value,height:s.value}},htmlBuilder(t,e){var r=Jt.makeSpan(["mord","rule"],[],e),n=$(t.width,e),i=$(t.height,e),o=t.shift?$(t.shift,e):0;return r.style.borderRightWidth=U(n),r.style.borderTopWidth=U(i),r.style.bottom=U(o),r.width=n,r.height=i+o,r.depth=-o,r.maxFontSize=1.125*i*e.sizeMultiplier,r},mathmlBuilder(t,e){var r=$(t.width,e),n=$(t.height,e),i=t.shift?$(t.shift,e):0,o=e.color&&e.getColor()||"black",s=new Ee.MathNode("mspace");s.setAttribute("mathbackground",o),s.setAttribute("width",U(r)),s.setAttribute("height",U(n));var l=new Ee.MathNode("mpadded",[s]);return i>=0?l.setAttribute("height",U(i)):(l.setAttribute("height",U(i)),l.setAttribute("depth",U(-i))),l.setAttribute("voffset",U(i)),l}});var vn=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"];ae({type:"sizing",names:vn,props:{numArgs:0,allowedInText:!0},handler:(t,e)=>{var{breakOnTokenText:r,funcName:n,parser:i}=t,o=i.parseExpression(!1,r);return{type:"sizing",mode:i.mode,size:vn.indexOf(n)+1,body:o}},htmlBuilder:(t,e)=>{var r=e.havingSize(t.size);return bn(t.body,r,e)},mathmlBuilder:(t,e)=>{var r=e.havingSize(t.size),n=Oe(t.body,r),i=new Ee.MathNode("mstyle",n);return i.setAttribute("mathsize",U(r.sizeMultiplier)),i}}),ae({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(t,e,r)=>{var{parser:n}=t,i=!1,o=!1,s=r[0]&&Ue(r[0],"ordgroup");if(s)for(var l="",a=0;a<s.body.length;++a){if("t"===(l=s.body[a].text))i=!0;else{if("b"!==l){i=!1,o=!1;break}o=!0}}else i=!0,o=!0;var c=e[0];return{type:"smash",mode:n.mode,body:c,smashHeight:i,smashDepth:o}},htmlBuilder:(t,e)=>{var r=Jt.makeSpan([],[qe(t.body,e)]);if(!t.smashHeight&&!t.smashDepth)return r;if(t.smashHeight&&(r.height=0,r.children))for(var n=0;n<r.children.length;n++)r.children[n].height=0;if(t.smashDepth&&(r.depth=0,r.children))for(var i=0;i<r.children.length;i++)r.children[i].depth=0;var o=Jt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r}]},e);return Jt.makeSpan(["mord"],[o],e)},mathmlBuilder:(t,e)=>{var r=new Ee.MathNode("mpadded",[ze(t.body,e)]);return t.smashHeight&&r.setAttribute("height","0px"),t.smashDepth&&r.setAttribute("depth","0px"),r}}),ae({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(t,e,r){var{parser:n}=t,i=r[0],o=e[0];return{type:"sqrt",mode:n.mode,body:o,index:i}},htmlBuilder(t,e){var r=qe(t.body,e.havingCrampedStyle());0===r.height&&(r.height=e.fontMetrics().xHeight),r=Jt.wrapFragment(r,e);var n=e.fontMetrics().defaultRuleThickness,i=n;e.style.id<_.TEXT.id&&(i=e.fontMetrics().xHeight);var o=n+i/4,s=r.height+r.depth+o+n,{span:l,ruleWidth:a,advanceWidth:c}=Cr.sqrtImage(s,e),u=l.height-a;u>r.height+r.depth+o&&(o=(o+u-r.height-r.depth)/2);var h=l.height-r.height-o-a;r.style.paddingLeft=U(c);var d=Jt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+h)},{type:"elem",elem:l},{type:"kern",size:a}]},e);if(t.index){var p=e.havingStyle(_.SCRIPTSCRIPT),m=qe(t.index,p,e),f=.6*(d.height-d.depth),g=Jt.makeVList({positionType:"shift",positionData:-f,children:[{type:"elem",elem:m}]},e),b=Jt.makeSpan(["root"],[g]);return Jt.makeSpan(["mord","sqrt"],[b,d],e)}return Jt.makeSpan(["mord","sqrt"],[d],e)},mathmlBuilder(t,e){var{body:r,index:n}=t;return n?new Ee.MathNode("mroot",[ze(r,e),ze(n,e)]):new Ee.MathNode("msqrt",[ze(r,e)])}});var yn={display:_.DISPLAY,text:_.TEXT,script:_.SCRIPT,scriptscript:_.SCRIPTSCRIPT};ae({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t,e){var{breakOnTokenText:r,funcName:n,parser:i}=t,o=i.parseExpression(!0,r),s=n.slice(1,n.length-5);return{type:"styling",mode:i.mode,style:s,body:o}},htmlBuilder(t,e){var r=yn[t.style],n=e.havingStyle(r).withFont("");return bn(t.body,n,e)},mathmlBuilder(t,e){var r=yn[t.style],n=e.havingStyle(r),i=Oe(t.body,n),o=new Ee.MathNode("mstyle",i),s={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[t.style];return o.setAttribute("scriptlevel",s[0]),o.setAttribute("displaystyle",s[1]),o}});ce({type:"supsub",htmlBuilder(t,e){var r=function(t,e){var r=t.base;return r?"op"===r.type?r.limits&&(e.style.size===_.DISPLAY.size||r.alwaysHandleSupSub)?dn:null:"operatorname"===r.type?r.alwaysHandleSupSub&&(e.style.size===_.DISPLAY.size||r.limits)?gn:null:"accent"===r.type?d.isCharacterBox(r.base)?We:null:"horizBrace"===r.type&&!t.sub===r.isOver?ln:null:null}(t,e);if(r)return r(t,e);var n,i,o,{base:s,sup:l,sub:a}=t,c=qe(s,e),u=e.fontMetrics(),h=0,p=0,m=s&&d.isCharacterBox(s);if(l){var f=e.havingStyle(e.style.sup());n=qe(l,f,e),m||(h=c.height-f.fontMetrics().supDrop*f.sizeMultiplier/e.sizeMultiplier)}if(a){var g=e.havingStyle(e.style.sub());i=qe(a,g,e),m||(p=c.depth+g.fontMetrics().subDrop*g.sizeMultiplier/e.sizeMultiplier)}o=e.style===_.DISPLAY?u.sup1:e.style.cramped?u.sup3:u.sup2;var b,v=e.sizeMultiplier,y=U(.5/u.ptPerEm/v),x=null;if(i){var w=t.base&&"op"===t.base.type&&t.base.name&&("\\oiint"===t.base.name||"\\oiiint"===t.base.name);(c instanceof J||w)&&(x=U(-c.italic))}if(n&&i){h=Math.max(h,o,n.depth+.25*u.xHeight),p=Math.max(p,u.sub2);var k=4*u.defaultRuleThickness;if(h-n.depth-(i.height-p)<k){p=k-(h-n.depth)+i.height;var q=.8*u.xHeight-(h-n.depth);q>0&&(h+=q,p-=q)}var S=[{type:"elem",elem:i,shift:p,marginRight:y,marginLeft:x},{type:"elem",elem:n,shift:-h,marginRight:y}];b=Jt.makeVList({positionType:"individualShift",children:S},e)}else if(i){p=Math.max(p,u.sub1,i.height-.8*u.xHeight);var A=[{type:"elem",elem:i,marginLeft:x,marginRight:y}];b=Jt.makeVList({positionType:"shift",positionData:p,children:A},e)}else{if(!n)throw new Error("supsub must have either sup or sub.");h=Math.max(h,o,n.depth+.25*u.xHeight),b=Jt.makeVList({positionType:"shift",positionData:-h,children:[{type:"elem",elem:n,marginRight:y}]},e)}var N=we(c,"right")||"mord";return Jt.makeSpan([N],[c,Jt.makeSpan(["msupsub"],[b])],e)},mathmlBuilder(t,e){var r,n=!1;t.base&&"horizBrace"===t.base.type&&!!t.sup===t.base.isOver&&(n=!0,r=t.base.isOver),!t.base||"op"!==t.base.type&&"operatorname"!==t.base.type||(t.base.parentIsSupSub=!0);var i,o=[ze(t.base,e)];if(t.sub&&o.push(ze(t.sub,e)),t.sup&&o.push(ze(t.sup,e)),n)i=r?"mover":"munder";else if(t.sub)if(t.sup){var s=t.base;i=s&&"op"===s.type&&s.limits&&e.style===_.DISPLAY||s&&"operatorname"===s.type&&s.alwaysHandleSupSub&&(e.style===_.DISPLAY||s.limits)?"munderover":"msubsup"}else{var l=t.base;i=l&&"op"===l.type&&l.limits&&(e.style===_.DISPLAY||l.alwaysHandleSupSub)||l&&"operatorname"===l.type&&l.alwaysHandleSupSub&&(l.limits||e.style===_.DISPLAY)?"munder":"msub"}else{var a=t.base;i=a&&"op"===a.type&&a.limits&&(e.style===_.DISPLAY||a.alwaysHandleSupSub)||a&&"operatorname"===a.type&&a.alwaysHandleSupSub&&(a.limits||e.style===_.DISPLAY)?"mover":"msup"}return new Ee.MathNode(i,o)}}),ce({type:"atom",htmlBuilder:(t,e)=>Jt.mathsym(t.text,t.mode,e,["m"+t.family]),mathmlBuilder(t,e){var r=new Ee.MathNode("mo",[Le(t.text,t.mode)]);if("bin"===t.family){var n=Me(t,e);"bold-italic"===n&&r.setAttribute("mathvariant",n)}else"punct"===t.family?r.setAttribute("separator","true"):"open"!==t.family&&"close"!==t.family||r.setAttribute("stretchy","false");return r}});var xn={mi:"italic",mn:"normal",mtext:"normal"};ce({type:"mathord",htmlBuilder:(t,e)=>Jt.makeOrd(t,e,"mathord"),mathmlBuilder(t,e){var r=new Ee.MathNode("mi",[Le(t.text,t.mode,e)]),n=Me(t,e)||"italic";return n!==xn[r.type]&&r.setAttribute("mathvariant",n),r}}),ce({type:"textord",htmlBuilder:(t,e)=>Jt.makeOrd(t,e,"textord"),mathmlBuilder(t,e){var r,n=Le(t.text,t.mode,e),i=Me(t,e)||"normal";return r="text"===t.mode?new Ee.MathNode("mtext",[n]):/[0-9]/.test(t.text)?new Ee.MathNode("mn",[n]):"\\prime"===t.text?new Ee.MathNode("mo",[n]):new Ee.MathNode("mi",[n]),i!==xn[r.type]&&r.setAttribute("mathvariant",i),r}});var wn={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},kn={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};ce({type:"spacing",htmlBuilder(t,e){if(kn.hasOwnProperty(t.text)){var r=kn[t.text].className||"";if("text"===t.mode){var n=Jt.makeOrd(t,e,"textord");return n.classes.push(r),n}return Jt.makeSpan(["mspace",r],[Jt.mathsym(t.text,t.mode,e)],e)}if(wn.hasOwnProperty(t.text))return Jt.makeSpan(["mspace",wn[t.text]],[],e);throw new l('Unknown type of space "'+t.text+'"')},mathmlBuilder(t,e){if(!kn.hasOwnProperty(t.text)){if(wn.hasOwnProperty(t.text))return new Ee.MathNode("mspace");throw new l('Unknown type of space "'+t.text+'"')}return new Ee.MathNode("mtext",[new Ee.TextNode(" ")])}});var qn=()=>{var t=new Ee.MathNode("mtd",[]);return t.setAttribute("width","50%"),t};ce({type:"tag",mathmlBuilder(t,e){var r=new Ee.MathNode("mtable",[new Ee.MathNode("mtr",[qn(),new Ee.MathNode("mtd",[Be(t.body,e)]),qn(),new Ee.MathNode("mtd",[Be(t.tag,e)])])]);return r.setAttribute("width","100%"),r}});var _n={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Sn={"\\textbf":"textbf","\\textmd":"textmd"},An={"\\textit":"textit","\\textup":"textup"},Nn=(t,e)=>{var r=t.font;return r?_n[r]?e.withTextFontFamily(_n[r]):Sn[r]?e.withTextFontWeight(Sn[r]):"\\emph"===r?"textit"===e.fontShape?e.withTextFontShape("textup"):e.withTextFontShape("textit"):e.withTextFontShape(An[r]):e};ae({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(t,e){var{parser:r,funcName:n}=t,i=e[0];return{type:"text",mode:r.mode,body:he(i),font:n}},htmlBuilder(t,e){var r=Nn(t,e),n=be(t.body,r,!0);return Jt.makeSpan(["mord","text"],n,r)},mathmlBuilder(t,e){var r=Nn(t,e);return Be(t.body,r)}}),ae({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:r}=t;return{type:"underline",mode:r.mode,body:e[0]}},htmlBuilder(t,e){var r=qe(t.body,e),n=Jt.makeLineSpan("underline-line",e),i=e.fontMetrics().defaultRuleThickness,o=Jt.makeVList({positionType:"top",positionData:r.height,children:[{type:"kern",size:i},{type:"elem",elem:n},{type:"kern",size:3*i},{type:"elem",elem:r}]},e);return Jt.makeSpan(["mord","underline"],[o],e)},mathmlBuilder(t,e){var r=new Ee.MathNode("mo",[new Ee.TextNode("‾")]);r.setAttribute("stretchy","true");var n=new Ee.MathNode("munder",[ze(t.body,e),r]);return n.setAttribute("accentunder","true"),n}}),ae({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(t,e){var{parser:r}=t;return{type:"vcenter",mode:r.mode,body:e[0]}},htmlBuilder(t,e){var r=qe(t.body,e),n=e.fontMetrics().axisHeight,i=.5*(r.height-n-(r.depth+n));return Jt.makeVList({positionType:"shift",positionData:i,children:[{type:"elem",elem:r}]},e)},mathmlBuilder:(t,e)=>new Ee.MathNode("mpadded",[ze(t.body,e)],["vcenter"])}),ae({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(t,e,r){throw new l("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(t,e){for(var r=Tn(t),n=[],i=e.havingStyle(e.style.text()),o=0;o<r.length;o++){var s=r[o];"~"===s&&(s="\\textasciitilde"),n.push(Jt.makeSymbol(s,"Typewriter-Regular",t.mode,i,["mord","texttt"]))}return Jt.makeSpan(["mord","text"].concat(i.sizingClasses(e)),Jt.tryCombineChars(n),i)},mathmlBuilder(t,e){var r=new Ee.TextNode(Tn(t)),n=new Ee.MathNode("mtext",[r]);return n.setAttribute("mathvariant","monospace"),n}});var Tn=t=>t.body.replace(/ /g,t.star?"␣":" "),En=oe,Ln="[ \r\n\t]",Cn="(\\\\[a-zA-Z@]+)"+Ln+"*",Mn="[̀-ͯ]",On=new RegExp(Mn+"+$"),Bn="("+Ln+"+)|\\\\(\n|[ \r\t]+\n?)[ \r\t]*|([!-\\[\\]-‧‪-퟿豈-￿]"+Mn+"*|[\ud800-\udbff][\udc00-\udfff]"+Mn+"*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|"+Cn+"|\\\\[^\ud800-\udfff])";class zn{constructor(t,e){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=t,this.settings=e,this.tokenRegex=new RegExp(Bn,"g"),this.catcodes={"%":14,"~":13}}setCatcode(t,e){this.catcodes[t]=e}lex(){var t=this.input,e=this.tokenRegex.lastIndex;if(e===t.length)return new s("EOF",new o(this,e,e));var r=this.tokenRegex.exec(t);if(null===r||r.index!==e)throw new l("Unexpected character: '"+t[e]+"'",new s(t[e],new o(this,e,e+1)));var n=r[6]||r[3]||(r[2]?"\\ ":" ");if(14===this.catcodes[n]){var i=t.indexOf("\n",this.tokenRegex.lastIndex);return-1===i?(this.tokenRegex.lastIndex=t.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 s(n,new o(this,e,this.tokenRegex.lastIndex))}}class Pn{constructor(t,e){void 0===t&&(t={}),void 0===e&&(e={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=e,this.builtins=t,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(0===this.undefStack.length)throw new l("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var t=this.undefStack.pop();for(var e in t)t.hasOwnProperty(e)&&(null==t[e]?delete this.current[e]:this.current[e]=t[e])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(t){return this.current.hasOwnProperty(t)||this.builtins.hasOwnProperty(t)}get(t){return this.current.hasOwnProperty(t)?this.current[t]:this.builtins[t]}set(t,e,r){if(void 0===r&&(r=!1),r){for(var n=0;n<this.undefStack.length;n++)delete this.undefStack[n][t];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][t]=e)}else{var i=this.undefStack[this.undefStack.length-1];i&&!i.hasOwnProperty(t)&&(i[t]=this.current[t])}null==e?delete this.current[t]:this.current[t]=e}}var Rn=jr;Hr("\\noexpand",(function(t){var e=t.popToken();return t.isExpandable(e.text)&&(e.noexpand=!0,e.treatAsRelax=!0),{tokens:[e],numArgs:0}})),Hr("\\expandafter",(function(t){var e=t.popToken();return t.expandOnce(!0),{tokens:[e],numArgs:0}})),Hr("\\@firstoftwo",(function(t){return{tokens:t.consumeArgs(2)[0],numArgs:0}})),Hr("\\@secondoftwo",(function(t){return{tokens:t.consumeArgs(2)[1],numArgs:0}})),Hr("\\@ifnextchar",(function(t){var e=t.consumeArgs(3);t.consumeSpaces();var r=t.future();return 1===e[0].length&&e[0][0].text===r.text?{tokens:e[1],numArgs:0}:{tokens:e[2],numArgs:0}})),Hr("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),Hr("\\TextOrMath",(function(t){var e=t.consumeArgs(2);return"text"===t.mode?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0}}));var Zn={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(t){var e,r=t.popToken(),n="";if("'"===r.text)e=8,r=t.popToken();else if('"'===r.text)e=16,r=t.popToken();else if("`"===r.text)if("\\"===(r=t.popToken()).text[0])n=r.text.charCodeAt(1);else{if("EOF"===r.text)throw new l("\\char` missing argument");n=r.text.charCodeAt(0)}else e=10;if(e){if(null==(n=Zn[r.text])||n>=e)throw new l("Invalid base-"+e+" digit "+r.text);for(var i;null!=(i=Zn[t.future().text])&&i<e;)n*=e,n+=i,t.popToken()}return"\\@char{"+n+"}"}));var In=(t,e,r)=>{var n=t.consumeArg().tokens;if(1!==n.length)throw new l("\\newcommand's first argument must be a macro name");var i=n[0].text,o=t.isDefined(i);if(o&&!e)throw new l("\\newcommand{"+i+"} attempting to redefine "+i+"; use \\renewcommand");if(!o&&!r)throw new l("\\renewcommand{"+i+"} when command "+i+" does not yet exist; use \\newcommand");var s=0;if(1===(n=t.consumeArg().tokens).length&&"["===n[0].text){for(var a="",c=t.expandNextToken();"]"!==c.text&&"EOF"!==c.text;)a+=c.text,c=t.expandNextToken();if(!a.match(/^\s*[0-9]+\s*$/))throw new l("Invalid number of arguments: "+a);s=parseInt(a),n=t.consumeArg().tokens}return t.macros.set(i,{tokens:n,numArgs:s}),""};Hr("\\newcommand",(t=>In(t,!1,!0))),Hr("\\renewcommand",(t=>In(t,!0,!1))),Hr("\\providecommand",(t=>In(t,!0,!0))),Hr("\\message",(t=>{var e=t.consumeArgs(1)[0];return console.log(e.reverse().map((t=>t.text)).join("")),""})),Hr("\\errmessage",(t=>{var e=t.consumeArgs(1)[0];return console.error(e.reverse().map((t=>t.text)).join("")),""})),Hr("\\show",(t=>{var e=t.popToken(),r=e.text;return console.log(e,t.macros.get(r),En[r],st.math[r],st.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`©}"),Hr("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),Hr("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),Hr("","\\mathscr{B}"),Hr("","\\mathscr{E}"),Hr("","\\mathscr{F}"),Hr("","\\mathscr{H}"),Hr("","\\mathscr{I}"),Hr("","\\mathscr{L}"),Hr("","\\mathscr{M}"),Hr("","\\mathscr{R}"),Hr("","\\mathfrak{C}"),Hr("","\\mathfrak{H}"),Hr("","\\mathfrak{Z}"),Hr("\\Bbbk","\\Bbb{k}"),Hr("·","\\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`≠}}"),Hr("\\ne","\\neq"),Hr("≠","\\neq"),Hr("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),Hr("∉","\\notin"),Hr("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),Hr("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),Hr("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),Hr("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),Hr("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),Hr("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),Hr("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),Hr("⟂","\\perp"),Hr("‼","\\mathclose{!\\mkern-0.8mu!}"),Hr("∌","\\notni"),Hr("⌜","\\ulcorner"),Hr("⌝","\\urcorner"),Hr("⌞","\\llcorner"),Hr("⌟","\\lrcorner"),Hr("©","\\copyright"),Hr("®","\\textregistered"),Hr("","\\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("⋮","\\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 jn={",":"\\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(t){var e="\\dotso",r=t.expandAfterFuture().text;return r in jn?e=jn[r]:("\\not"===r.slice(0,4)||r in st.math&&d.contains(["bin","rel"],st.math[r].group))&&(e="\\dotsb"),e}));var Hn={")":!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(t){return t.future().text in Hn?"\\ldots\\,":"\\ldots"})),Hr("\\dotsc",(function(t){var e=t.future().text;return e in Hn&&","!==e?"\\ldots\\,":"\\ldots"})),Hr("\\cdots",(function(t){return t.future().text in Hn?"\\@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",(t=>{if(t.macros.get("\\df@tag"))throw new l("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("\\newline","\\\\\\relax"),Hr("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var Dn=U(C["Main-Regular"]["T".charCodeAt(0)][1]-.7*C["Main-Regular"]["A".charCodeAt(0)][1]);Hr("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+Dn+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),Hr("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+Dn+"}{\\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("∷","\\dblcolon"),Hr("∹","\\eqcolon"),Hr("≔","\\coloneqq"),Hr("≕","\\eqqcolon"),Hr("⩴","\\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`∌}}"),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}{≩}"),Hr("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}"),Hr("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}"),Hr("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}"),Hr("\\nleqq","\\html@mathml{\\@nleqq}{≰}"),Hr("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}"),Hr("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}"),Hr("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}"),Hr("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}"),Hr("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}"),Hr("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}"),Hr("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}"),Hr("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}"),Hr("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}"),Hr("\\imath","\\html@mathml{\\@imath}{ı}"),Hr("\\jmath","\\html@mathml{\\@jmath}{ȷ}"),Hr("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),Hr("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),Hr("⟦","\\llbracket"),Hr("⟧","\\rrbracket"),Hr("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),Hr("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),Hr("⦃","\\lBrace"),Hr("⦄","\\rBrace"),Hr("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),Hr("⦵","\\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 $n=t=>e=>{var r=e.consumeArg().tokens,n=e.consumeArg().tokens,i=e.consumeArg().tokens,o=e.consumeArg().tokens,s=e.macros.get("|"),l=e.macros.get("\\|");e.macros.beginGroup();var a=e=>r=>{t&&(r.macros.set("|",s),i.length&&r.macros.set("\\|",l));var o=e;!e&&i.length&&("|"===r.future().text&&(r.popToken(),o=!0));return{tokens:o?i:n,numArgs:0}};e.macros.set("|",a(!1)),i.length&&e.macros.set("\\|",a(!0));var c=e.consumeArg().tokens,u=e.expandTokens([...o,...c,...r]);return e.macros.endGroup(),{tokens:u.reverse(),numArgs:0}};Hr("\\bra@ket",$n(!1)),Hr("\\bra@set",$n(!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 Un={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class Fn{constructor(t,e,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=e,this.expansionCount=0,this.feed(t),this.macros=new Pn(Rn,e.macros),this.mode=r,this.stack=[]}feed(t){this.lexer=new zn(t,this.settings)}switchMode(t){this.mode=t}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return 0===this.stack.length&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(t){this.stack.push(t)}pushTokens(t){this.stack.push(...t)}scanArgument(t){var e,r,n;if(t){if(this.consumeSpaces(),"["!==this.future().text)return null;e=this.popToken(),({tokens:n,end:r}=this.consumeArg(["]"]))}else({tokens:n,start:e,end:r}=this.consumeArg());return this.pushToken(new s("EOF",r.loc)),this.pushTokens(n),e.range(r,"")}consumeSpaces(){for(;;){if(" "!==this.future().text)break;this.stack.pop()}}consumeArg(t){var e=[],r=t&&t.length>0;r||this.consumeSpaces();var n,i=this.future(),o=0,s=0;do{if(n=this.popToken(),e.push(n),"{"===n.text)++o;else if("}"===n.text){if(-1===--o)throw new l("Extra }",n)}else if("EOF"===n.text)throw new l("Unexpected end of input in a macro argument, expected '"+(t&&r?t[s]:"}")+"'",n);if(t&&r)if((0===o||1===o&&"{"===t[s])&&n.text===t[s]){if(++s===t.length){e.splice(-s,s);break}}else s=0}while(0!==o||r);return"{"===i.text&&"}"===e[e.length-1].text&&(e.pop(),e.shift()),e.reverse(),{tokens:e,start:i,end:n}}consumeArgs(t,e){if(e){if(e.length!==t+1)throw new l("The length of delimiters doesn't match the number of args!");for(var r=e[0],n=0;n<r.length;n++){var i=this.popToken();if(r[n]!==i.text)throw new l("Use of the macro doesn't match its definition",i)}}for(var o=[],s=0;s<t;s++)o.push(this.consumeArg(e&&e[s+1]).tokens);return o}countExpansion(t){if(this.expansionCount+=t,this.expansionCount>this.settings.maxExpand)throw new l("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(t){var e=this.popToken(),r=e.text,n=e.noexpand?null:this._getExpansion(r);if(null==n||t&&n.unexpandable){if(t&&null==n&&"\\"===r[0]&&!this.isDefined(r))throw new l("Undefined control sequence: "+r);return this.pushToken(e),!1}this.countExpansion(1);var i=n.tokens,o=this.consumeArgs(n.numArgs,n.delimiters);if(n.numArgs)for(var s=(i=i.slice()).length-1;s>=0;--s){var a=i[s];if("#"===a.text){if(0===s)throw new l("Incomplete placeholder at end of macro body",a);if("#"===(a=i[--s]).text)i.splice(s+1,1);else{if(!/^[1-9]$/.test(a.text))throw new l("Not a valid argument number",a);i.splice(s,2,...o[+a.text-1])}}}return this.pushTokens(i),i.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(!1===this.expandOnce()){var t=this.stack.pop();return t.treatAsRelax&&(t.text="\\relax"),t}throw new Error}expandMacro(t){return this.macros.has(t)?this.expandTokens([new s(t)]):void 0}expandTokens(t){var e=[],r=this.stack.length;for(this.pushTokens(t);this.stack.length>r;)if(!1===this.expandOnce(!0)){var n=this.stack.pop();n.treatAsRelax&&(n.noexpand=!1,n.treatAsRelax=!1),e.push(n)}return this.countExpansion(e.length),e}expandMacroAsText(t){var e=this.expandMacro(t);return e?e.map((t=>t.text)).join(""):e}_getExpansion(t){var e=this.macros.get(t);if(null==e)return e;if(1===t.length){var r=this.lexer.catcodes[t];if(null!=r&&13!==r)return}var n="function"==typeof e?e(this):e;if("string"==typeof n){var i=0;if(-1!==n.indexOf("#"))for(var o=n.replace(/##/g,"");-1!==o.indexOf("#"+(i+1));)++i;for(var s=new zn(n,this.settings),l=[],a=s.lex();"EOF"!==a.text;)l.push(a),a=s.lex();return l.reverse(),{tokens:l,numArgs:i}}return n}isDefined(t){return this.macros.has(t)||En.hasOwnProperty(t)||st.math.hasOwnProperty(t)||st.text.hasOwnProperty(t)||Un.hasOwnProperty(t)}isExpandable(t){var e=this.macros.get(t);return null!=e?"string"==typeof e||"function"==typeof e||!e.unexpandable:En.hasOwnProperty(t)&&!En[t].primitive}}var Vn=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Wn=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9",:"a",:"e",:"h",:"i",:"j",:"k",:"l",:"m",:"n",:"o",:"p",:"r",:"s",:"t",:"u",:"v",:"x",:"β",:"γ",:"ρ",:"ϕ",:"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9",:"A",:"B",:"D",:"E",:"G",:"H",:"I",:"J",:"K",:"L",:"M",:"N",:"O",:"P",ᴿ:"R",:"T",:"U",:"V",:"W",:"a",:"b",:"c",:"d",:"e",:"f",:"g",ʰ:"h",:"i",ʲ:"j",:"k",ˡ:"l",:"m",:"n",:"o",:"p",ʳ:"r",ˢ:"s",:"t",:"u",:"v",ʷ:"w",ˣ:"x",ʸ:"y",:"z",:"β",:"γ",:"δ",:"ϕ",:"χ",ᶿ:"θ"}),Kn={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},Gn={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",:"ắ",:"ằ",:"ẵ",ǎ:"ǎ",â:"â",:"ấ",:"ầ",:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",:"ḃ",ć:"ć",:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",:"ḋ",:"ḑ",é:"é",è:"è",ë:"ë",:"ẽ",ē:"ē",:"ḗ",:"ḕ",ĕ:"ĕ",:"ḝ",ě:"ě",ê:"ê",ế:"ế",:"ề",:"ễ",ė:"ė",ȩ:"ȩ",:"ḟ",ǵ:"ǵ",:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",:"ḧ",ȟ:"ȟ",ĥ:"ĥ",:"ḣ",:"ḩ",í:"í",ì:"ì",ï:"ï",:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",:"ṍ",:"ṏ",ȭ:"ȭ",ō:"ō",:"ṓ",:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",:"ố",:"ồ",:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",:"ṕ",:"ṗ",ŕ:"ŕ",ř:"ř",:"ṙ",ŗ:"ŗ",ś:"ś",:"ṥ",š:"š",:"ṧ",ŝ:"ŝ",:"ṡ",ş:"ş",:"ẗ",ť:"ť",:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",:"ṹ",ū:"ū",:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",:"ṽ",:"ẃ",:"ẁ",:"ẅ",ŵ:"ŵ",:"ẇ",:"ẘ",:"ẍ",:"ẋ",ý:"ý",:"ỳ",ÿ:"ÿ",:"ỹ",ȳ:"ȳ",ŷ:"ŷ",:"ẏ",:"ẙ",ź:"ź",ž:"ž",:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",:"Ắ",:"Ằ",:"Ẵ",Ǎ:"Ǎ",Â:"Â",:"Ấ",:"Ầ",:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",:"Ḃ",Ć:"Ć",:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",:"Ḋ",:"Ḑ",É:"É",È:"È",Ë:"Ë",:"Ẽ",Ē:"Ē",:"Ḗ",:"Ḕ",Ĕ:"Ĕ",:"Ḝ",Ě:"Ě",Ê:"Ê",:"Ế",:"Ề",:"Ễ",Ė:"Ė",Ȩ:"Ȩ",:"Ḟ",Ǵ:"Ǵ",:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",:"Ḣ",:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",:"Ḿ",:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",:"Ṍ",:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",:"Ṓ",:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",:"Ố",:"Ồ",:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",:"Ṕ",:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",:"Ṥ",Š:"Š",:"Ṧ",Ŝ:"Ŝ",:"Ṡ",Ş:"Ş",Ť:"Ť",:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",:"Ṹ",Ū:"Ū",:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",:"Ṽ",:"Ẃ",:"Ẁ",:"Ẅ",Ŵ:"Ŵ",:"Ẇ",:"Ẍ",:"Ẋ",Ý:"Ý",:"Ỳ",Ÿ:"Ÿ",:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",:"Ẏ",Ź:"Ź",Ž:"Ž",:"Ẑ",Ż:"Ż",ά:"ά",:"ὰ",:"ᾱ",:"ᾰ",έ:"έ",:"ὲ",ή:"ή",:"ὴ",ί:"ί",:"ὶ",ϊ:"ϊ",ΐ:"ΐ",:"ῒ",:"ῑ",:"ῐ",ό:"ό",:"ὸ",ύ:"ύ",:"ὺ",ϋ:"ϋ",ΰ:"ΰ",:"ῢ",:"ῡ",:"ῠ",ώ:"ώ",:"ὼ",Ύ:"Ύ",:"Ὺ",Ϋ:"Ϋ",:"Ῡ",:"Ῠ",Ώ:"Ώ",:"Ὼ"};class Yn{constructor(t,e){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 Fn(t,e,this.mode),this.settings=e,this.leftrightDepth=0}expect(t,e){if(void 0===e&&(e=!0),this.fetch().text!==t)throw new l("Expected '"+t+"', got '"+this.fetch().text+"'",this.fetch());e&&this.consume()}consume(){this.nextToken=null}fetch(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(t){this.mode=t,this.gullet.switchMode(t)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var t=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),t}finally{this.gullet.endGroups()}}subparse(t){var e=this.nextToken;this.consume(),this.gullet.pushToken(new s("}")),this.gullet.pushTokens(t);var r=this.parseExpression(!1);return this.expect("}"),this.nextToken=e,r}parseExpression(t,e){for(var r=[];;){"math"===this.mode&&this.consumeSpaces();var n=this.fetch();if(-1!==Yn.endOfExpression.indexOf(n.text))break;if(e&&n.text===e)break;if(t&&En[n.text]&&En[n.text].infix)break;var i=this.parseAtom(e);if(!i)break;"internal"!==i.type&&r.push(i)}return"text"===this.mode&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(t){for(var e,r=-1,n=0;n<t.length;n++)if("infix"===t[n].type){if(-1!==r)throw new l("only one infix operator per group",t[n].token);r=n,e=t[n].replaceWith}if(-1!==r&&e){var i,o,s=t.slice(0,r),a=t.slice(r+1);return i=1===s.length&&"ordgroup"===s[0].type?s[0]:{type:"ordgroup",mode:this.mode,body:s},o=1===a.length&&"ordgroup"===a[0].type?a[0]:{type:"ordgroup",mode:this.mode,body:a},["\\\\abovefrac"===e?this.callFunction(e,[i,t[r],o],[]):this.callFunction(e,[i,o],[])]}return t}handleSupSubscript(t){var e=this.fetch(),r=e.text;this.consume(),this.consumeSpaces();var n=this.parseGroup(t);if(!n)throw new l("Expected group after '"+r+"'",e);return n}formatUnsupportedCmd(t){for(var e=[],r=0;r<t.length;r++)e.push({type:"textord",mode:"text",text:t[r]});var n={type:"text",mode:this.mode,body:e};return{type:"color",mode:this.mode,color:this.settings.errorColor,body:[n]}}parseAtom(t){var e,r,n=this.parseGroup("atom",t);if("text"===this.mode)return n;for(;;){this.consumeSpaces();var i=this.fetch();if("\\limits"===i.text||"\\nolimits"===i.text){if(n&&"op"===n.type){var o="\\limits"===i.text;n.limits=o,n.alwaysHandleSupSub=!0}else{if(!n||"operatorname"!==n.type)throw new l("Limit controls must follow a math operator",i);n.alwaysHandleSupSub&&(n.limits="\\limits"===i.text)}this.consume()}else if("^"===i.text){if(e)throw new l("Double superscript",i);e=this.handleSupSubscript("superscript")}else if("_"===i.text){if(r)throw new l("Double subscript",i);r=this.handleSupSubscript("subscript")}else if("'"===i.text){if(e)throw new l("Double superscript",i);var a={type:"textord",mode:this.mode,text:"\\prime"},c=[a];for(this.consume();"'"===this.fetch().text;)c.push(a),this.consume();"^"===this.fetch().text&&c.push(this.handleSupSubscript("superscript")),e={type:"ordgroup",mode:this.mode,body:c}}else{if(!Wn[i.text])break;var u=Vn.test(i.text),h=[];for(h.push(new s(Wn[i.text])),this.consume();;){var d=this.fetch().text;if(!Wn[d])break;if(Vn.test(d)!==u)break;h.unshift(new s(Wn[d])),this.consume()}var p=this.subparse(h);u?r={type:"ordgroup",mode:"math",body:p}:e={type:"ordgroup",mode:"math",body:p}}}return e||r?{type:"supsub",mode:this.mode,base:n,sup:e,sub:r}:n}parseFunction(t,e){var r=this.fetch(),n=r.text,i=En[n];if(!i)return null;if(this.consume(),e&&"atom"!==e&&!i.allowedInArgument)throw new l("Got function '"+n+"' with no arguments"+(e?" as "+e:""),r);if("text"===this.mode&&!i.allowedInText)throw new l("Can't use function '"+n+"' in text mode",r);if("math"===this.mode&&!1===i.allowedInMath)throw new l("Can't use function '"+n+"' in math mode",r);var{args:o,optArgs:s}=this.parseArguments(n,i);return this.callFunction(n,o,s,r,t)}callFunction(t,e,r,n,i){var o={funcName:t,parser:this,token:n,breakOnTokenText:i},s=En[t];if(s&&s.handler)return s.handler(o,e,r);throw new l("No function handler for "+t)}parseArguments(t,e){var r=e.numArgs+e.numOptionalArgs;if(0===r)return{args:[],optArgs:[]};for(var n=[],i=[],o=0;o<r;o++){var s=e.argTypes&&e.argTypes[o],a=o<e.numOptionalArgs;(e.primitive&&null==s||"sqrt"===e.type&&1===o&&null==i[0])&&(s="primitive");var c=this.parseGroupOfType("argument to '"+t+"'",s,a);if(a)i.push(c);else{if(null==c)throw new l("Null argument, please report this as a bug");n.push(c)}}return{args:n,optArgs:i}}parseGroupOfType(t,e,r){switch(e){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,e);case"hbox":var n=this.parseArgumentGroup(r,"text");return null!=n?{type:"styling",mode:n.mode,body:[n],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 l("A primitive argument cannot be optional");var o=this.parseGroup(t);if(null==o)throw new l("Expected group as "+t,this.fetch());return o;case"original":case null:case void 0:return this.parseArgumentGroup(r);default:throw new l("Unknown group type as "+t,this.fetch())}}consumeSpaces(){for(;" "===this.fetch().text;)this.consume()}parseStringGroup(t,e){var r=this.gullet.scanArgument(e);if(null==r)return null;for(var n,i="";"EOF"!==(n=this.fetch()).text;)i+=n.text,this.consume();return this.consume(),r.text=i,r}parseRegexGroup(t,e){for(var r,n=this.fetch(),i=n,o="";"EOF"!==(r=this.fetch()).text&&t.test(o+r.text);)o+=(i=r).text,this.consume();if(""===o)throw new l("Invalid "+e+": '"+n.text+"'",n);return n.range(i,o)}parseColorGroup(t){var e=this.parseStringGroup("color",t);if(null==e)return null;var r=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(e.text);if(!r)throw new l("Invalid color: '"+e.text+"'",e);var n=r[0];return/^[0-9a-f]{6}$/i.test(n)&&(n="#"+n),{type:"color-token",mode:this.mode,color:n}}parseSizeGroup(t){var e,r=!1;if(this.gullet.consumeSpaces(),!(e=t||"{"===this.gullet.future().text?this.parseStringGroup("size",t):this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size")))return null;t||0!==e.text.length||(e.text="0pt",r=!0);var n=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e.text);if(!n)throw new l("Invalid size: '"+e.text+"'",e);var i={number:+(n[1]+n[2]),unit:n[3]};if(!D(i))throw new l("Invalid unit: '"+i.unit+"'",e);return{type:"size",mode:this.mode,value:i,isBlank:r}}parseUrlGroup(t){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var e=this.parseStringGroup("url",t);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),null==e)return null;var r=e.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:r}}parseArgumentGroup(t,e){var r=this.gullet.scanArgument(t);if(null==r)return null;var n=this.mode;e&&this.switchMode(e),this.gullet.beginGroup();var i=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var o={type:"ordgroup",mode:this.mode,loc:r.loc,body:i};return e&&this.switchMode(n),o}parseGroup(t,e){var r,n=this.fetch(),i=n.text;if("{"===i||"\\begingroup"===i){this.consume();var s="{"===i?"}":"\\endgroup";this.gullet.beginGroup();var a=this.parseExpression(!1,s),c=this.fetch();this.expect(s),this.gullet.endGroup(),r={type:"ordgroup",mode:this.mode,loc:o.range(n,c),body:a,semisimple:"\\begingroup"===i||void 0}}else if(null==(r=this.parseFunction(e,t)||this.parseSymbol())&&"\\"===i[0]&&!Un.hasOwnProperty(i)){if(this.settings.throwOnError)throw new l("Undefined control sequence: "+i,n);r=this.formatUnsupportedCmd(i),this.consume()}return r}formLigatures(t){for(var e=t.length-1,r=0;r<e;++r){var n=t[r],i=n.text;"-"===i&&"-"===t[r+1].text&&(r+1<e&&"-"===t[r+2].text?(t.splice(r,3,{type:"textord",mode:"text",loc:o.range(n,t[r+2]),text:"---"}),e-=2):(t.splice(r,2,{type:"textord",mode:"text",loc:o.range(n,t[r+1]),text:"--"}),e-=1)),"'"!==i&&"`"!==i||t[r+1].text!==i||(t.splice(r,2,{type:"textord",mode:"text",loc:o.range(n,t[r+1]),text:i+i}),e-=1)}}parseSymbol(){var t=this.fetch(),e=t.text;if(/^\\verb[^a-zA-Z]/.test(e)){this.consume();var r=e.slice(5),n="*"===r.charAt(0);if(n&&(r=r.slice(1)),r.length<2||r.charAt(0)!==r.slice(-1))throw new l("\\verb assertion failed --\n please report what input caused this bug");return{type:"verb",mode:"text",body:r=r.slice(1,-1),star:n}}Gn.hasOwnProperty(e[0])&&!st[this.mode][e[0]]&&(this.settings.strict&&"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+e[0]+'" used in math mode',t),e=Gn[e[0]]+e.slice(1));var i,s=On.exec(e);if(s&&("i"===(e=e.substring(0,s.index))?e="ı":"j"===e&&(e="ȷ")),st[this.mode][e]){this.settings.strict&&"math"===this.mode&&Zt.indexOf(e)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+e[0]+'" used in math mode',t);var a,c=st[this.mode][e].group,u=o.range(t);if(it.hasOwnProperty(c)){var h=c;a={type:"atom",mode:this.mode,family:h,loc:u,text:e}}else a={type:c,mode:this.mode,loc:u,text:e};i=a}else{if(!(e.charCodeAt(0)>=128))return null;this.settings.strict&&(N(e.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+e[0]+'" used in math mode',t):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+e[0]+'" ('+e.charCodeAt(0)+")",t)),i={type:"textord",mode:"text",loc:o.range(t),text:e}}if(this.consume(),s)for(var d=0;d<s[0].length;d++){var p=s[0][d];if(!Kn[p])throw new l("Unknown accent ' "+p+"'",t);var m=Kn[p][this.mode]||Kn[p].text;if(!m)throw new l("Accent "+p+" unsupported in "+this.mode+" mode",t);i={type:"accent",mode:this.mode,loc:o.range(t),label:m,isStretchy:!1,isShifty:!0,base:i}}return i}}Yn.endOfExpression=["}","\\endgroup","\\end","\\right","&"];var Xn=function(t,e){if(!("string"==typeof t||t instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var r=new Yn(t,e);delete r.gullet.macros.current["\\df@tag"];var n=r.parse();if(delete r.gullet.macros.current["\\current@color"],delete r.gullet.macros.current["\\color"],r.gullet.macros.get("\\df@tag")){if(!e.displayMode)throw new l("\\tag works only in display equations");n=[{type:"tag",mode:"text",body:n,tag:r.subparse([new s("\\df@tag")])}]}return n},Qn=function(t,e,r){e.textContent="";var n=ti(t,r).toNode();e.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."),Qn=function(){throw new l("KaTeX doesn't work in quirks mode.")});var Jn=function(t,e,r){if(r.throwOnError||!(t instanceof l))throw t;var n=Jt.makeSpan(["katex-error"],[new J(e)]);return n.setAttribute("title",t.toString()),n.setAttribute("style","color:"+r.errorColor),n},ti=function(t,e){var r=new f(e);try{return function(t,e,r){var n,i=Re(r);if("mathml"===r.output)return Pe(t,e,i,r.displayMode,!0);if("html"===r.output){var o=Se(t,i);n=Jt.makeSpan(["katex"],[o])}else{var s=Pe(t,e,i,r.displayMode,!1),l=Se(t,i);n=Jt.makeSpan(["katex"],[s,l])}return Ze(n,r)}(Xn(t,r),t,r)}catch(e){return Jn(e,t,r)}},ei={version:"0.16.11",render:Qn,renderToString:function(t,e){return ti(t,e).toMarkup()},ParseError:l,SETTINGS_SCHEMA:p,__parse:function(t,e){var r=new f(e);return Xn(t,r)},__renderToDomTree:ti,__renderToHTMLTree:function(t,e){var r=new f(e);try{return function(t,e,r){var n=Se(t,Re(r)),i=Jt.makeSpan(["katex"],[n]);return Ze(i,r)}(Xn(t,r),0,r)}catch(e){return Jn(e,t,r)}},__setFontMetrics:function(t,e){C[t]=e},__defineSymbol:lt,__defineFunction:ae,__defineMacro:Hr,__domTree:{Span:G,Anchor:Y,SymbolNode:J,SvgNode:tt,PathNode:et,LineNode:rt}};const ri=ui(),ni=[`https://app.tildacdn.${ri}/tfront/plugins/tooltip/t-tooltip.min.js`,`https://app.tildacdn.${ri}/tfront/plugins/tooltip/t-tooltip.min.css`],ii={position:"bottom",closeDelay:0,maxWidth:200,zIndex:999999999},oi={position:"top",type:"info",closeDelay:0,maxWidth:250,zIndex:999999999};var si=function(t,e,r,n){var i;e[0]=0;for(var o=1;o<e.length;o++){var s=e[o++],l=e[o]?(e[0]|=s?1:2,r[e[o++]]):e[++o];3===s?n[0]=l:4===s?n[1]=Object.assign(n[1]||{},l):5===s?(n[1]=n[1]||{})[e[++o]]=l:6===s?n[1][e[++o]]+=l+"":s?(i=t.apply(l,si(t,l,r,["",null])),n.push(i),l[0]?e[0]|=2:(e[o-2]=0,e[o]=i)):n.push(l)}return n},li=new Map;(function(t){var e=li.get(this);return e||(e=new Map,li.set(this,e)),(e=si(this,e.get(t)||(e.set(t,e=function(t){for(var e,r,n=1,i="",o="",s=[0],l=function(t){1===n&&(t||(i=i.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?s.push(0,t,i):3===n&&(t||i)?(s.push(3,t,i),n=2):2===n&&"..."===i&&t?s.push(4,t,0):2===n&&i&&!t?s.push(5,0,!0,i):n>=5&&((i||!t&&5===n)&&(s.push(n,0,i,r),n=6),t&&(s.push(n,t,0,r),n=6)),i=""},a=0;a<t.length;a++){a&&(1===n&&l(),l(a));for(var c=0;c<t[a].length;c++)e=t[a][c],1===n?"<"===e?(l(),s=[s],n=3):i+=e:4===n?"--"===i&&">"===e?(n=1,i=""):i=e+i[0]:o?e===o?o="":i+=e:'"'===e||"'"===e?o=e:">"===e?(l(),n=1):n&&("="===e?(n=5,r=i,i=""):"/"===e&&(n<5||">"===t[a][c+1])?(l(),3===n&&(s=s[0]),n=s,(s=s[0]).push(2,0,n),n=0):" "===e||"\t"===e||"\n"===e||"\r"===e?(l(),n=2):i+=e),3===n&&"!--"===i&&(n=4,s=s[0])}return l(),s}(t)),e),arguments,[])).length>1?e:e[0]}).bind((function(t,e){this[0]=3;for(var r=arguments.length,n=new Array(r>2?r-2:0),i=2;i<r;i++)n[i-2]=arguments[i];if("function"==typeof t){const r=e?.bindTo;r&&delete e.bindTo;const i=new t(e).render(),o=i.querySelector("[children-container]")||i;if(o.append(...n.flat()),o.removeAttribute("children-container"),Array.isArray(r)){const[t,e]=r;t&&"object"==typeof t&&["string","number"].includes(typeof e)&&(t[e]=i)}return i}if("string"==typeof t){const r=document.createElement(t);return e&&Object.entries(e).forEach((t=>{let[e,n]=t;if(e.startsWith("on"))Array.isArray(n)?n.forEach((t=>r.addEventListener(e.substring(2).toLowerCase(),t))):"function"==typeof n&&r.addEventListener(e.substring(2).toLowerCase(),n);else if("className"===e&&"string"==typeof n)r.classList.add(...n.split(" "));else if("tooltip"===e&&"string"==typeof n)i=r,o=n,ai(ni).then((()=>{if(!window.Tooltip)return;const t=new window.Tooltip({...ii,target:i,content:{title:o}});i.updateTooltipContent=t.updateContent.bind(t)}));else if("infoTooltip"===e&&n&&"object"==typeof n)!function(t,e){ai(ni).then((()=>{if(!window.Tooltip)return;const r=new window.Tooltip({...oi,target:t,content:e});t.updateTooltipContent=r.updateContent.bind(r)}))}(r,n);else if("bindTo"===e){if(Array.isArray(n)){const[t,e]=n;t&&"object"==typeof t&&["string","number"].includes(typeof e)&&(t[e]=r)}}else"testid"===e||("string"==typeof n||"number"==typeof n?r.setAttribute(e,n.toString()):"boolean"==typeof n&&n?r.setAttribute(e,""):n&&(r[e]=n));var i,o})),r.append(...n.flat()),r}if(t instanceof Element)return t;throw new Error("Неверный тип для создания элемента")}));function ai(t){const e=(Array.isArray(t)?t:[t]).map((t=>{const e=t.split("."),r=e.pop()?.toLowerCase(),n=window.ver?"?v="+window.ver:"";return"js"===r||"css"===r?function(t,e){return new Promise(((r,n)=>{const i="style"===e,o=i?"link":"script",s=i?"href":"src";let l;try{const{pathname:e}=new URL(t,window.location.href);l=e}catch(e){l=t}const a=document.querySelector(`${o}[${s}*="${l}"]`);if(a)return"true"===a.getAttribute("data-loading")?(a.addEventListener("load",r),void a.addEventListener("error",n)):r(new Event("load"));const c=document.createElement(o);c.setAttribute(s,t),i&&c.setAttribute("rel","stylesheet"),c.setAttribute("data-loading","true"),c.addEventListener("load",(()=>{c.removeAttribute("data-loading"),r(new Event("load"))})),c.addEventListener("error",(()=>{document.head.removeChild(c),n(new Error(`Failed to load resource: ${t}`))})),document.head.appendChild(c)}))}(t+n,"js"===r?"script":"style"):Promise.reject(new Error("Unknown resource extension. Make sure the resource url ends with .css or .js"))}));return Promise.all(e)}function ci(){const t={ru:"com",by:"biz",kz:"pro",cc:"one"};let e="cc";if("undefined"!=typeof window){const r=window.location.origin.split(".").pop()||"";Object.keys(t).includes(r)&&(e=r)}return e}function ui(){return{ru:"com",by:"biz",kz:"pro",cc:"one"}[ci()]}const hi={RU:{left:"Выровнять текст влево",center:"Выровнять текст по центру",right:"Выровнять текст вправо",justify:"Выровнять текст по ширине",remove_font:"Очистить шрифт",new_font:"Выбрать шрифт из полной коллекции шрифтов и подключить свой шрифт можно в настройках сайта",remove_fontsize:"Вернуть размер по умолчанию",remove_fontweight:"Убрать жирность",modal_insert:"Применить",tooltip_load:"Загрузить",tooltip_edit:"Редактировать",tooltip_remove:"Удалить",modal_title:"Заголовок",modal_caption:"Подпись",modal_link:"Ссылка",modal_newtab:"Открыть ссылку в новой вкладке",remove_lineheight:"Очистить",modal_url:"Укажите ссылку",modal_text:"Текст",modal_color:"Текст",modal_color2:"цвет",modal_linesize:"Линия",modal_linesize2:"цвет и толщина",modal_nofollow:"Rel nofollow: ссылка не передает вес странице на которую ссылается",modal_info:"Цвет ссылок для всего сайта можно задать в настройках сайта.",modal_link_insert:"Применить",modal_kerning_insert:"Применить",modal_cancel:"Отмена",link_style:"Цвет и стиль ссылки",cancel:"Отменить",highlight:"Маркер",sub:"Подстрочный",sup:"Надстрочный",ai:"Сгенерировать с AI",text:"Обычный текст",subheading:"Заголовок H2",title:"Подзаголовок H3",subtitle:"Подзаголовок H4",preface:"Введение",quote:"Цитата",bold:"Жирный",italic:"Курсив",underline:"Подчеркивание",strike:"Зачеркнуто",list:"Маркированный список",list_ordered:"Нумерованный список",link:"Ссылка",color:"Цвет текста",weight:"Жирность текста",font:"Шрифт",size:"Размер текста",lineheight:"Межстрочное расстояние",align:"Выравнивание",typograph:"Типограф",ai_gen:"Сгенерировать с ИИ",clean:"Очистить стили",text_styles:"Стиль текста",image:"Изображение",video:"Видео",divider:"Разделитель",more:"Ещё",modal_video_insert:"Вставить",modal_video_title:"Ссылка на видео",modal_video_help:"Поддерживаются следующие сервисы: YouTube, Vimeo, Kinescope, Rutube, VK Video, а также видео в формате .MP4",modal_undercut_insert:"Применить",modal_hide:"Кнопка скрытия",modal_show:"Кнопка раскрытия",tooltip_remove_undercut:"Удалить стиль",tooltip_preview_undercut_open:"Показать",tooltip_preview_undercut_hide:"Спрятать",undercut:"Скрыть текст (под кат)",undercut_color:"Цвет",undercut_style_block:"Цвет и стиль кнопок",undercut_style:"Подчеркивание",undercut_more:"Читать далее",undercut_info:"Опубликуйте страницу или перейдите в режим предпросмотра для просмотра текста в режиме скрытия",undercut_style_options_none:"Нет",undercut_style_options_solid:"Сплошная линия",undercut_style_options_dashed:"Пунктир",undercut_style_options_dotted:"Точки",undercut_cannot_wrap_undercut:"Вы не можете скрыть текст, в котором уже есть скрытие. Выберите, пожалуйста, другой диапазон",generate_text:"Сгенерировать текст ",rewrite:"Переписать",simplify:"Упростить",shrink:"Укоротить",extend:"Удлинить",continue:"Продолжить",variable_fontweight:"Вариативный",ok:"ОК",table:"Таблица",table_using_notification_title:"Таблицы находятся в бета-режиме",table_using_notification:'\n В случае возникновения проблем, отмените изменения и попробуйте выполнить их снова.<br>\n Если проблема остается, то напишите, пожалуйста, в <a href="/tickets">поддержку</a>\n ',formula:"Формула",formula_insert:"Вставить",formula_popup_title:"Текст формулы",formula_popup_hint:'Напишите текст формулы в формате <a href="https://katex.org/docs/supported.html" target="_blank" rel="noopener noreferrer">KaTex</a>',formula_edit:"Редактировать",formula_remove:"Удалить",formula_update:"Обновить",shortcuts:"Горячие клавиши",nbsp:"Вставить неразр. пробел",select_all:"Выделить весь текст",increase_letterspacing:"Увеличить межбукв. интервал",decrease_letterspacing:"Уменьшить межбукв. интервал",close:"Закрыть",kerning:"Кернинг"},EN:{left:"Text align left",center:"Text align center",right:"Text align right",justify:"Text align justify",remove_font:"Remove Font Family",new_font:"Select other fonts or upload your own in the Site Settings",remove_fontsize:"Clear font size",remove_fontweight:"Clear font weight",modal_insert:"Apply",tooltip_load:"Upload",tooltip_edit:"Edit",tooltip_remove:"Remove",modal_title:"Title",modal_caption:"Caption",modal_link:"Url",modal_newtab:"Open link in new tab",remove_lineheight:"Clear line height",modal_url:"Enter a link",modal_text:"Text",modal_color:"Text",modal_color2:"color",modal_linesize:"Line",modal_linesize2:"color and size",modal_nofollow:"Rel nofollow",modal_info:"You can customize link colors for the entire website in the Site Settings.",modal_link_insert:"Apply",modal_kerning_insert:"Apply",modal_cancel:"Cancel",link_style:"Link color and style",cancel:"Cancel",highlight:"Highlight",sub:"Subscript",sup:"Superscript",ai:"Generate with AI",text:"Normal text",subheading:"Heading H2",title:"Subheading H3",subtitle:"Subheading H4",preface:"Preface",quote:"Quote",bold:"Bold",italic:"Italic",underline:"Underline",strike:"Strikethrough",list:"Marked list",list_ordered:"Ordered list",link:"Insert link",color:"Text color",weight:"Font weight",font:"Font family",size:"Font size",lineheight:"Line height",align:"Align",typograph:"Typograph",ai_gen:"Generate with AI",clean:"Clear formatting",text_styles:"Text format",image:"Image",video:"Video",divider:"Divider",more:"More",modal_video_insert:"Insert",modal_video_title:"Link to video",modal_video_help:"You can paste a link to a YouTube/Vimeo video or an MP4 video file",modal_hide:"Collapse button title",modal_show:"Expand button title",modal_undercut_insert:"Apply",tooltip_remove_undercut:"Remove style",tooltip_preview_undercut_open:"Expand",tooltip_preview_undercut_hide:"Collapse",undercut:"Collapse text",undercut_color:"Color",undercut_style_block:"Button color and style",undercut_style:"Style",undercut_more:"Show more",undercut_info:"To view the collapsible text, preview or publish the page",undercut_style_options_none:"None",undercut_style_options_solid:"Solid line",undercut_style_options_dashed:"Dashed line",undercut_style_options_dotted:"Dotted line",undercut_cannot_wrap_undercut:"You cannot collapse text that already contains a collapsible section. Please select a different part of the text.",generate_text:"Generate text",rewrite:"Rephrase",simplify:"Simplify",shrink:"Shorten",extend:"Expand",continue:"Continue",variable_fontweight:"Variable",ok:"OK",table:"Table",formula:"Formula",table_using_notification_title:"The tables are in beta mode and can be unstable",table_using_notification:'\n If you have problems, cancel the changes and try again.<br>\n If the problem remains, please write to <a href="/tickets">support</a>.\n ',formula_insert:"Insert",formula_popup_title:"Formula's text",formula_popup_hint:'Write a formula text in <a href="https://katex.org/docs/supported.html" target="_blank" rel="noopener noreferrer">KaTex</a> format',formula_edit:"Edit",formula_remove:"Remove",formula_update:"Update",shortcuts:"Keyboard Shortcuts",nbsp:"Insert a non-breaking space",select_all:"Select all",increase_letterspacing:"Increase letter spacing",decrease_letterspacing:"Decrease letter spacing",close:"Close",kerning:"Kerning"}},di=t.ZP.import("delta"),pi=".ql-formula";function mi(t,e){const r=e?"&":"#";return t&&(t=(t=t.replaceAll(`${r}nbsp;`,"⦁")).replaceAll(`${r}shy;`,"╍")),t||""}function fi(t,e){const r=e?"&":"#";return t&&(t=(t=t.replaceAll("⦁",`${r}nbsp;`)).replaceAll("╍",`${r}shy;`)),t||""}function gi(t){return t&&(t=(t=t.replaceAll("#nbsp;","&nbsp;")).replaceAll("#shy;","&shy;")),t||""}const bi=function(t){return function(e,r,n){const i=t[r||window.lang||"EN"],o=t.EN,s=i?.[e]??o?.[e];return"string"==typeof s?s:n||e}}(hi);function vi(t){if("string"==typeof t)return t;if(t&&"object"==typeof t&&"string"==typeof t.selector)return t.selector;if(t&&"object"==typeof t&&"object"==typeof t.selector)return vi(t.selector);if(t&&"object"==typeof t&&"string"==typeof t[0]){let e=0,r="";for(;e in t&&e<100;)r+=t[e],e++;return r}return""}function yi(t,e){if(!t||"string"!=typeof t)return"";const r=e&&e.allowLink,n=e&&e.allowTextStyles,i=["P","BR","SPAN","STRONG","B","UL","OL","LI","SUB","SUP","S","U","EM","I","DEL","DIV","TABLE","TBODY","TR","TD","TH"],o=["text-decoration","text-decoration-line","text-decoration-style","font-size","line-height","text-align","font-weight","color","background","background-color","letter-spacing"],s=["style","data-text","data-show-text","data-hide-text","data-color","data-style","data-preview-mode","class"];r&&(i.push("A"),s.push("href","target","rel"),o.push("border-bottom-width","border-bottom-color")),n&&i.push("BLOCKQUOTE","H2","H3","H4");const l=document.createElement("textarea");l.value=mi(mi(t,!0),!1);const a=document.createElement("div");return a.innerHTML=l.value,function(t,e){const{allowedTags:r,allowedAttributes:n,allowedStyles:i,notAllowedTags:o}=e,s=t=>(t.getAttribute("style")||"").split(";").map((t=>{const e=t.split(":");return{name:(e[0]||"").trim().toLowerCase(),value:(e[1]||"").trim().toLowerCase()}})),l=(t,e)=>{const r=s(t);t.removeAttribute("style");const n=[];for(const{name:t,value:i}of r)e.includes(t)&&!i.includes("var(")&&n.push({name:t,value:i});n.forEach((e=>{let{name:r,value:n}=e;t.style.setProperty(r,n)}))},a=t=>{const e=[];for(const{name:r,value:n}of t.attributes)e.push({name:r,value:n||""});return e},c=(t,e)=>{const r=a(t).filter((t=>{let{name:r}=t;return e.includes(r.toLowerCase())}));for(const{name:e}of t.attributes)t.removeAttribute(e);r.forEach((e=>{let{name:r,value:n}=e;t.setAttribute(r,n)}))},u=t=>{const e=Array.from(t.childNodes);for(const s of e){const{tagName:e,nodeType:a}=s;if(a!==Node.ELEMENT_NODE)continue;const h=s.hasAttribute("data-tilda-quill"),d=r.includes(e),p=o.includes(e);if(d)c(s,n),l(s,h?i:[]),u(s);else if(p)s.remove();else{const e=document.createElement("span");for(;s.firstChild;)e.appendChild(s.firstChild);t.replaceChild(e,s),u(e)}}};u(t)}(a,{allowedTags:i,allowedAttributes:s,allowedStyles:o,notAllowedTags:["STYLE","SCRIPT","META","LINK","IFRAME","FIGURE","IMG","VIDEO"]}),l.value=a.innerHTML,l.value}function xi(t){return t.replace(/&(?!nbsp;)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function wi(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!t)return"";let r=t.replace(/&lt;/g,"<").replace(/&gt;/g,">");return r=r.replace(/&amp;/g,"&"),!e&&(r=r.replace(/&nbsp;/g," ")),r}function ki(t){return[/^\s+/,/\s+$/,/\s{2,}/g].forEach((e=>{e.test(t)&&(t=t.replace(e,(t=>"&nbsp;".repeat(t.length))))})),t}function qi(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.getSelection();if(!e||!("index"in e))return!1;const[r]=t.getLine(e.index);return!!r&&Boolean(r.domNode.closest("table"))}function _i(t,e){return!!t&&(t.closest?t.closest(e):t.parentNode.closest(e))}function Si(){const t=window.getSelection();if(t.isCollapsed)return _i(t.baseNode,pi);const e=function(t){const e=document.createRange();return e.setStart(t.anchorNode,t.anchorOffset),e.setEnd(t.focusNode,t.focusOffset),!e.collapsed}(t),r=e?t.anchorNode:t.focusNode,n=e?t.focusNode:t.anchorNode;if(_i(r,pi)||_i(n,pi))return!0;if(r===n)return!1;let i=r.nextSibling;for(;i&&i!==n;){if(i.closest&&i.closest(pi))return!0;i=i.nextSibling}return!1}function Ai(t){return t.querySelectorAll(pi).length>0}function Ni(t){return t?t.replace(/__new_line__/g,"\n").replace(/__tabulation__/g,"\t").replace(/\\u0020/g," "):""}function Ti(t,e,r){const{value:n,direction:i}=r||{},o=e?{...e}:{};0===o.length&&(o.length=1,o.index=Math.max(0,o.index-1));let s=parseFloat(n);if(isNaN(s)&&i){const e=t.getFormat(o),r=parseFloat(e?.letterspacing)||0;s="increase"===i?Math.min(r+.5,100):Math.max(r-.5,-100)}t.formatText(o,"letterspacing",`${s}px`)}var Ei=r(6865);const Li=["14px","16px","18px","20px","22px","24px","26px","28px","30px","32px","34px","36px","38px","40px","42px","44px","46px","48px","50px","52px","54px","56px","58px","60px","62px","64px","66px","68px","70px","72px","74px","76px","78px","80px","82px","84px","86px","88px","90px"],Ci=[...Li],Mi={scope:Ei.Parchment.Scope.INLINE,whitelist:Li},Oi=new Ei.Parchment.StyleAttributor("lineheight","line-height",Mi),Bi={scope:Ei.Parchment.Scope.INLINE,whitelist:new Array(901).fill(null).map(((t,e)=>String(e)))},zi=new Ei.Parchment.StyleAttributor("weight","font-weight",Bi),Pi=new Ei.Parchment.StyleAttributor("list-color","color",{scope:Ei.Parchment.Scope.BLOCK});var Ri=r(9649),Zi=r(1195),Ii=r(7028);const ji=["left","center","right"];"y"===new URLSearchParams(window.location.search).get("justify")&&ji.push("justify");const Hi=[...ji];Ii.HE.whitelist=ji;const Di=Ii.HE;var $i=r(8746);const{$headlinefont:Ui,$textfont:Fi,uploaded_fonts:Vi}=window;let Wi=["Arial","Georgia"];Vi&&Array.isArray(Vi)&&Wi.unshift(...Vi),Fi&&Wi.unshift(Fi),Ui&&Wi.unshift(Ui),Wi=[...new Set(Wi)];const Ki=[...Wi];$i.H.whitelist=Wi;const Gi=$i.H;var Yi=r(7592);const Xi=["14px","16px","18px","20px","22px","24px","26px","28px","30px","32px","34px","36px","38px","40px","42px","46px","52px","62px","72px","82px","92px","102px"],Qi=[...Xi];Yi.Z.whitelist=Xi;const Ji=Yi.Z;var to=r(4899);function eo(t,e,r){return e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class ro extends to.V{static create(t){return document.createElement(this.getTag(t))}static getTag(t){return{bullet:"UL",ordered:"OL"}[t]||this.defaultTag}checkMerge(){return super.checkMerge()&&this.domNode.tagName===this.next.domNode.tagName}}eo(ro,"tagName",["OL","UL"]),eo(ro,"defaultTag","OL");class no extends to.Z{constructor(t,e){super(t,e),this.uiNode&&(this.uiNode.remove(),this.uiNode=null)}optimize(t){if(!this.statics.requiredContainer||this.parent instanceof this.statics.requiredContainer||this.wrap(this.statics.requiredContainer.blotName,no.formats(this.domNode)),super.optimize(t),this.children.length>=1){const t=this.children.head,e=t?.attributes?.attributes;if(e)for(const r in e){const n=e[r],i=n.keyName,o=n.value(t.domNode);"color"===i&&super.format("list-color",o)}else super.format("list-color",!1)}this.uiNode&&(this.uiNode.remove(),this.uiNode=null)}format(t,e){t===to.Z.blotName&&e!==no.formats(this.domNode)&&this.wrap(this.statics.requiredContainer.blotName,e),super.format(t,e)}}eo(no,"requiredContainer",ro);var io=r(1276);function oo(t,e,r){return e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class so extends io.Z{}oo(so,"blotName","highlight"),oo(so,"tagName","mark");var lo=r(1487);class ao extends lo.Z{static create(t){if("string"==typeof t){const e=super.create(t);return e.setAttribute("href",t),e.removeAttribute("rel"),e.removeAttribute("target"),e}if(t instanceof Element){const e=t.getAttribute("href"),r=t.getAttribute("target"),n=t.getAttribute("rel"),i=t.style.color,o=t.style.borderBottomColor,s=t.style.borderBottomWidth,l=super.create(e),a=[];return l.removeAttribute("target"),l.removeAttribute("rel"),l.setAttribute("href",e),n?.includes("nofollow")&&a.push("nofollow"),"_blank"===r&&(l.setAttribute("target","_blank"),a.push("noreferrer","noopener")),a.length&&l.setAttribute("rel",a.join(" ")),i&&(l.style.color=i),(s||o)&&(s&&o?l.style.borderBottom=(s||"inherit")+" solid "+o:(o&&(l.style.borderBottomColor=o),s&&(l.style.borderBottomWidth=s),l.style.borderBottomStyle="solid"),l.style.boxShadow="none",l.style.textDecoration="none"),l}}static formats(t){return t}optimize(t){super.optimize(t);const{domNode:e}=this,{parentElement:r}=e,n=e.style.color,i=r?.style.color;!n&&i&&(e.style.color=i)}}var co=r(8417);function uo(t,e,r){return e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class ho extends co.i2{static create(t){const e=super.create();t=t||{};let{videoUrl:r,url:n,href:i,new_tab:o,caption:s,alt:l,isDivider:a}=t;const c=ho.isVideoServiceLink(r);let u=ho.isMP4Link(r)?r:"";if(n)n=n.replace(/"/g,"&quot;"),i=(i||"").replace(/"/g,"&quot;"),o=o||"",s=(s||"").replace(/</g,"&lt;").replace(/>/g,"&gt;"),l=(l||"").replace(/"/g,"&quot;"),e.innerHTML=i?`<a quill-image-link href="${i}" ${o?'target="_blank"':""}><img src="${n}" alt="${l}" /></a>`:`<img src="${n}" alt="${l}" />`,e.setAttribute("data-alt",l),e.setAttribute("data-src",n),i&&e.setAttribute("data-href",i),o&&e.setAttribute("data-new-tab",o),s&&(e.innerHTML+=`<figcaption>${s}</figcaption>`,e.setAttribute("data-caption",s));else if(c){const{videoType:t,videoId:n}=c,i=ho.getEmbedLink(t,n);r=r.replace(/"/g,"&quot;"),i&&(e.innerHTML=`<div class="t-redactor__video-container"><iframe width="100%" height="100%" src="${i}" data-video-url="${r}" frameborder="0" allow="autoplay; encrypted-media; fullscreen; picture-in-picture;" allowfullscreen></iframe></div>`)}else u?(u=u.replace(/"/g,"&quot;"),e.innerHTML=`<div class="t-redactor__video-container"><video preload="auto" playsinline controls><source src="${u}" type="video/mp4">Your browser doesn't support HTML5 video tag</video></div>`):a&&(e.innerHTML="<hr>");return e.setAttribute("contenteditable",!1),e}static value(t){return{alt:t.querySelector("img")?.alt||"",url:t.querySelector("img")?.src||"",href:t.getAttribute("data-href")||"",new_tab:t.getAttribute("data-new-tab")||"",caption:t.getAttribute("data-caption")||"",videoUrl:t.querySelector("iframe")?.getAttribute("data-video-url")||t.querySelector("iframe")?.src||t.querySelector("source")?.src||"",isDivider:!!t.querySelector("hr")}}static isYoutubeLink(t){if(!(t=t||""))return!1;const e=t.match(/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(shorts\/)|(embed\/)|(watch\?v=))([^#&?]*).*/);return!(!e||11!==e[8].length)&&e[8]}static isVimeoLink(t){if(!(t=t||""))return!1;const e=t.match(/https?:\/\/(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^/]*)\/videos\/|album\/(\d+)\/video\/|video\/|)(\d+)(?:$|\/|\?)/);return e&&e[3]||!1}static isVKLink(t){if(!(t=t||""))return!1;const e=t.match(/^.*vk\.com\/video(\?.*&z=video)?([0-9-]+)_([0-9]+).*/);return!!(e&&e[2]&&e[3])&&[e[2],e[3]]}static isRutubeLink(t){if(!(t=t||""))return!1;const e=t.match(/^.*rutube\.ru\/video\/([0-9a-z]+).*/);return e&&e[1]||!1}static isKinescopeLink(t){if(!(t=t||""))return!1;const e=t.match(/^.*kinescope\.io(\/embed)?(\/pl)?\/([a-zA-Z0-9-]+).*/);return e&&e[3]||!1}static isVideoServiceLink(t){const{isYoutubeLink:e,isVimeoLink:r,isVKLink:n,isRutubeLink:i,isKinescopeLink:o}=ho,s={youtube:e,vimeo:r,vk:n,rutube:i,kinescope:o};return Object.entries(s).map((e=>{let[r,n]=e;return{videoType:r,videoId:n(t)}})).find((t=>{let{videoId:e}=t;return e}))||!1}static getEmbedLink(t,e){return{youtube:`https://www.youtube.com/embed/${e}`,vimeo:`https://player.vimeo.com/video/${e}`,vk:`https://vk.com/video_ext.php?oid=${e[0]}&id=${e[1]}&hd=2`,rutube:`https://rutube.ru/play/embed/${e}`,kinescope:`https://kinescope.io/embed/${e}`}[t]||""}static isMP4Link(t){if(!(t=t||""))return!1;return!!t.match(/(https?):\/\/.+\.mp4(\?.+|)/)}}function po(t,e,r){return e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}uo(ho,"blotName","media"),uo(ho,"tagName","figure");class mo extends io.Z{}function fo(t,e,r){return e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}po(mo,"blotName","subscript"),po(mo,"tagName","sub");class go extends io.Z{}function bo(t,e,r){return e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}fo(go,"blotName","superscript"),fo(go,"tagName","sup");class vo extends co.ZP{}function yo(t,e,r){return e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}bo(vo,"blotName","header"),bo(vo,"tagName","H3"),bo(vo,"className","t-redactor__h3");class xo extends co.ZP{}function wo(t,e,r){return e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}yo(xo,"blotName","preface"),yo(xo,"tagName","blockquote"),yo(xo,"className","t-redactor__preface");class ko extends co.ZP{}function qo(t,e,r){return e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}wo(ko,"blotName","quote"),wo(ko,"tagName","blockquote"),wo(ko,"className","t-redactor__quote");class _o extends co.ZP{}function So(t,e,r){return e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}qo(_o,"blotName","subheader"),qo(_o,"tagName","H4"),qo(_o,"className","t-redactor__h4");class Ao extends co.ZP{}So(Ao,"blotName","subheading"),So(Ao,"tagName","H2"),So(Ao,"className","t-redactor__h2");var No=r(4854);function To(t,e,r){return e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class Eo extends No.Z{}To(Eo,"blotName","strike"),To(Eo,"tagName",["s","del"]);var Lo=r(4489),Co=r(7363),Mo=r(5),Oo=r(6406);function Bo(t,e,r){return e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class zo extends Oo.Z{static create(t){const e=super.create();return t.previewMode="true"===t.previewMode,t.text=ki(t.text),t.modalShow=ki(t.modalShow),t.modalHide=ki(t.modalHide),e.classList.add(this.className),e.setAttribute("data-text",xi(t.text)),e.setAttribute("data-show-text",xi(t.modalShow)),e.setAttribute("data-hide-text",xi(t.modalHide)),e.setAttribute("data-color",t.color),e.setAttribute("data-style",t.style),e.setAttribute("data-preview-mode",t.previewMode),e.style.setProperty("--undercut-color",t.color),e.style.setProperty("--undercut-style",t.style),e.setAttribute("contenteditable",!1),e.innerHTML=`${t.previewMode?t.text:xi(t.modalShow)||"[+]"}`,e}static formats(t){return{text:wi(t.getAttribute("data-text")||""),color:t.getAttribute("data-color")||"",modalShow:wi(t.getAttribute("data-show-text")||""),modalHide:wi(t.getAttribute("data-hide-text")||""),style:t.getAttribute("data-style")||"",previewMode:t.getAttribute("data-preview-mode")||""}}format(t,e){if("undercut"!==t)return super.format(t,e);queueMicrotask((()=>{let r=this.domNode.getAttribute("data-text");if(!r)return super.format(t,e);r=function(t){const e=wi(t).split(/<br\s*[^>]*\/?>/g);let r="";return e.length<=2?t:(r=2===e.length?`${e[0]}<br>${e[1]}`:e.map(((t,r)=>0===r||r===e.length-1?t:`<p>${t}</p>`)).join(""),r)}(r),e||(r=function(t){const e=document.createElement("span");return e.innerHTML=t.replace(/<br style="display: block;">/g,"&ltbr&gt;").replace(/<p>/g,"&ltp&gt;").replace(/<\/p>/g,"&lt/p&gt;"),r=xi(e.textContent),r.replace(/&lt;br&gt;/g,"<br>").replace(/&lt;p&gt;/g,"<p>").replace(/&lt;\/p&gt;/g,"</p>");var r}(wi(r)),this.domNode.removeAttribute("data-text")),function(t,e){const r=wi(t).split(/<br\s*[^>]*\/?>/g);if(2!==r.length)return void e.insertAdjacentHTML("beforebegin",wi(t));const n=e.previousSibling,i=e.nextSibling,o=document.createElement("span"),s=document.createElement("p");o.innerHTML=n?`${n.nodeValue||n.outerHTML}${r[0]}`:`<p>${r[0]}</p>`,s.innerHTML=i?`${r[1]}${i.nodeValue||i.outerHTML}`:`<p>${r[1]}</p>`;let l=i?i.nextSibling:null;for(;l;){s.innerHTML+=l.nodeValue||l.outerHTML;const t=l.nextSibling;if(l.remove(),!t)break;l=t}n?n.replaceWith(o):e.insertAdjacentHTML("beforebegin",`<p>${r[0]}</p>`),i?i.replaceWith(s):e.insertAdjacentHTML("beforebegin",`<p>${r[1]}</p>`)}(r,this.domNode),this.domNode.remove()}))}static value(t){return{text:wi(t.getAttribute("data-text")||""),color:t.getAttribute("data-color")||"",modalShow:wi(t.getAttribute("data-show-text")||""),modalHide:wi(t.getAttribute("data-hide-text")||""),style:t.getAttribute("data-style")||"",previewMode:t.getAttribute("data-preview-mode")||""}}optimize(){return!1}}Bo(zo,"blotName","undercut"),Bo(zo,"className","ql-undercut"),Bo(zo,"tagName","SPAN");const Po=zo;var Ro=r(2589);class Zo extends Ro.Z{static create(t){const e=Ro.Z.create(t);return e.dataset.value=function(t){return t?t.replace(/\n/g,"__new_line__").replace(/\t/g,"__tabulation__").replace(/ {2,}/g,(t=>t.split("").map((()=>"\\u0020")).join(""))):""}(t),e}static value(t){return Ni(t.getAttribute("data-value"))}static nodeHTML(t){const e=Zo.value(t);return Zo.createCopiedFormulaHTML(e)}html(){const{formula:t}=this.value();return Zo.createCopiedFormulaHTML(t)}static createCopiedFormulaHTML(t){return`<span class="ql-copied-formula">${t}</span>`}}const Io={scope:Ei.Parchment.Scope.INLINE,whitelist:new Array(401).fill(null).map(((t,e)=>.5*e-100+"px"))},jo=new Ei.Parchment.StyleAttributor("letterspacing","letter-spacing",Io);var Ho=r(9978),Do=r(4453),$o=r(8895),Uo=r.n($o);class Fo extends Ho.ZP{getHTMLOfSelection(){const t=this.quill.getSelection();if(t?.length>0){return{html:this.quill.getSemanticHTML(t?.index||0,t?.length||0),text:this.quill.getText(t?.index||0,t?.length||0)}}return this.getHTMLFromNativeSelection()}onCaptureCopy(t){t.preventDefault();const{text:e,html:r}=this.getHTMLOfSelection(),n=function(t){try{const e=(new DOMParser).parseFromString(`<div>${t}</div>`,"text/html").body.firstElementChild,r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT);for(;r.nextNode();){const t=r.currentNode;t instanceof Element&&t.setAttribute("data-tilda-quill","")}return e.innerHTML}catch(e){return t}}(r),i=e.replaceAll("#shy;","").replaceAll("╍","").replaceAll("#nbsp;"," ").replaceAll("⦁"," "),o=gi(fi(n.replaceAll("&nbsp;"," "),!0));if(t.clipboardData?.setData("text/plain",i),t.clipboardData?.setData("text/html",o),"cut"===t.type){const t=this.quill.getSelection();t?.length>0&&this.quill.deleteText(t)}}onCapturePaste(t){t.preventDefault();const e=t.clipboardData?.getData("text/plain")||"",r=t.clipboardData?.getData("text/html")||"",{container:n,options:i}=this.quill,{formats:o}=i,s=yi(r,{allowLink:!n?.closest("[data-redactor-nohref]")&&o.includes("link"),allowTextStyles:["subheading","title","preface","quote"].some((t=>o.includes(t)))&&!i.blockModeHeading}),l=this.quill.getSelection();l?.length>0&&this.quill.deleteText(l),s?this.quill.clipboard.dangerouslyPasteHTML(l?.index||0,s):this.quill.insertText(l?.index||0,e)}convert(t,e){let{html:r,text:n}=t;if(e&&e[Do.ZP.blotName])return(new(Uo())).insert(n||"",{[Do.ZP.blotName]:e[Do.ZP.blotName]});if(!r)return(new(Uo())).insert(n||"",e);const i=this.convertHTML(r),o=i.ops[i.ops.length-1],s=i.ops[i.ops.length-2],l=s?.attributes?.["table-cell-line"];return l&&(a=o,/^(\n)*$/g.test(a?.insert))?o.insert?.split("").length<=1?new(Uo())(i.ops.slice(0,-1)).insert("\n"):i.compose((new(Uo())).retain(i.length()-1).delete(1)):!function(t,e){let r="";for(let n=t.ops.length-1;n>=0&&r.length<e.length;--n){const e=t.ops[n];if("string"!=typeof e.insert)break;r=e.insert+r}return r.slice(-1*e.length)===e}(i,"\n")||o?.attributes&&!e?.table||s?.insert?.media?i:i.compose((new(Uo())).retain(i.length()-1).delete(1));var a}getHTMLFromNativeSelection(){const t=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.getSelection();return t?.baseNode?.parentNode?.closest(pi)}();return t?{html:Zo.nodeHTML(t),text:""}:{html:"",text:""}}}const Vo="tilda:table-beta:notification";t.ZP.debug(!1),t.ZP.getFormatContent=function(t,e){const{keepNbspMarkers:r,useHTMLNbspEntities:n}=e||{},i=t.cloneNode(!0);i.querySelectorAll(".ql-formula").forEach((t=>t.innerHTML=""));let o=i.innerHTML;r||(o=fi(o,n));const s=[];o=o.replace(/(<td[\w\W]*?>[\w\W]*?<\/td>)/gi,(t=>(s.push(t),`__TD_BLOCK_${s.length-1}__`))),o=o.replace(/<br>/gi,""),o=o.replace(/<span class="ql-cursor">\ufeff<\/span>/gi,""),o=o.replace(/<strong style="background-color: transparent;"> <\/strong>/gi,""),o=o.replace(/<em> <\/em>/gi,""),o=o.replace(/<p> /gi,"<p>"),o=o.replace(/<(p|h3|h4|blockquote) ([\w\W]((?!>).)*?)>(<br>)?<\/(p|h3|h4|blockquote)>/gi,"<br />"),o=o.replace(/<p>(&nbsp;( )*)+<\/p>/gi,"<p></p>"),o=o.replace(/<p>([\w\W]*?)<\/p>/gi,"$1<br />"),"<br />"===o.slice(-6)&&"<br /><br />"!==o.slice(-12)&&(o=o.substring(0,o.length-6)),o=o.replace(/__TD_BLOCK_(\d+)__/g,((t,e)=>s[e]));const l=t.getAttribute("style");l&&(o=`<div style="${l}" data-customstyle="yes">${o}</div>`);const a=window.chrome&&!window.opr&&!window.navigator.userAgent.includes("Edg"),c=t?.parentElement?.parentElement;if(a&&c){const t=c.getAttribute("data-original-opacity");t?(c.removeAttribute("data-original-opacity"),c.style.opacity=t):c.style.removeProperty("opacity")}return o},t.ZP.fixCustomStyle=function(t,e){const{useHTMLNbspEntities:r}=e||{};function n(t){let e=t.replace(/ <br>/gi,"</br>");return e=e.replace(/<(a|span) ([\w\W]((?!>).)*?)><br>\n([\w\W]*?)<\/(a|span)>/gi,"<br><$1 $2>$4</$1>"),e=e.replace(/<(a|span) ([\w\W]((?!>).)*?)>([\w\W]*?)<br>\n<\/(a|span)>/gi,"<$1 $2>$4</$1><br>"),e=e.replace(/й/gi,"й"),e=e.replace(/<strong> <\/strong>/g,"<br>"),e=e.replace(/ /g," "),e}t=mi(t,r);const i=document.createElement("div");i.style.display="none",i.innerHTML=t;const o=i.querySelectorAll('[data-customstyle="yes"]'),s=o[0]?.style.getPropertyValue("font-size")||"",l=o[0]?.style.getPropertyValue("color")||"",a=o[0]?.style.getPropertyValue("line-height")||"",c=o[0]?.style.getPropertyValue("text-align")||"",u=o[0]?.style.getPropertyValue("letter-spacing")||"";if(!o&&t)return{html:n(t)};o.forEach((t=>t.setAttribute("style","")));const h=function(t,e){let r="";return t.forEach((t=>{let n="";for(const e of t.attributes)n+=`${e.name}:"${e.value}" `;const i=`<${e} ${n}>${t.innerHTML}</${e}>`;r+=i})),r}(o,"span");return h?{html:n(h),styles:{color:l,fontSize:s,lineHeight:a,textAlign:c,letterSpacing:u}}:{html:t}},t.ZP.setCustomStyles=function(t,e){if(e){const r=t.innerHTML;if(r&&"<p><br></p>"!==r){t.setAttribute("quill-global-styles",JSON.stringify(e));for(const r in e)t.style[r]=e[r]}}const r=window.chrome&&!window.opr&&!window.navigator.userAgent.includes("Edg"),n=t?.parentNode?.parentNode;if(r&&n){let t=parseFloat(window.getComputedStyle(n).opacity);if(!isNaN(t)){const e=n.style.opacity;e&&n.setAttribute("data-original-opacity",e),t<=.35?t+=.25:t>.35&&t<=.5?t+=.2:t>.5&&t<=.65?t+=.15:t>.65&&t<=.75&&(t+=.1),n.style.opacity=t}}},t.ZP.addNbspMarkers=mi,t.ZP.removeNbspMarkers=fi,t.ZP.addMarkersOnTextChange=function(t){let e=t.root.innerHTML;const r=t.getSelection(),n=e.split("#nbsp;");let i=n.length>1?n.length-1:0;i*=5,e=n.join("⦁");const o=e.split("#shy;");let s=o.length>1?o.length-1:0;s*=4,e=o.join("╍"),(o.length>1||n.length>1)&&(t.root.innerHTML=e,setTimeout((()=>{const e=r.index-i-s;e>=0&&t.setSelection(e)})))},t.ZP.getCursorPosition=function(t){let e=0,r=0;function n(t){let i=0;if("LI"===t.nodeName&&(i+=1,e+=1),"P"===t.nodeName&&"<p><br></p>"===t.outerHTML&&(i+=1,r+=1),"BR"===t.nodeName)i=1;else if("#text"===t.nodeName)i=t.nodeValue.length;else if(t.childNodes)for(let e=0;e<t.childNodes.length;e++)i+=n(t.childNodes[e]);return i}function i(t,e,r){let s=0;if("#text"===e.nodeName)s+=r;else for(let t=0;t<r;t++)s+=n(e.childNodes[t]);return e!==t&&e.parentNode&&(s+=i(t,e.parentNode,o(e))),s}function o(t){return t?o(t.previousSibling)+1:-1}let s=0,l=0,a=0;if(window.getSelection){const e=window.getSelection();if(e.rangeCount){const r=e.getRangeAt(0);s=i(t,r.startContainer,r.startOffset),l=i(t,r.endContainer,r.endOffset),a=Math.max(l-s,0)}}return{start:s,end:l-e/2-r,offset:a,lists:e,lineBreaks:r}},t.ZP.translate=bi,t.ZP.unEscapeNbspMarkers=gi,t.ZP.escapeNbspMarkers=function(t){return t&&(t=(t=t.replaceAll("&nbsp;","#nbsp;")).replaceAll("&shy;","#shy;")),t||""},t.ZP.register({"attributors/style/align":Di,"attributors/style/background":Zi.w,"attributors/style/color":Ri.HQ,"attributors/style/font":Gi,"attributors/style/size":Ji},!0),t.ZP.register({"formats/align":Di,"formats/background":Zi.w,"formats/color":Ri.HQ,"formats/font":Gi,"formats/size":Ji,"formats/bold":Lo.Z,"formats/italic":Co.Z,"formats/strike":Eo,"formats/underline":Mo.Z,"formats/header":vo,"formats/subheader":_o,"formats/subheading":Ao,"formats/lineheight":Oi,"formats/weight":zi,"formats/list-color":Pi,"formats/list":no,"formats/highlight":so,"formats/link":ao,"formats/media":ho,"formats/subscript":mo,"formats/superscript":go,"formats/quote":ko,"formats/preface":xo,"formats/undercut":Po,"formats/formula":Zo,"formats/letterspacing":jo},!0),t.ZP.register({"modules/toolbar_content":class{constructor(t,e){this.quill=t,this.options=e,this.parent=null,this.formats=this.quill.options.formats,this.modules=Object.keys(this.quill.options.modules),this.toolbarClass=e.toolbarClass||"ql-toolbar",this.isСollapsedList=e.isMobile&&e.showByClick,e.editorWrapper?Object.getPrototypeOf(e.editorWrapper).jquery?this.parent=e.editorWrapper[0]:this.parent=e.editorWrapper:e.selector&&(this.parent=document.querySelector(e.selector)),this.feedsMode=e.feedsMode;let r,n="";if(this.formats.includes("bold")&&!e.blockModeHeading&&(n+=this.getButtonHtml("bold","ql-bold")),this.formats.includes("italic")&&!this.isСollapsedList&&(n+=this.getButtonHtml("italic","ql-italic")),this.formats.includes("underline")&&!this.isСollapsedList&&(n+=this.getButtonHtml("underline","ql-underline")),this.formats.includes("strike")&&!this.isСollapsedList&&(n+=this.getButtonHtml("strike","ql-strike")),this.formats.includes("link")&&(n+=this.getButtonHtml("link","ql-link_custom")),this.formats.includes("list")&&!e.blockModeHeading&&(n+=this.getButtonHtml("list_ordered","ql-list","ordered"),n+=this.getButtonHtml("list","ql-list","bullet")),(this.formats.includes("subheading")||this.formats.includes("title")||this.formats.includes("subtitle")||this.formats.includes("preface")||this.formats.includes("quote"))&&!e.blockModeHeading&&(n+=this.getButtonHtml("text_styles","ql-text-styles")),this.formats.includes("divider")&&!e.blockModeHeading&&(n+=this.getButtonHtml("divider","ql-divider")),this.formats.includes("color")&&(n+=this.getButtonHtml("color","ql-color_custom")),this.formats.includes("weight")&&!e.blockModeHeading&&(n+=this.getButtonHtml("weight","ql-weight_custom")),this.formats.includes("font")&&!e.blockModeHeading&&(n+=this.getButtonHtml("font","ql-font_custom")),this.formats.includes("size")&&!e.blockModeHeading&&(n+=this.getButtonHtml("size","ql-size_custom")),this.formats.includes("lineheight")&&!e.blockModeHeading&&(n+=this.getButtonHtml("lineheight","ql-lineheight_custom")),this.formats.includes("align")&&(n+=this.getButtonHtml("align","ql-align_custom")),this.formats.includes("media")&&!e.blockModeHeading&&(n+=this.getButtonHtml("image","ql-image-custom"),n+=this.getButtonHtml("video","ql-video-custom")),e.blockModeHeading||"RU"!==window.lang&&"RU"!==window.country&&"BY"!==window.country&&"UA"!==window.country||(n+=this.getButtonHtml("typograph","ql-typograph_custom")),this.modules.includes("generate")&&(n+=this.getButtonHtml("ai_gen","ql-gen_custom")),this.isСollapsedList||(n+=this.getButtonHtml("clean","ql-clean_custom")),(this.formats.includes("subscript")||this.formats.includes("subscript")||this.formats.includes("background")||this.formats.includes("undercut")||this.isСollapsedList&&this.formats.includes("italic")||this.isСollapsedList&&this.formats.includes("underline")||this.isСollapsedList&&this.formats.includes("strike")||this.isСollapsedList&&this.formats.includes("clean"))&&!e.blockModeHeading&&(n+=this.getButtonHtml("more","ql-more_custom")),e.editorWrapper){const t=`<div class="ql-toolbar ${"ql-toolbar"===this.toolbarClass?"":this.toolbarClass}"></div>`;this.parent.insertAdjacentHTML("beforeend",t),r=this.parent.querySelector(".ql-toolbar"),r.style.display="none",r.innerHTML=n}else e.selector&&(r=this.parent,this.parent.innerHTML=n);if(e.hint&&r?.querySelectorAll(".toolbar__button").forEach((t=>{t.addEventListener("mouseenter",(()=>{if(t.classList.contains("quill-dropdown_shown"))return;const e=`<div class="toolbar__button__hint"><span>${t.getAttribute("data-name")}</span></div>`;t.insertAdjacentHTML("beforeend",e)})),t.addEventListener("mouseleave",(()=>{this.removeTooltip()}))})),e.fixed&&r&&setTimeout((()=>{const t=this.parent.getBoundingClientRect();r.style.position="fixed",r.style.top=t.top-30+"px",r.style.left=t.left+"px"}),500),e.sticky&&r?.classList.add("ql-toolbar__sticky"),this.isСollapsedList&&r){r.style.maxWidth="100%";r.querySelectorAll("button").forEach((t=>{t.style.minWidth="25px"}))}if(e.showByClick&&r)t.root.addEventListener("click",(()=>{r.style.display="flex"})),document.addEventListener("mousedown",(e=>{t.root.contains(e.target)||e.target===t.root||r.contains(e.target)||e.target===r||(r.style.display="none")}));else if(e.showOnSelection&&r){let e=!1;t.on("selection-change",(n=>{if(e)return void(r.style.display="flex");if("yes"===r.getAttribute("data-force-show"))return;if(n&&n.length>0?r.style.display="flex":r.style.display="none",r.style.top="-34px",r.style.left="0px",!n)return;const i=this.parent.getBoundingClientRect(),o=r.getBoundingClientRect(),s=t.getBounds(n.index,n.length),l=(s.left+s.right)/2-o.width/2;r.style.top=s.top-34+"px",l+o.width>i.width?r.style.left=Math.abs(i.width-o.width)+"px":r.style.left=l<=0?"0px":l+"px"})),document.addEventListener("mousedown",(t=>{r.contains(t.target)||r===t.target?e=!0:(e=!1,r.style.display="none")}))}else e.editorWrapper&&r&&setTimeout((()=>{r.style.display="flex"}));t.on("selection-change",((t,e)=>{this.changeOptionsAvailability(t||e,r)})),t.on("text-change",(()=>{this.changeOptionsAvailability(t.getSelection(),r)})),e.callback&&e.callback(this.quill)}getButtonHtml(t,e,r){return`<button ${t?`data-name="${bi(t)}"`:""} ${`class="toolbar__button ${e}"`} ${r?`value="${r}"`:""} type="button"></button>`}removeTooltip(){document.querySelectorAll(".toolbar__button__hint").forEach((t=>t.remove()))}changeOptionsAvailability(t,e){!function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.getSelection();if(!e||!("index"in e))return!1;const[r]=t.getLine(e.index);return!!r&&Boolean(r.domNode.closest(".quill-table__wrapper"))}(this.quill,t)?Si(this.quill)?this.disableButtonsUnavaliableForSelection(e,".ql-list,.ql-image-custom,.ql-video-custom,.ql-lineheight_custom,.ql-text-styles,.ql-link_custom,.ql-gen_custom"):this.enableButtons(e):this.disableButtonsUnavaliableForSelection(e,".ql-list,.ql-image-custom,.ql-video-custom,.ql-lineheight_custom,.ql-text-styles,.ql-link_custom,.ql-gen_custom")}enableButtons(t){t.querySelectorAll(".toolbar__button").forEach((t=>{t.disabled=!1}))}disableButtonsUnavaliableForSelection(t,e){t.querySelectorAll(e).forEach((t=>{t.disabled=!0}))}},"modules/dropdown":class{constructor(t,e){this.quill=t,this.options=e}add(t){const e=this.quill.options.modules.toolbar.container,r=document.querySelector(e+" "+vi(t)),n=document.createElement("div");n.classList.add("quill-dropdown__container");const i=Math.random().toString(36).substring(2),o=e=>{if(!e.currentTarget.classList.contains("quill-dropdown_shown")){t.isUpdateOnOpen&&this.renderOptionsItems({options:t,dropdownContainer:n,removeActive:s,closeDropdown:l}),window.setTimeout((()=>{document.addEventListener("click",l)}),0);const e=document.querySelector(".quill-dropdown_shown");let i;if(e&&e.classList.remove("quill-dropdown_shown"),"text-styles"===t.name){const t=this.quill.getFormat();Object.keys(t).forEach((e=>{!t[e]||"header"!==e&&"subheader"!==e&&"subheading"!==e&&"quote"!==e&&"preface"!==e||(i=e)}))}else if("more"===t.name){const t=this.quill.getFormat();Object.keys(t).forEach((e=>{t[e]&&["superscript","subscript"].includes(e)&&(i=e)}))}else{const e=this.quill.getFormat();"object"==typeof e&&(i=e[t.name])}if(r){r.classList.toggle("quill-dropdown_shown");const t=r.querySelector(".quill-dropdown__item_active");t&&t.classList.remove("quill-dropdown__item_active");const e=r.querySelector(`.quill-dropdown__item[value="${i}"]`);e&&e.classList.add("quill-dropdown__item_active")}"function"==typeof t.open&&t.open.call(null,r)}},s=()=>{if(!r)return;const t=r.querySelector(".quill-dropdown__item");t&&t.classList.remove("quill-dropdown__item_active");const e=r.querySelector(".quill-dropdown__item__variable-control");e&&e.remove()},l=()=>{const n=document.querySelector(e+" "+vi(t))?.getAttribute("data-hash");document.removeEventListener("click",l),i!==n&&r&&r.removeEventListener("click",o),s(),r&&r.classList.remove("quill-dropdown_shown")};t.isUpdateOnOpen||this.renderOptionsItems({options:t,dropdownContainer:n,removeActive:s,closeDropdown:l}),r&&(r.append(n),r.classList.add("quill-dropdown"),r.removeEventListener("click",o),r.addEventListener("click",o),r.setAttribute("data-hash",i))}createOptionsMarkup(t){return t.data.filter((t=>!t.isHidden)).map(((t,e,r)=>{const n=t.content?`<div class="quill-dropdown__item ${t.className||""}">${t.content}</div>`:`<div class="quill-dropdown__item ${t.className||""}" value="${t.value||t}"${t.skipClick?` data-skip-click="${t.skipClick}"`:""}>${t.title||t}</div>`;return t.divider?`\n\t\t\t\t\t\t${0!==e?'<div class="quill-dropdown__divider"></div>':""}\n\t\t\t\t\t\t${n}\n\t\t\t\t\t\t${e!==r.length-1?'<div class="quill-dropdown__divider"></div>':""}\n\t\t\t\t\t`:n})).join("")}renderOptionsItems(t){let{options:e,dropdownContainer:r,removeActive:n,closeDropdown:i}=t;const o=this.createOptionsMarkup(e);r.innerHTML=o;r.querySelectorAll(".quill-dropdown__item").forEach((t=>{t.addEventListener("click",(r=>{r.stopPropagation(),t.getAttribute("data-skip-click")&&(r.detail&&!r.detail.shouldProcessDropdownClick||!r.detail)||(n(),e.action(t.getAttribute("value")),i())}))}))}},"modules/alignDropdown":class{constructor(t,e){this.quill=t,this.options=e;t.getModule("dropdown").add({selector:e,data:Hi.map((t=>({title:bi(t),value:t}))),name:"align",action:function(e){setTimeout((()=>{t.format("align",e)}))}})}},"modules/cleanstyle":class{constructor(t,e){this.quill=t,this.options=e,t.options.modules.toolbar.handlers.bold=function(e){t.format("weight",!1),t.format("bold",e)};const r=t.options.modules.toolbar.container,n=document.querySelector(r+" "+vi(this.options));n?.addEventListener("click",this.clean.bind(this))}clean(){const{quill:t}=this,e=t.getSelection(),r={bold:!1,color:!1,size:!1,italic:!1,strike:!1,underline:!1,list:!1,align:!1,header:!1,subheader:!1,subheading:!1,preface:!1,quote:!1,weight:!1,link:!1,lineheight:!1,font:!1,"list-color":!1,background:!1,superscript:!1,subscript:!1,undercut:!1,letterspacing:!1};e?.length>0?(t.formatText(e.index,e.length,r),t.formatText(e.index,e.length,r),t.formatLine(e.index,e.length,r),t.formatLine(e.index,e.length,r)):(t.formatText(0,t.getLength(),r),t.formatText(0,t.getLength(),r),t.formatLine(0,t.getLength(),r),t.formatLine(0,t.getLength(),r)),t.getLength()-1!==e?.length&&0!==e?.length||(t.root.style.removeProperty("font-size"),t.root.style.removeProperty("line-height"),t.root.style.removeProperty("color"),t.root.style.removeProperty("text-align"),t.root.style.removeProperty("letter-spacing"),t.root.removeAttribute("quill-global-styles"),t.blur(),t.format(""))}},"modules/fontDropdown":class{constructor(t,e){this.quill=t,this.options=e;const r=`\n <a\n href="/projects/settings/?projectid=${window.projectid}#tab=ss_menu_fonts"\n class="quill-dropdown__item__link"\n target="_blank"\n >\n <img\n style="float:left;margin-left:-30px;margin-right:5px;"\n src="https://static.tildacdn.${ui()}/img/attention_icon.png"\n />\n ${bi("new_font")}\n </a>\n `;this.quill.getModule("dropdown").add({selector:e,data:[...Ki.map((t=>({title:t.replace(/'/g,""),value:t}))),{title:bi("remove_font"),value:"remove"},{content:r}],name:"font",action:function(e){setTimeout((()=>{t.format("font","remove"===e?"":e)}))}})}},"modules/textStylesDropdown":class{constructor(t,e){this.quill=t,this.options=e;const r=[{title:bi("text"),value:"remove"},{title:bi("subheading"),value:"subheading"},{title:bi("title"),value:"header"},{title:bi("subtitle"),value:"subheader"},{title:bi("preface"),value:"preface"},{title:bi("quote"),value:"quote"}];this.quill.getModule("dropdown").add({selector:e,data:r,name:"text-styles",property:"textStyles",action:function(e){setTimeout((()=>{"remove"!==e?t.format(e,!0):(t.format("subheading",!1),t.format("header",!1),t.format("subheader",!1),t.format("preface",!1),t.format("quote",!1))}))}})}},"modules/lineheightDropdown":class{constructor(t,e){this.quill=t,this.options=e;t.getModule("dropdown").add({selector:e,data:[...Ci,{value:"remove",title:bi("remove_lineheight")}],name:"lineheight",property:"lineHeight",action:function(e){if(t.root.closest('[data-code-field="formmsgsuccess"], [data-code-field="formbottomtext"]'))t.format("lineheight","remove"===e?"":e);else{if((t.getSelection()?.length||0)===(t.getLength()||0)-1){t.format("lineheight","");let r=t.root.getAttribute("quill-global-styles");r=r?JSON.parse(r):{},"remove"===e?(delete r.lineHeight,t.root.style.removeProperty("line-height")):(r.lineHeight=e,t.root.style.setProperty("line-height",e)),Object.keys(r).length>0&&t.root.setAttribute("quill-global-styles",JSON.stringify(r)),t.format("")}else t.format("lineheight","remove"===e?"":e)}}})}},"modules/sizeDropdown":class{constructor(t,e){this.quill=t,this.options=e;t.getModule("dropdown").add({selector:e,data:[...Qi,{title:bi("remove_fontsize"),value:"remove"}],name:"size",property:"fontSize",action:function(e){if(t.root.closest('[data-code-field="formmsgsuccess"], [data-code-field="formbottomtext"]'))t.format("size","remove"===e?"":e),t.format("size","remove"===e?"":e);else{if((t.getSelection()?.length||0)===(t.getLength()||0)-1){t.format("size","");let r=t.root.getAttribute("quill-global-styles");r=r?JSON.parse(r):{},"remove"===e?(delete r.fontSize,t.root.style.removeProperty("font-size")):(r.fontSize=e,t.root.style.setProperty("font-size",e)),Object.keys(r).length>0&&t.root.setAttribute("quill-global-styles",JSON.stringify(r)),t.format("")}else t.format("size","remove"===e?"":e)}}})}},"modules/weightDropdown":class{constructor(t,e){this.quill=t,this.options=e,this.addVariableControl=this.addVariableControl.bind(this);const r=[{title:"Thin",value:"100"},{title:"Extralight",value:"200"},{title:"Light",value:"300"},{title:"Normal",value:"400"},{title:"Medium",value:"500"},{title:"Semibold",value:"600"},{title:"Bold",value:"700"},{title:"Extrabold",value:"800"},{title:"Black",value:"900"},{title:bi("variable_fontweight"),value:"variable",skipClick:!0},{title:bi("remove_fontweight"),value:"remove"}],n=!!this.quill.root.closest("#allrecords, .tn-layout");t.getModule("dropdown").add({selector:e,data:r,name:"weight",property:"fontWeight",action:function(e){t.format("bold",!1),t.format("weight","remove"===e?"":e)},open:async t=>{if(!t||!document.fonts)return;const i=this.quill.getFormat();let o=i.font||"";const s=i.weight||"";n&&!o&&(o=window.getComputedStyle(this.quill.root).fontFamily,o=o.split(",")[0]||""),o=o.toLowerCase().replace(/[^a-z]/g,"");let l=["400","700"];if(!["arial","georgia",""].includes(o)){const t=[...await document.fonts.ready].filter((t=>{let{family:e}=t;return e.toLowerCase().replace(/[^a-z]/g,"")===o}));l=[...new Set(t.map((t=>{let{weight:e}=t;if(/[a-zA-Z]/.test(e)){const t=r.find((t=>{let{title:r}=t;return e.toLowerCase()===r.replace(/\s/g,"").toLowerCase()}));return t&&t.value||""}return e})))]}let a=l.find((t=>t.includes(" ")));a=a&&a.split(" ").map((t=>parseInt(t,10)||0));t.querySelectorAll(".quill-dropdown__item").forEach((r=>{const n=r.getAttribute("value");if(a){const i=parseInt(n,10)||0,[s,l]=a;i>=s&&i<=l||"remove"===n||"variable"===n&&e.enableVariableControl||!o?r.style.removeProperty("display"):r.style.display="none",this.addVariableControl({button:t,item:r,minWeight:s,maxWeight:l})}else l.includes(n)||!o||"remove"===n?r.style.removeProperty("display"):r.style.display="none"}));const c=s%100!=0,u=t.querySelector(`[value="variable"], [value="${s}"]`);u&&c&&(u.dispatchEvent(new Event("click")),u.classList.remove("quill-dropdown__item_active"))}})}addVariableControl(t){let{button:e,item:r,minWeight:n,maxWeight:i}=t;if(!r)return;"variable"===r.getAttribute("value")&&r.addEventListener("click",(t=>{if(t.stopPropagation(),t.detail&&t.detail.shouldProcessDropdownClick)return;const{target:o}=t;if("INPUT"===o.tagName&&o.closest('.quill-dropdown__item[value="variable"]'))return;if(e.querySelector(".quill-dropdown__item__variable-control"))return;const s=this.quill.getFormat().weight||"",l=s||(n<400&&400<i?400:n),a=e.querySelector(".quill-dropdown__item_active");a&&a.classList.remove("quill-dropdown__item_active");const c=document.createElement("div");c.classList.add("quill-dropdown__item__variable-control"),r.appendChild(c);const u=document.createElement("input");u.type="number",u.min=n,u.max=i,u.value=l,u.step=1,c.appendChild(u);const h=document.createElement("button");h.textContent="",h.addEventListener("click",(t=>{t.stopPropagation();const e=u.value;n<e&&e<=i&&(r.setAttribute("value",e),r.dispatchEvent(new CustomEvent("click",{detail:{shouldProcessDropdownClick:!0}})))})),c.appendChild(h),u.addEventListener("keyup",(t=>{let{key:e}=t;e&&"Enter"===e&&h.dispatchEvent(new Event("click"))})),u.focus()}))}},"modules/tilda_link":class{constructor(t,e){this.quill=t,this.options=e,this.inputColorPicker=null,this.inputLineColorPicker=null,this.toolbarParent=this.quill.getModule("toolbar_content").parent,this.projectid=document.getElementById("allrecords")?.getAttribute("data-tilda-project-id")||window.tildaprojectid||window.projectid||"",this.tooltip=this.quill.getModule("tooltip"),t.root.addEventListener("click",(t=>{t.target.closest("figure a")&&t.preventDefault()})),this.tooltipTrigger={selector:"a:not([quill-image-link])",setContent:t=>{const e=(t=t.closest("a")).getAttribute("href")||"";return`\n\t\t\t\t\t<div class="quill-tooltip quill-tooltip-link">\n\t\t\t\t\t\t<a \n href="${e}"\n ${e.startsWith("#")?"":'target="_blank"'}\n rel="noopener noreferrer"\n class="quill-tooltip-link__url"\n >\n ${e.length>29?`${e.slice(0,30)}...`:e}\n </a>\n\t\t\t\t\t\t<button\n class="quill-tooltip-link__button quill-tooltip-link__button_edit"\n >\n ${bi("tooltip_edit")}\n </button>\n\t\t\t\t\t\t<button\n class="quill-tooltip-link__button quill-tooltip-link__button_remove"\n >\n ${bi("tooltip_remove")}\n </button>\n\t\t\t\t\t</div>`},setHandlers:()=>{let t=0;const e=this.quill.getSelection();e&&(t=e.index);const r=this.quill.getLeaf(t)[0],n=this.quill.getIndex(r),i=r.domNode.length;document.querySelector(".quill-tooltip-link__button_edit").addEventListener("click",(()=>{const t=this.quill.getSelection();this.openPopup(t)}));document.querySelector(".quill-tooltip-link__button_remove").addEventListener("click",(()=>{this.quill.formatText(n,i,{color:!1,link:!1})}))}},setTimeout((()=>this.tooltip?.registerTrigger(this.tooltipTrigger))),document.addEventListener("paste",(()=>{this.tooltip?.registerTrigger(this.tooltipTrigger)}));const r=this.toolbarParent.querySelector(vi(this.options));r?.addEventListener("click",(()=>this.openPopup()))}isRelativeUrl(t){let e=!1;return t.match("^[/?&#%]")||t.match("[:@]")||!t.includes(".")||t.match(/^http([s]?):\/\/.*/)||(e=!0),e}isValidUrl(t){return null!==t.match(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_+.~#?&//=]*)/g)}isMail(t){return-1!==t.search("@")&&!1===/(ftp|https?):\/\//i.test(t)}openPopup(t){const e=this.quill.getModule("popup");let r=t||this.quill.getSelection();null===r&&(this.quill.focus(),[r]=this.quill.selection.getRange(),this.quill.update(r));const n=this.toolbarParent.querySelector(vi(this.options)),i=`https://tilda.${window.location.origin.split(".").pop()}/projects/settings/?projectid=${this.projectid}#tab=ss_menu_fonts`;e?.show({type:"link",popupTarget:".quill-popup_link",button:n,btnTitle:bi("modal_link_insert"),btnAction:t=>{if(t.url&&!t.url.match(/javascript:/)){let e=this.quill.getLeaf(r.index+r.length)[0].domNode.parentNode;const n=t.text||this.quill.getText(r.index,r.length);if(!n.length)return;let i=t.url.trim();if(i=i.replace(/['"<>]+/g,""),!i)return void this.quill.format("link",!1);this.isMail(i)?i=`mailto:${i.replace(/mailto:/g,"")}`:this.isRelativeUrl(i)&&(i=`https://${i}`);let o=!1;if("A"!==e.tagName&&e.closest("a")&&(o=e,e=e.closest("a")),"A"===e.tagName)o?o.textContent=n:e.textContent=n,e.setAttribute("href",i);else{const t=e.textContent===n;let o;t&&(o=this.quill.getFormat(r)),this.quill.deleteText(r.index,r.length),this.quill.insertText(r.index,n,"link",i),this.quill.setSelection(r.index,n.length);const s=this.quill.selection.getNativeRange();if(s&&(e=s.end.node.parentNode,"A"!==e.tagName&&(e=s.start.node.parentNode),t))for(const t in o)if(Object.prototype.hasOwnProperty.call(o,t)){const e=o[t];this.quill.format(t,e)}}const s=[];t.new_tab?(e.setAttribute("target","_blank"),s.push("noreferrer","noopener")):e.removeAttribute("target"),t.rel_nofollow&&s.push("nofollow"),s.length?e.setAttribute("rel",s.join(" ")):e.removeAttribute("rel"),void 0!==t.color&&(e.style.color=t.color),"#"===t.line_color&&(t.line_color=""),t.line_color||t.line_width?(t.line_color&&t.line_width?e.style.borderBottom=`${t.line_width}px solid ${t.line_color}`:(t.line_color&&(e.style.borderBottomColor=t.line_color),t.line_width&&(e.style.borderBottomWidth=`${t.line_width}px`),e.style.borderBottomStyle="solid"),e.style.boxShadow="none",e.style.textDecoration="none"):(e.style.borderBottom="",e.style.boxShadow="",e.style.textDecoration="");try{let t=0;r&&(t=r.index);const e=this.quill.getLeaf(t)[0],n=this.quill.getIndex(e),i=e.domNode.length;this.quill.formatText(n,i,"link")}catch(t){console.error("Error: failed forced text-change event")}}else if(!t.url){const t=this.quill.getLeaf(r.index)[0],e=t.offset(this.quill.scroll);this.quill.setSelection(e,t.length()),this.quill.format("link",!1)}this.tooltip?.registerTrigger(this.tooltipTrigger)},popupBody:`\n\t\t\t\t<div class="quill-link-popup">\n\t\t\t\t\t<label class="quill-link-popup__label">\n\t\t\t\t\t\t<div class="quill-link-popup__label__title">${bi("modal_url")}</div>\n\t\t\t\t\t\t<input autocomplete="off" name="url" class="quill-link-popup__input" type="text" />\n\t\t\t\t\t</label>\n\t\t\t\t\t<label class="quill-link-popup__label">\n\t\t\t\t\t\t<div class="quill-link-popup__label__title">${bi("modal_text")}</div>\n\t\t\t\t\t\t<input name="text" class="quill-link-popup__input" type="text" />\n\t\t\t\t\t</label>\n\t\t\t\t\t<label class="quill-link-popup__label quill-link-popup__label_cb">\n\t\t\t\t\t\t<input name="new_tab" class="quill-link-popup__input quill-link-popup__input_checkbox" type="checkbox" />\n\t\t\t\t\t\t<span class="quill-link-popup__label__text">${bi("modal_newtab")}</span>\n\t\t\t\t\t</label>\n\t\t\t\t\t<div class="quill-link-popup__settings">\n\t\t\t\t\t\t<div class="quill-link-popup__settings__header">${bi("link_style")}</div>\n\t\t\t\t\t\t<div class="quill-link-popup__settings__body">\n\t\t\t\t\t\t\t<div class="quill-link-popup__settings__visual">\n\t\t\t\t\t\t\t\t<div class="quill-link-popup__settings__section">\n\t\t\t\t\t\t\t\t\t<label class="quill-link-popup__label quill-link-popup__label_color">\n\t\t\t\t\t\t\t\t\t\t<div class="quill-link-popup__label__text">\n ${bi("modal_color")}\n <span class="quill-link-popup__label__text__colored">\n ${bi("modal_color2")}\n </span>\n </div>\n\t\t\t\t\t\t\t\t\t\t<input autocomplete="off" name="color" class="quill-link-popup__input quill-link-popup__input_color" />\n\t\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class="quill-link-popup__settings__section">\n\t\t\t\t\t\t\t\t\t<label class="quill-link-popup__label quill-link-popup__label_line-color">\n\t\t\t\t\t\t\t\t\t\t<div class="quill-link-popup__label__text">\n ${bi("modal_linesize")}\n <span class="quill-link-popup__label__text__colored">\n ${bi("modal_linesize2")}\n </span>\n </div>\n\t\t\t\t\t\t\t\t\t\t<div class="quill-link-popup__label__row">\n\t\t\t\t\t\t\t\t\t\t\t<input autocomplete="off" name="line_color" class="quill-link-popup__input quill-link-popup__input_line-color" />\n\t\t\t\t\t\t\t\t\t\t\t<select name="line_width" class="quill-link-popup__input quill-link-popup__select">\n\t\t\t\t\t\t\t\t\t\t\t\t<option selected></option>\n\t\t\t\t\t\t\t\t\t\t\t\t<option value="1">1px</option>\n\t\t\t\t\t\t\t\t\t\t\t\t<option value="2">2px</option>\n\t\t\t\t\t\t\t\t\t\t\t\t<option value="3">3px</option>\n\t\t\t\t\t\t\t\t\t\t\t\t<option value="4">4px</option>\n\t\t\t\t\t\t\t\t\t\t\t\t<option value="5">5px</option>\n\t\t\t\t\t\t\t\t\t\t\t\t<option value="6">6px</option>\n\t\t\t\t\t\t\t\t\t\t\t\t<option value="7">7px</option>\n\t\t\t\t\t\t\t\t\t\t\t\t<option value="8">8px</option>\n\t\t\t\t\t\t\t\t\t\t\t\t<option value="9">9px</option>\n\t\t\t\t\t\t\t\t\t\t\t\t<option value="10">10px</option>\n\t\t\t\t\t\t\t\t\t\t\t\t<option value="15">15px</option>\n\t\t\t\t\t\t\t\t\t\t\t\t<option value="20">20px</option>\n\t\t\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class="quill-link-popup__settings__section">\n\t\t\t\t\t\t\t\t\t<a \n href="${i}"\n target="_blank"\n class="quill-link-popup__settings__visual__info"\n >\n ${bi("modal_info")}\n </a>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<label class="quill-link-popup__label quill-link-popup__label_cb quill-link-popup__label_rel">\n\t\t\t\t\t\t\t\t<input name="rel_nofollow" class="quill-link-popup__input quill-link-popup__input_checkbox" type="checkbox" />\n\t\t\t\t\t\t\t\t<span class="quill-link-popup__label__text">${bi("modal_nofollow")}</span>\n\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t`,setHandlers:t=>{this.toolbarParent.querySelector(".quill-link-popup__settings__header")?.addEventListener("click",(()=>{this.toolbarParent.querySelector(".quill-link-popup__settings").classList.toggle("quill-link-popup__settings_show")}));let e=this.quill.selection.getNativeRange().start.node.parentNode;function n(t){if("transparent"===t||"initial"===t)return"";function e(t){return`0${parseInt(t).toString(16)}`.slice(-2)}return[`#${e((t=t.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)([,.\d\s]+)?\)$/))[1])}${e(t[2])}${e(t[3])}`]}if("A"!==e?.tagName&&(e=e.closest("a")),this.toolbarParent.querySelector('.quill-link-popup__input[name="url"]')?.focus(),"A"===e?.tagName){t.url=e.getAttribute("href"),t.text=e.textContent,t.new_tab="_blank"===e.getAttribute("target");const r=e.getAttribute("rel");t.rel_nofollow=r&&r.includes("nofollow"),t.color=e.style.color,t.line_color=e.style.borderBottomColor,t.line_width=e.style.borderBottomWidth.split("px")[0];document.querySelectorAll(".quill-link-popup input, .quill-link-popup select").forEach((e=>{"url"===e.name?e.value=t.url:"text"===e.name?e.value=t.text:"new_tab"===e.name?e.checked=t.new_tab:"rel_nofollow"===e.name?e.checked=t.rel_nofollow:"color"===e.name&&t.color?(e.value=n(t.color),this.toolbarParent.querySelector(".quill-link-popup__settings")?.classList.add("quill-link-popup__settings_show")):"line_color"===e.name&&t.line_color?(e.value=n(t.line_color),this.toolbarParent.querySelector(".quill-link-popup__settings")?.classList.add("quill-link-popup__settings_show")):"line_width"===e.name&&"inherit"!==t.line_width&&(e.value=t.line_width)}))}else{if(t.text=this.quill.getText(r.index,r.length),this.isValidUrl(t.text)){const e=document.querySelector(".quill-link-popup input[name=url]");e&&(e.value=t.text.trim()),t.url=t.text.trim()}const e=document.querySelector(".quill-link-popup input[name=text]");e&&(e.value=t.text)}const i=document.querySelector(".quill-link-popup input.quill-link-popup__input_color"),o=document.querySelector(".quill-link-popup input.quill-link-popup__input_line-color");if("function"==typeof TColorPicker){const t=["/zero/","/page/"].includes(window.location.pathname),{toolbarParent:e}=this,r=e?e.querySelector(".ql-toolbar")||e:null,n={letterCase:"lowercase",swatchesKey:window.projectid||null,noDocumentColors:!t,swatchSize:25,panelGap:2,theme:i.closest(".tn-theme-dark")?"dark":"light",clearBtnSize:12,appendTo:r};this.inputColorPicker=new TColorPicker(i,n),this.inputLineColorPicker=new TColorPicker(o,n),this.inputColorPicker.init(),this.inputLineColorPicker.init()}const s=e=>{const r=e.currentColor.hex||"",n=e.target;t[n.name]=r};i.addEventListener("colorchange",s),o.addEventListener("colorchange",s);document.querySelectorAll('.quill-link-popup input[type="text"].quill-link-popup__input').forEach((e=>{e.addEventListener("input",(()=>{e.name.includes("color")||("function"==typeof window.checkLinkCCtoWS&&window.checkLinkCCtoWS(e.value),t[e.name]=e.value)}))}));document.querySelectorAll(".quill-link-popup select.quill-link-popup__input, input.quill-link-popup__input_color, input.quill-link-popup__input_line-color").forEach((e=>{const r="SELECT"===e.tagName?"change":"input";e.addEventListener(r,(()=>{let r=e.value;"line_color"!==e.name||r.includes("#")||(r=`#${r}`),t[e.name]=r}))}));document.querySelectorAll('.quill-link-popup input[type="checkbox"].quill-link-popup__input').forEach((e=>{e.addEventListener("change",(()=>{t[e.name]=e.checked}))}))},closeAction:()=>{this.inputColorPicker&&(this.inputColorPicker.destroy(),this.inputColorPicker=null),this.inputLineColorPicker&&(this.inputLineColorPicker.destroy(),this.inputLineColorPicker=null)}})}},"modules/tilda_kerning":class{constructor(t){this.quill=t,this.toolbarParent=this.quill.getModule("toolbar_content")?.parent}openPopup(t){const e=this.quill.getModule("popup");if(!e)return;let r=t||this.quill.getSelection();r||(this.quill.focus(),[r]=this.quill.selection.getRange(),this.quill.update(r));const n=this.toolbarParent.querySelector(".ql-more_custom");e.show({type:"kerning",popupTarget:".quill-popup_kerning",button:n,btnTitle:bi("modal_kerning_insert"),btnAction:t=>{const e=parseInt(t.kerning,10);if(!(Number.isNaN(e)||e<-50||e>100))try{Ti(this.quill,r,{value:e})}catch(t){console.error("Error: failed forced text-change event")}},popupBody:`\n\t\t\t\t<div class="quill-kerning-popup">\n\t\t\t\t\t<label class="quill-popup__label">\n\t\t\t\t\t\t<div class="quill-popup__label__title">${bi("kerning")}</div>\n\t\t\t\t\t\t<input autocomplete="off" name="kerning" class="quill-popup__input" type="text" placeholder="1.5" />\n\t\t\t\t\t</label>\n\t\t\t\t</div>\n\t\t\t`,setHandlers:t=>{const e=this.toolbarParent.querySelector('.quill-popup__input[name="kerning"]');e&&(e.value=(this.quill.getFormat(r).letterspacing||"").replace("px","")||"",this.addRangeToInput(e),e.focus(),e.addEventListener("input",(()=>{t[e.name]=e.value})))}})}addRangeToInput(t){if("INPUT"!==t?.tagName)return;const e=.5;const r=t=>{const r=parseFloat(t)||0;return((t,e,r)=>Math.min(Math.max(t,e),r))(0,Math.round(r/e)*e,3)},{name:n,value:i}=t,o=document.createElement("div");o.classList.add("quill__range-wrapper");const s=document.createElement("input");s.classList.add("quill__input_range"),s.type="range",s.name=`${n}-range`,s.min=0,s.max=3,s.step=e,s.value=r(i),s.tabIndex=-1,t.after(o),o.append(t,s),s.addEventListener("input",(()=>{const{value:e}=s;t.value=r(e),t.dispatchEvent(new CustomEvent("input",{detail:{skipSetRangeValue:!0}})),t.dispatchEvent(new CustomEvent("change",{detail:{skipSetRangeValue:!0}}))})),t.addEventListener("input",(e=>{if(e.detail&&e.detail.skipSetRangeValue)return;const{value:n}=t;s.value=r(n)})),t.addEventListener("change",(e=>{if(e.detail&&e.detail.skipSetRangeValue)return;const{value:n}=t;s.value=r(n)})),t.addEventListener("keydown",(r=>{if(!["ArrowDown","ArrowUp"].includes(r.key))return;if(t.hasAttribute("data-no-range"))return;r.preventDefault();const n="ArrowUp"===r.key?e:-.5,{value:i}=t,o=parseFloat(i)||0;t.value=o+n,t.dispatchEvent(new Event("input")),t.dispatchEvent(new Event("change"))}))}},"modules/divider":class{constructor(e,r){this.quill=e,this.options=r,this.toolbarParent=this.quill.getModule("toolbar_content").parent,this.toolbarParent.querySelector(vi(this.options))?.addEventListener("click",(()=>{const r=e.getSelection();e.insertEmbed(r.index,"media",{isDivider:!0},t.ZP.sources.USER)}))}},"modules/textcolor":class{constructor(t,e){this.quill=t,this.options=e,this.toolbarParent=this.quill.getModule("toolbar_content").parent,this.picker=null;const r=this.toolbarParent.querySelector(vi(this.options));this.initColorPicker(r),this.setHandlers(r)}initColorPicker(t){const{toolbarParent:e}=this,r=e?e.querySelector(".ql-toolbar")||e:null;if(!t)return;if("function"!=typeof TColorPicker)return;const n=["/zero/","/page/"].includes(window.location.pathname),i={isOpacityEnabled:!0,swatchesKey:window.projectid||null,noDocumentColors:!n,inputReplacement:t,theme:t.closest(".tn-theme-dark")?"dark":"light",positionPriority:["bottom","right","left"],appendTo:r};this.picker=new TColorPicker(null,i),this.picker.init()}setHandlers(t){t&&(t.addEventListener("paneltoggle",(e=>{if(e.isOpen){let e=this.quill.getSelection();null===e&&(this.quill.focus(),[e]=this.quill.selection.getRange(),this.quill.update(e));const r=this.quill.getFormat(e).color||"",n=TColorPicker.parseColor(r);this.picker.color=r||"",isNaN(n[3])?this.picker.opacity=1:this.picker.opacity=n[3],t.classList.add("quill-dropdown_shown");const i=t.querySelector(".toolbar__button__hint");i&&i.remove()}else t.classList.remove("quill-dropdown_shown")})),t.addEventListener("colorchange",(t=>{let e="";if(t.currentColor.rgb){e=`rgba(${[...t.currentColor.rgb,t.currentColor.opacity].join(", ")})`}this.quill.format("color",e)})))}},"modules/generate":class{constructor(t,e){this.quill=t,this.options=e,this.modules=Object.keys(this.quill.options.modules),this.toolbarParent=this.quill.getModule("toolbar_content").parent;const r=[{title:bi("generate_text"),value:"generate_text"},{title:bi("rewrite"),value:"rewrite"},{title:bi("simplify"),value:"simplify"},{title:bi("shrink"),value:"shrink"},{title:bi("extend"),value:"extend"},{title:bi("continue"),value:"continue"}];this.quill.getModule("dropdown").add({selector:this.options,data:r,name:"ai",action:e=>{const r=t.getSelection();"generate_text"===e?this.initAITextGenPopup():("rewrite"===e||"simplify"===e||"shrink"===e||"extend"===e||"continue"===e)&&this.initAIQuickAction(e,r)}})}initAITextGenPopup(){window.t_ai_cur_editor=this.quill;const t=this.quill.root.closest(".pe-content-form"),e=this.quill.root.closest(".record"),r=window.location.pathname.indexOf("zero")>-1?"zero":t?"content":"redactor",n=t?t.getAttribute("data-rec-tplid"):e?e.getAttribute("data-record-type"):"zero",i=e?e.getAttribute("recordid"):t?t.getAttribute("data-rec-id"):"";this.loadTildaAI((()=>{window.tai__init("field",{tplId:n,recordId:i,place:r})}))}initAIQuickAction(t,e){window.t_ai_cur_editor=this.quill;const r=this.quill.root.closest(".pe-content-form"),n=this.quill.root.closest(".record"),i=window.location.pathname.indexOf("zero")>-1?"zero":r?"content":"redactor",o=r?r.getAttribute("data-rec-tplid"):n?n.getAttribute("data-record-type"):"zero",s=n?n.getAttribute("recordid"):r?r.getAttribute("data-rec-id"):"";this.loadTildaAI((()=>{window.tai__init("quick",{tplId:o,recordId:s,place:i,textAction:t,textRange:e})}))}loadTildaAI(t){ai([`https://tilda.${ci()}/front/tildaai/dist/t-ai-init.min.js`]).then((()=>{t()}))}},"modules/tilda_hotkeys":class{constructor(t,e){this.quill=t,this.options=e,this.quill.keyboard.addBinding({key:["m","M"],shortKey:!0},(function(){const t=this.quill.getModule("cleanstyle");t&&t.clean()})),this.quill.keyboard.addBinding({key:["k","K"],shortKey:!0},(function(){const t=this.quill.getModule("tilda_link");t&&t.openPopup()})),this.quill.keyboard.addBinding({key:["h","H"],shortKey:!0},(function(){const t=this.quill.getModule("undercut");t&&t.openPopup()})),this.quill.keyboard.addBinding({key:["a","A"],shortKey:!0},(function(){this.quill.setSelection(0,this.quill.getLength())})),this.quill.keyboard.addBinding({key:" ",shortKey:!0,shiftKey:!0},(function(t){if(!t)return;const{index:e,length:r}=t;this.quill.deleteText(e,r,"user"),this.quill.insertText(e,"⦁","user"),this.quill.setSelection(e+1,0,"user")})),this.quill.keyboard.addBinding({key:["x","X"],shiftKey:!0,shortKey:!0},(function(t){this.quill.getFormat(t).strike?this.quill.formatText(t,"strike",!1):this.quill.formatText(t,"strike",!0)})),this.quill.keyboard.addBinding({key:["l","L"],shortKey:!0,altKey:!0,shiftKey:null},(function(t){this.quill.formatLine(t,"align","left",!0)})),this.quill.keyboard.addBinding({key:["r","R"],shortKey:!0,altKey:!0,shiftKey:null},(function(t){this.quill.formatLine(t,"align","right",!0)})),this.quill.keyboard.addBinding({key:["t","T"],shortKey:!0,altKey:!0,shiftKey:null},(function(t){this.quill.formatLine(t,"align","center",!0)})),this.quill.keyboard.addBinding({key:["]"],shortKey:!0},(function(t){Ti(this.quill,t,{direction:"increase"})})),this.quill.keyboard.addBinding({key:["["],shortKey:!0},(function(t){Ti(this.quill,t,{direction:"reduce"})}))}},"modules/image":class{constructor(e,r){e&&(this.quill=e,this.options=r,this.quill.getModule&&(this.toolbarParent=this.quill.getModule("toolbar_content").parent,this.tooltip=this.quill.getModule("tooltip"),this.toolbar=this.toolbarParent.classList.contains("ql-toolbar")?this.toolbarParent:this.toolbarParent.querySelector(".ql-toolbar"),this.range=null,this.quill.root.addEventListener("click",(t=>{t.target.closest('figure[data-type="image"] a')&&t.preventDefault()})),this.tooltipTrigger={selector:"figure img",setContent:()=>`\n\t\t\t\t<div class="quill-tooltip quill-tooltip-image">\n\t\t\t\t\t<button class="quill-tooltip-link__button quill-tooltip-link__button_load">${bi("tooltip_load")}</button>\n\t\t\t\t\t<button class="quill-tooltip-link__button quill-tooltip-link__button_edit">${bi("tooltip_edit")}</button>\n\t\t\t\t\t<button class="quill-tooltip-link__button quill-tooltip-link__button_remove">${bi("tooltip_remove")}</button>\n\t\t\t\t</div>\n\t\t\t`,setHandlers:e=>{const r=t.ZP.find(e.closest("figure")),n=this.quill.getIndex(r);this.quill.root.parentElement.querySelector(".quill-tooltip-link__button_load")?.addEventListener("click",(t=>{t.preventDefault(),this.range={index:n},this.removeIndex=n;const e=this.toolbar.querySelector(".js-imgs-button");e&&TUWidget.openPopup(e)})),this.quill.root.parentElement.querySelector(".quill-tooltip-link__button_remove")?.addEventListener("click",(t=>{t.preventDefault(),this.quill.deleteText(n,1)})),this.quill.root.parentElement.querySelector(".quill-tooltip-link__button_edit")?.addEventListener("click",(t=>{t.preventDefault(),this.openPopup(e,t)}))}},setTimeout((()=>{this.toolbar.insertAdjacentHTML("beforeend",'<input type="hidden" name="li-tubutton" class="js-imgs-button" value="" data-tu-is-image="yes" data-tu-multiple="no" />');this.toolbar.querySelectorAll(".js-imgs-button").forEach((t=>{let r=t.id;r||(r=`tuwidget${parseInt(Math.floor(900001*Math.random())+99999)}`,t.id=r),TUWidget.init(t).done((t=>{const n=t.tuInfo.cdnUrl;(this.removeIndex||0===this.removeIndex)&&(this.quill.deleteText(this.removeIndex,1),this.removeIndex=null),e.insertEmbed(this.range.index,"media",{alt:"",href:"",new_tab:!1,url:n,type:"image"}),setTimeout((()=>{const t=document.querySelector(`#${r}-previews`);t&&(t.classList.remove("tu-popup-progressbar-completed","tu-processing","tu-image-preview","tu-success","tu-complete"),t.classList.add("tu-popup-progressbar-start")),this.tooltip?.registerTrigger(this.tooltipTrigger)}),500)}))}));this.toolbar.querySelector(vi(this.options))?.addEventListener("click",(()=>{this.removeIndex=null,this.range=e.getSelection();const t=this.toolbar.querySelector(".js-imgs-button");t&&TUWidget.openPopup(t)}).bind(this))})),this.tooltip?.registerTrigger(this.tooltipTrigger)))}openPopup(e,r){const n=t.ZP.find(e.closest("figure")),i=this.quill.getIndex(n),o=this.quill.getModule("popup");o?.show({type:"image",target:e,event:r,btnTitle:bi("modal_insert"),btnAction:t=>{this.quill.deleteText(i,1);const e=t;e.type="image",this.quill.insertEmbed(i,"media",e),this.tooltip?.registerTrigger(this.tooltipTrigger)},popupBody:`\n\t\t\t\t<div class="quill-link-popup">\n\t\t\t\t\t<label class="quill-link-popup__label">\n\t\t\t\t\t\t<div class="quill-link-popup__label__title">${bi("modal_title")}</div>\n\t\t\t\t\t\t<input autocomplete="off" name="alt" class="quill-link-popup__input" type="text" />\n\t\t\t\t\t</label>\n\t\t\t\t\t<label class="quill-link-popup__label">\n\t\t\t\t\t\t<div class="quill-link-popup__label__title">${bi("modal_caption")}</div>\n\t\t\t\t\t\t<input name="caption" class="quill-link-popup__input" type="text" />\n\t\t\t\t\t</label>\n\t\t\t\t\t<label class="quill-link-popup__label">\n\t\t\t\t\t\t<div class="quill-link-popup__label__title">${bi("modal_link")}</div>\n\t\t\t\t\t\t<input name="href" class="quill-link-popup__input" type="text" />\n\t\t\t\t\t</label>\n\t\t\t\t\t<label class="quill-link-popup__label quill-link-popup__label_cb quill-link-popup__label_rel">\n\t\t\t\t\t\t<input name="new_tab" class="quill-link-popup__input quill-link-popup__input_checkbox" type="checkbox" />\n\t\t\t\t\t\t<span class="quill-link-popup__label__text">${bi("modal_newtab")}</span>\n\t\t\t\t\t</label>\n\t\t\t\t</div>\n\t\t\t`,setHandlers:t=>{const r=e.closest("a[quill-image-link]");t.url=e.src;const n=e.getAttribute("alt")||"";document.querySelector('.quill-link-popup__input[name="alt"]').value=n,t.alt=n;const i=e.closest("figure").querySelector("figcaption")?.innerHTML||"";if(document.querySelector('.quill-link-popup__input[name="caption"]').value=i,t.caption=i,r){const e=r.getAttribute("href")||"";e||(r.href="");document.querySelector('.quill-link-popup__input[name="href"]').value=e,t.href=e;const n=document.querySelector('.quill-link-popup__input[name="new_tab"]'),i="_blank"===r.target;n.checked=i,t.new_tab=i}document.querySelectorAll('.quill-link-popup input[type="text"]').forEach((e=>{e.addEventListener("change",(()=>{if("href"===e.name){let r=e.value.trim().replace(/['"<>]+/g,"");this.isAbsoluteUrl(r)&&(r=`https://${r}`),t.href=r}else t[e.name]=e.value}))}));document.querySelectorAll('.quill-link-popup input[type="checkbox"]').forEach((e=>{e.addEventListener("change",(()=>{t[e.name]=e.checked}))}))}})}isAbsoluteUrl(t){let e=!1;return t.match("^[/?&#%]")||t.match("[:@]")||!t.includes(".")||t.match(/^http([s]?):\/\/.*/)||(e=!0),e}},"modules/modal":class{constructor(t,e){this.quill=t,this.options=e}open(t){const e=this.quill.getSelection(),r=this.quill.options.modules.toolbar.container,n=t.className||"",i=document.querySelector(vi(r));if(i){const e=`\n\t\t\t\t<div class="quill-modal${n}">\n\t\t\t\t\t<div class="quill-modal__overlay"></div>\n\t\t\t\t\t<div class="quill-modal__window">\n\t\t\t\t\t\t<div class="quill-modal__header">${t.title}\n\t\t\t\t\t\t\t<div class="quill-modal__header__close"></div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="quill-modal__body">${t.content}</div>\n\t\t\t\t\t\t<div class="quill-modal__footer">\n\t\t\t\t\t\t\t<button class="quill-modal__btn quill-modal__btn_cancel">${bi("cancel")}</button>\n\t\t\t\t\t\t\t<button class="quill-modal__btn quill-modal__btn_action">${t.action.title}</button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t`;i.insertAdjacentHTML("beforeend",e)}if(t.width){const e=document.querySelector(".quill-modal__window");e.style.width=t.width+"px",e.style.left=`calc(50% - ${t.width/2}px)`}const o={};t.setHandlers&&t.setHandlers(o);const s=t=>{t.preventDefault(),setTimeout((function(){document.querySelector(".quill-modal")?.remove(),e&&this.quill.setSelection(e)}))};document.querySelectorAll(".quill-modal__overlay, .quill-modal__header__close, .quill-modal__btn_cancel").forEach((t=>{t.addEventListener("click",s.bind(this))}));document.querySelectorAll("button.quill-modal__btn_action").forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault(),setTimeout((function(){t.action.func(o),document.querySelector(".quill-modal")?.remove()}))}))}))}},"modules/more":class{constructor(t,e){this.quill=t,this.options=e,this.fonts=[],this.picker=null,this.toolbarContent=this.quill.getModule("toolbar_content"),this.toolbarParent=this.toolbarContent.parent,this.data=this.getDefaultData(t);const r=this.getData.bind(this),n=this.quill.getModule("dropdown"),i=this.toolbarParent.querySelector(vi(this.options));n.add({selector:this.options,get data(){return r()},name:"more",isUpdateOnOpen:!0,action:e=>{const r=t.getSelection(),n=t.getFormat(r);n.superscript&&"superscript"===e?t.format("superscript",!1):n.subscript&&"subscript"===e?t.format("subscript",!1):"superscript"===e?(t.format("subscript",!1),t.format("superscript",!0)):"subscript"===e?(t.format("superscript",!1),t.format("subscript",!0)):"italic"===e?t.format("italic",!n.italic):"underline"===e?t.format("underline",!n.underline):"strike"===e?t.format("strike",!n.strike):"clean"===e?t.getModule("cleanstyle").clean():"formula"===e?t.getModule("tilda_formula").openPopup():"highlight"===e?this.openColorPicker(i):"undercut"===e?t.getModule("undercut").openPopup():"quill-table"===e?(t.getModule("quill-table").insertTable(3,3),t.getModule("table_popup").openPopup()):"shortcuts_popup"===e?t.getModule("shortcuts_popup").openPopup():"kerning"===e&&t.getModule("tilda_kerning").openPopup()}}),this.initColorPicker(i),this.setHandlers(i)}initColorPicker(t){const{toolbarParent:e}=this,r=e?e.querySelector(".ql-toolbar")||e:null;if(!t)return;if("function"!=typeof TColorPicker)return;const n=["/zero/","/page/"].includes(window.location.pathname),i={isOpacityEnabled:!0,swatchesKey:window.projectid||null,noDocumentColors:!n,inputReplacement:t,disablePanelToggleOnInputReplacementClick:!0,theme:t.closest(".tn-theme-dark")?"dark":"light",positionPriority:["bottom","right","left"],appendTo:r};this.picker=new TColorPicker(null,i),this.picker.init()}openColorPicker(t){if(t&&this.picker){let e=this.quill.getSelection();null===e&&(this.quill.focus(),[e]=this.quill.selection.getRange(),this.quill.update(e));const r=this.quill.getFormat(e).background||"",n=TColorPicker.parseColor(r);this.picker.color=r||"",isNaN(n[3])?this.picker.opacity=1:this.picker.opacity=n[3],this.picker.openPanel(),setTimeout((()=>{t.classList.add("quill-dropdown_shown");const e=t.querySelector(".toolbar__button__hint"),r=t.querySelector(".quill-dropdown__container");e&&e.remove(),r&&(r.style.display="none")}),0)}}setHandlers(t){this.quill.on("selection-change",((t,e)=>{Si(this.quill)?this.hideButtons(["formula","quill-table","undercut"]):this.showAllButtons()})),t&&(t.addEventListener("paneltoggle",(e=>{if(!e.isOpen){t.classList.remove("quill-dropdown_shown");const e=t.querySelector(".quill-dropdown__container");e&&e.style.removeProperty("display")}})),t.addEventListener("colorchange",(t=>{let e="";if(t.currentColor.rgb){e=`rgba(${[...t.currentColor.rgb,t.currentColor.opacity].join(", ")})`}this.quill.format("background",e)})))}getData(){return this.data}getDefaultData(t){const e=[{title:bi("highlight"),value:"highlight"},{title:bi("kerning"),value:"kerning",className:"ql-kerning_custom",get isHidden(){return!t.options?.modules?.tilda_kerning}},{title:bi("sup"),value:"superscript"},{title:bi("sub"),value:"subscript"}];t.options.formats.includes("formula")&&t.options.modules.tilda_formula&&e.push({title:bi("formula"),value:"formula"}),t.options.formats.includes("undercut")&&t.options.modules.undercut&&e.push({title:bi("undercut"),value:"undercut",get isHidden(){return qi(t)}});const r=i().requiredTableFormats.every((e=>t.options.formats.includes(e)));return t.options.modules["quill-table"]&&r&&e.push({title:bi("table"),value:"quill-table",divider:!0,get isHidden(){return qi(t)}}),t.options.modules.shortcuts_popup&&e.push({title:bi("shortcuts"),value:"shortcuts_popup"}),this.toolbarContent.isСollapsedList&&e.push({title:bi("italic"),value:"italic"},{title:bi("underline"),value:"underline"},{title:bi("strike"),value:"strike"},{title:bi("clean"),value:"clean"}),e}hideButtons(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.data=this.data.filter((e=>!t.includes(e.value)))}showAllButtons(){this.data=this.getDefaultData(this.quill)}},"modules/clipboard":Fo,"modules/popup":class{constructor(t,e){this.quill=t,this.options=e,this.toolbarModule=this.quill.getModule("toolbar_content"),this.toolbarParent=this.toolbarModule.parent}show(t){const{type:e,button:r,target:n,popupBody:i,btnTitle:o,secondBtnTitle:s,btnAction:l,secondBtnAction:a,setHandlers:c,event:u,popupTarget:h}=t,d={},p=this.quill.root.offsetWidth;let m,f;r?.classList.add("quill-dropdown_shown"),"image"===e?(f=n,m=this.quill.root.parentElement):(f=r,m=this.toolbarParent.classList.contains("ql-toolbar")?this.toolbarParent:this.toolbarParent.querySelector(".ql-toolbar"));const g=()=>{const t=this.toolbarParent.clientWidth;y.style.left=y.offsetLeft+x+5>=t||f.offsetLeft+x>=t?t-x-5+"px":f.offsetLeft+"px"},b=e=>{if(e&&e.target.closest(`.quill-popup_${t.type}, .tcolors-panel`))return;this.toolbarModule.options.showOnSelection&&m.removeAttribute("data-force-show"),"function"==typeof t.closeAction&&t.closeAction.call(null);const n=document.querySelector(h||".quill-popup");n?.remove(),r?.classList.remove("quill-dropdown_shown"),document.removeEventListener("mousedown",b),window.removeEventListener("resize",g)},v=`\n\t\t\t<div class="quill-popup quill-popup_${e}">\n\t\t\t\t${i}\n\t\t\t\t<div class="quill-popup__footer">\n ${s&&a?`<button class="quill-popup__btn quill-popup__btn_second-action" type="button">${s}</button>`:""}\n ${o&&l?`<button class="quill-popup__btn quill-popup__btn_action" type="button">${o}</button>`:""}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t`;m.insertAdjacentHTML("beforeend",v);const y=m.querySelector(".quill-popup"),x=y.offsetWidth;let w,k;if("image"===e){const t=130;w=u.clientX+t>p?p-2*t-5:u.clientX-t<0?5:u.clientX-t;const e=this.quill.root.getBoundingClientRect().top+window.pageYOffset;k=u.clientY+window.scrollY-e}else{const t=r?.parentElement;w="for_redactor_toolbar"===t?.id||t?.classList.contains("for_redactor_toolbar")?f.offsetLeft:f.offsetLeft+x>p?p-x:f.offsetLeft,w+x>window.outerWidth&&(w=window.outerWidth-x),k="image"===e?f.offsetTop:f.offsetHeight||30}y.style.left=w+"px",y.style.top=k+"px",window.addEventListener("resize",g),g(),c&&c(d),this.toolbarModule.options.showOnSelection&&(m.style.display="flex",m.setAttribute("data-force-show","yes"));const q=e=>{y.classList.contains("quill-popup_undercut")||"Enter"!==e.key||t.ignoreEnterClick||(e.preventDefault(),l(d),b(),document.removeEventListener("keydown",q))};document.removeEventListener("keydown",q),document.addEventListener("keydown",q);const _=m.querySelector(".quill-popup__btn_action");if(_?.addEventListener("click",(t=>{t.preventDefault(),setTimeout((()=>{l(d),b(),document.removeEventListener("keydown",q)}))})),"function"==typeof a&&s){const t=m.querySelector(".quill-popup__btn_second-action");t?.addEventListener("click",(t=>{t.preventDefault(),setTimeout((()=>{a(d),b(),document.removeEventListener("keydown",q)}))}))}document.addEventListener("mousedown",b)}},"modules/tooltip":class{constructor(t,e){this.quill=t,this.options=e,this.closeTooltip=this.closeTooltip.bind(this),this.setHandler=this.setHandler.bind(this)}registerTrigger(t){setTimeout((()=>{this.quill.root?.parentElement?.querySelectorAll(vi(t)).forEach((e=>{e.options=t,e.removeEventListener("click",this.setHandler),e.addEventListener("click",this.setHandler)}))}))}closeTooltip(){document.querySelectorAll(".quill-tooltip").forEach((t=>t.remove())),this.quill.root.removeEventListener("click",this.closeTooltip),window.removeEventListener("resize",this.adjustPosition)}setHandler(t){this.closeTooltip();const e=t.target;if(!e)return;const r=e.getAttribute("href");r&&r.includes("#popup")&&(t.preventDefault(),t.stopPropagation());const n=t.currentTarget.options;if(!n)return;this.quill.root.parentElement.insertAdjacentHTML("beforeend",n.setContent(e));const i=document.querySelector(".quill-tooltip"),o=e.offsetTop,s=e.offsetLeft,l=this.quill.root.offsetWidth,a=this.quill.root.getBoundingClientRect(),c=i?.clientWidth/2,u=e.offsetWidth,h=e.offsetHeight;let d,p;n.alignByPointer?(d=t.clientX+c>l?t.clientX-a.left-2*c+5:t.clientX-c<0?5:t.clientX-a.left-c,p=t.clientY-this.quill.root.getBoundingClientRect().top):(d=s-c/2+u/2,p=o+h),i&&(i.style.left=d+"px",i.style.top=p+10+"px"),n.setHandlers&&n.setHandlers(e),this.quill.root.removeEventListener("click",this.closeTooltip),setTimeout((()=>{this.quill.root.addEventListener("click",this.closeTooltip)}),0);const m=(e.closest(".ql-container")?.parentElement||document).querySelector(".ql-toolbar");if(m?.addEventListener("click",this.closeTooltip),!i)return;i.querySelectorAll(".quill-tooltip button").forEach((t=>{t.addEventListener("mousedown",(t=>t.stopPropagation())),t.addEventListener("click",(()=>i.remove()))})),window.addEventListener("resize",(()=>this.adjustPosition(e)))}adjustPosition(t){const e=document.querySelector(".quill-tooltip");if(!e)return;e.style.left=t.offsetLeft-e?.clientWidth/2+"px",e.style.top=t.offsetTop+20+"px";const r=Math.round(e?.getBoundingClientRect().right);Math.round(e?.getBoundingClientRect().left)-10<=0&&t.offsetLeft<e?.clientWidth/2?e.style.left="0px":e.clientWidth>=window.outerWidth?(e.style.maxWidth=this.quill.root.parentNode.getBoundingClientRect().width-10+"px",e.style.left="0px"):r>=window.outerWidth&&(e.style.left=window.outerWidth-e?.clientWidth+"px"),e.getBoundingClientRect().width>window.outerWidth&&(e.style.maxWidth=this.quill.root.parentNode.getBoundingClientRect().width-10+"px")}},"modules/typograph":class{constructor(t,e){this.quill=t,this.options=e;const r=this.quill.options.modules.toolbar.container,n=document.querySelector(r+" "+vi(this.options));n?.addEventListener("click",(()=>{const e={text:this.quill.root.innerHTML,action:"typograf"};let r="";for(const t in e)r+=r?"&":"",r+=encodeURIComponent(t)+"="+encodeURIComponent(e[t]);fetch("https://utils.tildacdn.com/typograf/",{method:"POST",body:r,headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}}).then((t=>t.text())).then((e=>{if(e&&"ERROR"!==e&&"EMPTY"!==e&&"Wrong parametrs"!==e){const r=document.createElement("div");r.innerHTML=e;const n=r.firstElementChild;n&&"P"===n.tagName&&(e=r.outerHTML),e=mi(e),t.clipboard.dangerouslyPasteHTML(e)}else"ERROR"===e?(console.error("Typograph error"),alert("Typographing error")):"Wrong parametrs"===e&&(console.error("Typograph error: Wrong parametrs"),alert("Typographing error"))})).catch((t=>{console.error("Typograph error: "+t.message),alert("Typographing error")}))}))}},"modules/video":class{constructor(t,e){this.quill=t,this.options=e,this.toolbarParent=this.quill.getModule("toolbar_content").parent,this.range=null;const r=this.toolbarParent.querySelector(vi(this.options));r?.addEventListener("click",(()=>this.openPopup()))}openPopup(){let t=this.quill.getSelection();null===t&&(this.quill.focus(),[t]=this.quill.selection.getRange(),this.quill.update(t));const e=this.quill.getModule("popup"),r=this.toolbarParent.querySelector(vi(this.options));e.show({type:"video",button:r,btnTitle:bi("modal_video_insert"),btnAction:e=>{const r=e;r.type="video",this.quill.insertEmbed(t.index,"media",r)},popupBody:`\n\t\t\t\t<div class="quill-video-popup">\n\t\t\t\t\t<label class="quill-video-popup__label">\n <div class="quill-video-popup__label__title">${bi("modal_video_title")}</div>\n <input type="text" class="quill-video-popup__input" />\n </label>\n <div class="quill-video-popup__help">${bi("modal_video_help")}</div>\n\t\t\t\t</div>\n\t\t\t`,setHandlers:t=>{const e=document.querySelector(".quill-video-popup__input");e.addEventListener("input",(()=>{t.videoUrl=e.value}))}})}},"modules/undercut":class{constructor(t,e){this.quill=t,this.quillTextarea,this.options=e,this.currentNode=null,this.currentRange=null,this.isEditUndercut=!1,this.inputColorPicker=null,this.isEmptySelection=!1,this.toolbarParent=this.quill.getModule("toolbar_content").parent,this.tooltip=this.quill.getModule("tooltip"),this.tooltipTrigger={selector:".ql-undercut",alignByPointer:!0,setContent:()=>`\n\t\t\t\t\t<div class="quill-tooltip quill-tooltip-undercut">\n\t\t\t\t\t <div class="quill-tooltip-undercut__controls">\n\t\t\t\t\t <div class="quill-tooltip-undercut__intro"></div>\n <button\n class="quill-tooltip-undercut__button quill-tooltip-undercut__button_edit"\n >\n ${bi("tooltip_edit")}\n </button>\n <button\n class="quill-tooltip-undercut__button quill-tooltip-undercut__button_preview"\n >\n ${bi("tooltip_preview_undercut_open")}\n </button>\n <button\n class="quill-tooltip-undercut__button quill-tooltip-undercut__button_remove"\n >\n ${bi("tooltip_remove_undercut")}\n </button>\n </div>\n\t\t\t\t\t</div>`,setHandlers:t=>{let e=0;const r=this.quill.getSelection();this.currentNode=this.quill.selection.getNativeRange()?.start.node.parentNode,this.currentRange=this.quill.getSelection(),r&&(e=r.index);const n=this.quill.getLeaf(e)[0];let i=null;i=t.closest(".ql-undercut")?t.closest(".ql-undercut"):n.domNode||this.currentNode;let o=wi(i.getAttribute("data-text")).replace(/<\/?[^>]+(>|$)/g,"");o.length>35&&(o=o.substring(0,35)+"...");const s="true"===i.getAttribute("data-preview-mode");document.querySelector(".quill-tooltip-undercut__intro").innerHTML=o;document.querySelector(".quill-tooltip-undercut__button_edit").addEventListener("click",(()=>{const t=this.quill.getSelection();this.openPopup(t)}));document.querySelector(".quill-tooltip-undercut__button_remove").addEventListener("click",(()=>{this.quill.formatText(e-1,1,"undercut",!0)}));const l=document.querySelector(".quill-tooltip-undercut__button_preview");l.innerHTML=bi(s?"tooltip_preview_undercut_hide":"tooltip_preview_undercut_open"),this.tooltip?.adjustPosition(i),l.addEventListener("click",(()=>{const t="true"===i.getAttribute("data-preview-mode");i.innerHTML=t?wi(i.getAttribute("data-show-text"))||"[+]":wi(i.getAttribute("data-text")),i.setAttribute("data-preview-mode",!t),this.tooltip?.registerTrigger(this.tooltipTrigger)}))}},setTimeout((()=>this.tooltip?.registerTrigger(this.tooltipTrigger))),document.addEventListener("paste",(()=>{this.tooltip?.registerTrigger(this.tooltipTrigger)}))}openPopup(t){const e=this.quill.getModule("popup");let r=t||this.quill.getSelection()||this.currentRange;null===r&&([r]=this.quill.selection.getRange(),this.quill.update(r));const n=this.toolbarParent.querySelector(".ql-more_custom");e?.show({type:"undercut",button:n,btnTitle:bi("modal_undercut_insert"),btnAction:t=>{const e=t.color||"#000000",n=t.modalHide||"",i=t.modalShow||"",o=t.style||"none";if(s=this.quillTextarea.getText(),/^\s*$/.test(s)&&!Ai(this.quillTextarea.root))return;var s;const l=document.createElement("div");new Wo(l).setContents(this.quillTextarea.getContents());const a=l.querySelector(".ql-editor").innerHTML,c=document.createElement("div");c.innerHTML=a,c.querySelectorAll("p").forEach(((t,e)=>{const r=document.createElement("br");if(r.style.display="block",e&&c.append(r),"<br>"!==t.innerHTML)for(;t.firstChild;)c.append(t.firstChild);t.remove()}));const u=this.isEmptySelection?0:r.length||1;this.quill.deleteText(this.isEditUndercut?r.index-1:r.index,u);const h=["list","undercut","align"],d=this.quill.options.formats.reduce(((t,e)=>(!h.includes(e)&&(t[e]=!1),t)),{}),p=this.quill.getContents(r.index,1).ops,m=p.length?p[0].attributes:{};this.quill.formatText(this.isEditUndercut?r.index-1:r.index,1,d),this.quill.insertEmbed(this.isEditUndercut?r.index-1:r.index,"undercut",{color:e,modalShow:i,modalHide:n,text:c.innerHTML,style:o}),this.quill.formatText(this.isEditUndercut?r.index:r.index+1,1,m),this.tooltip?.registerTrigger(this.tooltipTrigger),this.isEmptySelection=!1},popupBody:`\n\t\t\t\t<div class="quill-undercut-popup">\n <div class="quill-undercut-popup__data">\n <label class="quill-undercut-popup__label">\n <div class="quill-undercut-popup__label__title">${bi("modal_text")}</div>\n </label>\n <div class="quill-undercut-popup__textarea"></div>\n\t\t\t\t\t</div>\n\t\t\t\t <div class="quill-undercut-popup__row">\n <label class="quill-undercut-popup__label">\n <div class="quill-undercut-popup__label__title">${bi("modal_show")}</div>\n <input name="modalShow" class="quill-undercut-popup__input" type="text" />\n </label>\n <label class="quill-undercut-popup__label">\n <div class="quill-undercut-popup__label__title">${bi("modal_hide")}</div>\n <input name="modalHide" class="quill-undercut-popup__input" type="text" />\n </label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="quill-undercut-popup__settings">\n\t\t\t\t\t <div class="quill-undercut-popup__settings__header">${bi("undercut_style_block")}</div>\n <div class="quill-undercut-popup__settings__body">\n <div class="quill-undercut-popup__row">\n <div class="quill-undercut-popup__settings__section">\n <div class="quill-undercut-popup__settings__visual">\n <label class="quill-undercut-popup__label">\n <div class="quill-undercut-popup__label__title">\n ${bi("undercut_color")}\n </div>\n <input autocomplete="off" name="color" placeholder="#000000" class="quill-undercut-popup__input quill-undercut-popup__input_color" />\n </label>\n </div>\n </div>\n <div class="quill-undercut-popup__settings__section quill-undercut-popup__settings__style">\n <label class="quill-undercut-popup__label">\n <div class="quill-undercut-popup__label__title">\n ${bi("undercut_style")}\n </div>\n <select name="style" class="quill-undercut-popup__input quill-undercut-popup__select">\n <option value="none" selected>${bi("undercut_style_options_none")}</option>\n <option value="solid">${bi("undercut_style_options_solid")}</option>\n <option value="dashed">${bi("undercut_style_options_dashed")}</option>\n <option value="dotted">${bi("undercut_style_options_dotted")}</option>\n </select>\n </label>\n </div>\n </div>\n </div>\n\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t\t<div class="quill-undercut-popup__info">${bi("undercut_info")}</div>\n\t\t\t\t</div>\n\t\t\t`,setHandlers:t=>{let e=this.quill.selection.getNativeRange()?.start.node.parentNode||this.currentNode;if(function(t){let e=0;const r=[];return t.ops.forEach((t=>{t.insert&&t.insert.undercut&&r.push({text:t.insert.undercut?.text,index:e}),"string"==typeof t.insert?e+=t.insert.length:null!==t.insert&&(e+=1)})),r}(this.quill.getContents(r.index,r.length)).length){const t=document.querySelector(".quill-popup_undercut"),e=document.querySelector(".quill-undercut-popup"),r=document.querySelector(".quill-popup_undercut .quill-popup__btn_action");return t.style.width="350px",e.innerHTML=bi("undercut_cannot_wrap_undercut"),void(r.style.display="none")}this.currentNode=null,e=e.closest(".ql-undercut");const n=document.querySelector(".quill-undercut-popup input.quill-undercut-popup__input_color");if("function"==typeof TColorPicker){const t=["/zero/","/page/"].includes(window.location.pathname),{toolbarParent:e}=this,r=e?e.querySelector(".ql-toolbar")||e:null,i={letterCase:"lowercase",noDocumentColors:!t,swatchSize:22,panelGap:2,theme:n.closest(".tn-theme-dark")?"dark":"light",clearBtnSize:12,appendTo:r};this.inputColorPicker=new TColorPicker(n,i),this.inputColorPicker.init()}n.addEventListener("colorchange",(e=>{const r=e.currentColor.hex||"",n=e.target;t[n.name]=r}));const i=document.querySelector(".quill-undercut-popup__textarea"),o=i.value,s=i.parentNode,l=i.getAttribute("name");i.style.display="none";const a=Wo.fixCustomStyle(o),c=a.styles;i.insertAdjacentHTML("afterend",'<div class="edrec__wrapper__editor" quill-name="'+l+'">'+a.html+"</div>");const u=["list","undercut","align","table","formula"],h=this.quill.options.formats.filter((t=>!u.includes(t))),d={...this.quill.options.modules};["alignDropdown","generate","history","keyboard","undercut","uploader","quill-table","tilda_formula"].forEach((t=>delete d[t])),d.toolbar_content={hint:!0,toolbarClass:"edrec__wrapper__editor__toolbar",editorWrapper:s,showByClick:!0},d.toolbar={container:'[quill-name="'+l+'"] + .edrec__wrapper__editor__toolbar',toolbarOptions:["bold","italic","underline","link"]};const p=new Wo(s.querySelector(".edrec__wrapper__editor"),{formats:h,debug:!1,modules:d});if(Wo.setCustomStyles(p.root,c),this.quillTextarea=p,this.toolbarParent.querySelector(".quill-undercut-popup__settings__header")?.addEventListener("click",(()=>{this.toolbarParent.querySelector(".quill-undercut-popup__settings").classList.toggle("quill-undercut-popup__settings_show")})),"SPAN"===e?.tagName){t.text=e.getAttribute("data-text")||"",t.color=e.getAttribute("data-color")||"#000000",t.modalHide=wi(e.getAttribute("data-hide-text")||""),t.modalShow=wi(e.getAttribute("data-show-text")||""),t.style=e.getAttribute("data-style")||"none",t.color&&(this.inputColorPicker.color=t.color);const r=p.clipboard.convert({html:wi(t.text,!0)});p.setContents(r),this.isEditUndercut=!0}else{t.text=this.quill.getText(r.index,r.length);const e=t.text.match(/[а-яА-Я]/g)?.length>1?"RU":"EN";t.modalShow=bi("undercut_more",e),t.style="none";const n=this.quill.getContents(r.index,r.length);p.setContents(n),this.isEditUndercut=!1,this.isEmptySelection=!t.text&&!Ai(p.root)}document.querySelectorAll('.quill-undercut-popup select.quill-undercut-popup__input, .quill-undercut-popup input[type="text"].quill-undercut-popup__input').forEach((e=>{const r="SELECT"===e.tagName?"change":"input";e.value=t[e.name]||"",e.addEventListener(r,(()=>{t[e.name]=e.value}))}))},secondBtnTitle:bi("modal_cancel"),secondBtnAction:()=>{close()},closeAction:()=>{this.inputColorPicker&&(this.inputColorPicker.destroy(),this.inputColorPicker=null)}})}},"modules/quill-table":i(),"modules/tilda_formula":class{constructor(e,r){this.quill=e,this.options=r,this.toolbarParent=this.quill.getModule("toolbar_content").parent,this.tooltip=this.quill.getModule("tooltip"),this.tooltip=this.quill.getModule("tooltip"),this.tooltipTrigger={selector:pi,alignByPointer:!0,setContent:t=>{const e=t.closest(pi);return`\n <div class="quill-tooltip quill-tooltip-formula">\n <button\n class="quill-tooltip-link__button quill-tooltip-link__button_edit"\n data-value="${e?.dataset?.value||""}"\n >\n ${bi("formula_edit")}\n </button>\n\t\t\t\t\t\t<button\n class="quill-tooltip-link__button quill-tooltip-link__button_remove"\n >\n ${bi("formula_remove")}\n </button>\n </div>\n `},setHandlers:e=>{const r=e.closest(pi);if(r){const e=t.ZP.find(r);if(!e.next){const t=this.quill.getIndex(e);this.quill.setSelection(t+1)}}document.querySelector(".quill-tooltip-link__button_edit").addEventListener("click",(()=>{const t=this.getSelectedFormula();t&&this.openPopup(t)}));document.querySelector(".quill-tooltip-link__button_remove").addEventListener("click",(()=>{const t=this.getSelectedFormula();t&&this.quill.updateContents((new di).retain(t.index).delete(1))}))}},setTimeout((()=>this.tooltip?.registerTrigger(this.tooltipTrigger))),this.quill.root.addEventListener("click",(t=>{t.target?.closest(pi)&&this.tooltip?.registerTrigger(this.tooltipTrigger)})),this.quill.clipboard&&this.addMatcher()}openPopup(t){let e=t?.range??this.quill.getSelection();null===e&&(this.quill.focus(),[e]=this.quill.selection.getRange(),this.quill.update(e));const r=this.quill.getModule("popup"),n=this.toolbarParent.querySelector(".ql-more_custom");r?.show({type:"formula",button:n,ignoreEnterClick:!0,btnTitle:bi(t?"formula_update":"formula_insert"),btnAction:r=>{if(r.formulaText===t?.value)return;const n=new di;t?n.retain(t.index).delete(1):n.retain(e.index),n.insert({formula:r.formulaText}),this.quill.updateContents(n),this.tooltip?.registerTrigger(this.tooltipTrigger)},popupBody:`\n <div class="quill-formula-popup">\n <label class="quill-formula-popup__label">\n <div class="quill-formula-popup__label__title">${bi("formula_popup_title")}</div>\n <div class="quill-formula-popup__input-viewarea">\n <textarea class="quill-formula-popup__input" placeholder="e=mc^2" rows="3" maxlength="45000"></textarea>\n </div>\n </label>\n <div class="quill-formula-popup__help">${bi("formula_popup_hint")}</div>\n </div>\n `,setHandlers:e=>{const r=document.querySelector(".quill-formula-popup__input");if(r.addEventListener("input",(()=>{e.formulaText=r.value,this.resizeTextarea(r)})),r.parentNode.addEventListener("wheel",(t=>{t.stopPropagation()})),r.focus(),!t)return;const n=Ni(t.line.domNode.dataset.value);e.formulaText=n,r.value=n,0!==n.length&&this.resizeTextarea(r)}})}getSelectedFormula(){let t=0;const e=this.quill.getSelection();e&&(t=e.index);const r=this.quill.getLeaf(t)[0];return{line:r,index:this.quill.getIndex(r),range:e,value:r.domNode?.dataset?.value??""}}addMatcher(){this.quill.clipboard.addMatcher("span.ql-copied-formula",(t=>(new di).insert({formula:t.textContent})))}resizeTextarea(t){const e=t.offsetHeight-t.clientHeight;t.style.height="auto",t.style.height=t.scrollHeight+e+"px"}},"modules/table_popup":class{constructor(t){this.quill=t,this.toolbarParent=this.quill.getModule("toolbar_content").parent}openPopup(){if(!this.shouldShowNotification())return;const t=this.quill.getModule("popup"),e=this.toolbarParent.querySelector(".ql-more_custom");t?.show({type:"table",button:e,btnTitle:bi("ok"),btnAction:()=>{},popupBody:`\n <div class="quill-table-popup">\n <div class="quill-table_popup-title">\n ${bi("table_using_notification_title")}\n </div>\n <div class="quill-table_popup-text">\n ${bi("table_using_notification")}\n </div>\n </div>\n `}),this.setNotificationLockExpireTime()}getNotificationLockExpireTime(){return localStorage.getItem(Vo)}setNotificationLockExpireTime(){const t=new Date;t.setDate(t.getDate()+3);const e=t.getTime();localStorage.setItem(Vo,e)}shouldShowNotification(){const t=this.getNotificationLockExpireTime();return!Number.isNaN(t)&&Date.now()>+t}},"modules/shortcuts_popup":class{constructor(t){this.quill=t,this.toolbarParent=this.quill.getModule("toolbar_content").parent}openPopup(){const t=this.quill.getModule("popup"),e=this.toolbarParent.querySelector(".ql-more_custom"),r=[{title:"bold",shortcut:"ShortKey+B",format:"bold"},{title:"italic",shortcut:"ShortKey+I",format:"italic"},{title:"underline",shortcut:"ShortKey+U",format:"underline"},{title:"strike",shortcut:"ShortKey+Shift+X",format:"strike"},{title:"link",shortcut:"ShortKey+K",format:"link"},{title:"increase_letterspacing",shortcut:"ShortKey+]",format:"letterspacing"},{title:"decrease_letterspacing",shortcut:"ShortKey+[",format:"letterspacing"},{title:"undercut",shortcut:"ShortKey+H",format:"undercut"},{title:"nbsp",shortcut:"ShortKey+Shift+Space"},{title:"left",shortcut:"ShortKey+Alt+L",format:"align"},{title:"right",shortcut:"ShortKey+Alt+R",format:"align"},{title:"center",shortcut:"ShortKey+Alt+T",format:"align"},{title:"select_all",shortcut:"ShortKey+A"},{title:"clean",shortcut:"ShortKey+M"}].filter((t=>{let{format:e}=t;return e&&this.quill.options.formats.includes(e)||!e}));t?.show({type:"shortcuts",button:e,btnTitle:bi("close"),btnAction:()=>{},popupBody:`\n <div class="quill-shortcuts-popup">\n <div class="quill-shortcuts-popup__title">${bi("shortcuts")}</div>\n <div class="quill-shortcuts-popup__list">\n ${r.map((t=>{let{title:e,shortcut:r}=t;return`\n <div class="quill-shortcuts-popup__item">\n <div class="quill-shortcuts-popup__item-title">${bi(e)}</div>\n <div class="quill-shortcuts-popup__keys">\n ${this.getShortcutsKeysMarkup(r)}\n </div>\n </div>\n `})).join("")}\n </div>\n </div>\n `})}getShortcutsKeysMarkup(t){const e=t.split("+"),r=navigator.userAgent.includes("Mac"),n={Ctrl:r?"":"Ctrl",Alt:r?"":"Alt",Shift:r?"":"Shift",ShortKey:r?"":"Ctrl",Meta:r?"":"",Backspace:r?"":"Backspace",Plus:"+",Minus:"-",Space:"",ArrowRight:"",ArrowLeft:""};return e.map((t=>`<div class="quill-shortcuts-popup__key">${t in n?n[t]:t}</div>`)).join("")}}},!0),t.ZP.table={requiredTableFormats:i().requiredTableFormats,keyboardBindings:i().keyboardBindings,selectorsForExclude:i().selectorsForExclude},window.katex=ei,window.Quill=t.ZP;const Wo=t.ZP})()})();