OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
openproject/app/assets/javascripts/vendor/ckeditor/ckeditor.js

5 lines
618 KiB

/**
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md.
*/
(function(e){e.en=Object.assign(e.en||{},{a:'Cannot upload file:',b:'Bold',c:'image widget',d:'Block quote',e:'Italic',f:'Enter image caption',g:'Choose heading',h:'Heading',i:'Full size image',j:'Side image',k:'Left aligned image',l:'Centered image',m:'Right aligned image',n:'Insert image',o:'Upload failed',p:'Link',q:'Numbered List',r:'Bulleted List',s:'Upload in progress',t:'Change image text alternative',u:'Rich Text Editor',v:'Rich Text Editor, %0',w:'Undo',x:'Redo',y:'Save',z:'Cancel',aa:'Text alternative',ab:'Unlink',ac:'Edit link',ad:'Open link in new tab',ae:'This link has no URL',af:'Link URL',ag:'Paragraph',ah:'Heading 1',ai:'Heading 2',aj:'Heading 3'})})(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})),function(e,t){'object'==typeof exports&&'object'==typeof module?module.exports=t():'function'==typeof define&&define.amd?define([],t):'object'==typeof exports?exports.BalloonEditor=t():e.BalloonEditor=t()}('undefined'==typeof self?this:self,function(){var e=Math.min,t=Math.floor,n=String.fromCharCode;return function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e['default']}:function(){return e};return t.d(n,'a',n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p='',t(t.s=23)}([function(e,t,o){'use strict';function r(e){return Object.prototype.toString.call(e)}function i(e,t){return c.call(e,t)}function a(e){return!(55296<=e&&57343>=e)&&!(64976<=e&&65007>=e)&&65535!=(65535&e)&&65534!=(65535&e)&&!(0<=e&&8>=e)&&11!==e&&!(14<=e&&31>=e)&&!(127<=e&&159>=e)&&!(1114111<e)}function s(e){if(65535<e){e-=65536;var t=55296+(e>>10),o=56320+(1023&e);return n(t,o)}return n(e)}function l(e,t){var n=0;return i(h,t)?h[t]:35===t.charCodeAt(0)&&g.test(t)&&(n='x'===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10),a(n))?s(n):e}function d(e){return _[e]}var c=Object.prototype.hasOwnProperty,p=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,u=/&([a-z#][a-z0-9]{1,31});/gi,m=new RegExp(p.source+'|'+u.source,'gi'),g=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,h=o(15),f=/[&<>"]/,b=/[&<>"]/g,_={"&":'&amp;',"<":'&lt;',">":'&gt;','"':'&quot;'},k=/[.?*+^$[\]\\(){}|-]/g,w=o(6);t.lib={},t.lib.mdurl=o(16),t.lib.ucmicro=o(111),t.assign=function(e){var t=Array.prototype.slice.call(arguments,1);return t.forEach(function(t){if(t){if('object'!=typeof t)throw new TypeError(t+'must be object');Object.keys(t).forEach(function(n){e[n]=t[n]})}}),e},t.isString=function(e){return'[object String]'===r(e)},t.has=i,t.unescapeMd=function(e){return 0>e.indexOf('\\')?e:e.replace(p,'$1')},t.unescapeAll=function(e){return 0>e.indexOf('\\')&&0>e.indexOf('&')?e:e.replace(m,function(e,t,n){return t?t:l(e,n)})},t.isValidEntityCode=a,t.fromCodePoint=s,t.escapeHtml=function(e){return f.test(e)?e.replace(b,d):e},t.arrayReplaceAt=function(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))},t.isSpace=function(e){return!(9!==e&&32!==e)},t.isWhiteSpace=function(e){if(8192<=e&&8202>=e)return!0;return!(9!==e&&10!==e&&11!==e&&12!==e&&13!==e&&32!==e&&160!==e&&5760!==e&&8239!==e&&8287!==e&&12288!==e)},t.isMdAsciiPunct=function(e){return!(33!==e&&34!==e&&35!==e&&36!==e&&37!==e&&38!==e&&39!==e&&40!==e&&41!==e&&42!==e&&43!==e&&44!==e&&45!==e&&46!==e&&47!==e&&58!==e&&59!==e&&60!==e&&61!==e&&62!==e&&63!==e&&64!==e&&91!==e&&92!==e&&93!==e&&94!==e&&95!==e&&96!==e&&123!==e&&124!==e&&125!==e&&126!==e)},t.isPunctChar=function(e){return w.test(e)},t.escapeRE=function(e){return e.replace(k,'\\$&')},t.normalizeReference=function(e){return e.trim().replace(/\s+/g,' ').toUpperCase()}},function(e,t,n){function o(e,t){for(var n=0;n<e.length;n++){var o=e[n],r=g[o.id];if(r){r.refs++;for(var i=0;i<r.parts.length;i++)r.parts[i](o.parts[i]);for(;i<o.parts.length;i++)r.parts.push(c(o.parts[i],t))}else{for(var a=[],i=0;i<o.parts.length;i++)a.push(c(o.parts[i],t));g[o.id]={id:o.id,refs:1,parts:a}}}}function r(e,t){for(var n=[],o={},r=0;r<e.length;r++){var i=e[r],a=t.base?i[0]+t.base:i[0],s=i[1],l=i[2],d=i[3],c={css:s,media:l,sourceMap:d};o[a]?o[a].parts.push(c):n.push(o[a]={id:a,parts:[c]})}return n}function i(e,t){var n=b(e.insertInto);if(!n)throw new Error('Couldn\'t find a style target. This probably means that the value for the \'insertInto\' parameter is invalid.');var o=w[w.length-1];if('top'===e.insertAt)o?o.nextSibling?n.insertBefore(t,o.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),w.push(t);else if('bottom'===e.insertAt)n.appendChild(t);else if('object'==typeof e.insertAt&&e.insertAt.before){var r=b(e.insertInto+' '+e.insertAt.before);n.insertBefore(t,r)}else throw new Error('[Style Loader]\n\n Invalid value for parameter \'insertAt\' (\'options.insertAt\') found.\n Must be \'top\', \'bottom\', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n')}function a(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var t=w.indexOf(e);0<=t&&w.splice(t,1)}function s(e){var t=document.createElement('style');return e.attrs.type='text/css',d(t,e.attrs),i(e,t),t}function l(e){var t=document.createElement('link');return e.attrs.type='text/css',e.attrs.rel='stylesheet',d(t,e.attrs),i(e,t),t}function d(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function c(e,t){var n,o,r,i;if(t.transform&&e.css)if(i=t.transform(e.css),i)e.css=i;else return function(){};if(t.singleton){var d=k++;n=_||(_=s(t)),o=p.bind(null,n,d,!1),r=p.bind(null,n,d,!0)}else e.sourceMap&&'function'==typeof URL&&'function'==typeof URL.createObjectURL&&'function'==typeof URL.revokeObjectURL&&'function'==typeof Blob&&'function'==typeof btoa?(n=l(t),o=m.bind(null,n,t),r=function(){a(n),n.href&&URL.revokeObjectURL(n.href)}):(n=s(t),o=u.bind(null,n),r=function(){a(n)});return o(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;o(e=t)}else r()}}function p(e,t,n,o){var r=n?'':o.css;if(e.styleSheet)e.styleSheet.cssText=v(t,r);else{var i=document.createTextNode(r),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}function u(e,t){var n=t.css,o=t.media;if(o&&e.setAttribute('media',o),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function m(e,t,n){var o=n.css,r=n.sourceMap,i=t.convertToAbsoluteUrls===void 0&&r;(t.convertToAbsoluteUrls||i)&&(o=y(o)),r&&(o+='\n/*# sourceMappingURL=data:application/json;base64,'+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+' */');var a=new Blob([o],{type:'text/css'}),s=e.href;e.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}var g={},h=function(e){var t;return function(){return'undefined'==typeof t&&(t=e.apply(this,arguments)),t}}(function(){return window&&document&&document.all&&!window.atob}),f=function(e){return document.querySelector(e)},b=function(){var e={};return function(t){if('function'==typeof t)return t();if('undefined'==typeof e[t]){var n=f.call(this,t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}}(),_=null,k=0,w=[],y=n(29);e.exports=function(e,t){if('undefined'!=typeof DEBUG&&DEBUG&&'object'!=typeof document)throw new Error('The style-loader cannot be used in a non-browser environment');t=t||{},t.attrs='object'==typeof t.attrs?t.attrs:{},t.singleton||'boolean'==typeof t.singleton||(t.singleton=h()),t.insertInto||(t.insertInto='head'),t.insertAt||(t.insertAt='bottom');var n=r(e,t);return o(n,t),function(e){for(var a=[],s=0;s<n.length;s++){var i=n[s],l=g[i.id];l.refs--,a.push(l)}if(e){var d=r(e,t);o(d,t)}for(var s=0,l;s<a.length;s++)if(l=a[s],0===l.refs){for(var c=0;c<l.parts.length;c++)l.parts[c]();delete g[l.id]}}};var v=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join('\n')}}()},function(e,t,n){'use strict';(function(e,o){var r=n(24),i={function:!0,object:!0},a=i[typeof exports]&&exports&&!exports.nodeType?exports:void 0,s=i[typeof e]&&e&&!e.nodeType?e:void 0,l=Object(r.a)(a&&s&&'object'==typeof o&&o),d=Object(r.a)(i[typeof self]&&self),c=Object(r.a)(i[typeof window]&&window),p=Object(r.a)(i[typeof this]&&this),u=l||c!==(p&&p.window)&&c||d||p||Function('return this')();t.a=u}).call(t,n(4)(e),n(5))},function(e,t,n){'use strict';(function(e,o){var r=n(100),i={function:!0,object:!0},a=i[typeof exports]&&exports&&!exports.nodeType?exports:void 0,s=i[typeof e]&&e&&!e.nodeType?e:void 0,l=Object(r.a)(a&&s&&'object'==typeof o&&o),d=Object(r.a)(i[typeof self]&&self),c=Object(r.a)(i[typeof window]&&window),p=Object(r.a)(i[typeof this]&&this),u=l||c!==(p&&p.window)&&c||d||p||Function('return this')();t.a=u}).call(t,n(4)(e),n(5))},function(e){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,'loaded',{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,'id',{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,'exports',{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e){var t=function(){return this}();try{t=t||Function('return this')()||(1,eval)('this')}catch(n){'object'==typeof window&&(t=window)}e.exports=t},function(e){e.exports=/[!-#%-\*,-/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E49\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/},function(e){'use strict';function t(){this.__rules__=[],this.__cache__=null}t.prototype.__find__=function(e){for(var t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1},t.prototype.__compile__=function(){var e=this,t=[''];e.__rules__.forEach(function(e){e.enabled&&e.alt.forEach(function(e){0>t.indexOf(e)&&t.push(e)})}),e.__cache__={},t.forEach(function(t){e.__cache__[t]=[],e.__rules__.forEach(function(n){!n.enabled||t&&0>n.alt.indexOf(t)||e.__cache__[t].push(n.fn)})})},t.prototype.at=function(e,t,n){var o=this.__find__(e);if(-1===o)throw new Error('Parser rule not found: '+e);this.__rules__[o].fn=t,this.__rules__[o].alt=(n||{}).alt||[],this.__cache__=null},t.prototype.before=function(e,t,n,o){var r=this.__find__(e);if(-1===r)throw new Error('Parser rule not found: '+e);this.__rules__.splice(r,0,{name:t,enabled:!0,fn:n,alt:(o||{}).alt||[]}),this.__cache__=null},t.prototype.after=function(e,t,n,o){var r=this.__find__(e);if(-1===r)throw new Error('Parser rule not found: '+e);this.__rules__.splice(r+1,0,{name:t,enabled:!0,fn:n,alt:(o||{}).alt||[]}),this.__cache__=null},t.prototype.push=function(e,t,n){this.__rules__.push({name:e,enabled:!0,fn:t,alt:(n||{}).alt||[]}),this.__cache__=null},t.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);var n=[];return e.forEach(function(e){var o=this.__find__(e);if(0>o){if(t)return;throw new Error('Rules manager: invalid rule name '+e)}this.__rules__[o].enabled=!0,n.push(e)},this),this.__cache__=null,n},t.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(e){e.enabled=!1}),this.enable(e,t)},t.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);var n=[];return e.forEach(function(e){var o=this.__find__(e);if(0>o){if(t)return;throw new Error('Rules manager: invalid rule name '+e)}this.__rules__[o].enabled=!1,n.push(e)},this),this.__cache__=null,n},t.prototype.getRules=function(e){return null===this.__cache__&&this.__compile__(),this.__cache__[e]||[]},e.exports=t},function(e){'use strict';function t(e,t,n){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content='',this.markup='',this.info='',this.meta=null,this.block=!1,this.hidden=!1}t.prototype.attrIndex=function(e){var t,n,o;if(!this.attrs)return-1;for(t=this.attrs,n=0,o=t.length;n<o;n++)if(t[n][0]===e)return n;return-1},t.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]},t.prototype.attrSet=function(e,t){var n=this.attrIndex(e),o=[e,t];0>n?this.attrPush(o):this.attrs[n]=o},t.prototype.attrGet=function(e){var t=this.attrIndex(e),n=null;return 0<=t&&(n=this.attrs[t][1]),n},t.prototype.attrJoin=function(e,t){var n=this.attrIndex(e);0>n?this.attrPush([e,t]):this.attrs[n][1]=this.attrs[n][1]+' '+t},e.exports=t},function(e){e.exports='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M6.972 16.615a.997.997 0 0 1-.744-.292l-4.596-4.596a1 1 0 1 1 1.414-1.414l3.926 3.926 9.937-9.937a1 1 0 0 1 1.414 1.415L7.717 16.323a.997.997 0 0 1-.745.292z" fill="#000" fill-rule="evenodd"/></svg>'},function(e){e.exports='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M11.591 10.177l4.243 4.242a1 1 0 0 1-1.415 1.415l-4.242-4.243-4.243 4.243a1 1 0 0 1-1.414-1.415l4.243-4.242L4.52 5.934A1 1 0 0 1 5.934 4.52l4.243 4.243 4.242-4.243a1 1 0 1 1 1.415 1.414l-4.243 4.243z" fill="#000" fill-rule="evenodd"/></svg>'},function(e,t,n){var o=n(79);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path d="M18 4.5V3H2v1.5h16zm0 3V6h-5.674v1.5H18zm0 3V9h-5.674v1.5H18zm0 3V12h-5.674v1.5H18zm-8.5-6V12h-6V7.5h6zm.818-1.5H2.682C2.305 6 2 6.407 2 6.91v5.68c0 .503.305.91.682.91h7.636c.377 0 .682-.407.682-.91V6.91c0-.503-.305-.91-.682-.91zM18 16.5V15H2v1.5h16z" fill-rule="nonzero"/></svg>'},function(e){e.exports='<svg width="20" height="20" xmlns="http://www.w3.org/2000/svg"><g fill="#000" fill-rule="nonzero"><path d="M2 4.5V3h16v1.5zM6.5 7.5V12h7V7.5h-7zM5.758 6h8.484c.419 0 .758.407.758.91v5.681c0 .502-.34.909-.758.909H5.758c-.419 0-.758-.407-.758-.91V6.91c0-.503.34-.91.758-.91zM2 16.5V15h16v1.5z"/></g></svg>\n'},function(e){e.exports='<svg width="20" height="20" xmlns="http://www.w3.org/2000/svg"><g fill="#000" fill-rule="nonzero"><path d="M2 4.5V3h16v1.5zM2 7.5V6h5.674v1.5zM2 10.5V9h5.674v1.5zM2 13.5V12h5.674v1.5zM10.5 7.5V12h6V7.5h-6zM9.682 6h7.636c.377 0 .682.407.682.91v5.68c0 .503-.305.91-.682.91H9.682c-.377 0-.682-.407-.682-.91V6.91c0-.503.305-.91.682-.91zM2 16.5V15h16v1.5z"/></g></svg>\n'},function(e,t,n){'use strict';e.exports=n(106)},function(e,t,n){'use strict';e.exports.encode=n(107),e.exports.decode=n(108),e.exports.format=n(109),e.exports.parse=n(110)},function(e){e.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/},function(e){e.exports=/[\0-\x1F\x7F-\x9F]/},function(e){e.exports=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/},function(e){'use strict';var t=/^(?:<[A-Za-z][A-Za-z0-9\-]*(?:\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\s*=\s*(?:[^"'=<>`\x00-\x20]+|'[^']*'|"[^"]*"))?)*\s*\/?>|<\/[A-Za-z][A-Za-z0-9\-]*\s*>|<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->|<[?].*?[?]>|<![A-Z]+\s+[^>]*>|<!\[CDATA\[[\s\S]*?\]\]>)/,n=/^(?:<[A-Za-z][A-Za-z0-9\-]*(?:\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\s*=\s*(?:[^"'=<>`\x00-\x20]+|'[^']*'|"[^"]*"))?)*\s*\/?>|<\/[A-Za-z][A-Za-z0-9\-]*\s*>)/;e.exports.HTML_TAG_RE=t,e.exports.HTML_OPEN_CLOSE_TAG_RE=n},function(e){'use strict';e.exports.tokenize=function(e,t){var o=e.pos,r=e.src.charCodeAt(o),a,s,l,d,c;if(t)return!1;if(126!==r)return!1;if(s=e.scanDelims(e.pos,!0),d=s.length,c=n(r),2>d)return!1;for(d%2&&(l=e.push('text','',0),l.content=c,d--),a=0;a<d;a+=2)l=e.push('text','',0),l.content=c+c,e.delimiters.push({marker:r,jump:a,token:e.tokens.length-1,level:e.level,end:-1,open:s.can_open,close:s.can_close});return e.pos+=s.length,!0},e.exports.postProcess=function(e){var t=[],n=e.delimiters,o=e.delimiters.length,r,i,a,s,l;for(r=0;r<o;r++)(a=n[r],126===a.marker)&&-1!==a.end&&(s=n[a.end],l=e.tokens[a.token],l.type='s_open',l.tag='s',l.nesting=1,l.markup='~~',l.content='',l=e.tokens[s.token],l.type='s_close',l.tag='s',l.nesting=-1,l.markup='~~',l.content='','text'===e.tokens[s.token-1].type&&'~'===e.tokens[s.token-1].content&&t.push(s.token-1));for(;t.length;){for(r=t.pop(),i=r+1;i<e.tokens.length&&'s_close'===e.tokens[i].type;)i++;i--,r!==i&&(l=e.tokens[i],e.tokens[i]=e.tokens[r],e.tokens[r]=l)}}},function(e){'use strict';e.exports.tokenize=function(e,t){var o=e.pos,r=e.src.charCodeAt(o),a,s,l;if(t)return!1;if(95!==r&&42!==r)return!1;for(s=e.scanDelims(e.pos,42===r),a=0;a<s.length;a++)l=e.push('text','',0),l.content=n(r),e.delimiters.push({marker:r,length:s.length,jump:a,token:e.tokens.length-1,level:e.level,end:-1,open:s.can_open,close:s.can_close});return e.pos+=s.length,!0},e.exports.postProcess=function(e){var t=e.delimiters,o=e.delimiters.length,r,i,a,s,l,d;for(r=o-1;0<=r;r--)(i=t[r],95===i.marker||42===i.marker)&&-1!==i.end&&(a=t[i.end],d=0<r&&t[r-1].end===i.end+1&&t[r-1].token===i.token-1&&t[i.end+1].token===a.token+1&&t[r-1].marker===i.marker,l=n(i.marker),s=e.tokens[i.token],s.type=d?'strong_open':'em_open',s.tag=d?'strong':'em',s.nesting=1,s.markup=d?l+l:l,s.content='',s=e.tokens[a.token],s.type=d?'strong_close':'em_close',s.tag=d?'strong':'em',s.nesting=-1,s.markup=d?l+l:l,s.content='',d&&(e.tokens[t[r-1].token].content='',e.tokens[t[i.end+1].token].content='',r--))}},function(o,r,i){'use strict';function a(e){const t=e.match(/^([^:]+):/);return t?e+` Read more: ${fd}#error-${t[1]}\n`:e}function s(){let e='e';for(let n=0;8>n;n++)e+=t(65536*(1+Math.random())).toString(16).substring(1);return e}function l(e,t){return e[vd]&&e[vd][t]?e[vd][t].emitter:null}function d(e,t){e[xd]||(e[xd]=t||s())}function c(e){return e[xd]}function p(e){return e._events||Object.defineProperty(e,'_events',{value:{}}),e._events}function u(){return{callbacks:[],childEvents:[]}}function m(e,t){const n=p(e);if(n[t])return;let o=t,r=null;const i=[];for(;''!==o&&!n[o];)n[o]=u(),i.push(n[o]),r&&n[o].childEvents.push(r),r=o,o=o.substr(0,o.lastIndexOf(':'));if(''!==o){for(const e of i)e.callbacks=n[o].callbacks.slice();n[o].childEvents.push(r)}}function g(e,t){const n=p(e)[t];if(!n)return[];let o=[n.callbacks];for(let r=0;r<n.childEvents.length;r++){const t=g(e,n.childEvents[r]);o=o.concat(t)}return o}function h(e,t){let n;return e._events&&(n=e._events[t])&&n.callbacks.length?n.callbacks:-1<t.indexOf(':')?h(e,t.substr(0,t.lastIndexOf(':'))):null}function f(e,t,n){for(let[o,r]of e){r?'function'==typeof r&&(r=r(t.name)):r=t.name;const e=new kd(t.source,r);e.path=[...t.path],o.fire(e,...n)}}function b(e,t,n){const o=g(e,t);for(const r of o)for(let e=0;e<r.length;e++)r[e].callback==n&&(r.splice(e,1),e--)}function _(e,...t){t.forEach((t)=>{Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t)).forEach((n)=>{if(!(n in e.prototype)){const o=Object.getOwnPropertyDescriptor(t,n);o.enumerable=!1,Object.defineProperty(e.prototype,n,o)}})})}function k(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}function w(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}function y(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}function v(e){this.__data__=new Rd(e)}function x(e,t,n){var o=e[t];sc.call(e,t)&&Td(o,n)&&(n!==void 0||t in e)||(e[t]=n)}function C(e,t){return pc.call(e,t)||'object'==typeof e&&t in e&&null===ad(e)}function A(e){return qc(Object(e))}function T(e){return ap.call(e)}function E(e,t,n,o,r,i,a){var s;if(o&&(s=i?o(e,r,i,a):o(e)),void 0!==s)return s;if(!Od(e))return e;var l=Ec(e);if(!l){var d=up(e),c=d==zp||d==jp;if(Object(Bp.a)(e))return Mc(e,t);if(d==Up||d==qp||c&&!i){if(sd(e))return i?e:{};if(s=Mp(c?{}:e),!t)return jc(e,Fc(s,e))}else{if(!Hp[d])return i?e:{};s=Lp(e,d,E,t)}}else if(s=hp(e),!t)return Bc(e,s);a||(a=new rc);var p=a.get(e);if(p)return p;if(a.set(e,s),!l)var u=n?Wc(e):Dc(e);return ic(u||e,function(r,i){u&&(i=r,r=e[i]),lc(s,i,E(r,t,n,o,i,e,a))}),s}function P(t,n){const o=e(t.length,n.length);for(let e=0;e<o;e++)if(t[e]!=n[e])return e;return t.length==n.length?'same':t.length<n.length?'prefix':'extension'}function S(e){const t=new Map;for(const n in e)t.set(n,e[n]);return t}function R(e){return!!(e&&e[Symbol.iterator])}function O(e,t){if('function'==typeof t)return t(e);const n={};return t.name&&(n.name=I(t.name,e.name),!n.name)?null:t.attributes&&(n.attributes=N(t.attributes,e),!n.attributes)?null:!(t.classes&&(n.classes=V(t.classes,e),!n.classes))&&!(t.styles&&(n.styles=L(t.styles,e),!n.styles))&&n}function I(e,t){return e instanceof RegExp?e.test(t):e===t}function N(e,t){const n=[];for(const o in e){const r=e[o];if(t.hasAttribute(o)){const e=t.getAttribute(o);if(!0===r)n.push(o);else if(r instanceof RegExp){if(r.test(e))n.push(o);else return null;}else if(e===r)n.push(o);else return null}else return null}return n}function V(e,t){const n=[];for(const o of e)if(o instanceof RegExp){const e=t.getClassNames();for(const t of e)o.test(t)&&n.push(t);if(0===n.length)return null}else if(t.hasClass(o))n.push(o);else return null;return n}function L(e,t){const n=[];for(const o in e){const r=e[o];if(t.hasStyle(o)){const e=t.getStyle(o);if(r instanceof RegExp){if(r.test(e))n.push(o);else return null;}else if(e===r)n.push(o);else return null}else return null}return n}function D(e){e=gd(e)?S(e):new Map(e);for(const[t,n]of e)null===n?e.delete(t):'string'!=typeof n&&e.set(t,n+'');return e}function F(e,t){let n=null,o=0,r=0,a=null;if(e.clear(),''!==t){';'!=t.charAt(t.length-1)&&(t+=';');for(let s=0;s<t.length;s++){const i=t.charAt(s);if(null===n)switch(i){case':':a||(a=t.substr(o,s-o),r=s+1);break;case'"':case'\'':n=i;break;case';':const l=t.substr(r,s-r);a&&e.set(a.trim(),l.trim()),a=null,o=s+1;}else i===n&&(n=null)}}}function M(e,t){const n=t.split(/\s+/);e.clear(),n.forEach((t)=>e.add(t))}function B(e){return'string'==typeof e?[new Kp(e)]:(R(e)||(e=[e]),Array.from(e).map((e)=>'string'==typeof e?new Kp(e):e instanceof Zp?new Kp(e.data):e))}function q(){for(const e of this.getChildren())if(!e.is('uiElement'))return null;return this.childCount}function z(e,t,n){if(!Od(n))return!1;var o=typeof t;return!('number'==o?!(kc(n)&&Nc(t,n.length)):!('string'==o&&t in n))&&Td(n[t],e)}function j(e){e=null==e?e:Object(e);var t=[];for(var n in e)t.push(n);return t}function U(e){Ou in e||(Object.defineProperty(e,Ou,{value:new Map}),Object.defineProperty(e,Iu,{value:new Map}),Object.defineProperty(e,Nu,{value:new Map}))}function H(...e){const t=K(...e),n=Array.from(this._bindings.keys()),o=n.length;if(!t.callback&&1<t.to.length)throw new bd('observable-bind-to-no-callback: Binding multiple observables only possible with callback.');if(1<o&&t.callback)throw new bd('observable-bind-to-extra-callback: Cannot bind multiple properties and use a callback in one binding.');t.to.forEach((e)=>{if(e.properties.length&&e.properties.length!==o)throw new bd('observable-bind-to-properties-length: The number of properties must match.');e.properties.length||(e.properties=this._bindProperties)}),this._to=t.to,t.callback&&(this._bindings.get(n[0]).callback=t.callback),Q(this._observable,this._to),J(this),this._bindProperties.forEach((e)=>{Y(this._observable,e)})}function W(e,t,n){if(1<this._bindings.size)throw new bd('observable-bind-to-many-not-one-binding: Cannot bind multiple properties with toMany().');this.to(...G(e,t),n)}function G(e,t){const n=e.map((e)=>[e,t]);return Array.prototype.concat.apply([],n)}function $(e){return e.every((e)=>'string'==typeof e)}function K(...e){if(!e.length)throw new bd('observable-bind-to-parse-error: Invalid argument syntax in `to()`.');const t={to:[]};let n;return'function'==typeof e[e.length-1]&&(t.callback=e.pop()),e.forEach((e)=>{if('string'==typeof e)n.properties.push(e);else if('object'==typeof e)n={observable:e,properties:[]},t.to.push(n);else throw new bd('observable-bind-to-parse-error: Invalid argument syntax in `to()`.')}),t}function Z(e,t,n,o){const r=e[Iu],i=r.get(n),a=i||{};a[o]||(a[o]=new Set),a[o].add(t),i||r.set(n,a)}function J(e){let t;e._bindings.forEach((n,o)=>{e._to.forEach((r)=>{t=r.properties[n.callback?0:e._bindProperties.indexOf(o)],n.to.push([r.observable,t]),Z(e._observable,n,r.observable,t)})})}function Y(e,t){const n=e[Nu],o=n.get(t);let r;o.callback?r=o.callback.apply(e,o.to.map((e)=>e[0][e[1]])):(r=o.to[0],r=r[0][r[1]]),e.hasOwnProperty(t)?e[t]=r:e.set(t,r)}function Q(e,t){t.forEach((t)=>{const n=e[Iu];let o;n.get(t.observable)||e.listenTo(t.observable,'change',(r,i)=>{o=n.get(t.observable)[i],o&&o.forEach((t)=>{Y(e,t.property)})})})}function X(e){return!!(e.item.is('attributeElement')||e.item.is('uiElement'))}function ee(e){let t=0;for(const n of e)t++;return t}function te(){if(ne(this))return null;let e=this.parent;for(;e&&e.is('attributeElement');){if(1<ne(e))return null;e=e.parent}return!e||1<ne(e)?null:this.childCount}function ne(e){return Array.from(e.getChildren()).filter((e)=>!e.is('uiElement')).length}function oe(){return null}function re(e){let t;if('string'!=typeof e)t=e.keyCode+(e.altKey?tm.alt:0)+(e.ctrlKey?tm.ctrl:0)+(e.shiftKey?tm.shift:0);else if(t=tm[e.toLowerCase()],!t)throw new bd('keyboard-unknown-key: Unknown key name.',{key:e});return t}function ie(e){return'string'==typeof e&&(e=se(e)),e.map((e)=>'string'==typeof e?re(e):e).reduce((e,t)=>t+e,0)}function ae(e){return Qu.isMac?se(e).map((e)=>em[e.toLowerCase()]||e).reduce((e,t)=>e.slice(-1)in Xu?e+t:e+'+'+t):e}function se(e){return e.split(/\s*\+\s*/)}function le(e){e.document.on('keydown',(t,n)=>ce(t,n,e.domConverter))}function de(){return null}function ce(e,t,n){if(t.keyCode==tm.arrowright){const e=t.domTarget.ownerDocument.defaultView.getSelection(),o=1==e.rangeCount&&e.getRangeAt(0).collapsed;if(o||t.shiftKey){const t=e.focusNode,r=e.focusOffset,i=n.domPositionToView(t,r);if(null===i)return;let a=!1;const s=i.getLastMatchingPosition((e)=>(e.item.is('uiElement')&&(a=!0),!!(e.item.is('uiElement')||e.item.is('attributeElement'))));if(a){const t=n.viewPositionToDom(s);o?e.collapse(t.parent,t.offset):e.extend(t.parent,t.offset)}}}}function pe(e){return'string'==typeof e?[new Kp(e)]:(R(e)||(e=[e]),Array.from(e).map((e)=>'string'==typeof e?new Kp(e):e instanceof Zp?new Kp(e.data):e))}function ue(e){return Array.from(e.getChildren()).some((e)=>!e.is('uiElement'))}function me(e){let t=e.parent;for(;!we(t);){if(!t)return;t=t.parent}return t}function ge(e,t){if(e.priority<t.priority)return!0;return!(e.priority>t.priority)&&e.getIdentity()<t.getIdentity()}function he(e){const t=e.nodeBefore;if(t&&t.is('text'))return new zu(t,t.data.length);const n=e.nodeAfter;return n&&n.is('text')?new zu(n,0):e}function fe(e){if(e.offset==e.parent.data.length)return new zu(e.parent.parent,e.parent.index+1);if(0===e.offset)return new zu(e.parent.parent,e.parent.index);const t=e.parent.data.slice(e.offset);return e.parent._data=e.parent.data.slice(0,e.offset),e.parent.parent._insertChild(e.parent.index+1,new Kp(t)),new zu(e.parent.parent,e.parent.index+1)}function be(e,t){const n=e.data.length;return e._data+=t.data,t._remove(),new zu(e,n)}function _e(e){return e.start.parent==e.end.parent&&e.start.parent.is('attributeElement')&&0===e.start.offset&&e.end.offset===e.start.parent.childCount}function ke(e){for(const t of e){if(!im.some((e)=>t instanceof e))throw new bd('view-writer-insert-invalid-node');t.is('text')||ke(t.getChildren())}}function we(e){return e&&(e.is('containerElement')||e.is('documentFragment'))}function ye(e){const t=me(e.start),n=me(e.end);if(!t||!n||t!==n)throw new bd('view-writer-invalid-range-container')}function ve(e,t){return null===e.id&&null===t.id}function xe(e){return e instanceof Text&&e.data.substr(0,lm)===dm}function Ce(e){return e.data.length==lm&&xe(e)}function Ae(e){return xe(e)?e.data.slice(lm):e.data}function Te(e,t){let n=cm.get(t);return n||(n=t(window.document),cm.set(t,n)),e.isEqualNode(n)}function Ee(e){e.document.on('keydown',Pe)}function Pe(e,t){if(t.keyCode==tm.arrowleft){const e=t.domTarget.ownerDocument.defaultView.getSelection();if(1==e.rangeCount&&e.getRangeAt(0).collapsed){const t=e.getRangeAt(0).startContainer,n=e.getRangeAt(0).startOffset;xe(t)&&n<=lm&&e.collapse(t,0)}}}function Se(e,t,o){function r(n){const r=(c[n-1]===void 0?-1:c[n-1])+1,p=c[n+1]===void 0?-1:c[n+1],u=r>p?-1:1;d[n+u]&&(d[n]=d[n+u].slice(0)),d[n]||(d[n]=[]),d[n].push(r>p?i:a);let m=rd(r,p),g=m-n;for(;g<s&&m<l&&o(e[g],t[m]);)g++,m++,d[n].push('equal');return m}o=o||function(e,t){return e===t};let i,a;if(t.length<e.length){const n=e;e=t,t=n,i='delete',a='insert'}else i='insert',a='delete';const s=e.length,l=t.length,n=l-s,d={},c={};let u=0,m;do{for(m=-u;m<n;m++)c[m]=r(m);for(m=n+u;m>n;m--)c[m]=r(m);c[n]=r(n),u++}while(c[n]!==l);return d[n].slice(1)}function Re(e,t,n){e.insertBefore(n,e.childNodes[t]||null)}function Oe(e){const t=e.parentNode;t&&t.removeChild(e)}function Ie(e){return'[object Text]'==Object.prototype.toString.call(e)}function Ne(e){if('false'==e.getAttribute('contenteditable'))return!1;const t=e.findAncestor((e)=>e.hasAttribute('contenteditable'));return!t||'true'==t.getAttribute('contenteditable')}function Ve(e){let t=0;for(;e.previousSibling;)e=e.previousSibling,t++;return t}function Le(e){const t=[];for(;e&&e.nodeType!=Node.DOCUMENT_NODE;)t.unshift(e),e=e.parentNode;return t}function De(e,t){const n=Le(e),o=Le(t);let r=0;for(;n[r]==o[r]&&n[r];)r++;return 0==r?null:n[r-1]}function Fe(e,t,n){let o=Le(e);return n&&(o=o.slice(o.indexOf(n)+1)),o.some((e)=>e.tagName&&t.includes(e.tagName.toLowerCase()))}function Me(e,t){for(;e&&e!=um.document;)t(e),e=e.parentNode}function Be(e){if(e){if(e.defaultView)return e instanceof e.defaultView.Document;if(e.ownerDocument&&e.ownerDocument.defaultView)return e instanceof e.ownerDocument.defaultView.Node}return!1}function qe(e){return'[object Window]'==Object.prototype.toString.apply(e)}function ze(e){return e['data-ck-expando']||(e['data-ck-expando']=s())}function je(e){var t=-1,n=e?e.length:0;for(this.__data__=new oc;++t<n;)this.add(e[t])}function Ue(e,t,n,o,r,i){var a=r&Cm,s=Dc(e),l=s.length,d=Dc(t),c=d.length;if(l!=c&&!a)return!1;for(var p=l,u;p--;)if(u=s[p],a?!(u in t):!uc(t,u))return!1;var m=i.get(e);if(m)return m==t;var g=!0;i.set(e,t);for(var h=a;++p<l;){u=s[p];var f=e[u],b=t[u];if(o)var _=a?o(b,f,u,t,e,i):o(f,b,u,e,t,i);if(void 0===_?!(f===b||n(f,b,o,r,i)):!_){g=!1;break}h||(h='constructor'==u)}if(g&&!h){var k=e.constructor,w=t.constructor;k!=w&&'constructor'in e&&'constructor'in t&&!('function'==typeof k&&k instanceof k&&'function'==typeof w&&w instanceof w)&&(g=!1)}return i['delete'](e),g}function He(e,t,n,o,r){return!(e!==t)||(null!=e&&null!=t&&(Od(e)||ld(t))?Vm(e,t,He,n,o,r):e!==e&&t!==t)}function We(e,t,n){function o(t){var n=b,o=_;return b=_=void 0,m=t,w=e.apply(o,n),w}function r(e){return m=e,y=setTimeout(s,t),g?o(e):w}function i(e){var n=e-u,o=e-m,r=t-n;return h?Wm(r,k-o):r}function a(e){var n=e-u,o=e-m;return!u||n>=t||0>n||h&&o>=k}function s(){var e=jm();return a(e)?l(e):void(y=setTimeout(s,i(e)))}function l(e){return(clearTimeout(y),y=void 0,f&&b)?o(e):(b=_=void 0,w)}function d(){void 0!==y&&clearTimeout(y),u=m=0,b=_=y=void 0}function c(){return void 0===y?w:l(jm())}function p(){var e=jm(),n=a(e);if(b=arguments,_=this,u=e,n){if(void 0===y)return r(u);if(h)return clearTimeout(y),y=setTimeout(s,t),o(u)}return void 0===y&&(y=setTimeout(s,t)),w}var u=0,m=0,g=!1,h=!1,f=!0,b,_,k,w,y;if('function'!=typeof e)throw new TypeError(Um);return t=cu(t)||0,Od(n)&&(g=!!n.leading,h='maxWait'in n,k=h?Hm(cu(n.maxWait)||0,t):k,f='trailing'in n?!!n.trailing:f),p.cancel=d,p.flush=c,p}function Ge(e){return e==tm.arrowright||e==tm.arrowleft||e==tm.arrowup||e==tm.arrowdown}function $e(e){return'[object Range]'==Object.prototype.toString.apply(e)}function Ke(e){const t=e.ownerDocument.defaultView.getComputedStyle(e);return{top:parseInt(t.borderTopWidth,10),right:parseInt(t.borderRightWidth,10),bottom:parseInt(t.borderBottomWidth,10),left:parseInt(t.borderLeftWidth,10)}}function Ze(e,t){for(const n of tg)e[n]=t[n]}function Je(e){return!!Xm(e)&&e===e.ownerDocument.body}function Ye({target:e,viewportOffset:t=0}){const n=it(e);for(let o=n,r=null;o;){let i;i=o==n?at(e):at(r),Xe(i,()=>st(e,o));const a=st(e,o);Qe(o,a,t),o.parent==o?o=null:(r=o.frameElement,o=o.parent)}}function Qe(e,t,n){const o=t.clone().moveBy(0,n),r=t.clone().moveBy(0,-n),i=new eg(e).excludeScrollbarsAndBorders();if(![r,o].every((e)=>i.contains(e))){let{scrollX:a,scrollY:s}=e;tt(r,i)?s-=i.top-t.top+n:et(o,i)&&(s+=t.bottom-i.bottom+n),nt(t,i)?a-=i.left-t.left+n:rt(t,i)&&(a+=t.right-i.right+n),e.scrollTo(a,s)}}function Xe(e,t){const n=it(e);for(let o,r;e!=n.document.body;)r=t(),o=new eg(e).excludeScrollbarsAndBorders(),o.contains(r)||(tt(r,o)?e.scrollTop-=o.top-r.top:et(r,o)&&(e.scrollTop+=r.bottom-o.bottom),nt(r,o)?e.scrollLeft-=o.left-r.left:rt(r,o)&&(e.scrollLeft+=r.right-o.right)),e=e.parentNode}function et(e,t){return e.bottom>t.bottom}function tt(e,t){return e.top<t.top}function nt(e,t){return e.left<t.left}function rt(e,t){return e.right>t.right}function it(e){return $e(e)?e.startContainer.ownerDocument.defaultView:e.ownerDocument.defaultView}function at(e){if($e(e)){let t=e.commonAncestorContainer;return Ie(t)&&(t=t.parentNode),t}return e.parentNode}function st(e,t){const n=it(e),o=new eg(e);if(n===t)return o;for(let r=n;r!=t;){const e=r.frameElement,t=new eg(e).excludeScrollbarsAndBorders();o.moveBy(t.left,t.top),r=r.parent}return o}function lt(e){return gd(e)?S(e):new Map(e)}function dt(e){return'string'==typeof e?[new rg(e)]:(R(e)||(e=[e]),Array.from(e).map((e)=>'string'==typeof e?new rg(e):e instanceof ig?new rg(e.data,e.getAttributes()):e))}function ct(e,t,n,o,r){return{done:!1,value:{type:e,item:t,previousPosition:n,nextPosition:o,length:r}}}function pt(e){const t=e.split(':');return 1<t.length?t[0]+':'+t[1]:t[0]}function ut(e,t,n){const o=t.getRange(),r=Array.from(e.getAncestors());r.shift(),r.reverse();const i=r.some((e)=>{if(o.containsItem(e)){const t=n.toViewElement(e);return!!t.getCustomProperty('addHighlight')}});return!i}function mt(e,t){return!t.has(e)&&(t.add(e),e.document.model.schema.isBlock(e)&&e.parent)}function gt(e,t){const n=e.parent.getAncestors({parentFirst:!0,includeSelf:!0}),o=n.find((e)=>mt(e,t));return n.forEach((e)=>t.add(e)),o}function ht(){const e=new Set(['insert','move','remove','reinsert']);this.listenTo(this.root.document.model,'applyOperation',(t,n)=>{const o=n[0];!o.isDocumentOperation||e.has(o.type)&&ft.call(this,o)},{priority:'low'})}function ft(e){const t=e.type,n=e.delta.batch;let o,r;'insert'==t?o=pg.createFromPositionAndShift(e.position,e.nodes.maxOffset):(o=pg.createFromPositionAndShift(e.getMovedRangeStart(),e.howMany),r=e.sourcePosition);const i=o.end.offset-o.start.offset;let a=o.start;('move'==t||'remove'==t||'reinsert'==t)&&(a=a._getTransformedByInsertion(r,i));const s=this._getTransformedByDocumentChange(t,e.delta.type,a,i,r);('move'==t||'remove'==t||'reinsert'==t)&&3==s.length&&(s[2]=o);const l=pg.createFromRanges(s),d=!l.isEqual(this),c=this.containsPosition(a),p=r&&(this.containsPosition(r)||this.start.isEqual(r));if(d){const e=pg.createFromRange(this);this.start=l.start,this.end=l.end,this.fire('change:range',e,{type:t,batch:n,range:o,sourcePosition:r})}else(c||p)&&this.fire('change:content',pg.createFromRange(this),{type:t,batch:n,range:o,sourcePosition:r})}function bt(e){return e instanceof ig||e instanceof rg?e.getAttributes():null}function _t(e,t){const n=e.document.differ;for(const o of n.getChanges()){if('insert'!=o.type)continue;const n=o.position.parent,r=o.length===n.maxOffset;r&&e.enqueueChange(t,(e)=>{const t=Array.from(n.getAttributeKeys()).filter((e)=>e.startsWith(bg));for(const o of t)e.removeAttribute(o,n)})}}function kt(e){return e=wg(e),e.view=vt(e.view,'container'),(t)=>{t.on('insert:'+e.model,Tt(e.view),{priority:e.priority||'normal'})}}function wt(e){e=wg(e);const t=e.model.key?e.model.key:e.model;let n='attribute:'+t;if(e.model.name&&(n+=':'+e.model.name),e.model.values)for(const t of e.model.values)e.view[t]=vt(e.view[t],'attribute');else e.view=vt(e.view,'attribute');const o=Ct(e);return(t)=>{t.on(n,Rt(o),{priority:e.priority||'normal'})}}function yt(e){e=wg(e);const t=e.model.key?e.model.key:e.model;let n='attribute:'+t;if(e.model.name&&(n+=':'+e.model.name),e.model.values)for(const t of e.model.values)e.view[t]=At(e.view[t]);else e.view=At(e.view);const o=Ct(e);return(t)=>{t.on(n,St(o),{priority:e.priority||'normal'})}}function vt(e,t){return'function'==typeof e?e:(n,o)=>xt(e,o,t)}function xt(e,t,n){'string'==typeof e&&(e={name:e});let o;if(o='container'==n?t.createContainerElement(e.name,Object.assign({},e.attributes)):'attribute'==n?t.createAttributeElement(e.name,Object.assign({},e.attributes)):t.createUIElement(e.name,Object.assign({},e.attributes)),e.styles){const n=Object.keys(e.styles);for(const r of n)t.setStyle(r,e.styles[r],o)}if(e.classes){const n=e.classes;if('string'==typeof n)t.addClass(n,o);else for(const e of n)t.addClass(e,o)}return o}function Ct(e){return e.model.values?(t,n)=>{const o=e.view[t];return o?o(t,n):null}:e.view}function At(e){return'string'==typeof e?(t)=>({key:e,value:t}):'object'==typeof e?e.value?()=>e:(t)=>({key:e.key,value:t}):e}function Tt(e){return(t,n,o)=>{const r=e(n.item,o.writer);if(r&&o.consumable.consume(n.item,'insert')){const e=o.mapper.toViewPosition(n.range.start);o.mapper.bindElements(n.item,r),o.writer.insert(e,r)}}}function Et(){return(e,t,n)=>{if(n.consumable.consume(t.item,'insert')){const e=n.writer,o=n.mapper.toViewPosition(t.range.start),r=e.createText(t.item.data);e.insert(o,r)}}}function Pt(){return(e,t,n)=>{const o=n.mapper.toViewPosition(t.position),r=t.position.getShiftedBy(t.length),i=n.mapper.toViewPosition(r,{isPhantom:!0}),a=new ju(o,i),s=n.writer.remove(a.getTrimmed());for(const o of ju.createIn(s).getItems())n.mapper.unbindViewElement(o)}}function St(e){return e=e||((e,t)=>({value:e,key:t.attributeKey})),(t,n,o)=>{const r=e(n.attributeOldValue,n),i=e(n.attributeNewValue,n);if((r||i)&&o.consumable.consume(n.item,t.name)){const e=o.mapper.toViewElement(n.item),t=o.writer;if(null!==n.attributeOldValue&&r)if('class'==r.key){const n=Array.isArray(r.value)?r.value:[r.value];for(const o of n)t.removeClass(o,e)}else if('style'==r.key){const n=Object.keys(r.value);for(const o of n)t.removeStyle(o,e)}else t.removeAttribute(r.key,e);if(null!==n.attributeNewValue&&i)if('class'==i.key){const n=Array.isArray(i.value)?i.value:[i.value];for(const o of n)t.addClass(o,e)}else if('style'==i.key){const n=Object.keys(i.value);for(const o of n)t.setStyle(o,i.value[o],e)}else t.setAttribute(i.key,i.value,e)}}}function Rt(e){return(t,n,o)=>{const r=e(n.attributeOldValue,o.writer),i=e(n.attributeNewValue,o.writer);if((r||i)&&o.consumable.consume(n.item,t.name)){const e=o.writer,t=e.document.selection;if(n.item instanceof hg||n.item instanceof _g)e.wrap(t.getFirstRange(),i);else{let t=o.mapper.toViewRange(n.range);null!==n.attributeOldValue&&r&&(t=e.unwrap(t,r)),null!==n.attributeNewValue&&i&&e.wrap(t,i)}}}}function Ot(e,t){return(n,o)=>{const r=o.newSelection,i=new hg,a=[];for(const e of r.getRanges())a.push(t.toModelRange(e));i.setTo(a,{backward:r.isBackward}),i.isEqual(e.document.selection)||e.change((e)=>{e.setSelection(i)})}}function It(){return(e,t,n)=>{const o=t.selection;if(!o.isCollapsed&&n.consumable.consume(o,'selection')){const e=[];for(const t of o.getRanges()){const o=n.mapper.toViewRange(t);e.push(o)}n.writer.setSelection(e,{backward:o.isBackward})}}}function Nt(){return(e,t,n)=>{const o=t.selection;if(o.isCollapsed&&n.consumable.consume(o,'selection')){const e=n.writer,t=o.getFirstPosition(),r=n.mapper.toViewPosition(t),i=e.breakAttributes(r);e.setSelection(i)}}}function Vt(){return(e,t,n)=>{const o=n.writer,r=o.document.selection;for(const o of r.getRanges())o.isCollapsed&&o.end.parent.document&&n.writer.mergeAttributes(o.start);o.setSelection(null)}}function Lt(e,t){const n=Ft();if(1===n&&(e=Object.keys(window.CKEDITOR_TRANSLATIONS)[0]),0===n||!Dt(e,t))return t.replace(/ \[context: [^\]]+\]$/,'');const o=window.CKEDITOR_TRANSLATIONS[e];return o[t].replace(/ \[context: [^\]]+\]$/,'')}function Dt(e,t){return e in window.CKEDITOR_TRANSLATIONS&&t in window.CKEDITOR_TRANSLATIONS[e]}function Ft(){return Object.keys(window.CKEDITOR_TRANSLATIONS).length}function Mt(e,t){const n={name:t,allowIn:[],allowContentOf:[],allowWhere:[],allowAttributes:[],allowAttributesOf:[],inheritTypesFrom:[]};return Wt(e,n),Gt(e,n,'allowIn'),Gt(e,n,'allowContentOf'),Gt(e,n,'allowWhere'),Gt(e,n,'allowAttributes'),Gt(e,n,'allowAttributesOf'),Gt(e,n,'inheritTypesFrom'),$t(e,n),n}function Bt(e,t){for(const n of e[t].allowContentOf)if(e[n]){const o=Kt(e,n);o.forEach((e)=>{e.allowIn.push(t)})}delete e[t].allowContentOf}function qt(e,t){for(const n of e[t].allowWhere){const o=e[n];if(o){const n=o.allowIn;e[t].allowIn.push(...n)}}delete e[t].allowWhere}function zt(e,t){for(const n of e[t].allowAttributesOf){const o=e[n];if(o){const n=o.allowAttributes;e[t].allowAttributes.push(...n)}}delete e[t].allowAttributesOf}function jt(e,t){const n=e[t];for(const o of n.inheritTypesFrom){const t=e[o];if(t){const e=Object.keys(t).filter((e)=>e.startsWith('is'));for(const o of e)o in n||(n[o]=t[o])}}delete n.inheritTypesFrom}function Ut(e,t){const n=e[t],o=n.allowIn.filter((t)=>e[t]);n.allowIn=Array.from(new Set(o))}function Ht(e,t){const n=e[t];n.allowAttributes=Array.from(new Set(n.allowAttributes))}function Wt(e,t){for(const n of e){const e=Object.keys(n).filter((e)=>e.startsWith('is'));for(const o of e)t[o]=n[o]}}function Gt(e,t,n){for(const o of e)'string'==typeof o[n]?t[n].push(o[n]):Array.isArray(o[n])&&t[n].push(...o[n])}function $t(e,t){for(const n of e){const e=n.inheritAllFrom;e&&(t.allowContentOf.push(e),t.allowWhere.push(e),t.allowAttributesOf.push(e),t.inheritTypesFrom.push(e))}}function Kt(e,t){const n=e[t];return Zt(e).filter((e)=>e.allowIn.includes(n.name))}function Zt(e){return Object.keys(e).map((t)=>e[t])}function Jt(e){return'string'==typeof e?{name:e,*getAttributeKeys(){},getAttribute(){}}:{name:e.is('element')?e.name:'$text',*getAttributeKeys(){yield*e.getAttributeKeys()},getAttribute(t){return e.getAttribute(t)}}}function*Yt(e,t){for(let n=!1;!n;){if(n=!0,e){const t=e.next();t.done||(n=!1,yield{walker:e,value:t.value})}if(t){const e=t.next();e.done||(n=!1,yield{walker:t,value:e.value})}}}function Qt(e,t){const n=new Set,o=new Map,r=pg.createIn(e).getItems();for(const o of r)'$marker'==o.name&&n.add(o);for(const r of n){const e=r.getAttribute('data-name'),n=cg.createBefore(r);o.has(e)?o.get(e).end=cg.createFromPosition(n):o.set(e,new pg(cg.createFromPosition(n))),t.remove(r)}return o}function Xt(e,t){let n;for(const o of new Pg(e)){const e={};for(const t of o.getAttributeKeys())e[t]=o.getAttribute(t);const r=t.createElement(o.name,e);n&&t.append(r,n),n=cg.createAt(r)}return n}function en(e){e=wg(e);const t=rn(e),n=on(e),o=n?'element:'+n:'element';return(n)=>{n.on(o,t,{priority:e.priority||'normal'})}}function tn(e){e=wg(e),ln(e);const t=dn(e),n=on(e),o=n?'element:'+n:'element';return(n)=>{n.on(o,t,{priority:e.priority||'normal'})}}function nn(e){e=wg(e);let t=null;('string'==typeof e.view||e.view.key)&&(t=sn(e)),ln(e,t);const n=dn(e);return(t)=>{t.on('element',n,{priority:e.priority||'low'})}}function on(e){return'string'==typeof e.view?e.view:'object'==typeof e.view&&'string'==typeof e.view.name?e.view.name:null}function rn(e){const t=new Jp(e.view);return(n,o,r)=>{const i=t.match(o.viewItem);if(i){i.match.name=!0;const t=an(e.model,o.viewItem,r.writer);if(t&&r.consumable.test(o.viewItem,i.match)){const e=r.splitToAllowedParent(t,o.modelCursor);if(e){r.writer.insert(t,e.position);const n=r.convertChildren(o.viewItem,cg.createAt(t));r.consumable.consume(o.viewItem,i.match),o.modelRange=new pg(cg.createBefore(t),cg.createAfter(n.modelCursor.parent)),o.modelCursor=e.cursorParent?cg.createAt(e.cursorParent):o.modelRange.end}}}}}function an(e,t,n){return e instanceof Function?e(t,n):n.createElement(e)}function sn(e){'string'==typeof e.view&&(e.view={key:e.view});const t=e.view.key;let n;if('class'==t||'style'==t){const o='class'==t?'classes':'styles';n={[o]:e.view.value}}else{const o='undefined'==typeof e.view.value?/[\s\S]*/:e.view.value;n={attributes:{[t]:o}}}return e.view.name&&(n.name=e.view.name),e.view=n,t}function ln(e,t=null){const n='object'==typeof e.model?e.model.key:e.model,o='object'!=typeof e.model||'undefined'==typeof e.model.value?!(null!==t)||((e)=>e.getAttribute(t)):e.model.value;e.model={key:n,value:o}}function dn(e){const t=new Jp(e.view);return(n,o,r)=>{const i=t.match(o.viewItem);if(i){const t=e.model.key,n='function'==typeof e.model.value?e.model.value(o.viewItem):e.model.value;if(null!==n&&(cn(e)?i.match.name=!0:delete i.match.name,!!r.consumable.test(o.viewItem,i.match))){o.modelRange||(o=Object.assign(o,r.convertChildren(o.viewItem,o.modelCursor)));const e=pn(o.modelRange,{key:t,value:n},r);e&&r.consumable.consume(o.viewItem,i.match)}}}}function cn(e){return!!('object'!=typeof e.view||on(e))&&!e.view.classes&&!e.view.attributes&&!e.view.styles}function pn(e,t,n){let o=!1;for(const r of Array.from(e.getItems()))n.schema.checkAttribute(r,t.key)&&(n.writer.setAttribute(t.key,t.value,r),o=!0);return o}function un(){return(e,t,n)=>{if(!t.modelRange&&n.consumable.consume(t.viewItem,{name:!0})){const{modelRange:e,modelCursor:o}=n.convertChildren(t.viewItem,t.modelCursor);t.modelRange=e,t.modelCursor=o}}}function mn(){return(e,t,n)=>{if(n.schema.checkChild(t.modelCursor,'$text')&&n.consumable.consume(t.viewItem)){const e=n.writer.createText(t.viewItem.data);n.writer.insert(e,t.modelCursor),t.modelRange=pg.createFromPositionAndShift(t.modelCursor,e.offsetSize),t.modelCursor=t.modelRange.end}}}function gn(e){const t=[],n=e.root.document;if(!n)return[];const o=pg.createIn(e);for(const r of n.model.markers){const e=o.getIntersection(r.getRange());e&&t.push([r.name,e])}return t}function hn(e,t){for(const n of e)t(n)}function*fn(e){if(e.model.values)for(const t of e.model.values){const n={key:e.model.key,value:t},o=e.view[t],r=e.upcastAlso?e.upcastAlso[t]:void 0;yield*bn(n,o,r)}else yield*bn(e.model,e.view,e.upcastAlso)}function*bn(e,t,n){if(yield{model:e,view:t},n){n=Array.isArray(n)?n:[n];for(const t of n)yield{model:e,view:t}}}function _n(e){return'string'==typeof e?[new rg(e)]:(R(e)||(e=[e]),Array.from(e).map((e)=>'string'==typeof e?new rg(e):e instanceof ig?new rg(e.data,e.getAttributes()):e))}function kn(e,t){t=xn(t);const n=t.reduce((e,t)=>e+t.offsetSize,0),o=e.parent;An(e);const r=e.index;return o._insertChild(r,t),Cn(o,r+t.length),Cn(o,r),new pg(e,e.getShiftedBy(n))}function wn(e){if(!e.isFlat)throw new bd('operation-utils-remove-range-not-flat: Trying to remove a range which starts and ends in different element.');const t=e.start.parent;An(e.start),An(e.end);const n=t._removeChildren(e.start.index,e.end.index-e.start.index);return Cn(t,e.start.index),n}function yn(e,t){if(!e.isFlat)throw new bd('operation-utils-move-range-not-flat: Trying to move a range which starts and ends in different element.');const n=wn(e);return t=t._getTransformedByDeletion(e.start,e.end.offset-e.start.offset),kn(t,n)}function vn(e,t,n){An(e.start),An(e.end);for(const o of e.getItems()){const e=o.is('textProxy')?o.textNode:o;null===n?e._removeAttribute(t):e._setAttribute(t,n),Cn(e.parent,e.index)}Cn(e.end.parent,e.end.index)}function xn(e){const t=[];e instanceof Array||(e=[e]);for(let n=0;n<e.length;n++)if('string'==typeof e[n])t.push(new rg(e[n]));else if(e[n]instanceof ig)t.push(new rg(e[n].data,e[n].getAttributes()));else if(e[n]instanceof Ng||e[n]instanceof ag)for(const o of e[n])t.push(o);else e[n]instanceof og&&t.push(e[n]);for(let n=1;n<t.length;n++){const e=t[n],o=t[n-1];e instanceof rg&&o instanceof rg&&Tn(e,o)&&(t.splice(n-1,2,new rg(o.data+e.data,o.getAttributes())),n--)}return t}function Cn(e,t){const n=e.getChild(t-1),o=e.getChild(t);if(n&&o&&n.is('text')&&o.is('text')&&Tn(n,o)){const r=new rg(n.data+o.data,n.getAttributes());e._removeChildren(t-1,2),e._insertChild(t-1,r)}}function An(e){const t=e.textNode,n=e.parent;if(t){const o=e.offset-t.startOffset,r=t.index;n._removeChildren(r,1);const i=new rg(t.data.substr(0,o),t.getAttributes()),a=new rg(t.data.substr(o),t.getAttributes());n._insertChild(r,[i,a])}}function Tn(e,t){const n=e.getAttributes(),o=t.getAttributes();for(const r of n){if(r[1]!==t.getAttribute(r[0]))return!1;o.next()}return o.next().done}function En(e){return[e.clone()]}function Pn(e,t){for(let n=0;n<t.length;n++)t[n].baseVersion=e+n+1;return t}function Sn(e,t){return null===e.targetPosition._getTransformedByDeletion(t.sourcePosition,t.howMany)}function Rn(e){return 0===e.length?null:1==e.length?e[0]:(e[0].end=e[e.length-1].end,e[0])}function On(e,t,n){const o=[];for(let r=0;r<e.length;r++){const i=In(e[r],t,n.isSticky);o.push(i);for(let t=r+1;t<e.length;t++)e[t]=e[t]._getTransformedByMove(i.sourcePosition,i.targetPosition,i.howMany)[0];t=t._getTransformedByMove(i.sourcePosition,i.targetPosition,i.howMany,!0,!1)}return o}function In(e,t,n){let o='$graveyard'==t.root.rootName?Mg:'$graveyard'==e.start.root.rootName?Fg:Dg;const r=new o(e.start,e.end.offset-e.start.offset,t,0);return r.isSticky=n,r}function Nn(e,t,n,o,r){var i=-1,a=e.length;for(n||(n=lh),r||(r=[]);++i<a;){var s=e[i];0<t&&n(s)?1<t?Nn(s,t-1,n,o,r):Uc(r,s):!o&&(r[r.length]=s)}return r}function Vn(e,t,n,o){var r=n.length,i=r,a=!o;if(null==e)return!i;for(e=Object(e);r--;){var s=n[r];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++r<i;){s=n[r];var l=s[0],d=e[l],c=s[1];if(!(a&&s[2])){var p=new rc;if(o)var u=o(d,c,l,e,t,p);if(void 0===u?!Lm(c,d,o,kh|wh,p):!u)return!1}else if(void 0===d&&!(l in e))return!1}return!0}function Ln(e,t){if('function'!=typeof e||t&&'function'!=typeof t)throw new TypeError(Ph);var n=function(){var o=arguments,r=t?t.apply(this,o):o[0],i=n.cache;if(i.has(r))return i.get(r);var a=e.apply(this,o);return n.cache=i.set(r,a),a};return n.cache=new(Ln.Cache||oc),n}function Dn(e,t){if(Ec(e))return!1;var n=typeof e;return!!('number'==n||'symbol'==n||'boolean'==n||null==e||ou(e))||Mh.test(e)||!Fh.test(e)||null!=t&&e in Object(t)}function Fn(e,t){return t in Object(e)}function Mn(e,t){for(const n of t)for(const t of n.operations)t.baseVersion=++e;return t}function Bn(e){return e.reduce((e,t)=>e+t.operations.length,0)}function qn(e,t){const n=e[e.length-1];let o=n.operations.length+n.baseVersion;const r=new Kg;for(let n=0;n<t;n++)r.addOperation(new zg(o++));e.push(r)}function zn(e,t,n){Wn(e,t,n),jn(e,t,n),Hn(t,n),Un(t,n)}function jn(e,t,n){const o=n.originalDelta.get(t);if(n.document.history.isUndoingDelta(o)){const t=n.document.history.getUndoneDelta(o),r=n.wasAffected.get(e),i=r.get(t);i!==void 0&&(n.insertBefore=i)}}function Un(e,t){const n=t.originalDelta.get(e),o=t.document.history;t.forceNotSticky=o.isUndoneDelta(n)||o.isUndoingDelta(n)}function Hn(e,t){const n=t.document.history,o=t.originalDelta.get(e);t.forceWeakRemove=n.isUndoneDelta(o)}function Wn(e,t,n){n.wasAffected.get(e)||n.wasAffected.set(e,new Map);const o=n.originalDelta.get(t);let r=!!n.wasAffected.get(e).get(o);for(const o of e.operations){for(const e of t.operations)if(o instanceof Dg&&e instanceof Dg&&Gn(o,e)){r=!0;break}if(r)break}n.wasAffected.get(e).set(o,r)}function Gn(e,t){const n=e.targetPosition,o=t.sourcePosition,r=P(o.getParentPath(),n.getParentPath());return!(n.root!=o.root)&&'same'==r&&o.offset<n.offset}function $n(e,t,n){delete n.insertBefore,delete n.forceNotSticky,delete n.forceWeakRemove;const o=n.wasAffected.get(e);n.wasAffected.delete(e);for(const r of t)n.wasAffected.set(r,new Map(o))}function Kn(e,t){let n=[],r=null,o;switch(e){case Qg:case Xg:for(const e of t)r=e instanceof zg?new Kg:e instanceof Mg?new Xg:new Qg,r.addOperation(e),n.push(r);return n;case Jg:case th:return r=new e,r.addOperation(t[0]),r.addOperation(t[1]),n=Kn(Qg,t.slice(2)),[r].concat(n);case Yg:case nh:return n=Kn(Qg,t.slice(0,-2)),r=new e,r.addOperation(t[t.length-2]),r.addOperation(t[t.length-1]),n.concat(r);case eh:return r=t[0]instanceof zg?new Kg:new eh,r.addOperation(t[0]),[r];case Zg:for(o=0;o<t.length&&!!(t[o]instanceof zg);o++);o==t.length?r=new Kg:(r=new Zg,0!=o&&t.unshift(t.splice(o,1)[0]));for(const e of t)r.addOperation(e);return[r];default:r=new e;for(const e of t)r.addOperation(e);return[r];}}function Zn(e,t){const n=e.clone(),o=n.operations[0];return o.oldRange&&(o.oldRange=o.oldRange.getTransformedByDelta(t)[0]),o.newRange&&(o.newRange=o.newRange.getTransformedByDelta(t)[0]),[n]}function Jn(e,t){function n(){const n=new pg(e.position.getShiftedBy(s),e.position.getShiftedBy(l)),r=new Lg(n,t.key,a,t.value,0);o.addOperation(r)}const o=new Zg,r=e.nodes;let a=r.getNode(0).getAttribute(t.key),s=0,l=r.getNode(0).offsetSize;for(let o=1;o<r.length;o++){const e=r.getNode(o),i=e.getAttribute(t.key);i!=a&&(a!=t.value&&n(),a=i,s=l),l+=e.offsetSize}return n(),o}function Yn(){const e=new Kg;return e.addOperation(new zg(0)),e}function Qn(e,t,n,o){function r(){0===i.operations.length&&e.batch.addDelta(i);const o=new pg(l,d),r=o.root.document?s.version:null,p=new Lg(o,t,c,n,r);i.addOperation(p),a.applyOperation(p)}const i=new Zg,a=e.model,s=a.document;let l=o.start,d,c,p;for(const i of o)p=i.item.getAttribute(t),d&&c!=p&&(c!=n&&r(),l=d),d=i.nextPosition,c=p;d instanceof cg&&d!=l&&c!=n&&r()}function Xn(e,t,n,o){const r=e.model,i=r.document,a=o.getAttribute(t);let s,l;if(a!=n){const d=o.root===o,c=d?new rb:new Zg;if(e.batch.addDelta(c),d){const e=o.document?i.version:null;l=new Ug(o,t,a,n,e)}else{s=o.is('element')?new pg(cg.createBefore(o),cg.createFromParentAndOffset(o,0)):new pg(cg.createBefore(o),cg.createAfter(o));const e=s.root.document?i.version:null;l=new Lg(s,t,a,n,e)}c.addOperation(l),r.applyOperation(l)}}function eo(e,t,n,o){const r=e.model,i=r.document,a=new eb,s=new qg(t,n,o,r.markers,i.version);e.batch.addDelta(a),a.addOperation(s),r.applyOperation(s)}function to(e,t,n,o){let r;if(e.root.document){const n=o.document,i=new cg(n.graveyard,[0]);r=new Mg(e,t,i,n.version)}else r=new ib(e,t);n.addOperation(r),o.applyOperation(r)}function no(e,t){return!(e!==t)||!!(e instanceof ab&&t instanceof ab)}function oo(e){const t=[];for(const n of e)if(n.is('text'))for(let e=0;e<n.data.length;e++)t.push({name:'$text',attributes:new Map(n.getAttributes())});else t.push({name:n.name,attributes:new Map(n.getAttributes())});return t}function ro(e,t){const n=[];let o=0,r=0;for(const i of t)i.offset>o&&(n.push(...'e'.repeat(i.offset-o).split('')),r+=i.offset-o),'insert'==i.type?(n.push(...'i'.repeat(i.howMany).split('')),o=i.offset+i.howMany):'remove'==i.type?(n.push(...'r'.repeat(i.howMany).split('')),o=i.offset,r+=i.howMany):(n.push(...'a'.repeat(i.howMany).split('')),o=i.offset+i.howMany,r+=i.howMany);return r<e&&n.push(...'e'.repeat(e-r).split('')),n}function io(e){const t=e.position&&'$graveyard'==e.position.root.rootName,n=e.range&&'$graveyard'==e.range.root.rootName;return!t&&!n}function ao(e){return!!e&&1==e.length&&/[\u0300-\u036f\u1ab0-\u1aff\u1dc0-\u1dff\u20d0-\u20ff\ufe20-\ufe2f]/.test(e)}function so(e){return!!e&&1==e.length&&/[\ud800-\udbff]/.test(e)}function lo(e){return!!e&&1==e.length&&/[\udc00-\udfff]/.test(e)}function co(e,t){return so(e.charAt(t-1))&&lo(e.charAt(t))}function po(e,t){return ao(e.charAt(t))}function uo(e){const t=e.textNode;if(t){const n=t.data,o=e.offset-t.startOffset;return!co(n,o)&&!po(n,o)}return!0}function mo(){const e=new Set(['insert','move','remove','reinsert']);this.listenTo(this.root.document.model,'applyOperation',(t,n)=>{const o=n[0];!o.isDocumentOperation||e.has(o.type)&&go.call(this,o)},{priority:'low'})}function go(e){let t,n;'insert'==e.type?t=pg.createFromPositionAndShift(e.position,e.nodes.maxOffset):(t=pg.createFromPositionAndShift(e.getMovedRangeStart(),e.howMany),n=e.sourcePosition);const o=t.end.offset-t.start.offset;let r;switch(e.type){case'insert':const i='sticksToNext'==this.stickiness;r=this._getTransformedByInsertion(t.start,o,i);break;case'move':case'remove':case'reinsert':const a=pg.createFromPositionAndShift(n,o),s=a.containsPosition(this)||a.start.isEqual(this)&&'sticksToNext'==this.stickiness||a.end.isEqual(this)&&'sticksToPrevious'==this.stickiness;if(s)r=this._getCombined(n,t.start);else{const e='sticksToNext'==this.stickiness,i=t.start._getTransformedByInsertion(n,o);r=this._getTransformedByMove(n,i,o,e)}}if(!this.isEqual(r)){const e=cg.createFromPosition(this);this.path=r.path,this.root=r.root,this.fire('change',e)}}function ho(e,t,n){e.change((o)=>{n.isCollapsed||e.deleteContent(n);const r=new hb(e,o,n.anchor);let i;i=t.is('documentFragment')?t.getChildren():[t],r.handleNodes(i,{isFirst:!0,isLast:!0});const a=r.getSelectionRange();a?n instanceof _g?o.setSelection(a):n.setTo(a):Zm.warn('insertcontent-no-range: Cannot determine a proper selection range after insertion.')})}function fo(e,t,n={}){if(t.isCollapsed)return;const o=e.schema;e.change((e)=>{if(!n.doNotResetEntireContent&&vo(o,t))return void yo(e,t,o);const r=t.getFirstRange(),i=r.start,a=gb.createFromPosition(r.end);r.start.isTouching(r.end)||e.remove(r),n.leaveUnmerged||(bo(e,i,a),o.removeDisallowedAttributes(i.parent.getChildren(),e)),t instanceof _g?e.setSelection(i):t.setTo(i),_o(o,i)&&wo(e,i,t),a.detach()})}function bo(e,t,n){const o=t.parent,r=n.parent;if(o!=r&&o.parent&&r.parent&&ko(t,n,e.model.schema)){for(t=cg.createAfter(o),n=cg.createBefore(r),n.isEqual(t)||e.insert(r,t),e.merge(t);n.parent.isEmpty;){const t=n.parent;n=cg.createBefore(t),e.remove(t)}bo(e,t,n)}}function _o(e,t){const n=e.checkChild(t,'$text'),o=e.checkChild(t,'paragraph');return!n&&o}function ko(e,t,n){const o=new pg(e,t);for(const r of o.getWalker())if(n.isObject(r.item)||n.isLimit(r.item))return!1;return!0}function wo(e,t,n){const o=e.createElement('paragraph');e.insert(o,t),n instanceof _g?e.setSelection(o,0):n.setTo(o,0)}function yo(e,t){const n=e.model.schema.getLimitElement(t);e.remove(pg.createIn(n)),wo(e,cg.createAt(n),t)}function vo(e,t){const n=e.getLimitElement(t);if(!t.containsEntireContent(n))return!1;const o=t.getFirstRange();return o.start.parent!=o.end.parent&&e.checkChild(n,'paragraph')}function xo(e,t,n={}){const o=e.schema,r='backward'!=n.direction,i=n.unit?n.unit:'character',a=t.focus,s=new lg({boundaries:Eo(a,r),singleCharacters:!0,direction:r?'forward':'backward'}),l={walker:s,schema:o,isForward:r,unit:i};for(let o;o=s.next();){if(o.done)return;const n=Co(l,o.value);if(n)return void(t instanceof _g?e.change((e)=>{e.setSelectionFocus(n)}):t.setFocus(n))}}function Co(e,t){if('text'==t.type)return'word'===e.unit?To(e.walker,e.isForward):Ao(e.walker,e.unit,e.isForward);if(t.type==(e.isForward?'elementStart':'elementEnd')){if(e.schema.isObject(t.item))return cg.createAt(t.item,e.isForward?'after':'before');if(e.schema.checkChild(t.nextPosition,'$text'))return t.nextPosition}else{if(e.schema.isLimit(t.item))return void e.walker.skip(()=>!0);if(e.schema.checkChild(t.nextPosition,'$text'))return t.nextPosition}}function Ao(e,t){const n=e.position.textNode;if(n){const o=n.data;for(let r=e.position.offset-n.startOffset;co(o,r)||'character'==t&&po(o,r);)e.next(),r=e.position.offset-n.startOffset}return e.position}function To(e,t){let n=e.position.textNode;if(n)for(let o=e.position.offset-n.startOffset;!Po(n.data,o,t)&&!So(n,o,t);){e.next();const r=t?e.position.nodeAfter:e.position.nodeBefore;if(r){const o=r.data.charAt(t?0:r.data.length-1);fb.includes(o)||(e.next(),n=e.position.textNode)}o=e.position.offset-n.startOffset}return e.position}function Eo(e,t){const n=e.root,o=cg.createAt(n,t?'end':0);return t?new pg(e,o):new pg(o,e)}function Po(e,t,n){const o=t+(n?0:-1);return fb.includes(e.charAt(o))}function So(e,t,n){return t===(n?e.endOffset:0)}function Ro(e,t){return e.change((e)=>{const n=e.createDocumentFragment(),o=t.getFirstRange();if(!o||o.isCollapsed)return n;const r=o.start.root,i=o.start.getCommonPath(o.end),a=r.getNodeByPath(i);let s=o.start.parent==o.end.parent?o:pg.createFromParentsAndOffsets(a,o.start.path[i.length],a,o.end.path[i.length]+1);const l=s.end.offset-s.start.offset;for(const t of s.getItems({shallow:!0}))t.is('textProxy')?e.appendText(t.data,t.getAttributes(),n):e.append(t._clone(!0),n);if(s!=o){const t=o._getTransformedByMove(s.start,cg.createAt(n,0),l)[0],r=new pg(cg.createAt(n),t.start),i=new pg(t.end,cg.createAt(n,'end'));Oo(i,e),Oo(r,e)}return n})}function Oo(e,t){const n=[];Array.from(e.getItems({direction:'backward'})).map((e)=>pg.createOn(e)).filter((t)=>{const n=(t.start.isAfter(e.start)||t.start.isEqual(e.start))&&(t.end.isBefore(e.end)||t.end.isEqual(e.end));return n}).forEach((e)=>{n.push(e.start.parent),t.remove(e)}),n.forEach((e)=>{for(let n=e;n.parent&&n.isEmpty;){const e=pg.createOn(n);n=n.parent,t.remove(e)}})}function Io(e){return e.every((e)=>'string'==typeof e)}function No(e){return!!e&&((e.value&&(e=e.value),Array.isArray(e))?e.some(No):!!(e instanceof Eb))}function Vo(e,t){return e.map((e)=>e instanceof Eb?e.getValue(t):e)}function Lo(e,t,{node:n}){let o=Vo(e,n);o=1==e.length&&e[0]instanceof Sb?o[0]:o.reduce(Go,''),Zo(o)?t.remove():t.set(o)}function Do(e){return{set(t){e.textContent=t},remove(){e.textContent=''}}}function Fo(e,t,n){return{set(o){e.setAttributeNS(n,t,o)},remove(){e.removeAttributeNS(n,t)}}}function Mo(e,t){return{set(n){e.style[t]=n},remove(){e.style[t]=null}}}function Bo(e){const t=Ab(e,(e)=>{if(e&&(e instanceof Eb||Yo(e)||Jo(e)||Qo(e)))return e});return t}function qo(e){if('string'==typeof e?e=Uo(e):e.text&&Ho(e),e.on&&(e.eventListeners=jo(e.on),delete e.on),!e.text){e.attributes&&zo(e.attributes);const t=[];if(e.children)if(Qo(e.children))t.push(e.children);else for(const n of e.children)Yo(n)||Jo(n)||Be(n)?t.push(n):t.push(new Tb(n));e.children=t}return e}function zo(e){for(const t in e)e[t].value&&(e[t].value=[].concat(e[t].value)),Wo(e,t)}function jo(e){for(const t in e)Wo(e,t);return e}function Uo(e){return{text:[e]}}function Ho(e){Array.isArray(e.text)||(e.text=[e.text])}function Wo(e,t){Array.isArray(e[t])||(e[t]=[e[t]])}function Go(e,t){return Zo(t)?e:Zo(e)?t:`${e} ${t}`}function $o(e,t){for(const n in t)e[n]?e[n].push(...t[n]):e[n]=t[n]}function Ko(e,t){if(t.attributes&&(!e.attributes&&(e.attributes={}),$o(e.attributes,t.attributes)),t.eventListeners&&(!e.eventListeners&&(e.eventListeners={}),$o(e.eventListeners,t.eventListeners)),t.text&&e.text.push(...t.text),t.children&&t.children.length){if(e.children.length!=t.children.length)throw new bd('ui-template-extend-children-mismatch: The number of children in extended definition does not match.');let n=0;for(const o of t.children)Ko(e.children[n++],o)}}function Zo(e){return!e&&0!==e}function Jo(e){return e instanceof Ib}function Yo(e){return e instanceof Tb}function Qo(e){return e instanceof Cb}function Xo(){return{children:[],bindings:[],attributes:{}}}function er(e){return'class'==e||'style'==e}function tr(e){for(;e&&'html'!=e.tagName.toLowerCase();){if('static'!=um.window.getComputedStyle(e).position)return e;e=e.parentElement}return null}function nr({element:e,target:t,positions:n,limiter:o,fitInViewport:r}){Vd(t)&&(t=t()),Vd(o)&&(o=o());const i=tr(e.parentElement),a=new eg(e),s=new eg(t);let l,d;if(!o&&!r)[d,l]=or(n[0],s,a);else{const e=o&&new eg(o).getVisible(),t=r&&new eg(um.window);[d,l]=rr(n,s,a,e,t)||or(n[0],s,a)}let{left:c,top:p}=ir(l);if(i){const e=ir(new eg(i)),t=Ke(i);c-=e.left,p-=e.top,c+=i.scrollLeft,p+=i.scrollTop,c-=t.left,p-=t.top}return{left:c,top:p,name:d}}function or(e,t,n){const{left:o,top:r,name:i}=e(t,n);return[i,n.clone().moveTo(o,r)]}function rr(e,t,n,o,r){let i=0,a=0,s,l;const d=n.getArea();return e.some((e)=>{function c(){a=g,i=m,s=u,l=p}const[p,u]=or(e,t,n);let m,g;if(o)if(r){const e=o.getIntersection(r);m=e?e.getIntersectionArea(u):0}else m=o.getIntersectionArea(u);return r&&(g=r.getIntersectionArea(u)),r&&!o?g>a&&c():!r&&o?m>i&&c():g>a&&m>=i?c():g>=a&&m>i&&c(),m===d}),s?[l,s]:null}function ir({left:e,top:t}){const{scrollX:n,scrollY:o}=um.window;return{left:e+n,top:t+o}}function ar(e){return(t)=>t+e}function sr(e){return Xm(e)?e:$e(e)?e.commonAncestorContainer:'function'==typeof e?sr(e()):null}function lr(e,t){return e.top-t.height-Fb.arrowVerticalOffset}function dr(e){return e.bottom+Fb.arrowVerticalOffset}function cr(e){const t=e.next();return t.done?null:t.value}function pr(e){return!!(e.focus&&'none'!=um.window.getComputedStyle(e.element).display)}function ur(e){return e.bindTemplate.to((t)=>{t.target===e.element&&t.preventDefault()})}function mr(e){return Array.isArray(e)?{items:e}:e?Object.assign({items:[]},e):{items:[]}}function gr(e){const t=Fb.defaultPositions;return e?[t.northWestArrowSouth,t.northWestArrowSouthWest,t.northWestArrowSouthEast,t.southWestArrowNorth,t.southWestArrowNorthWest,t.southWestArrowNorthEast]:[t.southEastArrowNorth,t.southEastArrowNorthEast,t.southEastArrowNorthWest,t.northEastArrowSouth,t.northEastArrowSouthEast,t.northEastArrowSouthWest]}function hr(e){return(e+'').toLowerCase()}function fr({origin:e,originKeystrokeHandler:t,originFocusTracker:n,toolbar:o,beforeFocus:r,afterBlur:i}){n.add(o.element),t.set('Alt+F10',(e,t)=>{n.isFocused&&!o.focusTracker.isFocused&&(r&&r(),o.focus(),t())}),o.keystrokes.set('Esc',(t,n)=>{o.focusTracker.isFocused&&(e.focus(),i&&i(),n())})}function br(e,t){e instanceof HTMLTextAreaElement&&(e.value=t),e.innerHTML=t}function _r(e){return e instanceof HTMLTextAreaElement?e.value:e.innerHTML}function kr(e){if(!Vd(e.updateElement))throw new bd('attachtoform-missing-elementapi-interface: ElementApi interface is required.');const t=e.element;if(t&&'textarea'===t.tagName.toLowerCase()&&t.form){let n;const o=t.form,r=()=>e.updateElement();Vd(o.submit)&&(n=o.submit,o.submit=()=>{r(),n.apply(o)}),o.addEventListener('submit',r),e.on('destroy',()=>{o.removeEventListener('submit',r),n&&(o.submit=n)})}}function wr(e){const t=e.files?Array.from(e.files):[],n=e.items?Array.from(e.items):[];return t.length?t:n.filter((e)=>'file'===e.kind).map((e)=>e.getAsFile())}function yr(e,t){const n=t.target.ownerDocument,o=t.clientX,r=t.clientY;let i;return n.caretRangeFromPoint&&n.caretRangeFromPoint(o,r)?i=n.caretRangeFromPoint(o,r):t.rangeParent&&(i=n.createRange(),i.setStart(t.rangeParent,t.rangeOffset),i.collapse(!0)),i?e.domConverter.domRangeToView(i):e.document.selection.getFirstRange()}function vr(e){return e=e.replace(/</g,'&lt;').replace(/>/g,'&gt;').replace(/\n\n/g,'</p><p>').replace(/\n/g,' ').replace(/^\s/,'&nbsp;').replace(/\s$/,'&nbsp;').replace(/\s\s/g,' &nbsp;'),-1<e.indexOf('</p><p>')&&(e=`<p>${e}</p>`),e}function xr(e){return e.replace(/<span(?: class="Apple-converted-space"|)>(\s+)<\/span>/g,(e,t)=>1==t.length?' ':t)}function Cr(e){let t='';if(e.is('text')||e.is('textProxy'))t=e.data;else if(e.is('img')&&e.hasAttribute('alt'))t=e.getAttribute('alt');else{let n=null;for(const o of e.getChildren()){const e=Cr(o);n&&(n.is('containerElement')||o.is('containerElement'))&&(y_.includes(n.name)||y_.includes(o.name)?t+='\n':t+='\n\n'),t+=e,n=o}}return t}function Ar(e){e.return=!1,e.stop()}function Tr(e,t,n,o){const r=n.isCollapsed,i=n.getFirstRange(),a=i.start.parent,s=i.end.parent;if(o.isLimit(a)||o.isLimit(s))return void(r||a!=s||e.deleteContent(n));if(r)Er(t,n,i.start);else{const o=!(i.start.isAtStart&&i.end.isAtEnd);e.deleteContent(n,{leaveUnmerged:o}),o&&(a==s?Er(t,n,n.focus):t.setSelection(s,0))}}function Er(e,t,n){const o=n.parent,r=new o.constructor(o.name,o.getAttributes());n.isAtEnd?e.insert(r,n.parent,'after'):n.isAtStart?e.insert(r,n.parent,'before'):e.split(n),e.setSelection(n.parent.nextSibling,0)}function Pr(e,t){function n(){a&&(r.push(a),a=null)}function o(e){return a&&a.type==e}const r=[];let i=0,a;return e.forEach((e)=>{'equal'==e?(n(),i++):'insert'==e?(o('insert')?a.values.push(t[i]):(n(),a={type:'insert',index:i,values:[t[i]]}),i++):o('delete')?a.howMany++:(n(),a={type:'delete',index:i,howMany:1})}),n(),r}function Sr(e){return!!e.ctrlKey||O_.includes(e.keyCode)}function Rr(e,t){return e instanceof Kp&&t instanceof Kp?e.data===t.data:e===t}function Or(e){if(1==e.newChildren.length-e.oldChildren.length){const t=Se(e.oldChildren,e.newChildren,Rr),n=Pr(t,e.newChildren);if(!(1<n.length)){const e=n[0];return e.values[0]instanceof Kp?e:void 0}}}function Ir(e){const t=e.map((e)=>e.node).reduce((e,t)=>e.getCommonAncestor(t,{includeSelf:!0}));return t?t.getAncestors({includeSelf:!0,parentFirst:!0}).find((e)=>e.is('containerElement')||e.is('rootElement')):void 0}function Nr(e){if(0==e.length)return!1;for(const t of e)if('children'===t.type&&!Or(t))return!0;return!1}function Vr(e){return e.every((e)=>e.is('text'))}function Lr(e){let t=null,n=null;for(let o=0;o<e.length;o++){const r=e[o];'equal'!=r&&(t=null===t?o:t,n=o)}let o=0,r=0;for(let a=t;a<=n;a++)'insert'!=e[a]&&o++,'delete'!=e[a]&&r++;return{insertions:r,deletions:o,firstChangeAt:t}}function Dr(e,t){const n=Fr([e],t);n.sort((e,t)=>e.start.isBefore(t.start)?-1:1);for(let o=1;o<n.length;o++){const e=n[o-1],t=n[o];e.end.isTouching(t.start)&&(e.end=t.end,n.splice(o,1),o--)}return n}function Fr(e,t){for(const n of t)for(const t of n.operations)for(let n=0;n<e.length;n++){let o;switch(t.type){case'insert':o=e[n]._getTransformedByInsertion(t.position,t.nodes.maxOffset,!0);break;case'move':case'remove':case'reinsert':o=e[n]._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,!0);}o&&(e.splice(n,1,...o),n=n+o.length-1)}return e}function Mr(){let e=Br(ak);return e&&e.length==sk||(e=zr(sk),qr(ak,e)),e}function Br(e){e=e.toLowerCase();const t=document.cookie.split(';');for(const n of t){const t=n.split('='),o=decodeURIComponent(t[0].trim().toLowerCase());if(o===e)return decodeURIComponent(t[1])}return null}function qr(e,t){document.cookie=encodeURIComponent(e)+'='+encodeURIComponent(t)+';path=/'}function zr(e){let t='';const n=new Uint8Array(e);window.crypto.getRandomValues(n);for(let o=0;o<n.length;o++){const e=lk.charAt(n[o]%lk.length);t+=.5<Math.random()?e.toUpperCase():e}return t}function jr(e){return Array.from(e.getChildren()).reduce((e,t)=>e+t.data,'')}function Ur(e,t){return t.filter((e)=>e[0]!==void 0&&e[1]!==void 0).map((t)=>pg.createFromParentsAndOffsets(e,t[0],e,t[1]))}function Hr(e){return'blockQuote'==e.parent.name?e.parent:null}function Wr(e){let t=0,n;const o=[];for(;t<e.length;){const r=e[t],i=e[t+1];n||(n=cg.createBefore(r)),i&&r.nextSibling==i||(o.push(new pg(n,cg.createAfter(r))),n=null),t++}return o}function Gr(e,t){const n=e.checkChild(t.parent,'blockQuote'),o=e.checkChild(['$root','blockQuote'],t);return n&&o}function $r(e,t=512){try{const n=e.match(Fk)[1],o=atob(e.replace(Fk,'')),r=[];for(let e=0;e<o.length;e+=t){const n=o.slice(e,e+t),a=Array(n.length);for(let e=0;e<n.length;e++)a[e]=n.charCodeAt(e);r.push(new Uint8Array(a))}return new Blob(r,{type:n})}catch(e){throw new Error('Problem with decoding Base64 image data.')}}function Kr(e){if('string'!=typeof e)return!1;const t=e.match(Fk);return!!(t&&t.length)}function Zr(){function e(e,t,n){if(n.consumable.test(t.viewItem,{name:!0,classes:'image'})){const e=Array.from(t.viewItem.getChildren()).find((e)=>e.is('img'));if(e&&e.hasAttribute('src')&&n.consumable.test(e,{name:!0})){const o=n.convertItem(e,t.modelCursor),r=cr(o.modelRange.getItems());r&&(n.convertChildren(t.viewItem,cg.createAt(r)),t.modelRange=o.modelRange,t.modelCursor=o.modelCursor)}}}return(t)=>{t.on('element:figure',e)}}function Jr(){function e(e,t,n){if(n.consumable.consume(t.item,e.name)){const e=n.writer,o=n.mapper.toViewElement(t.item),r=o.getChild(0);if(null===t.attributeNewValue){const n=t.attributeOldValue;n.data&&(e.removeAttribute('srcset',r),e.removeAttribute('sizes',r),n.width&&e.removeAttribute('width',r))}else{const n=t.attributeNewValue;n.data&&(e.setAttribute('srcset',n.data,r),e.setAttribute('sizes','100vw',r),n.width&&e.setAttribute('width',n.width,r))}}}return(t)=>{t.on('attribute:srcset:image',e)}}function Yr(e){function t(e,t,n){if(n.consumable.consume(t.item,e.name)){const e=n.writer,o=n.mapper.toViewElement(t.item),r=o.getChild(0);null===t.attributeNewValue?e.removeAttribute(t.attributeKey,r):e.setAttribute(t.attributeKey,t.attributeNewValue,r)}}return(n)=>{n.on(`attribute:${e}:image`,t)}}function Qr(e,t){return e&&t&&e.priority==t.priority&&ei(e.classes)==ei(t.classes)}function Xr(e,t){if(e.priority>t.priority)return!0;return!(e.priority<t.priority)&&ei(e.classes)>ei(t.classes)}function ei(e){return Array.isArray(e)?e.sort().join(','):e}function ti(e){return!!e.getCustomProperty(Wk)}function ni(e,t,n={}){function o(e){return Array.isArray(e)?e:[e]}return t.setAttribute('contenteditable','false',e),t.addClass($k,e),t.setCustomProperty(Wk,!0,e),e.getFillerOffset=si,n.label&&ri(e,n.label,t),oi(e,t,(e,t,n)=>n.addClass(o(t.classes),e),(e,t,n)=>n.removeClass(o(t.classes),e)),e}function oi(e,t,n,o){const r=new Hk;r.on('change:top',(t,r)=>{r.oldDescriptor&&o(e,r.oldDescriptor,r.writer),r.newDescriptor&&n(e,r.newDescriptor,r.writer)}),t.setCustomProperty('addHighlight',(e,t,n)=>r.add(t,n),e),t.setCustomProperty('removeHighlight',(e,t,n)=>r.remove(t,n),e)}function ri(e,t,n){n.setCustomProperty(Gk,t,e)}function ii(e){const t=e.getCustomProperty(Gk);return t?'function'==typeof t?t():t:''}function ai(e,t){return t.addClass(['ck-editor__editable','ck-editor__nested-editable'],e),t.setAttribute('contenteditable',e.isReadOnly?'false':'true',e),e.on('change:isReadOnly',(n,o,r)=>{t.setAttribute('contenteditable',r?'false':'true',e)}),e.on('change:isFocused',(n,o,r)=>{r?t.addClass('ck-editor__nested-editable_focused',e):t.removeClass('ck-editor__nested-editable_focused',e)}),e}function si(){return null}function li(e,t,n){return t.setCustomProperty(Zk,!0,e),ni(e,t,{label:function(){const t=e.getChild(0),o=t.getAttribute('alt');return o?`${o} ${n}`:n}})}function di(e){return!!e.getCustomProperty(Zk)&&ti(e)}function ci(e){const t=e.getSelectedElement();return!!(t&&di(t))}function pi(e){return e instanceof sg&&'image'==e.name}function ui(e){const t=e.createEmptyElement('img'),n=e.createContainerElement('figure',{class:'image'});return e.insert(zu.createAt(n),t),n}function mi(e){return e==tm.arrowright||e==tm.arrowleft||e==tm.arrowup||e==tm.arrowdown}function gi(e){return re(e)==ew}function hi(e){for(;e;){if(e instanceof Fu&&!(e instanceof Bu))return!0;e=e.parent}return!1}function fi({emitter:e,activator:t,callback:n,contextElements:o}){e.listenTo(document,'mousedown',(e,{target:r})=>{if(t()){for(const e of o)if(e.contains(r))return;n()}})}function bi({view:e}){e.listenTo(e.element,'submit',(t,n)=>{n.preventDefault(),e.fire('submit')},{useCapture:!0})}function _i(e){const t=e.plugins.get('ContextualBalloon');if(ci(e.editing.view.document.selection)){const n=ki(e);t.updatePosition(n)}}function ki(e){const t=e.editing.view,n=Fb.defaultPositions;return{target:t.domConverter.viewToDom(t.document.selection.getSelectedElement()),positions:[n.northArrowSouth,n.northArrowSouthWest,n.northArrowSouthEast,n.southArrowNorth,n.southArrowNorthWest,n.southArrowNorthEast]}}function wi(e){const t=/^image\/(jpeg|png|gif|bmp)$/;return t.test(e.type)}function yi(e){const t=e.getSelectedElement();if(t)return cg.createAfter(t);const n=e.getSelectedBlocks().next().value;if(n){if(n.isEmpty)return cg.createAt(n);const t=cg.createAfter(n);return e.focus.isTouching(t)?t:cg.createBefore(n)}return e.focus}function vi(e,t){e.hasClass('ck-appear')||t.addClass('ck-appear',e)}function xi(e,t){t.removeClass('ck-appear',e)}function Ci(e,t,n){t.hasClass('ck-image-upload-placeholder')||n.addClass('ck-image-upload-placeholder',t),t.hasClass('ck-infinite-progress')||n.addClass('ck-infinite-progress',t);const o=t.getChild(0);o.getAttribute('src')!==e&&n.setAttribute('src',e,o)}function Ai(e,t){e.hasClass('ck-image-upload-placeholder')&&t.removeClass('ck-image-upload-placeholder',e),e.hasClass('ck-infinite-progress')&&t.removeClass('ck-infinite-progress',e)}function Ti(e,t,n,o){const r=Si(t);t.insert(zu.createAt(e,'end'),r),n.on('change:uploadedPercent',(e,t,n)=>{o.change((e)=>{e.setStyle('width',n+'%',r)})})}function Ei(e,t){const n=Ri(e);n&&t.remove(ju.createOn(n))}function Pi(e,t,n){const o=new nm('div',{class:'ck-image-upload-complete-icon'});t.insert(zu.createAt(e,'end'),o),setTimeout(()=>{n.change((e)=>e.remove(ju.createOn(o)))},3e3)}function Si(e){const t=e.createUIElement('div',{class:'ck-progress-bar'});return e.setCustomProperty(Vw,!0,t),t}function Ri(e){for(const t of e.getChildren())if(t.getCustomProperty(Vw))return t}function Oi(e){return Array.from(e.types).includes('text/html')&&''!==e.getData('text/html')}function Ii(e,t){return t.checkChild(e.parent,'paragraph')&&!t.isObject(e)}function Ni(e,t,n){const o=n.writer.createElement('paragraph');return n.writer.insert(o,t),n.convertItem(e,cg.createAt(o))}function Vi(e,t,n){const o=new Pg(t);return!!n.checkChild(o,'paragraph')&&!!n.checkChild(o.push('paragraph'),e)}function Li(e,t,n){return n.checkChild(e.parent,t)&&!n.isObject(e)}function Di(e,t=Qw){const n=new t(e),o=new Gw(e),r=new Zw(e,n,o);return n.bind('isEnabled').to(r),n instanceof Qw?n.bind('isOn').to(r,'isOpen'):n.arrowView.bind('isOn').to(r,'isOpen'),Mi(r),r}function Fi(e,t){const n=e.locale,o=e.listView=new ty(n);o.items.bindTo(t).using((e)=>{const t=new ny(n);return t.bind(...Object.keys(e)).to(e),t}),e.panelView.children.add(o),o.items.delegate('execute').to(e)}function Mi(e){Bi(e),qi(e),zi(e)}function Bi(e){e.on('render',()=>{fi({emitter:e,activator:()=>e.isOpen,callback:()=>{e.isOpen=!1},contextElements:[e.element]})})}function qi(e){e.on('execute',()=>{e.isOpen=!1})}function zi(e){e.keystrokes.set('arrowdown',(t,n)=>{e.isOpen&&(e.panelView.focus(),n())}),e.keystrokes.set('arrowup',(t,n)=>{e.isOpen&&(e.panelView.focusLast(),n())})}function ji(e){const n=e.t,t={Paragraph:n('ag'),"Heading 1":n('ah'),"Heading 2":n('ai'),"Heading 3":n('aj')};return e.config.get('heading.options').map((e)=>{const n=t[e.title];return n&&n!=e.title&&(e=Object.assign({},e,{title:n})),e})}function Ui(e,t,n,o){const r=e.document;my.has(r)||(my.set(r,new Map),r.registerPostFixer((e)=>Hi(r,e))),my.get(r).set(t,{placeholderText:n,checkFunction:o}),e.render()}function Hi(e,t){const n=my.get(e);let o=!1;for(const[r,i]of n)Wi(t,r,i)&&(o=!0);return o}function Wi(e,t,n){const o=t.document,r=n.placeholderText;let i=!1;if(!o)return!1;t.getAttribute('data-placeholder')!==r&&(e.setAttribute('data-placeholder',r,t),i=!0);const a=o.selection,s=a.anchor,l=n.checkFunction;if(l&&!l())return t.hasClass('ck-placeholder')&&(e.removeClass('ck-placeholder',t),i=!0),i;const d=!Array.from(t.getChildren()).some((e)=>!e.is('uiElement'));return!o.isFocused&&d?(t.hasClass('ck-placeholder')||(e.addClass('ck-placeholder',t),i=!0),i):(d&&s&&s.parent!==t?!t.hasClass('ck-placeholder')&&(e.addClass('ck-placeholder',t),i=!0):t.hasClass('ck-placeholder')&&(e.removeClass('ck-placeholder',t),i=!0),i)}function Gi(e,t){return(n)=>{const o=n.createEditableElement('figcaption');return n.setCustomProperty(gy,!0,o),Ui(e,o,t),ai(o,n)}}function $i(e){for(const t of e.getChildren())if(t instanceof sg&&'caption'==t.name)return t;return null}function Ki(e){const t=e.parent;return'figcaption'==e.name&&t&&'figure'==t.name&&t.hasClass('image')?{name:!0}:null}function Zi(e,t=!0){return(n,o,r)=>{const i=o.item;if((i.childCount||t)&&pi(i.parent)){if(!r.consumable.consume(o.item,'insert'))return;const t=r.mapper.toViewElement(o.range.start.parent),n=e(r.writer),a=r.writer;i.childCount||a.addClass('ck-hidden',n),Ji(n,o.item,t,r)}}}function Ji(e,t,n,o){const r=zu.createAt(n,'end');o.writer.insert(r,e),o.mapper.bindElements(t,e)}function Yi(e){const t=e.getAncestors({includeSelf:!0}),n=t.find((e)=>'caption'==e.name);return n&&n.parent&&'image'==n.parent.name?n:null}function Qi(e,t){return!(e.childCount||e.hasClass('ck-hidden'))&&(t.addClass('ck-hidden',e),!0)}function Xi(e,t){return!!e.hasClass('ck-hidden')&&(t.removeClass('ck-hidden',e),!0)}function ea(e){return(t,n,o)=>{if(o.consumable.consume(n.item,t.name)){const t=na(n.attributeNewValue,e),r=na(n.attributeOldValue,e),i=o.mapper.toViewElement(n.item),a=o.writer;r&&a.removeClass(r.className,i),t&&a.addClass(t.className,i)}}}function ta(e){const t=e.filter((e)=>!e.isDefault);return(e,n,o)=>{if(n.modelRange){const e=n.viewItem,r=cr(n.modelRange.getItems());if(o.schema.checkAttribute(r,'imageStyle'))for(const n of t)o.consumable.consume(e,{classes:n.className})&&o.writer.setAttribute('imageStyle',n.name,r)}}}function na(e,t){for(const n of t)if(n.name===e)return n}function oa(e=[]){return e.map(ra).map((e)=>Object.assign({},e))}function ra(e){if('string'==typeof e){const t=e;Py[t]?e=Object.assign({},Py[t]):(Zm.warn('image-style-not-found: There is no such image style of given name.',{name:t}),e={name:t})}else if(Py[e.name]){const t=Py[e.name],n=Object.assign({},e);for(const o in t)e.hasOwnProperty(o)||(n[o]=t[o]);e=n}return'string'==typeof e.icon&&Sy[e.icon]&&(e.icon=Sy[e.icon]),e}function ia(e,t){for(const n of e)t[n.title]&&(n.title=t[n.title]);return e}function aa(e,t){return new pg(sa(e,t,!0),sa(e,t,!1))}function sa(e,t,n){let o=e.textNode||(n?e.nodeBefore:e.nodeAfter),r=null;for(;o&&o.getAttribute('linkHref')==t;)r=o,o=n?o.previousSibling:o.nextSibling;return r?cg.createAt(r,n?'before':'after'):e}function la(e){return e.is('attributeElement')&&!!e.getCustomProperty(My)}function da(e,t){const n=t.createAttributeElement('a',{href:e},{priority:5});return t.setCustomProperty(My,!0,n),n}function ca(e){return e+='',pa(e)?e:'#'}function pa(e){const t=e.replace(By,'');return t.match(qy)}function ua(e,t,n,o){const r=new zy(t,n,o),i=t.document.selection;n.listenTo(e.document,'keydown',(e,t)=>{if(!i.isCollapsed)return;if(t.shiftKey||t.altKey||t.ctrlKey)return;const n=t.keyCode==tm.arrowright,o=t.keyCode==tm.arrowleft;if(!n&&!o)return;const a=i.getFirstPosition();let s;s=n?r.handleForwardMovement(a,t):r.handleBackwardMovement(a,t),s&&e.stop()},{priority:yd.get('high')+1})}function ma(e,t){return ga(e,t)||ha(e,t)}function ga(e,t){const{nodeBefore:n,nodeAfter:o}=e,r=!!n&&n.hasAttribute(t),i=!!o&&o.hasAttribute(t);return i&&(!r||n.getAttribute(t)!==o.getAttribute(t))}function ha(e,t){const{nodeBefore:n,nodeAfter:o}=e,r=!!n&&n.hasAttribute(t),i=!!o&&o.hasAttribute(t);return r&&(!i||n.getAttribute(t)!==o.getAttribute(t))}function fa(e,t){const{nodeBefore:n,nodeAfter:o}=e,r=!!n&&n.hasAttribute(t),i=!!o&&o.hasAttribute(t);return i&&r?o.getAttribute(t)!==n.getAttribute(t):void 0}function ba(e,t){return ma(e.getShiftedBy(-1),t)}function _a(e){return e.getAncestors().find((e)=>la(e))}function ka(e,t,n){const o=t?e[0]:e[e.length-1];if(o.is('listItem'))for(let r=o[t?'previousSibling':'nextSibling'],i=o.getAttribute('indent');r&&r.is('listItem')&&r.getAttribute('indent')>=n;)i>r.getAttribute('indent')&&(i=r.getAttribute('indent')),r.getAttribute('indent')==i&&e[t?'unshift':'push'](r),r=r[t?'previousSibling':'nextSibling']}function wa(e,t){return t.checkChild(e.parent,'listItem')&&!t.isObject(e)}function ya(e){const t=e.createContainerElement('li');return t.getFillerOffset=va,t}function va(){const e=!this.isEmpty&&('ul'==this.getChild(0).name||'ol'==this.getChild(0).name);return this.isEmpty||e?0:null}function xa(e,t,n){const o=n.consumable;if(o.test(t.item,'insert')&&o.test(t.item,'attribute:type')&&o.test(t.item,'attribute:indent')){o.consume(t.item,'insert'),o.consume(t.item,'attribute:type'),o.consume(t.item,'attribute:indent');const e=t.item,r=Da(e,n);Ba(e,r,n)}}function Ca(e,t,n){const o=n.mapper.toViewPosition(t.position).getLastMatchingPosition((e)=>!e.item.is('li')),r=o.nodeAfter,i=n.writer;i.breakContainer(zu.createBefore(r)),i.breakContainer(zu.createAfter(r));const a=r.parent,s=a.previousSibling,l=ju.createOn(a),d=i.remove(l);s&&s.nextSibling&&Ma(i,s,s.nextSibling);const c=n.mapper.toModelElement(r);qa(c.getAttribute('indent')+1,t.position,l.start,r,n);for(const o of ju.createIn(d).getItems())n.mapper.unbindViewElement(o);e.stop()}function Aa(e,t,n){if(!n.consumable.consume(t.item,'attribute:type'))return;const o=n.mapper.toViewElement(t.item),r=n.writer;r.breakContainer(zu.createBefore(o)),r.breakContainer(zu.createAfter(o));let i=o.parent;const a='numbered'==t.attributeNewValue?'ol':'ul';i=r.rename(i,a),Ma(r,i,i.nextSibling),Ma(r,i.previousSibling,i);for(const o of t.item.getChildren())n.consumable.consume(o,'insert')}function Ta(e,t,n){if(n.consumable.consume(t.item,'attribute:indent')){const e=n.mapper.toViewElement(t.item),o=n.writer;o.breakContainer(zu.createBefore(e)),o.breakContainer(zu.createAfter(e));const r=e.parent,i=r.previousSibling,a=ju.createOn(r);o.remove(a),i&&i.nextSibling&&Ma(o,i,i.nextSibling),qa(t.attributeOldValue+1,t.range.start,a.start,e,n),Ba(t.item,e,n);for(const e of t.item.getChildren())n.consumable.consume(e,'insert')}}function Ea(e,t,n){if('listItem'!=t.item.name){let e=n.mapper.toViewPosition(t.range.start);const o=n.writer,r=[];for(;('ul'==e.parent.name||'ol'==e.parent.name)&&(e=o.breakContainer(e),'li'==e.parent.name);){const t=e,n=zu.createAt(e.parent,'end');if(!t.isEqual(n)){const e=o.remove(new ju(t,n));r.push(e)}e=zu.createAfter(e.parent)}if(0<r.length){for(let t=0;t<r.length;t++){const n=e.nodeBefore,i=o.insert(e,r[t]);if(e=i.end,0<t){const t=Ma(o,n,n.nextSibling);t&&t.parent==n&&e.offset--}}Ma(o,e.nodeBefore,e.nodeAfter)}}}function Pa(e,t,n){const o=n.mapper.toViewPosition(t.position),r=o.nodeBefore,i=o.nodeAfter;Ma(n.writer,r,i)}function Sa(e,t,n){if(n.consumable.consume(t.viewItem,{name:!0})){const e=n.writer,o=this.conversionApi.store,r=e.createElement('listItem');o.indent=o.indent||0,e.setAttribute('indent',o.indent,r);const i=t.viewItem.parent&&'ol'==t.viewItem.parent.name?'numbered':'bulleted';e.setAttribute('type',i,r),o.indent++;const a=n.splitToAllowedParent(r,t.modelCursor);if(!a)return;e.insert(r,a.position);let s=cg.createAfter(r);for(const e of t.viewItem.getChildren())'ul'==e.name||'ol'==e.name?s=n.convertItem(e,s).modelCursor:n.convertItem(e,cg.createAt(r,'end'));o.indent--,t.modelRange=new pg(t.modelCursor,s),t.modelCursor=a.cursorParent?cg.createAt(a.cursorParent):t.modelRange.end}}function Ra(e,t,n){if(n.consumable.test(t.viewItem,{name:!0})){const e=Array.from(t.viewItem.getChildren());for(const t of e)t.is('li')||t._remove()}}function Oa(e,t,n){if(n.consumable.test(t.viewItem,{name:!0})){if(0===t.viewItem.childCount)return;const e=[...t.viewItem.getChildren()];let n=!1,o=!0;for(const t of e)!n||t.is('ul')||t.is('ol')||t._remove(),t.is('text')?(o&&(t._data=t.data.replace(/^\s+/,'')),(!t.nextSibling||t.nextSibling.is('ul')||t.nextSibling.is('ol'))&&(t._data=t.data.replace(/\s+$/,''))):(t.is('ul')||t.is('ol'))&&(n=!0),o=!1}}function Ia(e,t){if(!t.isPhantom){const e=t.modelPosition.nodeBefore;if(e&&e.is('listItem')){const n=t.mapper.toViewElement(e),o=n.getAncestors().find((e)=>e.is('ul')||e.is('ol')),r=new qu({startPosition:zu.createAt(n,0)});for(const e of r)if('elementStart'==e.type&&e.item.is('li')){t.viewPosition=e.previousPosition;break}else if('elementEnd'==e.type&&e.item==o){t.viewPosition=e.nextPosition;break}}}}function Na(e,t){const n=t.viewPosition,o=n.parent,r=t.mapper;if('ul'==o.name||'ol'==o.name){if(!n.isAtEnd){const e=r.toModelElement(n.nodeAfter);t.modelPosition=cg.createBefore(e)}else{const e=r.toModelElement(n.nodeBefore),o=r.getModelLength(n.nodeBefore);t.modelPosition=cg.createBefore(e).getShiftedBy(o)}e.stop()}else if('li'==o.name&&n.nodeBefore&&('ul'==n.nodeBefore.name||'ol'==n.nodeBefore.name)){const i=r.toModelElement(o);let a=1,s=n.nodeBefore;for(;s&&(s.is('ul')||s.is('ol'));)a+=r.getModelLength(s),s=s.previousSibling;t.modelPosition=cg.createBefore(i).getShiftedBy(a),e.stop()}}function Va(e,t){function n(e){const t=e.nodeBefore;if(!t||!t.is('listItem')){const t=e.nodeAfter;t&&t.is('listItem')&&a.set(t,t)}else{let n=t;if(a.has(n))return;for(;n.previousSibling&&n.previousSibling.is('listItem');)if(n=n.previousSibling,a.has(n))return;a.set(e.nodeBefore,n)}}function o(e){for(let n=0,o=null;e&&e.is('listItem');){const r=e.getAttribute('indent');if(r>n){let i;null===o?(o=r-n,i=n):(o>r&&(o=r),i=r-o),t.setAttribute('indent',i,e),s=!0}else o=null,n=e.getAttribute('indent')+1;e=e.nextSibling}}function r(e){for(let n=[],o=null;e&&e.is('listItem');){const r=e.getAttribute('indent');if(o&&o.getAttribute('indent')>r&&(n=n.slice(0,r+1)),0!=r)if(n[r]){const o=n[r];e.getAttribute('type')!=o&&(t.setAttribute('type',o,e),s=!0)}else n[r]=e.getAttribute('type');o=e,e=e.nextSibling}}const i=e.document.differ.getChanges(),a=new Map;let s=!1;for(const o of i)if('insert'==o.type&&'listItem'==o.name)n(o.position);else if('insert'==o.type&&'listItem'!=o.name){if('$text'!=o.name){const e=o.position.nodeAfter;e.hasAttribute('indent')&&(t.removeAttribute('indent',e),s=!0),e.hasAttribute('type')&&(t.removeAttribute('type',e),s=!0)}const e=o.position.getShiftedBy(o.length);n(e)}else'remove'==o.type&&'listItem'==o.name?n(o.position):'attribute'==o.type&&'indent'==o.attributeKey?n(o.range.start):'attribute'==o.type&&'type'==o.attributeKey&&n(o.range.start);for(const n of a.values())o(n),r(n);return s}function La(e,[t,n]){let o=t.is('documentFragment')?t.getChild(0):t;if(o&&o.is('listItem')){const e=n.getFirstPosition();let t=null;if(e.parent.is('listItem')?t=e.parent:e.nodeBefore&&e.nodeBefore.is('listItem')&&(t=e.nodeBefore),t){const e=t.getAttribute('indent');if(0<e)for(;o&&o.is('listItem');)o._setAttribute('indent',o.getAttribute('indent')+e),o=o.nextSibling}}}function Da(e,t){const n=t.mapper,o=t.writer,r='numbered'==e.getAttribute('type')?'ol':'ul',i=ya(o),a=o.createContainerElement(r,null);return o.insert(zu.createAt(a),i),n.bindElements(e,i),i}function Fa(e,t){const n=!!t.sameIndent,o=!!t.smallerIndent,r=e instanceof sg?e.getAttribute('indent'):t.indent;for(let i=e instanceof sg?e.previousSibling:e.nodeBefore;i&&'listItem'==i.name;){const e=i.getAttribute('indent');if(n&&r==e||o&&r>e)return i;i=i.previousSibling}return null}function Ma(e,t,n){return t&&n&&('ul'==t.name||'ol'==t.name)&&t.name==n.name?e.mergeContainers(zu.createAfter(t)):null}function Ba(e,t,n){const o=t.parent,r=n.mapper,i=n.writer;let a=r.toViewPosition(cg.createBefore(e));const s=Fa(e,{sameIndent:!0,smallerIndent:!0}),l=e.previousSibling;if(s&&s.getAttribute('indent')==e.getAttribute('indent')){const e=r.toViewElement(s);a=i.breakContainer(zu.createAfter(e))}else a=l&&'listItem'==l.name?r.toViewPosition(cg.createAt(l,'end')):r.toViewPosition(cg.createBefore(e));if(a=za(a),i.insert(a,o),l&&'listItem'==l.name){const e=r.toViewElement(l),n=new qu({boundaries:new ju(zu.createAt(e,0),a),ignoreElementEnd:!0});for(const e of n)if(e.item.is('li')){const o=i.breakContainer(zu.createBefore(e.item)),r=e.item.parent,a=zu.createAt(t,'end');Ma(i,a.nodeBefore,a.nodeAfter),i.move(ju.createOn(r),a),n.position=o}}else{const n=o.nextSibling;if(n&&(n.is('ul')||n.is('ol'))){let o=null;for(const t of n.getChildren()){const n=r.toModelElement(t);if(n&&n.getAttribute('indent')>e.getAttribute('indent'))o=t;else break}o&&(i.breakContainer(zu.createAfter(o)),i.move(ju.createOn(o.parent),zu.createAt(t,'end')))}}Ma(i,o,o.nextSibling),Ma(i,o.previousSibling,o)}function qa(e,t,n,o,r){const i=Fa(t,{sameIndent:!0,smallerIndent:!0,indent:e}),a=r.mapper,s=r.writer,l=i?i.getAttribute('indent'):null;let d;if(!i)d=n;else if(l==e){const e=a.toViewElement(i).parent;d=zu.createAfter(e)}else{const e=cg.createAt(i,'end');d=a.toViewPosition(e)}d=za(d);for(const i of[...o.getChildren()])(i.is('ul')||i.is('ol'))&&(d=s.move(ju.createOn(i),d).end,Ma(s,i,i.nextSibling),Ma(s,i.previousSibling,i))}function za(e){return e.getLastMatchingPosition((e)=>e.item.is('uiElement'))}function ja(e){let t=1;for(const n of e.getChildren())if('ul'==n.name||'ol'==n.name)for(const e of n.getChildren())t+=ja(e);return t}function Ua(){return(e)=>{e.on('element:table',(e,t,n)=>{const o=t.viewItem;if(!n.consumable.test(o,{name:!0}))return;const{rows:r,headingRows:i,headingColumns:a}=Ha(o),s={};a&&(s.headingColumns=a),i&&(s.headingRows=i);const l=n.writer.createElement('table',s),d=n.splitToAllowedParent(l,t.modelCursor);if(n.writer.insert(l,d.position),n.consumable.consume(o,{name:!0}),r.length)r.forEach((e)=>n.convertItem(e,cg.createAt(l,'end')));else{const e=n.writer.createElement('tableRow');n.writer.insert(e,cg.createAt(l,'end')),n.writer.insertElement('tableCell',cg.createAt(e,'end'))}t.modelRange=new pg(cg.createBefore(l),cg.createAfter(l)),t.modelCursor=d.cursorParent?cg.createAt(d.cursorParent):t.modelRange.end},{priority:'normal'})}}function Ha(e){const t={headingRows:0,headingColumns:0},n=[],o=[];let r;for(const i of Array.from(e.getChildren()))if('tbody'===i.name||'thead'===i.name||'tfoot'===i.name){'thead'!==i.name||r||(r=i);for(const e of Array.from(i.getChildren()))if('thead'===e.parent.name&&e.parent===r)t.headingRows++,n.push(e);else{o.push(e);const n=Wa(e,t,r);n>t.headingColumns&&(t.headingColumns=n)}}return t.rows=[...n,...o],t}function Wa(e){let t=0,n=0;for(const o=Array.from(e.getChildren()).filter((e)=>'th'===e.name||'td'===e.name);n<o.length&&'th'===o[n].name;){const e=o[n],r=parseInt(e.getAttribute('colspan')||1);t+=r,n++}return t}function Ga(e={}){return(t)=>t.on('insert:table',(t,n,o)=>{const r=n.item;if(!o.consumable.consume(r,'insert'))return;o.consumable.consume(r,'attribute:headingRows:table'),o.consumable.consume(r,'attribute:headingColumns:table');const i=e&&e.asWidget,a=o.writer.createContainerElement('table');let s;i&&(s=ni(a,o.writer));const l=new bv(r),d={headingRows:r.getAttribute('headingRows')||0,headingColumns:r.getAttribute('headingColumns')||0};for(const i of l){const{row:t,cell:n}=i,s=rs(os(t,d),a,o),l=r.getChild(t),c=ts(l,t,s,o);o.consumable.consume(n,'insert');const p=zu.createAt(c,'end');es(i,d,p,o,e)}const c=o.mapper.toViewPosition(n.range.start);o.mapper.bindElements(r,i?s:a),o.writer.insert(c,i?s:a)},{priority:'normal'})}function $a(e={}){return(t)=>t.on('insert:tableRow',(t,n,o)=>{const r=n.item;if(o.consumable.consume(r,'insert')){const t=r.parent,n=o.mapper.toViewElement(t),i=t.getChildIndex(r),a=new bv(t,{startRow:i,endRow:i}),s={headingRows:t.getAttribute('headingRows')||0,headingColumns:t.getAttribute('headingColumns')||0};for(const t of a){const a=rs(os(i,s),n,o),l=ts(r,i,a,o);o.consumable.consume(t.cell,'insert');const d=zu.createAt(l,'end');es(t,s,d,o,e)}}},{priority:'normal'})}function Ka(e={}){return(t)=>t.on('insert:tableCell',(t,n,o)=>{const r=n.item;if(o.consumable.consume(r,'insert')){const t=r.parent,n=t.parent,i=n.getChildIndex(t),a=new bv(n,{startRow:i,endRow:i}),s={headingRows:n.getAttribute('headingRows')||0,headingColumns:n.getAttribute('headingColumns')||0};for(const n of a)if(n.cell===r){const i=o.mapper.toViewElement(t),a=zu.createAt(i,t.getChildIndex(r));return void es(n,s,a,o,e)}}},{priority:'normal'})}function Za(e={}){const t=!!e.asWidget;return(e)=>e.on('attribute:headingRows:table',(e,n,o)=>{function r(e,t,n){return e>t&&e<n}const i=n.item;if(!o.consumable.consume(n.item,e.name))return;const a=o.mapper.toViewElement(i),s=n.attributeOldValue,l=n.attributeNewValue;if(l>s){const e=Array.from(i.getChildren()).filter(({index:e})=>r(e,s-1,l)),n=rs('thead',a,o);ls(e,n,o,'end');for(const n of e)for(const e of n.getChildren())Qa(e,'th',o,t);ss('tbody',a,o)}else{const e=Array.from(i.getChildren()).filter(({index:e})=>r(e,l-1,s)).reverse(),n=rs('tbody',a,o);ls(e,n,o);const d=new bv(i,{startRow:l?l-1:l,endRow:s-1}),c={headingRows:i.getAttribute('headingRows')||0,headingColumns:i.getAttribute('headingColumns')||0};for(const e of d)Xa(e,c,o,t);ss('thead',a,o)}},{priority:'normal'})}function Ja(e={}){const t=!!e.asWidget;return(e)=>e.on('attribute:headingColumns:table',(e,n,o)=>{const r=n.item;if(o.consumable.consume(n.item,e.name)){const e={headingRows:r.getAttribute('headingRows')||0,headingColumns:r.getAttribute('headingColumns')||0},i=n.attributeOldValue,a=n.attributeNewValue,s=(i>a?i:a)-1;for(const n of new bv(r))n.column>s||Xa(n,e,o,t)}},{priority:'normal'})}function Ya(){return(e)=>e.on('remove:tableRow',(e,t,n)=>{e.stop();const o=n.mapper.toViewPosition(t.position).getLastMatchingPosition((e)=>!e.item.is('tr')),r=o.nodeAfter,i=r.parent,a=ju.createOn(r),s=n.writer.remove(a);for(const o of ju.createIn(s).getItems())n.mapper.unbindViewElement(o);i.childCount||n.writer.remove(ju.createOn(i))},{priority:'higher'})}function Qa(e,t,n,o){const r=n.mapper.toViewElement(e);let i;if(o){const e=n.writer.createEditableElement(t,r.getAttributes());i=ai(e,n.writer),n.writer.insert(zu.createAfter(r),i),n.writer.move(ju.createIn(r),zu.createAt(i)),n.writer.remove(ju.createOn(r))}else i=n.writer.rename(r,t);n.mapper.bindElements(e,i)}function Xa(e,t,n,o){const{cell:r}=e,i=ns(e,t),a=n.mapper.toViewElement(r);a&&a.name!==i&&Qa(r,i,n,o)}function es(e,t,n,o,r){const i=r&&r.asWidget,a=ns(e,t),s=i?ai(o.writer.createEditableElement(a),o.writer):o.writer.createContainerElement(a),l=e.cell;o.mapper.bindElements(l,s),o.writer.insert(n,s)}function ts(e,t,n,o){let r=o.mapper.toViewElement(e);if(!r){o.consumable.consume(e,'insert'),r=o.writer.createContainerElement('tr'),o.mapper.bindElements(e,r);const i=e.parent.getAttribute('headingRows')||0,a=0<i&&t>=i?t-i:t,s=zu.createAt(n,a);o.writer.insert(s,r)}return r}function ns(e,t){const{row:n,column:o}=e,{headingColumns:r,headingRows:i}=t;if(i&&i>n)return'th';return r&&r>o?'th':'td'}function os(e,t){return e<t.headingRows?'thead':'tbody'}function rs(e,t,n){const o=is(e,t);return o?o:as(e,t,n)}function is(e,t){for(const n of t.getChildren())if(n.name==e)return n}function as(e,t,n){const o=n.writer.createContainerElement(e);return n.writer.insert(zu.createAt(t,'tbody'==e?'end':'start'),o),o}function ss(e,t,n){const o=is(e,t);o&&0===o.childCount&&n.writer.remove(ju.createOn(o))}function ls(e,t,n,o){for(const r of e){const e=n.mapper.toViewElement(r);n.writer.move(ju.createOn(e),zu.createAt(t,o))}}function ds(e){for(let t=e.parent;t;){if('table'===t.name)return t;t=t.parent}}function cs(e,t,n,o,r=1){t>r?o.setAttribute(e,t,n):o.removeAttribute(e,n)}function ps(e,t,n,o,r,i={}){for(let a=0;a<o;a++){const o=e.createElement('tableRow');e.insert(o,t,n),us(r,e,cg.createAt(o,'end'),i)}}function us(e,t,n,o={}){for(let r=0;r<e;r++)t.insertElement('tableCell',o,n)}function ms(e,n){if(e<n)return{newCellsSpan:1,updatedSpan:1};const o=t(e/n);return{newCellsSpan:o,updatedSpan:e-o*n+o}}function gs(e){const t=e.parent;return t===t.root?t:t.parent}function hs(e,t){return'right'==t?e.nextSibling:e.previousSibling}function fs(e,t){const n=e.parent,o=n.parent,r=o.getChildIndex(n);if('down'==t&&r===o.childCount-1||'up'==t&&0===r)return;const i=o.getAttribute('headingRows')||0;if(i&&('down'==t&&r===i-1||'up'==t&&r===i))return;const a=parseInt(e.getAttribute('rowspan')||1),s='down'==t?r+a:r,l=[...new bv(o,{endRow:s})],d=l.find((t)=>t.cell===e),c=d.column,p=l.find(({row:e,column:n})=>n===c&&('down'==t?s===e:s===a+e));return p&&p.cell}function bs(e,t,n){const o=[],r=t>n?n:0,i=new bv(e,{startRow:r,endRow:t});for(const{row:r,rowspan:a,cell:s}of i)1<a&&r+a>t&&o.push(s);return o}function _s(e,t,n,o){const r=e.getAttribute(t)||0;n!==r&&cs(t,n,e,o,0)}function ks(e,t,n){const o=e.parent,r=o.parent,i=o.index,a=parseInt(e.getAttribute('rowspan')),s=t-i,l={},d=a-s;1<d&&(l.rowspan=d);const c=r.getChildIndex(o),p=c+s,u=[...new bv(r,{startRow:c,endRow:p,includeSpanned:!0})];let m;for(const{row:o,column:i,cell:a,colspan:s,cellIndex:d}of u)if(a===e&&(m=i,1<s&&(l.colspan=s)),void 0!==m&&m===i&&o===p){const e=r.getChild(o);n.insertElement('tableCell',l,cg.createFromParentAndOffset(e,d))}cs('rowspan',s,e,n)}function ws(e){const t=e.match(/^([^:]+):/);return t?e+` Read more: ${Nv}#error-${t[1]}\n`:e}function ys(){let e='e';for(let n=0;8>n;n++)e+=t(65536*(1+Math.random())).toString(16).substring(1);return e}function vs(e,t){e[Bv]||(e[Bv]=t||ys())}function xs(e){return e[Bv]}function Cs(e){return e._events||Object.defineProperty(e,'_events',{value:{}}),e._events}function As(){return{callbacks:[],childEvents:[]}}function Ts(e,t){const n=Cs(e);if(n[t])return;let o=t,r=null;const i=[];for(;''!==o&&!n[o];)n[o]=As(),i.push(n[o]),r&&n[o].childEvents.push(r),r=o,o=o.substr(0,o.lastIndexOf(':'));if(''!==o){for(const e of i)e.callbacks=n[o].callbacks.slice();n[o].childEvents.push(r)}}function Es(e,t){const n=Cs(e)[t];if(!n)return[];let o=[n.callbacks];for(let r=0;r<n.childEvents.length;r++){const t=Es(e,n.childEvents[r]);o=o.concat(t)}return o}function Ps(e,t){let n;return e._events&&(n=e._events[t])&&n.callbacks.length?n.callbacks:-1<t.indexOf(':')?Ps(e,t.substr(0,t.lastIndexOf(':'))):null}function Ss(e,t,n){for(let[o,r]of e){r?'function'==typeof r&&(r=r(t.name)):r=t.name;const e=new Dv(t.source,r);e.path=[...t.path],o.fire(e,...n)}}function Rs(e,t,n){const o=Es(e,t);for(const r of o)for(let e=0;e<r.length;e++)r[e].callback==n&&(r.splice(e,1),e--)}function Os(e,...t){t.forEach((t)=>{Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t)).forEach((n)=>{if(!(n in e.prototype)){const o=Object.getOwnPropertyDescriptor(t,n);o.enumerable=!1,Object.defineProperty(e.prototype,n,o)}})})}function Is(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}function Ns(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}function Vs(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}function Ls(e){this.__data__=new Gv(e)}function Ds(e,t,n){var o=e[t];xx.call(e,t)&&jv(o,n)&&(n!==void 0||t in e)||(e[t]=n)}function Fs(e,t){return Sx.call(e,t)||'object'==typeof e&&t in e&&null===Ex(e)}function Ms(e){return oC(Object(e))}function Bs(e){return xC.call(e)}function qs(e,t,n,o,r,i,a){var s;if(o&&(s=i?o(e,r,i,a):o(e)),void 0!==s)return s;if(!$v(e))return e;var l=Hx(e);if(!l){var d=SC(e),c=d==rA||d==iA;if(Object(nA.a)(e))return tC(e,t);if(d==aA||d==oA||c&&!i){if(Yv(e))return i?e:{};if(s=tA(c?{}:e),!t)return iC(e,eC(s,e))}else{if(!sA[d])return i?e:{};s=QC(e,d,qs,t)}}else if(s=IC(e),!t)return nC(e,s);a||(a=new wx);var p=a.get(e);if(p)return p;if(a.set(e,s),!l)var u=n?lC(e):Xx(e);return yx(u||e,function(r,i){u&&(i=r,r=e[i]),Cx(s,i,qs(r,t,n,o,i,e,a))}),s}function zs(t,n){const o=e(t.length,n.length);for(let e=0;e<o;e++)if(t[e]!=n[e])return e;return t.length==n.length?'same':t.length<n.length?'prefix':'extension'}function js(e){const t=new Map;for(const n in e)t.set(n,e[n]);return t}function Us(e){return!!(e&&e[Symbol.iterator])}function Hs(e,t){if('function'==typeof t)return t(e);const n={};return t.name&&(n.name=Ws(t.name,e.name),!n.name)?null:t.attributes&&(n.attributes=Gs(t.attributes,e),!n.attributes)?null:!(t.classes&&(n.classes=$s(t.classes,e),!n.classes))&&!(t.styles&&(n.styles=Ks(t.styles,e),!n.styles))&&n}function Ws(e,t){return e instanceof RegExp?e.test(t):e===t}function Gs(e,t){const n=[];for(const o in e){const r=e[o];if(t.hasAttribute(o)){const e=t.getAttribute(o);if(!0===r)n.push(o);else if(r instanceof RegExp){if(r.test(e))n.push(o);else return null;}else if(e===r)n.push(o);else return null}else return null}return n}function $s(e,t){const n=[];for(const o of e)if(o instanceof RegExp){const e=t.getClassNames();for(const t of e)o.test(t)&&n.push(t);if(0===n.length)return null}else if(t.hasClass(o))n.push(o);else return null;return n}function Ks(e,t){const n=[];for(const o in e){const r=e[o];if(t.hasStyle(o)){const e=t.getStyle(o);if(r instanceof RegExp){if(r.test(e))n.push(o);else return null;}else if(e===r)n.push(o);else return null}else return null}return n}function Zs(e){e=bA(e)?js(e):new Map(e);for(const[t,n]of e)null===n?e.delete(t):'string'!=typeof n&&e.set(t,n+'');return e}function Js(e,t){let n=null,o=0,r=0,a=null;if(e.clear(),''!==t){';'!=t.charAt(t.length-1)&&(t+=';');for(let s=0;s<t.length;s++){const i=t.charAt(s);if(null===n)switch(i){case':':a||(a=t.substr(o,s-o),r=s+1);break;case'"':case'\'':n=i;break;case';':const l=t.substr(r,s-r);a&&e.set(a.trim(),l.trim()),a=null,o=s+1;}else i===n&&(n=null)}}}function Ys(e,t){const n=t.split(/\s+/);e.clear(),n.forEach((t)=>e.add(t))}function Qs(e){return'string'==typeof e?[new cA(e)]:(Us(e)||(e=[e]),Array.from(e).map((e)=>'string'==typeof e?new cA(e):e instanceof pA?new cA(e.data):e))}function Xs(){for(const e of this.getChildren())if(!e.is('uiElement'))return null;return this.childCount}function el(e,t,n){if(!$v(n))return!1;var o=typeof t;return!('number'==o?!(Lx(n)&&Jx(t,n.length)):!('string'==o&&t in n))&&jv(n[t],e)}function tl(e){e=null==e?e:Object(e);var t=[];for(var n in e)t.push(n);return t}function nl(e){QA in e||(Object.defineProperty(e,QA,{value:new Map}),Object.defineProperty(e,XA,{value:new Map}),Object.defineProperty(e,eT,{value:new Map}))}function ol(...e){const t=sl(...e),n=Array.from(this._bindings.keys()),o=n.length;if(!t.callback&&1<t.to.length)throw new Vv('observable-bind-to-no-callback: Binding multiple observables only possible with callback.');if(1<o&&t.callback)throw new Vv('observable-bind-to-extra-callback: Cannot bind multiple properties and use a callback in one binding.');t.to.forEach((e)=>{if(e.properties.length&&e.properties.length!==o)throw new Vv('observable-bind-to-properties-length: The number of properties must match.');e.properties.length||(e.properties=this._bindProperties)}),this._to=t.to,t.callback&&(this._bindings.get(n[0]).callback=t.callback),pl(this._observable,this._to),dl(this),this._bindProperties.forEach((e)=>{cl(this._observable,e)})}function rl(e,t,n){if(1<this._bindings.size)throw new Vv('observable-bind-to-many-not-one-binding: Cannot bind multiple properties with toMany().');this.to(...il(e,t),n)}function il(e,t){const n=e.map((e)=>[e,t]);return Array.prototype.concat.apply([],n)}function al(e){return e.every((e)=>'string'==typeof e)}function sl(...e){if(!e.length)throw new Vv('observable-bind-to-parse-error: Invalid argument syntax in `to()`.');const t={to:[]};let n;return'function'==typeof e[e.length-1]&&(t.callback=e.pop()),e.forEach((e)=>{if('string'==typeof e)n.properties.push(e);else if('object'==typeof e)n={observable:e,properties:[]},t.to.push(n);else throw new Vv('observable-bind-to-parse-error: Invalid argument syntax in `to()`.')}),t}function ll(e,t,n,o){const r=e[XA],i=r.get(n),a=i||{};a[o]||(a[o]=new Set),a[o].add(t),i||r.set(n,a)}function dl(e){let t;e._bindings.forEach((n,o)=>{e._to.forEach((r)=>{t=r.properties[n.callback?0:e._bindProperties.indexOf(o)],n.to.push([r.observable,t]),ll(e._observable,n,r.observable,t)})})}function cl(e,t){const n=e[eT],o=n.get(t);let r;o.callback?r=o.callback.apply(e,o.to.map((e)=>e[0][e[1]])):(r=o.to[0],r=r[0][r[1]]),e.hasOwnProperty(t)?e[t]=r:e.set(t,r)}function pl(e,t){t.forEach((t)=>{const n=e[XA];let o;n.get(t.observable)||e.listenTo(t.observable,'change',(r,i)=>{o=n.get(t.observable)[i],o&&o.forEach((t)=>{cl(e,t.property)})})})}function ul(e){return!!(e.item.is('attributeElement')||e.item.is('uiElement'))}function ml(e){let t=0;for(const n of e)t++;return t}function gl(e){return'string'==typeof e?[new cA(e)]:(Us(e)||(e=[e]),Array.from(e).map((e)=>'string'==typeof e?new cA(e):e instanceof pA?new cA(e.data):e))}function hl(e){return e instanceof Text&&e.data.substr(0,fT)===bT}function fl(e){return e.data.length==fT&&hl(e)}function bl(e){return hl(e)?e.data.slice(fT):e.data}function _l(e,t){let n=_T.get(t);return n||(n=t(window.document),_T.set(t,n)),e.isEqualNode(n)}function kl(e){let t=0;for(;e.previousSibling;)e=e.previousSibling,t++;return t}function wl(e){const t=[];for(;e&&e.nodeType!=Node.DOCUMENT_NODE;)t.unshift(e),e=e.parentNode;return t}function yl(e,t){const n=wl(e),o=wl(t);let r=0;for(;n[r]==o[r]&&n[r];)r++;return 0==r?null:n[r-1]}function vl(e){return'[object Text]'==Object.prototype.toString.call(e)}function xl(e,t,n){let o=wl(e);return n&&(o=o.slice(o.indexOf(n)+1)),o.some((e)=>e.tagName&&t.includes(e.tagName.toLowerCase()))}function Cl(e,t){for(;e&&e!=kT.document;)t(e),e=e.parentNode}function Al(e){e.addRule('highlightedCodeBlock',{filter:function(e){var t=e.firstChild;return'DIV'===e.nodeName&&vT.test(e.className)&&t&&'PRE'===t.nodeName},replacement:function(e,t,n){var o=t.className||'',r=(o.match(vT)||[null,''])[1];return'\n\n'+n.fence+r+'\n'+t.firstChild.textContent+'\n'+n.fence+'\n\n'}})}function Tl(e){e.addRule('strikethrough',{filter:['del','s','strike'],replacement:function(e){return'~'+e+'~'}})}function El(e){var t=e.parentNode;return'THEAD'===t.nodeName||t.firstChild===e&&('TABLE'===t.nodeName||Pl(t))&&CT.call(e.childNodes,function(e){return'TH'===e.nodeName})}function Pl(e){var t=e.previousSibling;return'TBODY'===e.nodeName&&(!t||'THEAD'===t.nodeName&&/^\s*$/i.test(t.textContent))}function Sl(e,t){var n=xT.call(t.parentNode.childNodes,t),o=' ';return 0===n&&(o='| '),o+e+' |'}function Rl(e){for(var t in e.keep(function(e){return'TABLE'===e.nodeName&&!El(e.rows[0])}),AT)e.addRule(t,AT[t])}function Ol(e){e.addRule('taskListItems',{filter:function(e){return'checkbox'===e.type&&'LI'===e.parentNode.nodeName},replacement:function(e,t){return(t.checked?'[x]':'[ ]')+' '}})}function Il(e){e.use([Al,Tl,Rl,Ol])}function Nl(e){for(var t=1,n;t<arguments.length;t++)for(var o in n=arguments[t],n)n.hasOwnProperty(o)&&(e[o]=n[o]);return e}function Vl(e,t){return Array(t+1).join(e)}function Ll(e){return-1!==TT.indexOf(e.nodeName.toLowerCase())}function Dl(e){return-1!==ET.indexOf(e.nodeName.toLowerCase())}function Fl(e){return e.querySelector&&e.querySelector(PT)}function Ml(e){for(var t in this.options=e,this._keep=[],this._remove=[],this.blankRule={replacement:e.blankReplacement},this.keepReplacement=e.keepReplacement,this.defaultRule={replacement:e.defaultReplacement},this.array=[],e.rules)this.array.push(e.rules[t])}function Bl(e,t,n){for(var o=0,r;o<e.length;o++)if(r=e[o],ql(r,t,n))return r}function ql(e,t,n){var o=e.filter;if('string'==typeof o){if(o===t.nodeName.toLowerCase())return!0;}else if(Array.isArray(o)){if(-1<o.indexOf(t.nodeName.toLowerCase()))return!0;}else if(!('function'==typeof o))throw new TypeError('`filter` needs to be a string, array, or function');else if(o.call(e,t,n))return!0}function zl(e){var t=e.element,n=e.isBlock,o=e.isVoid,r=e.isPre||function(e){return'PRE'===e.nodeName};if(t.firstChild&&!r(t)){for(var i=null,a=!1,s=null,l=Ul(s,t,r);l!==t;){if(3===l.nodeType||4===l.nodeType){var d=l.data.replace(/[ \r\n\t]+/g,' ');if(i&&!/ $/.test(i.data)||a||' '!==d[0]||(d=d.substr(1)),!d){l=jl(l);continue}l.data=d,i=l}else if(1===l.nodeType)n(l)||'BR'===l.nodeName?(i&&(i.data=i.data.replace(/ $/,'')),i=null,a=!1):o(l)&&(i=null,a=!0);else{l=jl(l);continue}var c=Ul(s,l,r);s=l,l=c}i&&(i.data=i.data.replace(/ $/,''),!i.data&&jl(i))}}function jl(e){var t=e.nextSibling||e.parentNode;return e.parentNode.removeChild(e),t}function Ul(e,t,n){return e&&e.parentNode===t||n(t)?t.nextSibling||t.parentNode:t.firstChild||t.nextSibling||t.parentNode}function Hl(e){var t;if('string'==typeof e){var n=Wl().parseFromString('<x-turndown id="turndown-root">'+e+'</x-turndown>','text/html');t=n.getElementById('turndown-root')}else t=e.cloneNode(!0);return zl({element:t,isBlock:Ll,isVoid:Dl}),t}function Wl(){return LT=LT||new OT,LT}function Gl(e){return e.isBlock=Ll(e),e.isCode='code'===e.nodeName.toLowerCase()||e.parentNode.isCode,e.isBlank=$l(e),e.flankingWhitespace=Kl(e),e}function $l(e){return-1===['A','TH','TD'].indexOf(e.nodeName)&&/^\s*$/i.test(e.textContent)&&!Dl(e)&&!Fl(e)}function Kl(e){var t='',n='';if(!e.isBlock){var o=/^[ \r\n\t]/.test(e.textContent),r=/[ \r\n\t]$/.test(e.textContent);o&&!Zl('left',e)&&(t=' '),r&&!Zl('right',e)&&(n=' ')}return{leading:t,trailing:n}}function Zl(e,t){var n,o,r;return'left'===e?(n=t.previousSibling,o=/ $/):(n=t.nextSibling,o=/^ /),n&&(3===n.nodeType?r=o.test(n.nodeValue):1===n.nodeType&&!Ll(n)&&(r=o.test(n.textContent))),r}function Jl(e){if(!(this instanceof Jl))return new Jl(e);this.options=Nl({},{rules:ST,headingStyle:'setext',hr:'* * *',bulletListMarker:'*',codeBlockStyle:'indented',fence:'```',emDelimiter:'_',strongDelimiter:'**',linkStyle:'inlined',linkReferenceStyle:'full',br:' ',blankReplacement:function(e,t){return t.isBlock?'\n\n':''},keepReplacement:function(e,t){return t.isBlock?'\n\n'+t.outerHTML+'\n\n':t.outerHTML},defaultReplacement:function(e,t){return t.isBlock?'\n\n'+e+'\n\n':e}},e),this.rules=new Ml(this.options)}function Yl(e){var t=this;return IT.call(e.childNodes,function(e,n){n=new Gl(n);var o='';return 3===n.nodeType?o=n.isCode?n.nodeValue:t.escape(n.nodeValue):1===n.nodeType&&(o=Xl.call(t,n)),td(e,o)},'')}function Ql(e){var t=this;return this.rules.forEach(function(n){'function'==typeof n.append&&(e=td(e,n.append(t.options)))}),e.replace(/^[\t\r\n]+/,'').replace(/[\t\r\n\s]+$/,'')}function Xl(e){var t=this.rules.forNode(e),n=Yl.call(this,e),o=e.flankingWhitespace;return(o.leading||o.trailing)&&(n=n.trim()),o.leading+t.replacement(n,e,this.options)+o.trailing}function ed(e,t){var n=[e.match(VT)[0],t.match(NT)[0]].sort(),o=n[n.length-1];return 2>o.length?o:'\n\n'}function td(e,t){var n=ed(e,t);return e=e.replace(VT,''),t=t.replace(NT,''),e+n+t}function nd(e){return null!=e&&('string'==typeof e||e.nodeType&&(1===e.nodeType||9===e.nodeType||11===e.nodeType))}var od=Number.POSITIVE_INFINITY,rd=Math.max;Object.defineProperty(r,'__esModule',{value:!0});var id=Object.getPrototypeOf,ad=function(e){return id(Object(e))},sd=function(e){var t=!1;if(null!=e&&'function'!=typeof e.toString)try{t=!!(e+'')}catch(t){}return t},ld=function(e){return!!e&&'object'==typeof e},dd=Object.prototype,cd=Function.prototype.toString,pd=dd.hasOwnProperty,ud=cd.call(Object),md=dd.toString,gd=function(e){if(!ld(e)||md.call(e)!='[object Object]'||sd(e))return!1;var t=ad(e);if(null===t)return!0;var n=pd.call(t,'constructor')&&t.constructor;return'function'==typeof n&&n instanceof n&&cd.call(n)==ud};class hd{constructor(e,t){this._config={},t&&this.define(t),e&&this._setObjectToTarget(this._config,e)}set(e,t){this._setToTarget(this._config,e,t)}define(e,t){this._setToTarget(this._config,e,t,!0)}get(e){return this._getFromSource(this._config,e)}_setToTarget(e,t,n,o=!1){if(gd(t))return void this._setObjectToTarget(e,t,o);const r=t.split('.');t=r.pop();for(const i of r)gd(e[i])||(e[i]={}),e=e[i];return gd(n)?(gd(e[t])||(e[t]={}),e=e[t],void this._setObjectToTarget(e,n,o)):void(o&&'undefined'!=typeof e[t]||(e[t]=n))}_getFromSource(e,t){const n=t.split('.');t=n.pop();for(const o of n){if(!gd(e[o])){e=null;break}e=e[o]}return e?e[t]:void 0}_setObjectToTarget(e,t,n){Object.keys(t).forEach((o)=>{this._setToTarget(e,o,t[o],n)})}}const fd='https://docs.ckeditor.com/ckeditor5/latest/framework/guides/support/error-codes.html';class bd extends Error{constructor(e,t){e=a(e),t&&(e+=' '+JSON.stringify(t)),super(e),this.name='CKEditorError',this.data=t}static isCKEditorError(e){return e instanceof bd}}var _d=function(){return function e(){e.called=!0}};class kd{constructor(e,t){this.source=e,this.name=t,this.path=[],this.stop=_d(),this.off=_d()}}const wd={get(e){return'number'==typeof e?e:this[e]||this.normal},highest:1e5,high:1e3,normal:0,low:-1e3,lowest:-1e5};var yd=wd;const vd=Symbol('listeningTo'),xd=Symbol('emitterId'),Cd={on(e,t,n={}){this.listenTo(this,e,t,n)},once(e,t,n){this.listenTo(this,e,function(e,...n){e.off(),t.call(this,e,...n)},n)},off(e,t){this.stopListening(this,e,t)},listenTo(e,t,n,o={}){let r,i;this[vd]||(this[vd]={});const a=this[vd];c(e)||d(e);const s=c(e);(r=a[s])||(r=a[s]={emitter:e,callbacks:{}}),(i=r.callbacks[t])||(i=r.callbacks[t]=[]),i.push(n),m(e,t);const l=g(e,t),p=yd.get(o.priority),u={callback:n,priority:p};for(const r of l){let e=!1;for(let t=0;t<r.length;t++)if(r[t].priority<p){r.splice(t,0,u),e=!0;break}e||r.push(u)}},stopListening(e,t,n){const o=this[vd];let r=e&&c(e);const i=o&&r&&o[r],a=i&&t&&i.callbacks[t];if(o&&(!e||i)&&(!t||a))if(n)b(e,t,n);else if(a){for(;n=a.pop();)b(e,t,n);delete i.callbacks[t]}else if(i){for(t in i.callbacks)this.stopListening(e,t);delete o[r]}else{for(r in o)this.stopListening(o[r].emitter);delete this[vd]}},fire(e,...t){const n=e instanceof kd?e:new kd(this,e),o=n.name;let r=h(this,o);if(n.path.push(this),r){const e=[n,...t];r=Array.from(r);for(let t=0;t<r.length&&(r[t].callback.apply(this,e),n.off.called&&(delete n.off.called,b(this,o,r[t].callback)),!n.stop.called);t++);}if(this._delegations){const e=this._delegations.get(o),r=this._delegations.get('*');e&&f(e,n,t),r&&f(r,n,t)}return n.return},delegate(...e){return{to:(t,n)=>{this._delegations||(this._delegations=new Map);for(const o of e){const e=this._delegations.get(o);e?e.set(t,n):this._delegations.set(o,new Map([[t,n]]))}}}},stopDelegating(e,t){if(this._delegations)if(!e)this._delegations.clear();else if(!t)this._delegations.delete(e);else{const n=this._delegations.get(e);n&&n.delete(t)}}};var Ad=Cd,Td=function(e,t){return e===t||e!==e&&t!==t},Ed=function(e,t){for(var n=e.length;n--;)if(Td(e[n][0],t))return n;return-1},Pd=Array.prototype,Sd=Pd.splice;k.prototype.clear=function(){this.__data__=[]},k.prototype['delete']=function(e){var t=this.__data__,n=Ed(t,e);if(0>n)return!1;var o=t.length-1;return n==o?t.pop():Sd.call(t,n,1),!0},k.prototype.get=function(e){var t=this.__data__,n=Ed(t,e);return 0>n?void 0:t[n][1]},k.prototype.has=function(e){return-1<Ed(this.__data__,e)},k.prototype.set=function(e,t){var n=this.__data__,o=Ed(n,e);return 0>o?n.push([e,t]):n[o][1]=t,this};var Rd=k,Od=function(e){var t=typeof e;return!!e&&('object'==t||'function'==t)},Id=Object.prototype,Nd=Id.toString,Vd=function(e){var t=Od(e)?Nd.call(e):'';return t=='[object Function]'||t=='[object GeneratorFunction]'},Ld=Function.prototype.toString,Dd=function(e){if(null!=e){try{return Ld.call(e)}catch(t){}try{return e+''}catch(t){}}return''},Fd=/[\\^$.*+?()[\]{}|]/g,Md=/^\[object .+?Constructor\]$/,Bd=Object.prototype,qd=Function.prototype.toString,zd=Bd.hasOwnProperty,jd=RegExp('^'+qd.call(zd).replace(Fd,'\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,'$1.*?')+'$'),Ud=function(e){if(!Od(e))return!1;var t=Vd(e)||sd(e)?jd:Md;return t.test(Dd(e))},Hd=function(e,t){var n=e[t];return Ud(n)?n:void 0},Wd=Hd(Object,'create'),Gd=Wd,$d=Object.prototype,Kd=$d.hasOwnProperty,Zd=Object.prototype,Jd=Zd.hasOwnProperty;w.prototype.clear=function(){this.__data__=Gd?Gd(null):{}},w.prototype['delete']=function(e){return this.has(e)&&delete this.__data__[e]},w.prototype.get=function(e){var t=this.__data__;if(Gd){var n=t[e];return n==='__lodash_hash_undefined__'?void 0:n}return Kd.call(t,e)?t[e]:void 0},w.prototype.has=function(e){var t=this.__data__;return Gd?t[e]!==void 0:Jd.call(t,e)},w.prototype.set=function(e,t){var n=this.__data__;return n[e]=Gd&&void 0===t?'__lodash_hash_undefined__':t,this};var Yd=w,Qd=i(2),Xd=Hd(Qd.a,'Map'),ec=Xd,tc=function(e){var t=typeof e;return'string'==t||'number'==t||'symbol'==t||'boolean'==t?'__proto__'!==e:null===e},nc=function(e,t){var n=e.__data__;return tc(t)?n['string'==typeof t?'string':'hash']:n.map};y.prototype.clear=function(){this.__data__={hash:new Yd,map:new(ec||Rd),string:new Yd}},y.prototype['delete']=function(e){return nc(this,e)['delete'](e)},y.prototype.get=function(e){return nc(this,e).get(e)},y.prototype.has=function(e){return nc(this,e).has(e)},y.prototype.set=function(e,t){return nc(this,e).set(e,t),this};var oc=y;v.prototype.clear=function(){this.__data__=new Rd},v.prototype['delete']=function(e){return this.__data__['delete'](e)},v.prototype.get=function(e){return this.__data__.get(e)},v.prototype.has=function(e){return this.__data__.has(e)},v.prototype.set=function(e,t){var n=this.__data__;return n instanceof Rd&&n.__data__.length==200&&(n=this.__data__=new oc(n.__data__)),n.set(e,t),this};var rc=v,ic=function(e,t){for(var n=-1,o=e.length;++n<o&&!(!1===t(e[n],n,e)););return e},ac=Object.prototype,sc=ac.hasOwnProperty,lc=x,dc=function(e,t,n,o){n||(n={});for(var r=-1,i=t.length;++r<i;){var a=t[r],s=o?o(n[a],e[a],a,n,e):e[a];lc(n,a,s)}return n},cc=Object.prototype,pc=cc.hasOwnProperty,uc=C,mc=Object.keys,gc=function(e){return mc(Object(e))},hc=function(e,t){for(var n=-1,o=Array(e);++n<e;)o[n]=t(n);return o},fc=function(e){return function(t){return null==t?void 0:t[e]}},bc=fc('length'),_c=function(e){return'number'==typeof e&&-1<e&&0==e%1&&e<=9007199254740991},kc=function(e){return null!=e&&_c(bc(e))&&!Vd(e)},wc=function(e){return ld(e)&&kc(e)},yc=Object.prototype,vc=yc.hasOwnProperty,xc=yc.toString,Cc=yc.propertyIsEnumerable,Ac=function(e){return wc(e)&&vc.call(e,'callee')&&(!Cc.call(e,'callee')||xc.call(e)=='[object Arguments]')},Tc=Array.isArray,Ec=Tc,Pc=Object.prototype,Sc=Pc.toString,Rc=function(e){return'string'==typeof e||!Ec(e)&&ld(e)&&Sc.call(e)=='[object String]'},Oc=function(e){var t=e?e.length:void 0;return _c(t)&&(Ec(e)||Rc(e)||Ac(e))?hc(t,String):null},Ic=/^(?:0|[1-9]\d*)$/,Nc=function(e,t){return t=null==t?9007199254740991:t,!!t&&('number'==typeof e||Ic.test(e))&&-1<e&&0==e%1&&e<t},Vc=Object.prototype,Lc=function(e){var t=e&&e.constructor,n='function'==typeof t&&t.prototype||Vc;return e===n},Dc=function(e){var t=Lc(e);if(!(t||kc(e)))return gc(e);var n=Oc(e),o=n||[],r=o.length;for(var i in e)!uc(e,i)||!!n&&('length'==i||Nc(i,r))||t&&'constructor'==i||o.push(i);return o},Fc=function(e,t){return e&&dc(t,Dc(t),e)},Mc=function(e,t){if(t)return e.slice();var n=new e.constructor(e.length);return e.copy(n),n},Bc=function(e,t){var n=-1,o=e.length;for(t||(t=Array(o));++n<o;)t[n]=e[n];return t},qc=Object.getOwnPropertySymbols;qc||(A=function(){return[]});var zc=A,jc=function(e,t){return dc(e,zc(e),t)},Uc=function(e,t){for(var n=-1,o=t.length,r=e.length;++n<o;)e[r+n]=t[n];return e},Hc=function(e,t,n){var o=t(e);return Ec(e)?o:Uc(o,n(e))},Wc=function(e){return Hc(e,Dc,zc)},Gc=Hd(Qd.a,'DataView'),$c=Gc,Kc=Hd(Qd.a,'Promise'),Zc=Kc,Jc=Hd(Qd.a,'Set'),Yc=Jc,Qc=Hd(Qd.a,'WeakMap'),Xc=Qc,ep='[object Map]',tp='[object Promise]',np='[object Set]',op='[object WeakMap]',rp='[object DataView]',ip=Object.prototype,ap=ip.toString,sp=Dd($c),lp=Dd(ec),dp=Dd(Zc),cp=Dd(Yc),pp=Dd(Xc);($c&&T(new $c(new ArrayBuffer(1)))!=rp||ec&&T(new ec)!=ep||Zc&&T(Zc.resolve())!=tp||Yc&&T(new Yc)!=np||Xc&&T(new Xc)!=op)&&(T=function(e){var t=ap.call(e),n=t=='[object Object]'?e.constructor:void 0,o=n?Dd(n):void 0;if(o)switch(o){case sp:return rp;case lp:return ep;case dp:return tp;case cp:return np;case pp:return op;}return t});var up=T,mp=Object.prototype,gp=mp.hasOwnProperty,hp=function(e){var t=e.length,n=e.constructor(t);return t&&'string'==typeof e[0]&&gp.call(e,'index')&&(n.index=e.index,n.input=e.input),n},fp=Qd.a.Uint8Array,bp=fp,_p=function(e){var t=new e.constructor(e.byteLength);return new bp(t).set(new bp(e)),t},kp=function(e,t){var n=t?_p(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)},wp=function(e,t){return e.set(t[0],t[1]),e},yp=function(e,t,n,o){var r=-1,i=e.length;for(o&&i&&(n=e[++r]);++r<i;)n=t(n,e[r],r,e);return n},vp=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,o){n[++t]=[o,e]}),n},xp=function(e,t,n){var o=t?n(vp(e),!0):vp(e);return yp(o,wp,new e.constructor)},Cp=/\w*$/,Ap=function(e){var t=new e.constructor(e.source,Cp.exec(e));return t.lastIndex=e.lastIndex,t},Tp=function(e,t){return e.add(t),e},Ep=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n},Pp=function(e,t,n){var o=t?n(Ep(e),!0):Ep(e);return yp(o,Tp,new e.constructor)},Sp=Qd.a.Symbol,Rp=Sp,Op=Rp?Rp.prototype:void 0,Ip=Op?Op.valueOf:void 0,Np=function(e){return Ip?Object(Ip.call(e)):{}},Vp=function(e,t){var n=t?_p(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)},Lp=function(e,t,n,o){var r=e.constructor;return t==='[object ArrayBuffer]'?_p(e):t==='[object Boolean]'||t==='[object Date]'?new r(+e):t==='[object DataView]'?kp(e,o):t==='[object Float32Array]'||t==='[object Float64Array]'||t==='[object Int8Array]'||t==='[object Int16Array]'||t==='[object Int32Array]'||t==='[object Uint8Array]'||t==='[object Uint8ClampedArray]'||t==='[object Uint16Array]'||t==='[object Uint32Array]'?Vp(e,o):t==='[object Map]'?xp(e,o,n):t==='[object Number]'||t==='[object String]'?new r(e):t==='[object RegExp]'?Ap(e):t==='[object Set]'?Pp(e,o,n):t==='[object Symbol]'?Np(e):void 0},Dp=Object.create,Fp=function(e){return Od(e)?Dp(e):{}},Mp=function(e){return'function'!=typeof e.constructor||Lc(e)?{}:Fp(ad(e))},Bp=i(25),qp='[object Arguments]',zp='[object Function]',jp='[object GeneratorFunction]',Up='[object Object]',Hp={};Hp[qp]=Hp['[object Array]']=Hp['[object ArrayBuffer]']=Hp['[object DataView]']=Hp['[object Boolean]']=Hp['[object Date]']=Hp['[object Float32Array]']=Hp['[object Float64Array]']=Hp['[object Int8Array]']=Hp['[object Int16Array]']=Hp['[object Int32Array]']=Hp['[object Map]']=Hp['[object Number]']=Hp[Up]=Hp['[object RegExp]']=Hp['[object Set]']=Hp['[object String]']=Hp['[object Symbol]']=Hp['[object Uint8Array]']=Hp['[object Uint8ClampedArray]']=Hp['[object Uint16Array]']=Hp['[object Uint32Array]']=!0,Hp['[object Error]']=Hp[zp]=Hp['[object WeakMap]']=!1;var Wp=E,Gp=function(e){return Wp(e,!1,!0)};class $p{constructor(){this.parent=null}get index(){let e;if(!this.parent)return null;if(-1==(e=this.parent.getChildIndex(this)))throw new bd('view-node-not-found-in-parent: The node\'s parent does not contain this node.');return e}get nextSibling(){const e=this.index;return null!==e&&this.parent.getChild(e+1)||null}get previousSibling(){const e=this.index;return null!==e&&this.parent.getChild(e-1)||null}get root(){let e=this;for(;e.parent;)e=e.parent;return e}get document(){return this.parent instanceof $p?this.parent.document:null}getPath(){const e=[];for(let t=this;t.parent;)e.unshift(t.index),t=t.parent;return e}getAncestors(e={includeSelf:!1,parentFirst:!1}){const t=[];for(let n=e.includeSelf?this:this.parent;n;)t[e.parentFirst?'push':'unshift'](n),n=n.parent;return t}getCommonAncestor(e,t={}){const n=this.getAncestors(t),o=e.getAncestors(t);let r=0;for(;n[r]==o[r]&&n[r];)r++;return 0==r?null:n[r-1]}isBefore(e){if(this==e)return!1;if(this.root!==e.root)return!1;const t=this.getPath(),n=e.getPath(),o=P(t,n);return!('prefix'!==o)||'extension'!==o&&t[o]<n[o]}isAfter(e){return this!=e&&!(this.root!==e.root)&&!this.isBefore(e)}_remove(){this.parent._removeChildren(this.index)}_fireChange(e,t){this.fire('change:'+e,t),this.parent&&this.parent._fireChange(e,t)}toJSON(){const e=Gp(this);return delete e.parent,e}is(e){return'node'==e}}_($p,Ad);class Kp extends $p{constructor(e){super(),this._textData=e}is(e){return'text'==e||super.is(e)}get data(){return this._textData}get _data(){return this.data}set _data(e){this._fireChange('text',this),this._textData=e}isSimilar(e){return!!(e instanceof Kp)&&(this===e||this.data===e.data)}_clone(){return new Kp(this.data)}}class Zp{constructor(e,t,n){if(this.textNode=e,0>t||t>e.data.length)throw new bd('view-textproxy-wrong-offsetintext: Given offsetInText value is incorrect.');if(0>n||t+n>e.data.length)throw new bd('view-textproxy-wrong-length: Given length value is incorrect.');this.data=e.data.substring(t,t+n),this.offsetInText=t}get offsetSize(){return this.data.length}get isPartial(){return this.data.length!==this.textNode.data.length}get parent(){return this.textNode.parent}get root(){return this.textNode.root}get document(){return this.textNode.document}is(e){return'textProxy'==e}getAncestors(e={includeSelf:!1,parentFirst:!1}){const t=[];for(let n=e.includeSelf?this.textNode:this.parent;null!==n;)t[e.parentFirst?'push':'unshift'](n),n=n.parent;return t}}class Jp{constructor(...e){this._patterns=[],this.add(...e)}add(...e){for(let t of e)('string'==typeof t||t instanceof RegExp)&&(t={name:t}),t.classes&&('string'==typeof t.classes||t.classes instanceof RegExp)&&(t.classes=[t.classes]),this._patterns.push(t)}match(...e){for(const t of e)for(const e of this._patterns){const n=O(t,e);if(n)return{element:t,pattern:e,match:n}}return null}matchAll(...e){const t=[];for(const n of e)for(const e of this._patterns){const o=O(n,e);o&&t.push({element:n,pattern:e,match:o})}return 0<t.length?t:null}getElementName(){if(1!==this._patterns.length)return null;const e=this._patterns[0],t=e.name;return'function'!=typeof e&&t&&!(t instanceof RegExp)?t:null}}class Yp extends $p{constructor(e,t,n){if(super(),this.name=e,this._attrs=D(t),this._children=[],n&&this._insertChild(0,n),this._classes=new Set,this._attrs.has('class')){const e=this._attrs.get('class');M(this._classes,e),this._attrs.delete('class')}this._styles=new Map,this._attrs.has('style')&&(F(this._styles,this._attrs.get('style')),this._attrs.delete('style')),this._customProperties=new Map}get childCount(){return this._children.length}get isEmpty(){return 0===this._children.length}is(e,t=null){return t?'element'==e&&t==this.name:'element'==e||e==this.name||super.is(e)}getChild(e){return this._children[e]}getChildIndex(e){return this._children.indexOf(e)}getChildren(){return this._children[Symbol.iterator]()}*getAttributeKeys(){0<this._classes.size&&(yield'class'),0<this._styles.size&&(yield'style');for(const e of this._attrs.keys())yield e}*getAttributes(){yield*this._attrs.entries(),0<this._classes.size&&(yield['class',this.getAttribute('class')]),0<this._styles.size&&(yield['style',this.getAttribute('style')])}getAttribute(e){if('class'==e)return 0<this._classes.size?[...this._classes].join(' '):void 0;if('style'==e){if(0<this._styles.size){let e='';for(const[t,n]of this._styles)e+=`${t}:${n};`;return e}return}return this._attrs.get(e)}hasAttribute(e){return'class'==e?0<this._classes.size:'style'==e?0<this._styles.size:this._attrs.has(e)}isSimilar(e){if(!(e instanceof Yp))return!1;if(this===e)return!0;if(this.name!=e.name)return!1;if(this._attrs.size!==e._attrs.size||this._classes.size!==e._classes.size||this._styles.size!==e._styles.size)return!1;for(const[t,n]of this._attrs)if(!e._attrs.has(t)||e._attrs.get(t)!==n)return!1;for(const t of this._classes)if(!e._classes.has(t))return!1;for(const[t,n]of this._styles)if(!e._styles.has(t)||e._styles.get(t)!==n)return!1;return!0}hasClass(...e){for(const t of e)if(!this._classes.has(t))return!1;return!0}getClassNames(){return this._classes.keys()}getStyle(e){return this._styles.get(e)}getStyleNames(){return this._styles.keys()}hasStyle(...e){for(const t of e)if(!this._styles.has(t))return!1;return!0}findAncestor(...e){const t=new Jp(...e);for(let n=this.parent;n;){if(t.match(n))return n;n=n.parent}return null}getCustomProperty(e){return this._customProperties.get(e)}*getCustomProperties(){yield*this._customProperties.entries()}getIdentity(){const e=Array.from(this._classes).sort().join(','),t=Array.from(this._styles).map((e)=>`${e[0]}:${e[1]}`).sort().join(';'),n=Array.from(this._attrs).map((e)=>`${e[0]}="${e[1]}"`).sort().join(' ');return this.name+(''==e?'':` class="${e}"`)+(''==t?'':` style="${t}"`)+(''==n?'':` ${n}`)}_clone(e=!1){const t=[];if(e)for(const n of this.getChildren())t.push(n._clone(e));const n=new this.constructor(this.name,this._attrs,t);return n._classes=new Set(this._classes),n._styles=new Map(this._styles),n._customProperties=new Map(this._customProperties),n.getFillerOffset=this.getFillerOffset,n}_appendChild(e){return this._insertChild(this.childCount,e)}_insertChild(e,t){this._fireChange('children',this);let n=0;const o=B(t);for(const r of o)null!==r.parent&&r._remove(),r.parent=this,this._children.splice(e,0,r),e++,n++;return n}_removeChildren(e,t=1){this._fireChange('children',this);for(let n=e;n<e+t;n++)this._children[n].parent=null;return this._children.splice(e,t)}_setAttribute(e,t){t=t+'',this._fireChange('attributes',this),'class'==e?M(this._classes,t):'style'==e?F(this._styles,t):this._attrs.set(e,t)}_removeAttribute(e){return this._fireChange('attributes',this),'class'==e?!!(0<this._classes.size)&&(this._classes.clear(),!0):'style'==e?!!(0<this._styles.size)&&(this._styles.clear(),!0):this._attrs.delete(e)}_addClass(e){this._fireChange('attributes',this),e=Array.isArray(e)?e:[e],e.forEach((e)=>this._classes.add(e))}_removeClass(e){this._fireChange('attributes',this),e=Array.isArray(e)?e:[e],e.forEach((e)=>this._classes.delete(e))}_setStyle(e,t){if(this._fireChange('attributes',this),gd(e)){const t=Object.keys(e);for(const n of t)this._styles.set(n,e[n])}else this._styles.set(e,t)}_removeStyle(e){this._fireChange('attributes',this),e=Array.isArray(e)?e:[e],e.forEach((e)=>this._styles.delete(e))}_setCustomProperty(e,t){this._customProperties.set(e,t)}_removeCustomProperty(e){return this._customProperties.delete(e)}}class Qp extends Yp{constructor(e,t,n){super(e,t,n),this.getFillerOffset=q}is(e,t=null){return t?'containerElement'==e&&t==this.name||super.is(e,t):'containerElement'==e||super.is(e)}}var Xp=z,eu=function(e,t,n){var o=n.length;return 0===o?e.call(t):1===o?e.call(t,n[0]):2===o?e.call(t,n[0],n[1]):3===o?e.call(t,n[0],n[1],n[2]):e.apply(t,n)},tu=Object.prototype,nu=tu.toString,ou=function(e){return'symbol'==typeof e||ld(e)&&nu.call(e)=='[object Symbol]'},ru=0/0,iu=/^\s+|\s+$/g,au=/^[-+]0x[0-9a-f]+$/i,su=/^0b[01]+$/i,lu=/^0o[0-7]+$/i,du=parseInt,cu=function(e){if('number'==typeof e)return e;if(ou(e))return ru;if(Od(e)){var t=Vd(e.valueOf)?e.valueOf():e;e=Od(t)?t+'':t}if('string'!=typeof e)return 0===e?e:+e;e=e.replace(iu,'');var n=su.test(e);return n||lu.test(e)?du(e.slice(2),n?2:8):au.test(e)?ru:+e},pu=1/0,uu=function(e){if(!e)return 0===e?e:0;if(e=cu(e),e===pu||e===-pu){var t=0>e?-1:1;return t*17976931348623157e292}return e===e?e:0},mu=function(e){var t=uu(e),n=t%1;return t===t?n?t-n:t:0},gu=rd,hu=function(e,t){if('function'!=typeof e)throw new TypeError('Expected a function');return t=gu(void 0===t?e.length-1:mu(t),0),function(){for(var n=arguments,o=-1,r=gu(n.length-t,0),i=Array(r);++o<r;)i[o]=n[t+o];switch(t){case 0:return e.call(this,i);case 1:return e.call(this,n[0],i);case 2:return e.call(this,n[0],n[1],i);}var a=Array(t+1);for(o=-1;++o<t;)a[o]=n[o];return a[t]=i,eu(e,this,a)}},fu=Qd.a.Reflect,bu=fu,_u=function(e){for(var t=[],n;!(n=e.next()).done;)t.push(n.value);return t},ku=Object.prototype,wu=bu?bu.enumerate:void 0,yu=ku.propertyIsEnumerable;wu&&!yu.call({valueOf:1},'valueOf')&&(j=function(e){return _u(wu(e))});var vu=j,xu=Object.prototype,Cu=xu.hasOwnProperty,Au=function(e){for(var t=-1,n=Lc(e),o=vu(e),r=o.length,i=Oc(e),a=i||[],s=a.length;++t<r;){var l=o[t];!!i&&('length'==l||Nc(l,s))||'constructor'==l&&(n||!Cu.call(e,l))||a.push(l)}return a},Tu=Object.prototype,Eu=Tu.propertyIsEnumerable,Pu=!Eu.call({valueOf:1},'valueOf'),Su=function(e){return hu(function(t,n){var o=-1,r=n.length,i=1<r?n[r-1]:void 0,a=2<r?n[2]:void 0;for(i=3<e.length&&'function'==typeof i?(r--,i):void 0,a&&Xp(n[0],n[1],a)&&(i=3>r?void 0:i,r=1),t=Object(t);++o<r;){var s=n[o];s&&e(t,s,o,i)}return t})}(function(e,t){if(Pu||Lc(t)||kc(t))return void dc(t,Au(t),e);for(var n in t)lc(e,n,t[n])}),Ru=Su;const Ou=Symbol('observableProperties'),Iu=Symbol('boundObservables'),Nu=Symbol('boundProperties'),Vu={set(e,t){if(Od(e))return void Object.keys(e).forEach((t)=>{this.set(t,e[t])},this);U(this);const n=this[Ou];if(e in this&&!n.has(e))throw new bd('observable-set-cannot-override: Cannot override an existing property.');Object.defineProperty(this,e,{enumerable:!0,configurable:!0,get(){return n.get(e)},set(t){const o=n.get(e);o===t&&n.has(e)||(n.set(e,t),this.fire('change:'+e,e,t,o))}}),this[e]=t},bind(...e){if(!e.length||!$(e))throw new bd('observable-bind-wrong-properties: All properties must be strings.');if(new Set(e).size!==e.length)throw new bd('observable-bind-duplicate-properties: Properties must be unique.');U(this);const t=this[Nu];e.forEach((e)=>{if(t.has(e))throw new bd('observable-bind-rebind: Cannot bind the same property more that once.')});const n=new Map;return e.forEach((e)=>{const o={property:e,to:[]};t.set(e,o),n.set(e,o)}),{to:H,toMany:W,_observable:this,_bindProperties:e,_to:[],_bindings:n}},unbind(...e){if(!(Ou in this))return;const t=this[Nu],n=this[Iu];if(e.length){if(!$(e))throw new bd('observable-unbind-wrong-properties: Properties must be strings.');e.forEach((e)=>{const o=t.get(e);if(!o)return;let r,i,a,s;o.to.forEach((e)=>{r=e[0],i=e[1],a=n.get(r),s=a[i],s.delete(o),s.size||delete a[i],Object.keys(a).length||(n.delete(r),this.stopListening(r,'change'))}),t.delete(e)})}else n.forEach((e,t)=>{this.stopListening(t,'change')}),n.clear(),t.clear()},decorate(e){const t=this[e];if(!t)throw new bd('observablemixin-cannot-decorate-undefined: Cannot decorate an undefined method.',{object:this,methodName:e});this.on(e,(e,n)=>{e.return=t.apply(this,n)}),this[e]=function(...t){return this.fire(e,t)}}};Ru(Vu,Ad);var Lu=Vu;const Du=Symbol('document');class Fu extends Qp{constructor(e,t,n){super(e,t,n),this.set('isReadOnly',!1),this.set('isFocused',!1)}get document(){return this.getCustomProperty(Du)}set _document(e){if(this.getCustomProperty(Du))throw new bd('view-editableelement-document-already-set: View document is already set.');this._setCustomProperty(Du,e),this.bind('isReadOnly').to(e),this.bind('isFocused').to(e,'isFocused',(t)=>t&&e.selection.editableElement==this),this.listenTo(e.selection,'change',()=>{this.isFocused=e.isFocused&&e.selection.editableElement==this})}}_(Fu,Lu);const Mu=Symbol('rootName');class Bu extends Fu{constructor(e){super(e),this.rootName='main'}is(e,t=null){return t?'rootElement'==e&&t==this.name||super.is(e,t):'rootElement'==e||super.is(e)}get rootName(){return this.getCustomProperty(Mu)}set rootName(e){this._setCustomProperty(Mu,e)}set _name(e){this.name=e}}class qu{constructor(e={}){if(!e.boundaries&&!e.startPosition)throw new bd('view-tree-walker-no-start-position: Neither boundaries nor starting position have been defined.');if(e.direction&&'forward'!=e.direction&&'backward'!=e.direction)throw new bd('view-tree-walker-unknown-direction: Only `backward` and `forward` direction allowed.',{direction:e.direction});this.boundaries=e.boundaries||null,this.position=e.startPosition?zu.createFromPosition(e.startPosition):zu.createFromPosition(e.boundaries['backward'==e.direction?'end':'start']),this.direction=e.direction||'forward',this.singleCharacters=!!e.singleCharacters,this.shallow=!!e.shallow,this.ignoreElementEnd=!!e.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null}[Symbol.iterator](){return this}skip(e){let t,n,o;do o=this.position,({done:t,value:n}=this.next());while(!t&&e(n));t||(this.position=o)}next(){return'forward'==this.direction?this._next():this._previous()}_next(){let e=zu.createFromPosition(this.position);const t=this.position,n=e.parent;if(null===n.parent&&e.offset===n.childCount)return{done:!0};if(n===this._boundaryEndParent&&e.offset==this.boundaries.end.offset)return{done:!0};let o;if(n instanceof Kp){if(e.isAtEnd)return this.position=zu.createAfter(n),this._next();o=n.data[e.offset]}else o=n.getChild(e.offset);if(o instanceof Yp)return this.shallow?e.offset++:e=new zu(o,0),this.position=e,this._formatReturnValue('elementStart',o,t,e,1);if(!(o instanceof Kp)){if('string'==typeof o){let o;if(this.singleCharacters)o=1;else{const t=n===this._boundaryEndParent?this.boundaries.end.offset:n.data.length;o=t-e.offset}const r=new Zp(n,e.offset,o);return e.offset+=o,this.position=e,this._formatReturnValue('text',r,t,e,o)}return e=zu.createAfter(n),this.position=e,this.ignoreElementEnd?this._next():this._formatReturnValue('elementEnd',n,t,e)}if(this.singleCharacters)return e=new zu(o,0),this.position=e,this._next();else{let n=o.data.length,r;return o==this._boundaryEndParent?(n=this.boundaries.end.offset,r=new Zp(o,0,n),e=zu.createAfter(r)):(r=new Zp(o,0,o.data.length),e.offset++),this.position=e,this._formatReturnValue('text',r,t,e,n)}}_previous(){let e=zu.createFromPosition(this.position);const t=this.position,n=e.parent;if(null===n.parent&&0===e.offset)return{done:!0};if(n==this._boundaryStartParent&&e.offset==this.boundaries.start.offset)return{done:!0};let o;if(n instanceof Kp){if(e.isAtStart)return this.position=zu.createBefore(n),this._previous();o=n.data[e.offset-1]}else o=n.getChild(e.offset-1);if(o instanceof Yp)return this.shallow?(e.offset--,this.position=e,this._formatReturnValue('elementStart',o,t,e,1)):(e=new zu(o,o.childCount),this.position=e,this.ignoreElementEnd?this._previous():this._formatReturnValue('elementEnd',o,t,e));if(!(o instanceof Kp)){if('string'==typeof o){let o;if(!this.singleCharacters){const t=n===this._boundaryStartParent?this.boundaries.start.offset:0;o=e.offset-t}else o=1;e.offset-=o;const r=new Zp(n,e.offset,o);return this.position=e,this._formatReturnValue('text',r,t,e,o)}return e=zu.createBefore(n),this.position=e,this._formatReturnValue('elementStart',n,t,e,1)}if(this.singleCharacters)return e=new zu(o,o.data.length),this.position=e,this._previous();else{let n=o.data.length,r;if(o==this._boundaryStartParent){const t=this.boundaries.start.offset;r=new Zp(o,t,o.data.length-t),n=r.data.length,e=zu.createBefore(r)}else r=new Zp(o,0,o.data.length),e.offset--;return this.position=e,this._formatReturnValue('text',r,t,e,n)}}_formatReturnValue(e,t,n,o,r){return t instanceof Zp&&(t.offsetInText+t.data.length==t.textNode.data.length&&('forward'!=this.direction||this.boundaries&&this.boundaries.end.isEqual(this.position)?n=zu.createAfter(t.textNode):(o=zu.createAfter(t.textNode),this.position=o)),0===t.offsetInText&&('backward'!=this.direction||this.boundaries&&this.boundaries.start.isEqual(this.position)?n=zu.createBefore(t.textNode):(o=zu.createBefore(t.textNode),this.position=o))),{done:!1,value:{type:e,item:t,previousPosition:n,nextPosition:o,length:r}}}}class zu{constructor(e,t){this.parent=e,this.offset=t}get nodeAfter(){return this.parent.is('text')?null:this.parent.getChild(this.offset)||null}get nodeBefore(){return this.parent.is('text')?null:this.parent.getChild(this.offset-1)||null}get isAtStart(){return 0===this.offset}get isAtEnd(){const e=this.parent.is('text')?this.parent.data.length:this.parent.childCount;return this.offset===e}get root(){return this.parent.root}get editableElement(){let e=this.parent;for(;!(e instanceof Fu);)if(e.parent)e=e.parent;else return null;return e}getShiftedBy(e){const t=zu.createFromPosition(this),n=t.offset+e;return t.offset=0>n?0:n,t}getLastMatchingPosition(e,t={}){t.startPosition=this;const n=new qu(t);return n.skip(e),n.position}getAncestors(){return this.parent.is('documentFragment')?[this.parent]:this.parent.getAncestors({includeSelf:!0})}getCommonAncestor(e){const t=this.getAncestors(),n=e.getAncestors();let o=0;for(;t[o]==n[o]&&t[o];)o++;return 0==o?null:t[o-1]}isEqual(e){return this.parent==e.parent&&this.offset==e.offset}isBefore(e){return'before'==this.compareWith(e)}isAfter(e){return'after'==this.compareWith(e)}compareWith(e){if(this.root!==e.root)return'different';if(this.isEqual(e))return'same';const t=this.parent.is('node')?this.parent.getPath():[],n=e.parent.is('node')?e.parent.getPath():[];t.push(this.offset),n.push(e.offset);const o=P(t,n);return'prefix'===o?'before':'extension'===o?'after':t[o]<n[o]?'before':'after'}static createAt(e,t){if(e instanceof zu)return this.createFromPosition(e);else{const n=e;if('end'==t)t=n.is('text')?n.data.length:n.childCount;else{if('before'==t)return this.createBefore(n);if('after'==t)return this.createAfter(n);t||(t=0)}return new zu(n,t)}}static createAfter(e){if(e.is('textProxy'))return new zu(e.textNode,e.offsetInText+e.data.length);if(!e.parent)throw new bd('view-position-after-root: You can not make position after root.',{root:e});return new zu(e.parent,e.index+1)}static createBefore(e){if(e.is('textProxy'))return new zu(e.textNode,e.offsetInText);if(!e.parent)throw new bd('view-position-before-root: You can not make position before root.',{root:e});return new zu(e.parent,e.index)}static createFromPosition(e){return new this(e.parent,e.offset)}}class ju{constructor(e,t=null){this.start=zu.createFromPosition(e),this.end=t?zu.createFromPosition(t):zu.createFromPosition(e)}*[Symbol.iterator](){yield*new qu({boundaries:this,ignoreElementEnd:!0})}get isCollapsed(){return this.start.isEqual(this.end)}get isFlat(){return this.start.parent===this.end.parent}get root(){return this.start.root}getEnlarged(){let e=this.start.getLastMatchingPosition(X,{direction:'backward'}),t=this.end.getLastMatchingPosition(X);return e.parent.is('text')&&e.isAtStart&&(e=zu.createBefore(e.parent)),t.parent.is('text')&&t.isAtEnd&&(t=zu.createAfter(t.parent)),new ju(e,t)}getTrimmed(){let e=this.start.getLastMatchingPosition(X);if(e.isAfter(this.end)||e.isEqual(this.end))return new ju(e,e);let t=this.end.getLastMatchingPosition(X,{direction:'backward'});const n=e.nodeAfter,o=t.nodeBefore;return n&&n.is('text')&&(e=new zu(n,0)),o&&o.is('text')&&(t=new zu(o,o.data.length)),new ju(e,t)}isEqual(e){return this==e||this.start.isEqual(e.start)&&this.end.isEqual(e.end)}containsPosition(e){return e.isAfter(this.start)&&e.isBefore(this.end)}containsRange(e,t=!1){e.isCollapsed&&(t=!1);const n=this.containsPosition(e.start)||t&&this.start.isEqual(e.start),o=this.containsPosition(e.end)||t&&this.end.isEqual(e.end);return n&&o}getDifference(e){const t=[];return this.isIntersecting(e)?(this.containsPosition(e.start)&&t.push(new ju(this.start,e.start)),this.containsPosition(e.end)&&t.push(new ju(e.end,this.end))):t.push(ju.createFromRange(this)),t}getIntersection(e){if(this.isIntersecting(e)){let t=this.start,n=this.end;return this.containsPosition(e.start)&&(t=e.start),this.containsPosition(e.end)&&(n=e.end),new ju(t,n)}return null}getWalker(e={}){return e.boundaries=this,new qu(e)}getCommonAncestor(){return this.start.getCommonAncestor(this.end)}*getItems(e={}){e.boundaries=this,e.ignoreElementEnd=!0;const t=new qu(e);for(const n of t)yield n.item}*getPositions(e={}){e.boundaries=this;const t=new qu(e);yield t.position;for(const n of t)yield n.nextPosition}isIntersecting(e){return this.start.isBefore(e.end)&&this.end.isAfter(e.start)}static createFromParentsAndOffsets(e,t,n,o){return new this(new zu(e,t),new zu(n,o))}static createFromRange(e){return new this(e.start,e.end)}static createFromPositionAndShift(e,t){const n=e,o=e.getShiftedBy(t);return 0<t?new this(n,o):new this(o,n)}static createIn(e){return this.createFromParentsAndOffsets(e,0,e,e.childCount)}static createOn(e){const t=e.is('textProxy')?e.offsetSize:1;return this.createFromPositionAndShift(zu.createBefore(e),t)}static createCollapsedAt(e,t){const n=zu.createAt(e,t),o=zu.createFromPosition(n);return new ju(n,o)}}class Uu{constructor(e=null,t,n){this._ranges=[],this._lastRangeBackward=!1,this._isFake=!1,this._fakeSelectionLabel='',this.setTo(e,t,n)}get isFake(){return this._isFake}get fakeSelectionLabel(){return this._fakeSelectionLabel}get anchor(){if(!this._ranges.length)return null;const e=this._ranges[this._ranges.length-1],t=this._lastRangeBackward?e.end:e.start;return zu.createFromPosition(t)}get focus(){if(!this._ranges.length)return null;const e=this._ranges[this._ranges.length-1],t=this._lastRangeBackward?e.start:e.end;return zu.createFromPosition(t)}get isCollapsed(){return 1===this.rangeCount&&this._ranges[0].isCollapsed}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}get editableElement(){return this.anchor?this.anchor.editableElement:null}*getRanges(){for(const e of this._ranges)yield ju.createFromRange(e)}getFirstRange(){let e=null;for(const t of this._ranges)(!e||t.start.isBefore(e.start))&&(e=t);return e?ju.createFromRange(e):null}getLastRange(){let e=null;for(const t of this._ranges)(!e||t.end.isAfter(e.end))&&(e=t);return e?ju.createFromRange(e):null}getFirstPosition(){const e=this.getFirstRange();return e?zu.createFromPosition(e.start):null}getLastPosition(){const e=this.getLastRange();return e?zu.createFromPosition(e.end):null}isEqual(e){if(this.isFake!=e.isFake)return!1;if(this.isFake&&this.fakeSelectionLabel!=e.fakeSelectionLabel)return!1;if(this.rangeCount!=e.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(e.anchor)||!this.focus.isEqual(e.focus))return!1;for(const t of this._ranges){let n=!1;for(const o of e._ranges)if(t.isEqual(o)){n=!0;break}if(!n)return!1}return!0}isSimilar(e){if(this.isBackward!=e.isBackward)return!1;const t=ee(this.getRanges()),n=ee(e.getRanges());if(t!=n)return!1;if(0==t)return!0;for(let t of this.getRanges()){t=t.getTrimmed();let n=!1;for(let o of e.getRanges())if(o=o.getTrimmed(),t.start.isEqual(o.start)&&t.end.isEqual(o.end)){n=!0;break}if(!n)return!1}return!0}getSelectedElement(){if(1!==this.rangeCount)return null;const e=this.getFirstRange(),t=e.start.nodeAfter,n=e.end.nodeBefore;return t instanceof Yp&&t==n?t:null}setTo(e,t,n){if(null===e)this._setRanges([]),this._setFakeOptions(t);else if(e instanceof Uu||e instanceof Hu)this._setRanges(e.getRanges(),e.isBackward),this._setFakeOptions({fake:e.isFake,label:e.fakeSelectionLabel});else if(e instanceof ju)this._setRanges([e],t&&t.backward),this._setFakeOptions(t);else if(e instanceof zu)this._setRanges([new ju(e)]),this._setFakeOptions(t);else if(e instanceof $p){const o=!!n&&!!n.backward;let r;if(t===void 0)throw new bd('view-selection-setTo-required-second-parameter: selection.setTo requires the second parameter when the first parameter is a node.');else r='in'==t?ju.createIn(e):'on'==t?ju.createOn(e):ju.createCollapsedAt(e,t);this._setRanges([r],o),this._setFakeOptions(n)}else if(R(e))this._setRanges(e,t&&t.backward),this._setFakeOptions(t);else throw new bd('view-selection-setTo-not-selectable: Cannot set selection to given place.');this.fire('change')}setFocus(e,t){if(null===this.anchor)throw new bd('view-selection-setFocus-no-ranges: Cannot set selection focus if there are no ranges in selection.');const n=zu.createAt(e,t);if('same'!=n.compareWith(this.focus)){const e=this.anchor;this._ranges.pop(),'before'==n.compareWith(e)?this._addRange(new ju(n,e),!0):this._addRange(new ju(e,n)),this.fire('change')}}_setRanges(e,t=!1){e=Array.from(e),this._ranges=[];for(const n of e)this._addRange(n);this._lastRangeBackward=!!t}_setFakeOptions(e={}){this._isFake=!!e.fake,this._fakeSelectionLabel=e.fake?e.label||'':''}_addRange(e,t=!1){if(!(e instanceof ju))throw new bd('view-selection-invalid-range: Invalid Range.');this._pushRange(e),this._lastRangeBackward=!!t}_pushRange(e){for(const t of this._ranges)if(e.isIntersecting(t))throw new bd('view-selection-range-intersects: Trying to add a range that intersects with another range from selection.',{addedRange:e,intersectingRange:t});this._ranges.push(ju.createFromRange(e))}}_(Uu,Ad);class Hu{constructor(e=null,t,n){this._selection=new Uu,this._selection.delegate('change').to(this),this._selection.setTo(e,t,n)}get isFake(){return this._selection.isFake}get fakeSelectionLabel(){return this._selection.fakeSelectionLabel}get anchor(){return this._selection.anchor}get focus(){return this._selection.focus}get isCollapsed(){return this._selection.isCollapsed}get rangeCount(){return this._selection.rangeCount}get isBackward(){return this._selection.isBackward}get editableElement(){return this._selection.editableElement}get _ranges(){return this._selection._ranges}*getRanges(){yield*this._selection.getRanges()}getFirstRange(){return this._selection.getFirstRange()}getLastRange(){return this._selection.getLastRange()}getFirstPosition(){return this._selection.getFirstPosition()}getLastPosition(){return this._selection.getLastPosition()}getSelectedElement(){return this._selection.getSelectedElement()}isEqual(e){return this._selection.isEqual(e)}isSimilar(e){return this._selection.isSimilar(e)}_setTo(e,t,n){this._selection.setTo(e,t,n)}_setFocus(e,t){this._selection.setFocus(e,t)}}_(Hu,Ad);class Wu{constructor(e={}){this._items=[],this._itemMap=new Map,this._idProperty=e.idProperty||'id',this._bindToExternalToInternalMap=new WeakMap,this._bindToInternalToExternalMap=new WeakMap,this._skippedIndexesFromExternal=[]}get length(){return this._items.length}get first(){return this._items[0]||null}get last(){return this._items[this.length-1]||null}add(e,t){let n;const o=this._idProperty;if(o in e){if(n=e[o],'string'!=typeof n)throw new bd('collection-add-invalid-id');if(this.get(n))throw new bd('collection-add-item-already-exists')}else e[o]=n=s();if(void 0===t)t=this._items.length;else if(t>this._items.length||0>t)throw new bd('collection-add-item-invalid-index');return this._items.splice(t,0,e),this._itemMap.set(n,e),this.fire('add',e,t),this}get(e){let t;if('string'==typeof e)t=this._itemMap.get(e);else if('number'==typeof e)t=this._items[e];else throw new bd('collection-get-invalid-arg: Index or id must be given.');return t||null}getIndex(e){let t;return t='string'==typeof e?this._itemMap.get(e):e,this._items.indexOf(t)}remove(e){let t=!1,n,o,r;const i=this._idProperty;if('string'==typeof e?(o=e,r=this._itemMap.get(o),t=!r,r&&(n=this._items.indexOf(r))):'number'==typeof e?(n=e,r=this._items[n],t=!r,r&&(o=r[i])):(r=e,o=r[i],n=this._items.indexOf(r),t=-1==n||!this._itemMap.get(o)),t)throw new bd('collection-remove-404: Item not found.');this._items.splice(n,1),this._itemMap.delete(o);const a=this._bindToInternalToExternalMap.get(r);return this._bindToInternalToExternalMap.delete(r),this._bindToExternalToInternalMap.delete(a),this.fire('remove',r,n),r}map(e,t){return this._items.map(e,t)}find(e,t){return this._items.find(e,t)}filter(e,t){return this._items.filter(e,t)}clear(){for(this._bindToCollection&&(this.stopListening(this._bindToCollection),this._bindToCollection=null);this.length;)this.remove(0)}bindTo(e){if(this._bindToCollection)throw new bd('collection-bind-to-rebind: The collection cannot be bound more than once.');return this._bindToCollection=e,{as:(e)=>{this._setUpBindToBinding((t)=>new e(t))},using:(e)=>{'function'==typeof e?this._setUpBindToBinding((t)=>e(t)):this._setUpBindToBinding((t)=>t[e])}}}_setUpBindToBinding(e){const t=this._bindToCollection,n=(n,o,r)=>{const i=t._bindToCollection==this,a=t._bindToInternalToExternalMap.get(o);if(i&&a)this._bindToExternalToInternalMap.set(o,a),this._bindToInternalToExternalMap.set(a,o);else{const n=e(o);if(!n)return void this._skippedIndexesFromExternal.push(r);let a=r;for(const e of this._skippedIndexesFromExternal)r>e&&a--;for(const e of t._skippedIndexesFromExternal)a>=e&&a++;this._bindToExternalToInternalMap.set(o,n),this._bindToInternalToExternalMap.set(n,o),this.add(n,a);for(let e=0;e<t._skippedIndexesFromExternal.length;e++)a<=t._skippedIndexesFromExternal[e]&&t._skippedIndexesFromExternal[e]++}};for(const o of t)n(null,o,t.getIndex(o));this.listenTo(t,'add',n),this.listenTo(t,'remove',(e,t,n)=>{const o=this._bindToExternalToInternalMap.get(t);o&&this.remove(o),this._skippedIndexesFromExternal=this._skippedIndexesFromExternal.reduce((e,t)=>(n<t&&e.push(t-1),n>t&&e.push(t),e),[])})}[Symbol.iterator](){return this._items[Symbol.iterator]()}}_(Wu,Ad);class Gu{constructor(){this.selection=new Hu,this.roots=new Wu({idProperty:'rootName'}),this.set('isReadOnly',!1),this.set('isFocused',!1),this.set('isComposing',!1),this._postFixers=new Set}getRoot(e='main'){return this.roots.get(e)}registerPostFixer(e){this._postFixers.add(e)}_callPostFixers(e){let t=!1;do for(const n of this._postFixers)if(t=n(e),t)break;while(t)}}_(Gu,Lu);const $u=10;class Ku extends Yp{constructor(e,t,n){super(e,t,n),this.getFillerOffset=te,this._priority=$u,this._id=null,this._clonesGroup=null}get priority(){return this._priority}get id(){return this._id}getElementsWithSameId(){if(null===this.id)throw new bd('attribute-element-get-elements-with-same-id-no-id: Cannot get elements with the same id for an attribute element without id.');return new Set(this._clonesGroup)}is(e,t=null){return t?'attributeElement'==e&&t==this.name||super.is(e,t):'attributeElement'==e||super.is(e)}isSimilar(e){return null!==this.id||null!==e.id?this.id===e.id:super.isSimilar(e)&&this.priority==e.priority}_clone(e){const t=super._clone(e);return t._priority=this._priority,t._id=this._id,t}}Ku.DEFAULT_PRIORITY=$u;class Zu extends Yp{constructor(e,t,n){super(e,t,n),this.getFillerOffset=oe}is(e,t=null){return t?'emptyElement'==e&&t==this.name||super.is(e,t):'emptyElement'==e||super.is(e)}_insertChild(e,t){if(t&&(t instanceof $p||0<Array.from(t).length))throw new bd('view-emptyelement-cannot-add: Cannot add child nodes to EmptyElement instance.')}}const Ju=navigator.userAgent.toLowerCase(),Yu={isMac:function(e){return-1<e.indexOf('macintosh')}(Ju)};var Qu=Yu;const Xu={"⌘":'ctrl',"⇧":'shift',"⌥":'alt'},em={ctrl:'\u2318',shift:'\u21E7',alt:'\u2325'},tm=function(){const e={arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,backspace:8,delete:46,enter:13,space:32,esc:27,tab:9,ctrl:1114112,cmd:1114112,shift:2228224,alt:4456448};for(let t=65;90>=t;t++){const o=n(t);e[o.toLowerCase()]=t}for(let t=48;57>=t;t++)e[t-48]=t;for(let t=112;123>=t;t++)e['f'+(t-111)]=t;return e}();class nm extends Yp{constructor(e,t,n){super(e,t,n),this.getFillerOffset=de}is(e,t=null){return t?'uiElement'==e&&t==this.name||super.is(e,t):'uiElement'==e||super.is(e)}_insertChild(e,t){if(t&&(t instanceof $p||0<Array.from(t).length))throw new bd('view-uielement-cannot-add: Cannot add child nodes to UIElement instance.')}render(e){return this.toDomElement(e)}toDomElement(e){const t=e.createElement(this.name);for(const n of this.getAttributeKeys())t.setAttribute(n,this.getAttribute(n));return t}}class om{constructor(e){this._children=[],e&&this._insertChild(0,e)}[Symbol.iterator](){return this._children[Symbol.iterator]()}get childCount(){return this._children.length}get isEmpty(){return 0===this.childCount}get root(){return this}get parent(){return null}is(e){return'documentFragment'==e}_appendChild(e){return this._insertChild(this.childCount,e)}getChild(e){return this._children[e]}getChildIndex(e){return this._children.indexOf(e)}getChildren(){return this._children[Symbol.iterator]()}_insertChild(e,t){this._fireChange('children',this);let n=0;const o=pe(t);for(const r of o)null!==r.parent&&r._remove(),r.parent=this,this._children.splice(e,0,r),e++,n++;return n}_removeChildren(e,t=1){this._fireChange('children',this);for(let n=e;n<e+t;n++)this._children[n].parent=null;return this._children.splice(e,t)}_fireChange(e,t){this.fire('change:'+e,t)}}_(om,Ad);class rm{constructor(e){this.document=e,this._cloneGroups=new Map}setSelection(e,t,n){this.document.selection._setTo(e,t,n)}setSelectionFocus(e,t){this.document.selection._setFocus(e,t)}createText(e){return new Kp(e)}createAttributeElement(e,t,n={}){const o=new Ku(e,t);return n.priority&&(o._priority=n.priority),n.id&&(o._id=n.id),o}createContainerElement(e,t){return new Qp(e,t)}createEditableElement(e,t){const n=new Fu(e,t);return n._document=this.document,n}createEmptyElement(e,t){return new Zu(e,t)}createUIElement(e,t,n){const o=new nm(e,t);return n&&(o.render=n),o}setAttribute(e,t,n){n._setAttribute(e,t)}removeAttribute(e,t){t._removeAttribute(e)}addClass(e,t){t._addClass(e)}removeClass(e,t){t._removeClass(e)}setStyle(e,t,n){gd(e)&&n===void 0&&(n=t),n._setStyle(e,t)}removeStyle(e,t){t._removeStyle(e)}setCustomProperty(e,t,n){n._setCustomProperty(e,t)}removeCustomProperty(e,t){return t._removeCustomProperty(e)}breakAttributes(e){return e instanceof zu?this._breakAttributes(e):this._breakAttributesRange(e)}breakContainer(e){const t=e.parent;if(!t.is('containerElement'))throw new bd('view-writer-break-non-container-element: Trying to break an element which is not a container element.');if(!t.parent)throw new bd('view-writer-break-root: Trying to break root element.');if(e.isAtStart)return zu.createBefore(t);if(!e.isAtEnd){const n=t._clone(!1);this.insert(zu.createAfter(t),n);const o=new ju(e,zu.createAt(t,'end')),r=new zu(n,0);this.move(o,r)}return zu.createAfter(t)}mergeAttributes(e){const t=e.offset,n=e.parent;if(n.is('text'))return e;if(n.is('attributeElement')&&0===n.childCount){const e=n.parent,t=n.index;return n._remove(),this._removeFromClonedElementsGroup(n),this.mergeAttributes(new zu(e,t))}const o=n.getChild(t-1),r=n.getChild(t);if(!o||!r)return e;if(o.is('text')&&r.is('text'))return be(o,r);if(o.is('attributeElement')&&r.is('attributeElement')&&o.isSimilar(r)){const e=o.childCount;return o._appendChild(r.getChildren()),r._remove(),this._removeFromClonedElementsGroup(r),this.mergeAttributes(new zu(o,e))}return e}mergeContainers(e){const t=e.nodeBefore,n=e.nodeAfter;if(!t||!n||!t.is('containerElement')||!n.is('containerElement'))throw new bd('view-writer-merge-containers-invalid-position: Element before and after given position cannot be merged.');const o=t.getChild(t.childCount-1),r=o instanceof Kp?zu.createAt(o,'end'):zu.createAt(t,'end');return this.move(ju.createIn(n),zu.createAt(t,'end')),this.remove(ju.createOn(n)),r}insert(e,t){t=R(t)?[...t]:[t],ke(t);const n=me(e);if(!n)throw new bd('view-writer-invalid-position-container');const o=this._breakAttributes(e,!0),r=n._insertChild(o.offset,t);for(const n of t)this._addToClonedElementsGroup(n);const i=o.getShiftedBy(r),a=this.mergeAttributes(o);if(0===r)return new ju(a,a);else{a.isEqual(o)||i.offset--;const e=this.mergeAttributes(i);return new ju(a,e)}}remove(e){if(ye(e),e.isCollapsed)return new om;const{start:t,end:n}=this._breakAttributesRange(e,!0),o=t.parent,r=n.offset-t.offset,i=o._removeChildren(t.offset,r);for(const t of i)this._removeFromClonedElementsGroup(t);const a=this.mergeAttributes(t);return e.start=a,e.end=zu.createFromPosition(a),new om(i)}clear(e,t){ye(e);const n=e.getWalker({direction:'backward',ignoreElementEnd:!0});for(const o of n){const n=o.item;let r;if(n.is('element')&&t.isSimilar(n))r=ju.createOn(n);else if(!o.nextPosition.isAfter(e.start)&&n.is('textProxy')){const e=n.getAncestors().find((e)=>e.is('element')&&t.isSimilar(e));e&&(r=ju.createIn(e))}r&&(r.end.isAfter(e.end)&&(r.end=e.end),r.start.isBefore(e.start)&&(r.start=e.start),this.remove(r))}}move(e,t){let n;if(t.isAfter(e.end)){t=this._breakAttributes(t,!0);const o=t.parent,r=o.childCount;e=this._breakAttributesRange(e,!0),n=this.remove(e),t.offset+=o.childCount-r}else n=this.remove(e);return this.insert(t,n)}wrap(e,t){if(!(t instanceof Ku))throw new bd('view-writer-wrap-invalid-attribute');if(ye(e),!e.isCollapsed)return this._wrapRange(e,t);else{let n=e.start;n.parent.is('element')&&!ue(n.parent)&&(n=n.getLastMatchingPosition((e)=>e.item.is('uiElement'))),n=this._wrapPosition(n,t);const o=this.document.selection;return o.isCollapsed&&o.getFirstPosition().isEqual(e.start)&&this.setSelection(n),new ju(n)}}unwrap(e,t){if(!(t instanceof Ku))throw new bd('view-writer-unwrap-invalid-attribute');if(ye(e),e.isCollapsed)return e;const{start:n,end:o}=this._breakAttributesRange(e,!0);if(o.isEqual(n.getShiftedBy(1))){const e=n.nodeAfter;if(!t.isSimilar(e)&&e instanceof Ku&&this._unwrapAttributeElement(t,e)){const e=this.mergeAttributes(n);e.isEqual(n)||o.offset--;const t=this.mergeAttributes(o);return new ju(e,t)}}const r=n.parent,i=this._unwrapChildren(r,n.offset,o.offset,t),a=this.mergeAttributes(i.start);a.isEqual(i.start)||i.end.offset--;const s=this.mergeAttributes(i.end);return new ju(a,s)}rename(e,t){const n=new Qp(t,e.getAttributes());return this.insert(zu.createAfter(e),n),this.move(ju.createIn(e),zu.createAt(n)),this.remove(ju.createOn(e)),n}_wrapChildren(e,t,n,o){let r=t;const i=[];for(;r<n;){const t=e.getChild(r),n=t.is('text'),a=t.is('attributeElement'),s=t.is('emptyElement'),l=t.is('uiElement');if(n||s||l||a&&ge(o,t)){const n=o._clone();t._remove(),n._appendChild(t),e._insertChild(r,n),this._addToClonedElementsGroup(n),i.push(new zu(e,r))}else a&&this._wrapChildren(t,0,t.childCount,o);r++}let a=0;for(const r of i){if(r.offset-=a,r.offset==t)continue;const e=this.mergeAttributes(r);e.isEqual(r)||(a++,n--)}return ju.createFromParentsAndOffsets(e,t,e,n)}_unwrapChildren(e,t,n,o){let r=t;const i=[];for(;r<n;){const t=e.getChild(r);if(t.isSimilar(o)){const o=t.getChildren(),a=t.childCount;t._remove(),e._insertChild(r,o),this._removeFromClonedElementsGroup(t),i.push(new zu(e,r),new zu(e,r+a)),r+=a,n+=a-1}else t.is('attributeElement')&&this._unwrapChildren(t,0,t.childCount,o),r++}let a=0;for(const r of i){if(r.offset-=a,r.offset==t||r.offset==n)continue;const e=this.mergeAttributes(r);e.isEqual(r)||(a++,n--)}return ju.createFromParentsAndOffsets(e,t,e,n)}_wrapRange(e,t){if(_e(e)&&this._wrapAttributeElement(t,e.start.parent)){const t=e.start.parent,n=this.mergeAttributes(zu.createAfter(t)),o=this.mergeAttributes(zu.createBefore(t));return new ju(o,n)}const{start:n,end:o}=this._breakAttributesRange(e,!0);if(o.isEqual(n.getShiftedBy(1))){const e=n.nodeAfter;if(e instanceof Ku&&this._wrapAttributeElement(t,e)){const e=this.mergeAttributes(n);e.isEqual(n)||o.offset--;const t=this.mergeAttributes(o);return new ju(e,t)}}const r=n.parent,i=this._unwrapChildren(r,n.offset,o.offset,t),a=this._wrapChildren(r,i.start.offset,i.end.offset,t),s=this.mergeAttributes(a.start);s.isEqual(a.start)||a.end.offset--;const l=this.mergeAttributes(a.end);return new ju(s,l)}_wrapPosition(e,t){if(t.isSimilar(e.parent))return he(zu.createFromPosition(e));e.parent.is('text')&&(e=fe(e));const n=this.createAttributeElement();n._priority=od,n.isSimilar=()=>!1,e.parent._insertChild(e.offset,n);const o=new ju(e,e.getShiftedBy(1));this.wrap(o,t);const r=new zu(n.parent,n.index);n._remove();const i=r.nodeBefore,a=r.nodeAfter;return i instanceof Kp&&a instanceof Kp?be(i,a):he(r)}_wrapAttributeElement(e,t){if(!ve(e,t))return!1;if(e.name!==t.name||e.priority!==t.priority)return!1;for(const n of e.getAttributeKeys())if('class'!==n&&'style'!==n&&t.hasAttribute(n)&&t.getAttribute(n)!==e.getAttribute(n))return!1;for(const n of e.getStyleNames())if(t.hasStyle(n)&&t.getStyle(n)!==e.getStyle(n))return!1;for(const n of e.getAttributeKeys())'class'!==n&&'style'!==n&&(t.hasAttribute(n)||this.setAttribute(n,e.getAttribute(n),t));for(const n of e.getStyleNames())t.hasStyle(n)||this.setStyle(n,e.getStyle(n),t);for(const n of e.getClassNames())t.hasClass(n)||this.addClass(n,t);return!0}_unwrapAttributeElement(e,t){if(!ve(e,t))return!1;if(e.name!==t.name||e.priority!==t.priority)return!1;for(const n of e.getAttributeKeys())if('class'!==n&&'style'!==n&&(!t.hasAttribute(n)||t.getAttribute(n)!==e.getAttribute(n)))return!1;if(!t.hasClass(...e.getClassNames()))return!1;for(const n of e.getStyleNames())if(!t.hasStyle(n)||t.getStyle(n)!==e.getStyle(n))return!1;for(const n of e.getAttributeKeys())'class'!==n&&'style'!==n&&this.removeAttribute(n,t);return this.removeClass(Array.from(e.getClassNames()),t),this.removeStyle(Array.from(e.getStyleNames()),t),!0}_breakAttributesRange(e,t=!1){const n=e.start,o=e.end;if(ye(e),e.isCollapsed){const n=this._breakAttributes(e.start,t);return new ju(n,n)}const r=this._breakAttributes(o,t),i=r.parent.childCount,a=this._breakAttributes(n,t);return r.offset+=r.parent.childCount-i,new ju(a,r)}_breakAttributes(e,t=!1){const n=e.offset,o=e.parent;if(e.parent.is('emptyElement'))throw new bd('view-writer-cannot-break-empty-element');if(e.parent.is('uiElement'))throw new bd('view-writer-cannot-break-ui-element');if(!t&&o.is('text')&&we(o.parent))return zu.createFromPosition(e);if(we(o))return zu.createFromPosition(e);if(o.is('text'))return this._breakAttributes(fe(e),t);const r=o.childCount;if(n==r){const e=new zu(o.parent,o.index+1);return this._breakAttributes(e,t)}if(0===n){const e=new zu(o.parent,o.index);return this._breakAttributes(e,t)}else{const e=o.index+1,r=o._clone();o.parent._insertChild(e,r),this._addToClonedElementsGroup(r);const i=o.childCount-n,a=o._removeChildren(n,i);r._appendChild(a);const s=new zu(o.parent,e);return this._breakAttributes(s,t)}}_addToClonedElementsGroup(e){if(!e.root.is('rootElement'))return;if(e.is('element'))for(const t of e.getChildren())this._addToClonedElementsGroup(t);const t=e.id;if(!t)return;let n=this._cloneGroups.get(t);n||(n=new Set,this._cloneGroups.set(t,n)),n.add(e),e._clonesGroup=n}_removeFromClonedElementsGroup(e){if(e.is('element'))for(const t of e.getChildren())this._removeFromClonedElementsGroup(t);const t=e.id;if(t){const n=this._cloneGroups.get(t);n&&(n.delete(e),0===n.size&&this._cloneGroups.delete(t))}}}const im=[Kp,Ku,Qp,Zu,nm],am=(e)=>{const t=e.createElement('br');return t.dataset.ckeFiller=!0,t},sm=(e)=>e.createTextNode('\xA0'),lm=7;let dm='';for(let e=0;e<lm;e++)dm+='\u200B';const cm=new WeakMap;class pm{constructor(e,t){this.domDocuments=new Set,this.domConverter=e,this.markedAttributes=new Set,this.markedChildren=new Set,this.markedTexts=new Set,this.selection=t,this._inlineFiller=null,this.isFocused=!1,this._fakeSelectionContainer=null}markToSync(e,t){if('text'===e)this.domConverter.mapViewToDom(t.parent)&&this.markedTexts.add(t);else{if(!this.domConverter.mapViewToDom(t))return;if('attributes'===e)this.markedAttributes.add(t);else if('children'===e)this.markedChildren.add(t);else throw new bd('view-renderer-unknown-type: Unknown type passed to Renderer.markToSync.')}}render(){let e;this._inlineFiller&&!this._isSelectionInInlineFiller()&&this._removeInlineFiller(),this._inlineFiller?e=this._getInlineFillerPosition():this._needsInlineFillerAtSelection()&&(e=this.selection.getFirstPosition(),this.markedChildren.add(e.parent));for(const e of this.markedAttributes)this._updateAttrs(e);for(const t of this.markedChildren)this._updateChildren(t,{inlineFillerPosition:e});for(const t of this.markedTexts)!this.markedChildren.has(t.parent)&&this.domConverter.mapViewToDom(t.parent)&&this._updateText(t,{inlineFillerPosition:e});if(e){const t=this.domConverter.viewPositionToDom(e),n=t.parent.ownerDocument;this._inlineFiller=xe(t.parent)?t.parent:this._addInlineFiller(n,t.parent,t.offset)}else this._inlineFiller=null;this._updateSelection(),this._updateFocus(),this.markedTexts.clear(),this.markedAttributes.clear(),this.markedChildren.clear()}_addInlineFiller(e,t,n){const o=t instanceof Array?t:t.childNodes,r=o[n];if(Ie(r))return r.data=dm+r.data,r;else{const r=e.createTextNode(dm);return Array.isArray(t)?o.splice(n,0,r):Re(t,n,r),r}}_getInlineFillerPosition(){const e=this.selection.getFirstPosition();return e.parent.is('text')?zu.createBefore(this.selection.getFirstPosition().parent):e}_isSelectionInInlineFiller(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const e=this.selection.getFirstPosition(),t=this.domConverter.viewPositionToDom(e);return!!(t&&Ie(t.parent)&&xe(t.parent))}_removeInlineFiller(){const e=this._inlineFiller;if(!xe(e))throw new bd('view-renderer-filler-was-lost: The inline filler node was lost.');Ce(e)?e.parentNode.removeChild(e):e.data=e.data.substr(lm),this._inlineFiller=null}_needsInlineFillerAtSelection(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const e=this.selection.getFirstPosition(),t=e.parent,n=e.offset;if(!this.domConverter.mapViewToDom(t.root))return!1;if(!t.is('element'))return!1;if(!Ne(t))return!1;if(n===t.getFillerOffset())return!1;const o=e.nodeBefore,r=e.nodeAfter;return!(o instanceof Kp||r instanceof Kp)}_updateText(e,t){const n=this.domConverter.findCorrespondingDomText(e),o=this.domConverter.viewToDom(e,n.ownerDocument),r=n.data;let i=o.data;const a=t.inlineFillerPosition;a&&a.parent==e.parent&&a.offset==e.index&&(i=dm+i),r!=i&&(n.data=i)}_updateAttrs(e){const t=this.domConverter.mapViewToDom(e),n=Array.from(t.attributes).map((e)=>e.name),o=e.getAttributeKeys();for(const n of o)t.setAttribute(n,e.getAttribute(n));for(const o of n)e.hasAttribute(o)||t.removeAttribute(o)}_updateChildren(e,t){function n(e,t){if(e===t)return!0;return Ie(e)&&Ie(t)?e.data===t.data:!!(Te(e,o.blockFiller)&&Te(t,o.blockFiller))}const o=this.domConverter,r=o.mapViewToDom(e);if(r){const a=r.ownerDocument,s=t.inlineFillerPosition,l=r.childNodes,d=Array.from(o.viewChildrenToDom(e,a,{bind:!0}));s&&s.parent==e&&this._addInlineFiller(a,d,s.offset);const c=Se(l,d,n);let p=0;const i=new Set;for(const e of c)'insert'===e?(Re(r,p,d[p]),p++):'delete'===e?(i.add(l[p]),Oe(l[p])):(this._markDescendantTextToSync(o.domToView(d[p])),p++);for(const e of i)e.parentNode||this.domConverter.unbindDomElement(e)}}_markDescendantTextToSync(e){if(e)if(e.is('text'))this.markedTexts.add(e);else if(e.is('element'))for(const t of e.getChildren())this._markDescendantTextToSync(t)}_updateSelection(){if(0===this.selection.rangeCount)return this._removeDomSelection(),void this._removeFakeSelection();const e=this.domConverter.mapViewToDom(this.selection.editableElement);this.isFocused&&e&&(this.selection.isFake?this._updateFakeSelection(e):(this._removeFakeSelection(),this._updateDomSelection(e)))}_updateFakeSelection(e){const t=e.ownerDocument;let n=this._fakeSelectionContainer;n||(this._fakeSelectionContainer=n=t.createElement('div'),Object.assign(n.style,{position:'fixed',top:0,left:'-9999px',width:'42px'}),n.appendChild(t.createTextNode('\xA0'))),n.parentElement||e.appendChild(n),n.firstChild.data=this.selection.fakeSelectionLabel||'\xA0';const o=t.getSelection(),r=t.createRange();o.removeAllRanges(),r.selectNodeContents(n),o.addRange(r),this.domConverter.bindFakeSelection(n,this.selection)}_updateDomSelection(e){const t=e.ownerDocument.defaultView.getSelection();if(this._domSelectionNeedsUpdate(t)){const n=this.domConverter.viewPositionToDom(this.selection.anchor),o=this.domConverter.viewPositionToDom(this.selection.focus);e.focus(),t.collapse(n.parent,n.offset),t.extend(o.parent,o.offset)}}_domSelectionNeedsUpdate(e){if(!this.domConverter.isDomSelectionCorrect(e))return!0;const t=e&&this.domConverter.domSelectionToView(e);return!(t&&this.selection.isEqual(t))&&(this.selection.isCollapsed||!this.selection.isSimilar(t))}_removeDomSelection(){for(const e of this.domDocuments){const t=e.getSelection();if(t.rangeCount){const t=e.activeElement,n=this.domConverter.mapDomToView(t);t&&n&&e.getSelection().removeAllRanges()}}}_removeFakeSelection(){const e=this._fakeSelectionContainer;e&&e.remove()}_updateFocus(){if(this.isFocused){const e=this.selection.editableElement;e&&this.domConverter.focus(e)}}}_(pm,Lu);var um={window,document};class mm{constructor(e={}){this.blockFiller=e.blockFiller||am,this.preElements=['pre'],this.blockElements=['p','div','h1','h2','h3','h4','h5','h6'],this._domToViewMapping=new WeakMap,this._viewToDomMapping=new WeakMap,this._fakeSelectionMapping=new WeakMap}bindFakeSelection(e,t){this._fakeSelectionMapping.set(e,new Uu(t))}fakeSelectionToView(e){return this._fakeSelectionMapping.get(e)}bindElements(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}unbindDomElement(e){const t=this._domToViewMapping.get(e);if(t){this._domToViewMapping.delete(e),this._viewToDomMapping.delete(t);for(const t of Array.from(e.childNodes))this.unbindDomElement(t)}}bindDocumentFragments(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}viewToDom(e,t,n={}){if(e.is('text')){const n=this._processDataFromViewText(e);return t.createTextNode(n)}else{if(this.mapViewToDom(e))return this.mapViewToDom(e);let o;if(e.is('documentFragment'))o=t.createDocumentFragment(),n.bind&&this.bindDocumentFragments(o,e);else{if(e.is('uiElement'))return o=e.render(t),n.bind&&this.bindElements(o,e),o;o=t.createElement(e.name),n.bind&&this.bindElements(o,e);for(const t of e.getAttributeKeys())o.setAttribute(t,e.getAttribute(t))}if(n.withChildren||void 0===n.withChildren)for(const r of this.viewChildrenToDom(e,t,n))o.appendChild(r);return o}}*viewChildrenToDom(e,t,n={}){const o=e.getFillerOffset&&e.getFillerOffset();let r=0;for(const i of e.getChildren())o===r&&(yield this.blockFiller(t)),yield this.viewToDom(i,t,n),r++;o===r&&(yield this.blockFiller(t))}viewRangeToDom(e){const t=this.viewPositionToDom(e.start),n=this.viewPositionToDom(e.end),o=document.createRange();return o.setStart(t.parent,t.offset),o.setEnd(n.parent,n.offset),o}viewPositionToDom(e){const t=e.parent;if(t.is('text')){const n=this.findCorrespondingDomText(t);if(!n)return null;let o=e.offset;return xe(n)&&(o+=lm),{parent:n,offset:o}}else{let n,o,r;if(0===e.offset){if(n=this.mapViewToDom(t),!n)return null;r=n.childNodes[0]}else{const t=e.nodeBefore;if(o=t.is('text')?this.findCorrespondingDomText(t):this.mapViewToDom(e.nodeBefore),!o)return null;n=o.parentNode,r=o.nextSibling}if(Ie(r)&&xe(r))return{parent:r,offset:lm};const i=o?Ve(o)+1:0;return{parent:n,offset:i}}}domToView(e,t={}){if(Te(e,this.blockFiller))return null;const n=this.getParentUIElement(e,this._domToViewMapping);if(n)return n;if(Ie(e)){if(Ce(e))return null;else{const t=this._processDataFromDomText(e);return''===t?null:new Kp(t)}}else if(this.isComment(e))return null;else{if(this.mapDomToView(e))return this.mapDomToView(e);let n;if(this.isDocumentFragment(e))n=new om,t.bind&&this.bindDocumentFragments(e,n);else{const o=t.keepOriginalCase?e.tagName:e.tagName.toLowerCase();n=new Yp(o),t.bind&&this.bindElements(e,n);const r=e.attributes;for(let e=r.length-1;0<=e;e--)n._setAttribute(r[e].name,r[e].value)}if(t.withChildren||void 0===t.withChildren)for(const o of this.domChildrenToView(e,t))n._appendChild(o);return n}}*domChildrenToView(e,t={}){for(let n=0;n<e.childNodes.length;n++){const o=e.childNodes[n],r=this.domToView(o,t);null!==r&&(yield r)}}domSelectionToView(e){if(1===e.rangeCount){let t=e.getRangeAt(0).startContainer;Ie(t)&&(t=t.parentNode);const n=this.fakeSelectionToView(t);if(n)return n}const t=this.isDomSelectionBackward(e),n=[];for(let t=0;t<e.rangeCount;t++){const o=e.getRangeAt(t),r=this.domRangeToView(o);r&&n.push(r)}return new Uu(n,{backward:t})}domRangeToView(e){const t=this.domPositionToView(e.startContainer,e.startOffset),n=this.domPositionToView(e.endContainer,e.endOffset);return t&&n?new ju(t,n):null}domPositionToView(e,t){if(Te(e,this.blockFiller))return this.domPositionToView(e.parentNode,Ve(e));const n=this.mapDomToView(e);if(n&&n.is('uiElement'))return zu.createBefore(n);if(Ie(e)){if(Ce(e))return this.domPositionToView(e.parentNode,Ve(e));const n=this.findCorrespondingViewText(e);let o=t;return n?(xe(e)&&(o-=lm,o=0>o?0:o),new zu(n,o)):null}if(0===t){const t=this.mapDomToView(e);if(t)return new zu(t,0)}else{const n=e.childNodes[t-1],o=Ie(n)?this.findCorrespondingViewText(n):this.mapDomToView(n);if(o&&o.parent)return new zu(o.parent,o.index+1)}return null}mapDomToView(e){return this.getParentUIElement(e)||this._domToViewMapping.get(e)}findCorrespondingViewText(e){if(Ce(e))return null;const t=this.getParentUIElement(e);if(t)return t;const n=e.previousSibling;if(n){if(!this.isElement(n))return null;const e=this.mapDomToView(n);if(e){const t=e.nextSibling;return t instanceof Kp?e.nextSibling:null}}else{const t=this.mapDomToView(e.parentNode);if(t){const e=t.getChild(0);return e instanceof Kp?e:null}}return null}mapViewToDom(e){return this._viewToDomMapping.get(e)}findCorrespondingDomText(e){const t=e.previousSibling;return t&&this.mapViewToDom(t)?this.mapViewToDom(t).nextSibling:!t&&e.parent&&this.mapViewToDom(e.parent)?this.mapViewToDom(e.parent).childNodes[0]:null}focus(e){const t=this.mapViewToDom(e);if(t&&t.ownerDocument.activeElement!==t){const{scrollX:e,scrollY:n}=um.window,o=[];Me(t,(e)=>{const{scrollLeft:t,scrollTop:n}=e;o.push([t,n])}),t.focus(),Me(t,(e)=>{const[t,n]=o.shift();e.scrollLeft=t,e.scrollTop=n}),um.window.scrollTo(e,n)}}isElement(e){return e&&e.nodeType==Node.ELEMENT_NODE}isDocumentFragment(e){return e&&e.nodeType==Node.DOCUMENT_FRAGMENT_NODE}isComment(e){return e&&e.nodeType==Node.COMMENT_NODE}isDomSelectionBackward(e){if(e.isCollapsed)return!1;const t=document.createRange();t.setStart(e.anchorNode,e.anchorOffset),t.setEnd(e.focusNode,e.focusOffset);const n=t.collapsed;return t.detach(),n}getParentUIElement(e){const t=Le(e);for(t.pop();t.length;){const e=t.pop(),n=this._domToViewMapping.get(e);if(n&&n.is('uiElement'))return n}return null}isDomSelectionCorrect(e){return this._isDomSelectionPositionCorrect(e.anchorNode,e.anchorOffset)&&this._isDomSelectionPositionCorrect(e.focusNode,e.focusOffset)}_isDomSelectionPositionCorrect(e,t){if(Ie(e)&&xe(e)&&t<lm)return!1;if(this.isElement(e)&&xe(e.childNodes[t]))return!1;const n=this.mapDomToView(e);return!(n&&n.is('uiElement'))}_processDataFromViewText(e){let t=e.data;if(e.getAncestors().some((e)=>this.preElements.includes(e.name)))return t;if(' '==t.charAt(0)){const n=this._getTouchingViewTextNode(e,!1),o=n&&this._nodeEndsWithSpace(n);(o||!n)&&(t='\xA0'+t.substr(1))}if(' '==t.charAt(t.length-1)){const n=this._getTouchingViewTextNode(e,!0);n||(t=t.substr(0,t.length-1)+'\xA0')}return t.replace(/ {2}/g,' \xA0')}_nodeEndsWithSpace(e){if(e.getAncestors().some((e)=>this.preElements.includes(e.name)))return!1;const t=this._processDataFromViewText(e);return' '==t.charAt(t.length-1)}_processDataFromDomText(e){let t=e.data;if(Fe(e,this.preElements))return Ae(e);t=t.replace(/[ \n\t\r]{1,}/g,' ');const n=this._getTouchingDomTextNode(e,!1),o=this._getTouchingDomTextNode(e,!0);return(!n||/[^\S\u00A0]/.test(n.data.charAt(n.data.length-1)))&&(t=t.replace(/^ /,'')),o||xe(e)||(t=t.replace(/ $/,'')),t=Ae(new Text(t)),t=t.replace(/ \u00A0/g,' '),(!n||/[^\S\u00A0]/.test(n.data.charAt(n.data.length-1)))&&(t=t.replace(/^\u00A0/,' ')),o&&'\xA0'!=o.data.charAt(0)||(t=t.replace(/\u00A0( *)$/,' $1')),t}_getTouchingViewTextNode(e,t){const n=new qu({startPosition:t?zu.createAfter(e):zu.createBefore(e),direction:t?'forward':'backward'});for(const o of n){if(o.item.is('containerElement'))return null;if(o.item.is('textProxy'))return o.item}return null}_getTouchingDomTextNode(e,t){if(!e.parentNode)return null;const n=t?'nextNode':'previousNode',o=e.ownerDocument,r=Le(e)[0],i=o.createTreeWalker(r,NodeFilter.SHOW_TEXT);i.currentNode=e;const a=i[n]();if(null!==a){const t=De(e,a);if(t&&!Fe(e,this.blockElements,t)&&!Fe(a,this.blockElements,t))return a}return null}}const gm=Ru({},Ad,{listenTo(e,...t){if(Be(e)||qe(e)){const n=this._getProxyEmitter(e)||new fm(e);n.attach(...t),e=n}Ad.listenTo.call(this,e,...t)},stopListening(e,t,n){if(Be(e)||qe(e)){const t=this._getProxyEmitter(e);if(!t)return;e=t}Ad.stopListening.call(this,e,t,n),e instanceof fm&&e.detach(t)},_getProxyEmitter(e){return l(this,ze(e))}});var hm=gm;class fm{constructor(e){d(this,ze(e)),this._domNode=e}}Ru(fm.prototype,Ad,{attach(e,t,n={}){if(!(this._domListeners&&this._domListeners[e])){const t=this._createDomListener(e,!!n.useCapture);this._domNode.addEventListener(e,t,!!n.useCapture),this._domListeners||(this._domListeners={}),this._domListeners[e]=t}},detach(e){let t;!this._domListeners[e]||(t=this._events[e])&&t.callbacks.length||this._domListeners[e].removeListener()},_createDomListener(e,t){const n=(t)=>{this.fire(e,t)};return n.removeListener=()=>{this._domNode.removeEventListener(e,n,t),delete this._domListeners[e]},n}});class bm{constructor(e){this.view=e,this.document=e.document,this.isEnabled=!1}enable(){this.isEnabled=!0}disable(){this.isEnabled=!1}destroy(){this.disable(),this.stopListening()}}_(bm,hm);je.prototype.add=je.prototype.push=function(e){return this.__data__.set(e,'__lodash_hash_undefined__'),this},je.prototype.has=function(e){return this.__data__.has(e)};var _m=je,km=function(e,t){for(var n=-1,o=e.length;++n<o;)if(t(e[n],n,e))return!0;return!1},wm=function(e,t,n,o,r,i){var a=r&2,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var d=i.get(e);if(d)return d==t;var c=-1,p=!0,u=r&1?new _m:void 0;for(i.set(e,t);++c<s;){var m=e[c],g=t[c];if(o)var h=a?o(g,m,c,t,e,i):o(m,g,c,e,t,i);if(void 0!==h){if(h)continue;p=!1;break}if(u){if(!km(t,function(e,t){if(!u.has(t)&&(m===e||n(m,e,o,r,i)))return u.add(t)})){p=!1;break}}else if(!(m===g||n(m,g,o,r,i))){p=!1;break}}return i['delete'](e),p},ym=Rp?Rp.prototype:void 0,vm=ym?ym.valueOf:void 0,xm=function(e,t,n,o,r,i,a){switch(n){case'[object DataView]':if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case'[object ArrayBuffer]':return!!(e.byteLength==t.byteLength&&o(new bp(e),new bp(t)));case'[object Boolean]':case'[object Date]':return+e==+t;case'[object Error]':return e.name==t.name&&e.message==t.message;case'[object Number]':return e==+e?e==+t:t!=+t;case'[object RegExp]':case'[object String]':return e==t+'';case'[object Map]':var s=vp;case'[object Set]':var l=i&2;if(s||(s=Ep),e.size!=t.size&&!l)return!1;var d=a.get(e);return d?d==t:(i|=1,a.set(e,t),wm(s(e),s(t),o,r,i,a));case'[object Symbol]':if(vm)return vm.call(e)==vm.call(t);}return!1},Cm=2,Am={};Am['[object Float32Array]']=Am['[object Float64Array]']=Am['[object Int8Array]']=Am['[object Int16Array]']=Am['[object Int32Array]']=Am['[object Uint8Array]']=Am['[object Uint8ClampedArray]']=Am['[object Uint16Array]']=Am['[object Uint32Array]']=!0,Am['[object Arguments]']=Am['[object Array]']=Am['[object ArrayBuffer]']=Am['[object Boolean]']=Am['[object DataView]']=Am['[object Date]']=Am['[object Error]']=Am['[object Function]']=Am['[object Map]']=Am['[object Number]']=Am['[object Object]']=Am['[object RegExp]']=Am['[object Set]']=Am['[object String]']=Am['[object WeakMap]']=!1;var Tm=Object.prototype,Em=Tm.toString,Pm=function(e){return ld(e)&&_c(e.length)&&!!Am[Em.call(e)]},Sm='[object Arguments]',Rm='[object Array]',Om='[object Object]',Im=Object.prototype,Nm=Im.hasOwnProperty,Vm=function(e,t,n,o,r,i){var a=Ec(e),s=Ec(t),l=Rm,d=Rm;a||(l=up(e),l=l==Sm?Om:l),s||(d=up(t),d=d==Sm?Om:d);var c=l==Om&&!sd(e),p=d==Om&&!sd(t),u=l==d;if(u&&!c)return i||(i=new rc),a||Pm(e)?wm(e,t,n,o,r,i):xm(e,t,l,n,o,r,i);if(!(r&2)){var m=c&&Nm.call(e,'__wrapped__'),g=p&&Nm.call(t,'__wrapped__');if(m||g){var h=m?e.value():e,f=g?t.value():t;return i||(i=new rc),n(h,f,o,r,i)}}return!!u&&(i||(i=new rc),Ue(e,t,n,o,r,i))},Lm=He,Dm=function(e,t,n){n='function'==typeof n?n:void 0;var o=n?n(e,t):void 0;return o===void 0?Lm(e,t,n):!!o};class Fm extends bm{constructor(e){super(e),this._config={childList:!0,characterData:!0,characterDataOldValue:!0,subtree:!0},this.domConverter=e.domConverter,this.renderer=e._renderer,this._domElements=[],this._mutationObserver=new window.MutationObserver(this._onMutations.bind(this))}flush(){this._onMutations(this._mutationObserver.takeRecords())}observe(e){this._domElements.push(e),this.isEnabled&&this._mutationObserver.observe(e,this._config)}enable(){super.enable();for(const e of this._domElements)this._mutationObserver.observe(e,this._config)}disable(){super.disable(),this._mutationObserver.disconnect()}destroy(){super.destroy(),this._mutationObserver.disconnect()}_onMutations(e){function t(e,t){if(!Array.isArray(e))return e===t||!!(e.is('text')&&t.is('text'))&&e.data===t.data}if(0===e.length)return;const n=this.domConverter,o=new Map,r=new Set;for(const t of e)if('childList'===t.type){const e=n.mapDomToView(t.target);if(e&&e.is('uiElement'))continue;e&&!this._isBogusBrMutation(t)&&r.add(e)}for(const t of e){const e=n.mapDomToView(t.target);if(!(e&&e.is('uiElement'))&&'characterData'===t.type){const e=n.findCorrespondingViewText(t.target);e&&!r.has(e.parent)?o.set(e,{type:'text',oldText:e.data,newText:Ae(t.target),node:e}):!e&&xe(t.target)&&r.add(n.mapDomToView(t.target.parentNode))}}const i=[];for(const t of o.values())this.renderer.markToSync('text',t.node),i.push(t);for(const o of r){const e=n.mapViewToDom(o),r=Array.from(o.getChildren()),a=Array.from(n.domChildrenToView(e,{withChildren:!1}));Dm(r,a,t)||(this.renderer.markToSync('children',o),i.push({type:'children',oldChildren:r,newChildren:a,node:o}))}const a=e[0].target.ownerDocument.getSelection();let s=null;if(a&&a.anchorNode){const e=n.domPositionToView(a.anchorNode,a.anchorOffset),t=n.domPositionToView(a.focusNode,a.focusOffset);e&&t&&(s=new Uu(e),s.setFocus(t))}this.document.fire('mutations',i,s),this.view.render()}_isBogusBrMutation(e){let t=null;return null===e.nextSibling&&0===e.removedNodes.length&&1==e.addedNodes.length&&(t=this.domConverter.domToView(e.addedNodes[0],{withChildren:!1})),t&&t.is('element','br')}}class Mm{constructor(e,t,n){this.view=e,this.document=e.document,this.domEvent=t,this.domTarget=t.target,Ru(this,n)}get target(){return this.view.domConverter.mapDomToView(this.domTarget)}preventDefault(){this.domEvent.preventDefault()}stopPropagation(){this.domEvent.stopPropagation()}}class Bm extends bm{constructor(e){super(e),this.useCapture=!1}observe(e){const t='string'==typeof this.domEventType?[this.domEventType]:this.domEventType;t.forEach((t)=>{this.listenTo(e,t,(e,t)=>{this.isEnabled&&this.onDomEvent(t)},{useCapture:this.useCapture})})}fire(e,t,n){this.isEnabled&&this.document.fire(e,new Mm(this.view,t,n))}}class qm extends Bm{constructor(e){super(e),this.domEventType=['keydown','keyup']}onDomEvent(e){this.fire(e.type,e,{keyCode:e.keyCode,altKey:e.altKey,ctrlKey:e.ctrlKey||e.metaKey,shiftKey:e.shiftKey,get keystroke(){return re(this)}})}}var zm=Date.now,jm=zm,Um='Expected a function',Hm=rd,Wm=e,Gm=We;class $m extends bm{constructor(e){super(e),this._fireSelectionChangeDoneDebounced=Gm((e)=>this.document.fire('selectionChangeDone',e),200)}observe(){const e=this.document;e.on('keydown',(t,n)=>{const o=e.selection;o.isFake&&Ge(n.keyCode)&&this.isEnabled&&(n.preventDefault(),this._handleSelectionMove(n.keyCode))},{priority:'lowest'})}destroy(){super.destroy(),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionMove(e){const t=this.document.selection,n=new Uu(t.getRanges(),{backward:t.isBackward,fake:!1});(e==tm.arrowleft||e==tm.arrowup)&&n.setTo(n.getFirstPosition()),(e==tm.arrowright||e==tm.arrowdown)&&n.setTo(n.getLastPosition());const o={oldSelection:t,newSelection:n,domSelection:null};this.document.fire('selectionChange',o),this._fireSelectionChangeDoneDebounced(o)}}const Km={error(e,t){console.error(a(e),t)},warn(e,t){console.warn(a(e),t)}};var Zm=Km;class Jm extends bm{constructor(e){super(e),this.mutationObserver=e.getObserver(Fm),this.selection=this.document.selection,this.domConverter=e.domConverter,this._documents=new WeakSet,this._fireSelectionChangeDoneDebounced=Gm((e)=>this.document.fire('selectionChangeDone',e),200),this._clearInfiniteLoopInterval=setInterval(()=>this._clearInfiniteLoop(),1e3),this._loopbackCounter=0}observe(e){const t=e.ownerDocument;this._documents.has(t)||(this.listenTo(t,'selectionchange',()=>{this._handleSelectionChange(t)}),this._documents.add(t))}destroy(){super.destroy(),clearInterval(this._clearInfiniteLoopInterval),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionChange(e){if(this.isEnabled&&(this.document.isFocused||this.document.isReadOnly)){this.mutationObserver.flush();const t=e.defaultView.getSelection(),n=this.domConverter.domSelectionToView(t);if(!(this.selection.isEqual(n)&&this.domConverter.isDomSelectionCorrect(t))){if(60<++this._loopbackCounter)return void Zm.warn('selectionchange-infinite-loop: Selection change observer detected an infinite rendering loop.');if(this.selection.isSimilar(n))this.view.render();else{const e={oldSelection:this.selection,newSelection:n,domSelection:t};this.document.fire('selectionChange',e),this._fireSelectionChangeDoneDebounced(e)}}}}_clearInfiniteLoop(){this._loopbackCounter=0}}class Ym extends Bm{constructor(e){super(e),this.domEventType=['focus','blur'],this.useCapture=!0;const t=this.document;t.on('focus',()=>{t.isFocused=!0,this._renderTimeoutId=setTimeout(()=>e.render(),50)}),t.on('blur',(n,o)=>{const r=t.selection.editableElement;(null===r||r===o.target)&&(t.isFocused=!1,e.render())})}onDomEvent(e){this.fire(e.type,e)}destroy(){this._renderTimeoutId&&clearTimeout(this._renderTimeoutId),super.destroy()}}class Qm extends Bm{constructor(e){super(e),this.domEventType=['compositionstart','compositionupdate','compositionend'];const t=this.document;t.on('compositionstart',()=>{t.isComposing=!0}),t.on('compositionend',()=>{t.isComposing=!1})}onDomEvent(e){this.fire(e.type,e)}}var Xm=function(e){return!!e&&1===e.nodeType&&ld(e)&&!gd(e)};class eg{constructor(e){const t=$e(e);if(Object.defineProperty(this,'_source',{value:e._source||e,writable:!0,enumerable:!1}),Xm(e)||t){const n=t?e.startContainer:e;n.ownerDocument&&n.ownerDocument.body.contains(n)||Zm.warn('rect-source-not-in-dom: The source of this rect does not belong to any rendered DOM tree.',{source:e}),t?Ze(this,eg.getDomRangeRects(e)[0]):Ze(this,e.getBoundingClientRect())}else if(qe(e)){const{innerWidth:t,innerHeight:n}=e;Ze(this,{top:0,right:t,bottom:n,left:0,width:t,height:n})}else Ze(this,e)}clone(){return new eg(this)}moveTo(e,t){return this.top=t,this.right=e+this.width,this.bottom=t+this.height,this.left=e,this}moveBy(e,t){return this.top+=t,this.right+=e,this.left+=e,this.bottom+=t,this}getIntersection(t){const n={top:rd(this.top,t.top),right:e(this.right,t.right),bottom:e(this.bottom,t.bottom),left:rd(this.left,t.left)};return n.width=n.right-n.left,n.height=n.bottom-n.top,0>n.width||0>n.height?null:new eg(n)}getIntersectionArea(e){const t=this.getIntersection(e);return t?t.getArea():0}getArea(){return this.width*this.height}getVisible(){const e=this._source;let t=this.clone();if(!Je(e))for(let n=e.parentNode||e.commonAncestorContainer;n&&!Je(n);){const e=new eg(n),o=t.getIntersection(e);if(o)o.getArea()<t.getArea()&&(t=o);else return null;n=n.parentNode}return t}isEqual(e){for(const t of tg)if(this[t]!==e[t])return!1;return!0}contains(e){const t=this.getIntersection(e);return!!(t&&t.isEqual(e))}excludeScrollbarsAndBorders(){const e=this._source;let t,n;if(qe(e))t=e.innerWidth-e.document.documentElement.clientWidth,n=e.innerHeight-e.document.documentElement.clientHeight;else{const o=Ke(this._source);t=e.offsetWidth-e.clientWidth,n=e.offsetHeight-e.clientHeight,this.moveBy(o.left,o.top)}return this.width-=t,this.right-=t,this.height-=n,this.bottom-=n,this}static getDomRangeRects(e){const t=[],n=Array.from(e.getClientRects());if(n.length)for(const e of n)t.push(new eg(e));else{let n=e.startContainer;Ie(n)&&(n=n.parentNode);const o=new eg(n.getBoundingClientRect());o.right=o.left,o.width=0,t.push(o)}return t}}const tg=['top','right','bottom','left','width','height'];Object.assign({},{scrollViewportToShowTarget:Ye,scrollAncestorsToShowTarget:function(e){const t=at(e);Xe(t,()=>new eg(e))}});class ng{constructor(){this.document=new Gu,this.domConverter=new mm,this._renderer=new pm(this.domConverter,this.document.selection),this._renderer.bind('isFocused').to(this.document),this.domRoots=new Map,this._observers=new Map,this._ongoingChange=!1,this._renderingInProgress=!1,this._postFixersInProgress=!1,this._writer=new rm(this.document),this.addObserver(Fm),this.addObserver(Jm),this.addObserver(Ym),this.addObserver(qm),this.addObserver($m),this.addObserver(Qm),Ee(this),le(this),this.on('render',()=>{this._render()})}attachDomRoot(e,t='main'){const n=this.document.getRoot(t);n._name=e.tagName.toLowerCase(),this.domRoots.set(t,e),this.domConverter.bindElements(e,n),this._renderer.markToSync('children',n),this._renderer.domDocuments.add(e.ownerDocument),n.on('change:children',(e,t)=>this._renderer.markToSync('children',t)),n.on('change:attributes',(e,t)=>this._renderer.markToSync('attributes',t)),n.on('change:text',(e,t)=>this._renderer.markToSync('text',t));for(const n of this._observers.values())n.observe(e,t)}getDomRoot(e='main'){return this.domRoots.get(e)}addObserver(e){let t=this._observers.get(e);if(t)return t;t=new e(this),this._observers.set(e,t);for(const[n,o]of this.domRoots)t.observe(o,n);return t.enable(),t}getObserver(e){return this._observers.get(e)}disableObservers(){for(const e of this._observers.values())e.disable()}enableObservers(){for(const e of this._observers.values())e.enable()}scrollToTheSelection(){const e=this.document.selection.getFirstRange();e&&Ye({target:this.domConverter.viewRangeToDom(e),viewportOffset:20})}focus(){if(!this.document.isFocused){const e=this.document.selection.editableElement;e?(this.domConverter.focus(e),this.render()):Zm.warn('view-focus-no-selection: There is no selection in any editable to focus.')}}change(e){if(this._renderingInProgress||this._postFixersInProgress)throw new bd('cannot-change-view-tree: Attempting to make changes to the view when it is in incorrect state: rendering or post fixers are in progress. This may cause some unexpected behaviour and inconsistency between the DOM and the view.');return this._ongoingChange?void e(this._writer):void(this._ongoingChange=!0,e(this._writer),this._ongoingChange=!1,this._postFixersInProgress=!0,this.document._callPostFixers(this._writer),this._postFixersInProgress=!1,this.fire('render'))}render(){this.change(()=>{})}destroy(){for(const e of this._observers.values())e.destroy();this.stopListening()}_render(){this._renderingInProgress=!0,this.disableObservers(),this._renderer.render(),this.enableObservers(),this._renderingInProgress=!1}}_(ng,Lu);class og{constructor(e){this.parent=null,this._attrs=lt(e)}get index(){let e;if(!this.parent)return null;if(null===(e=this.parent.getChildIndex(this)))throw new bd('model-node-not-found-in-parent: The node\'s parent does not contain this node.');return e}get startOffset(){let e;if(!this.parent)return null;if(null===(e=this.parent.getChildStartOffset(this)))throw new bd('model-node-not-found-in-parent: The node\'s parent does not contain this node.');return e}get offsetSize(){return 1}get endOffset(){return this.parent?this.startOffset+this.offsetSize:null}get nextSibling(){const e=this.index;return null!==e&&this.parent.getChild(e+1)||null}get previousSibling(){const e=this.index;return null!==e&&this.parent.getChild(e-1)||null}get root(){let e=this;for(;e.parent;)e=e.parent;return e}get document(){return this.root==this?null:this.root.document||null}getPath(){const e=[];for(let t=this;t.parent;)e.unshift(t.startOffset),t=t.parent;return e}getAncestors(e={includeSelf:!1,parentFirst:!1}){const t=[];for(let n=e.includeSelf?this:this.parent;n;)t[e.parentFirst?'push':'unshift'](n),n=n.parent;return t}getCommonAncestor(e,t={}){const n=this.getAncestors(t),o=e.getAncestors(t);let r=0;for(;n[r]==o[r]&&n[r];)r++;return 0==r?null:n[r-1]}isBefore(e){if(this==e)return!1;if(this.root!==e.root)return!1;const t=this.getPath(),n=e.getPath(),o=P(t,n);return!('prefix'!==o)||'extension'!==o&&t[o]<n[o]}isAfter(e){return this!=e&&!(this.root!==e.root)&&!this.isBefore(e)}hasAttribute(e){return this._attrs.has(e)}getAttribute(e){return this._attrs.get(e)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}toJSON(){const e={};return this._attrs.size&&(e.attributes=[...this._attrs]),e}_clone(){return new og(this._attrs)}_remove(){this.parent._removeChildren(this.index)}_setAttribute(e,t){this._attrs.set(e,t)}_setAttributesTo(e){this._attrs=lt(e)}_removeAttribute(e){return this._attrs.delete(e)}_clearAttributes(){this._attrs.clear()}is(e){return'node'==e}}class rg extends og{constructor(e,t){super(t),this._data=e||''}get offsetSize(){return this.data.length}get data(){return this._data}is(e){return'text'==e||super.is(e)}toJSON(){const e=super.toJSON();return e.data=this.data,e}_clone(){return new rg(this.data,this.getAttributes())}static fromJSON(e){return new rg(e.data,e.attributes)}}class ig{constructor(e,t,n){if(this.textNode=e,0>t||t>e.offsetSize)throw new bd('model-textproxy-wrong-offsetintext: Given offsetInText value is incorrect.');if(0>n||t+n>e.offsetSize)throw new bd('model-textproxy-wrong-length: Given length value is incorrect.');this.data=e.data.substring(t,t+n),this.offsetInText=t}get startOffset(){return null===this.textNode.startOffset?null:this.textNode.startOffset+this.offsetInText}get offsetSize(){return this.data.length}get endOffset(){return null===this.startOffset?null:this.startOffset+this.offsetSize}get isPartial(){return this.offsetSize!==this.textNode.offsetSize}get parent(){return this.textNode.parent}get root(){return this.textNode.root}get document(){return this.textNode.document}is(e){return'textProxy'==e}getPath(){const e=this.textNode.getPath();return 0<e.length&&(e[e.length-1]+=this.offsetInText),e}getAncestors(e={includeSelf:!1,parentFirst:!1}){const t=[];for(let n=e.includeSelf?this:this.parent;n;)t[e.parentFirst?'push':'unshift'](n),n=n.parent;return t}hasAttribute(e){return this.textNode.hasAttribute(e)}getAttribute(e){return this.textNode.getAttribute(e)}getAttributes(){return this.textNode.getAttributes()}getAttributeKeys(){return this.textNode.getAttributeKeys()}}class ag{constructor(e){this._nodes=[],e&&this._insertNodes(0,e)}[Symbol.iterator](){return this._nodes[Symbol.iterator]()}get length(){return this._nodes.length}get maxOffset(){return this._nodes.reduce((e,t)=>e+t.offsetSize,0)}getNode(e){return this._nodes[e]||null}getNodeIndex(e){const t=this._nodes.indexOf(e);return-1==t?null:t}getNodeStartOffset(e){const t=this.getNodeIndex(e);return null===t?null:this._nodes.slice(0,t).reduce((e,t)=>e+t.offsetSize,0)}indexToOffset(e){if(e==this._nodes.length)return this.maxOffset;const t=this._nodes[e];if(!t)throw new bd('model-nodelist-index-out-of-bounds: Given index cannot be found in the node list.');return this.getNodeStartOffset(t)}offsetToIndex(e){let t=0;for(const n of this._nodes){if(e>=t&&e<t+n.offsetSize)return this.getNodeIndex(n);t+=n.offsetSize}if(t!=e)throw new bd('model-nodelist-offset-out-of-bounds: Given offset cannot be found in the node list.');return this.length}_insertNodes(e,t){for(const n of t)if(!(n instanceof og))throw new bd('model-nodelist-insertNodes-not-node: Trying to insert an object which is not a Node instance.');this._nodes.splice(e,0,...t)}_removeNodes(e,t=1){return this._nodes.splice(e,t)}toJSON(){return this._nodes.map((e)=>e.toJSON())}}class sg extends og{constructor(e,t,n){super(t),this.name=e,this._children=new ag,n&&this._insertChild(0,n)}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}is(e,t=null){return t?'element'==e&&t==this.name:'element'==e||e==this.name||super.is(e)}getChild(e){return this._children.getNode(e)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(e){return this._children.getNodeIndex(e)}getChildStartOffset(e){return this._children.getNodeStartOffset(e)}offsetToIndex(e){return this._children.offsetToIndex(e)}getNodeByPath(e){let t=this;for(const n of e)t=t.getChild(t.offsetToIndex(n));return t}toJSON(){const e=super.toJSON();if(e.name=this.name,0<this._children.length){e.children=[];for(const t of this._children)e.children.push(t.toJSON())}return e}_clone(e=!1){const t=e?Array.from(this._children).map((e)=>e._clone(!0)):null;return new sg(this.name,this.getAttributes(),t)}_appendChild(e){this._insertChild(this.childCount,e)}_insertChild(e,t){const n=dt(t);for(const o of n)null!==o.parent&&o._remove(),o.parent=this;this._children._insertNodes(e,n)}_removeChildren(e,t=1){const n=this._children._removeNodes(e,t);for(const o of n)o.parent=null;return n}static fromJSON(e){let t=null;if(e.children){t=[];for(const n of e.children)n.name?t.push(sg.fromJSON(n)):t.push(rg.fromJSON(n))}return new sg(e.name,e.attributes,t)}}class lg{constructor(e={}){if(!e.boundaries&&!e.startPosition)throw new bd('model-tree-walker-no-start-position: Neither boundaries nor starting position have been defined.');const t=e.direction||'forward';if('forward'!=t&&'backward'!=t)throw new bd('model-tree-walker-unknown-direction: Only `backward` and `forward` direction allowed.',{direction:t});this.direction=t,this.boundaries=e.boundaries||null,this.position=e.startPosition?cg.createFromPosition(e.startPosition):cg.createFromPosition(this.boundaries['backward'==this.direction?'end':'start']),this.singleCharacters=!!e.singleCharacters,this.shallow=!!e.shallow,this.ignoreElementEnd=!!e.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null,this._visitedParent=this.position.parent}[Symbol.iterator](){return this}skip(e){let t,n,o,r;do o=this.position,r=this._visitedParent,({done:t,value:n}=this.next());while(!t&&e(n));t||(this.position=o,this._visitedParent=r)}next(){return'forward'==this.direction?this._next():this._previous()}_next(){const e=this.position,t=cg.createFromPosition(this.position),n=this._visitedParent;if(null===n.parent&&t.offset===n.maxOffset)return{done:!0};if(n===this._boundaryEndParent&&t.offset==this.boundaries.end.offset)return{done:!0};const o=t.textNode?t.textNode:t.nodeAfter;if(o instanceof sg)return this.shallow?t.offset++:(t.path.push(0),this._visitedParent=o),this.position=t,ct('elementStart',o,e,t,1);if(o instanceof rg){let r;if(this.singleCharacters)r=1;else{let e=o.endOffset;this._boundaryEndParent==n&&this.boundaries.end.offset<e&&(e=this.boundaries.end.offset),r=e-t.offset}const i=t.offset-o.startOffset,a=new ig(o,i,r);return t.offset+=r,this.position=t,ct('text',a,e,t,r)}return t.path.pop(),t.offset++,this.position=t,this._visitedParent=n.parent,this.ignoreElementEnd?this._next():ct('elementEnd',n,e,t)}_previous(){const e=this.position,t=cg.createFromPosition(this.position),n=this._visitedParent;if(null===n.parent&&0===t.offset)return{done:!0};if(n==this._boundaryStartParent&&t.offset==this.boundaries.start.offset)return{done:!0};const o=t.textNode?t.textNode:t.nodeBefore;if(o instanceof sg)return t.offset--,this.shallow?(this.position=t,ct('elementStart',o,e,t,1)):(t.path.push(o.maxOffset),this.position=t,this._visitedParent=o,this.ignoreElementEnd?this._previous():ct('elementEnd',o,e,t));if(o instanceof rg){let r;if(this.singleCharacters)r=1;else{let e=o.startOffset;this._boundaryStartParent==n&&this.boundaries.start.offset>e&&(e=this.boundaries.start.offset),r=t.offset-e}const i=t.offset-o.startOffset,a=new ig(o,i-r,r);return t.offset-=r,this.position=t,ct('text',a,e,t,r)}return t.path.pop(),this.position=t,this._visitedParent=n.parent,ct('elementStart',n,e,t,1)}}var dg=function(e){var t=e?e.length:0;return t?e[t-1]:void 0};class cg{constructor(e,t){if(!e.is('element')&&!e.is('documentFragment'))throw new bd('model-position-root-invalid: Position root invalid.');if(!(t instanceof Array)||0===t.length)throw new bd('model-position-path-incorrect: Position path must be an array with at least one item.',{path:t});t=e.getPath().concat(t),e=e.root,this.root=e,this.path=t}get offset(){return dg(this.path)}set offset(e){this.path[this.path.length-1]=e}get parent(){let e=this.root;for(let t=0;t<this.path.length-1;t++)e=e.getChild(e.offsetToIndex(this.path[t]));return e}get index(){return this.parent.offsetToIndex(this.offset)}get textNode(){const e=this.parent.getChild(this.index);return e instanceof rg&&e.startOffset<this.offset?e:null}get nodeAfter(){return null===this.textNode?this.parent.getChild(this.index):null}get nodeBefore(){return null===this.textNode?this.parent.getChild(this.index-1):null}get isAtStart(){return 0===this.offset}get isAtEnd(){return this.offset==this.parent.maxOffset}compareWith(e){if(this.root!=e.root)return'different';const t=P(this.path,e.path);return'same'===t?'same':'prefix'===t?'before':'extension'===t?'after':this.path[t]<e.path[t]?'before':'after'}getLastMatchingPosition(e,t={}){t.startPosition=this;const n=new lg(t);return n.skip(e),n.position}getParentPath(){return this.path.slice(0,-1)}getAncestors(){return this.parent.is('documentFragment')?[this.parent]:this.parent.getAncestors({includeSelf:!0})}getCommonPath(t){if(this.root!=t.root)return[];const n=P(this.path,t.path),o='string'==typeof n?e(this.path.length,t.path.length):n;return this.path.slice(0,o)}getCommonAncestor(e){const t=this.getAncestors(),n=e.getAncestors();let o=0;for(;t[o]==n[o]&&t[o];)o++;return 0==o?null:t[o-1]}getShiftedBy(e){const t=cg.createFromPosition(this),n=t.offset+e;return t.offset=0>n?0:n,t}isAfter(e){return'after'==this.compareWith(e)}isBefore(e){return'before'==this.compareWith(e)}isEqual(e){return'same'==this.compareWith(e)}isTouching(e){let t=null,n=null;const o=this.compareWith(e);switch(o){case'same':return!0;case'before':t=cg.createFromPosition(this),n=cg.createFromPosition(e);break;case'after':t=cg.createFromPosition(e),n=cg.createFromPosition(this);break;default:return!1;}for(let o=t.parent;t.path.length+n.path.length;){if(t.isEqual(n))return!0;if(t.path.length>n.path.length){if(t.offset!==o.maxOffset)return!1;t.path=t.path.slice(0,-1),o=o.parent,t.offset++}else{if(0!==n.offset)return!1;n.path=n.path.slice(0,-1)}}}_getTransformedByDeletion(e,t){const n=cg.createFromPosition(this);if(this.root!=e.root)return n;if('same'==P(e.getParentPath(),this.getParentPath())){if(e.offset<this.offset){if(e.offset+t>this.offset)return null;n.offset-=t}}else if('prefix'==P(e.getParentPath(),this.getParentPath())){const o=e.path.length-1;if(e.offset<=this.path[o]){if(e.offset+t>this.path[o])return null;n.path[o]-=t}}return n}_getTransformedByInsertion(e,t,n){const o=cg.createFromPosition(this);if(this.root!=e.root)return o;if('same'==P(e.getParentPath(),this.getParentPath()))(e.offset<this.offset||e.offset==this.offset&&n)&&(o.offset+=t);else if('prefix'==P(e.getParentPath(),this.getParentPath())){const n=e.path.length-1;e.offset<=this.path[n]&&(o.path[n]+=t)}return o}_getTransformedByMove(e,t,n,o,r){let i=this._getTransformedByDeletion(e,n);return t=t._getTransformedByDeletion(e,n),i=null===i||r&&i.isEqual(e)?this._getCombined(e,t):i._getTransformedByInsertion(t,n,o),i}_getCombined(e,t){const n=e.path.length-1,o=cg.createFromPosition(t);return o.offset=o.offset+this.path[n]-e.offset,o.path=o.path.concat(this.path.slice(n+1)),o}static createAt(e,t){if(e instanceof cg)return this.createFromPosition(e);else{const n=e;if('end'==t)t=n.maxOffset;else{if('before'==t)return this.createBefore(n);if('after'==t)return this.createAfter(n);t||(t=0)}return this.createFromParentAndOffset(n,t)}}static createAfter(e){if(!e.parent)throw new bd('model-position-after-root: You cannot make a position after root.',{root:e});return this.createFromParentAndOffset(e.parent,e.endOffset)}static createBefore(e){if(!e.parent)throw new bd('model-position-before-root: You cannot make a position before root.',{root:e});return this.createFromParentAndOffset(e.parent,e.startOffset)}static createFromParentAndOffset(e,t){if(!e.is('element')&&!e.is('documentFragment'))throw new bd('model-position-parent-incorrect: Position parent have to be a element or document fragment.');const n=e.getPath();return n.push(t),new this(e.root,n)}static createFromPosition(e){return new this(e.root,e.path.slice())}static fromJSON(e,t){if('$graveyard'===e.root)return new cg(t.graveyard,e.path);if(!t.getRoot(e.root))throw new bd('model-position-fromjson-no-root: Cannot create position for document. Root with specified name does not exist.',{rootName:e.root});return new cg(t.getRoot(e.root),e.path)}}class pg{constructor(e,t=null){this.start=cg.createFromPosition(e),this.end=t?cg.createFromPosition(t):cg.createFromPosition(e)}*[Symbol.iterator](){yield*new lg({boundaries:this,ignoreElementEnd:!0})}get isCollapsed(){return this.start.isEqual(this.end)}get isFlat(){return this.start.parent===this.end.parent}get root(){return this.start.root}containsPosition(e){return e.isAfter(this.start)&&e.isBefore(this.end)}containsRange(e,t=!1){e.isCollapsed&&(t=!1);const n=this.containsPosition(e.start)||t&&this.start.isEqual(e.start),o=this.containsPosition(e.end)||t&&this.end.isEqual(e.end);return n&&o}containsItem(e){const t=cg.createBefore(e);return this.containsPosition(t)||this.start.isEqual(t)}isEqual(e){return this.start.isEqual(e.start)&&this.end.isEqual(e.end)}isIntersecting(e){return this.start.isBefore(e.end)&&this.end.isAfter(e.start)}getDifference(e){const t=[];return this.isIntersecting(e)?(this.containsPosition(e.start)&&t.push(new pg(this.start,e.start)),this.containsPosition(e.end)&&t.push(new pg(e.end,this.end))):t.push(pg.createFromRange(this)),t}getIntersection(e){if(this.isIntersecting(e)){let t=this.start,n=this.end;return this.containsPosition(e.start)&&(t=e.start),this.containsPosition(e.end)&&(n=e.end),new pg(t,n)}return null}getMinimalFlatRanges(){const e=[],t=this.start.getCommonPath(this.end).length,n=cg.createFromPosition(this.start);for(let o=n.parent;n.path.length>t+1;){const t=o.maxOffset-n.offset;0!=t&&e.push(new pg(n,n.getShiftedBy(t))),n.path=n.path.slice(0,-1),n.offset++,o=o.parent}for(;n.path.length<=this.end.path.length;){const t=this.end.path[n.path.length-1],o=t-n.offset;0!=o&&e.push(new pg(n,n.getShiftedBy(o))),n.offset=t,n.path.push(0)}return e}getWalker(e={}){return e.boundaries=this,new lg(e)}*getItems(e={}){e.boundaries=this,e.ignoreElementEnd=!0;const t=new lg(e);for(const n of t)yield n.item}*getPositions(e={}){e.boundaries=this;const t=new lg(e);yield t.position;for(const n of t)yield n.nextPosition}getTransformedByDelta(e){const t=[pg.createFromRange(this)],n=new Set(['insert','move','remove','reinsert']);for(const o of e.operations)if(n.has(o.type))for(let n=0;n<t.length;n++){let r;r='insert'==o.type?t[n]._getTransformedByDocumentChange(o.type,e.type,o.position,o.nodes.maxOffset):t[n]._getTransformedByDocumentChange(o.type,e.type,o.targetPosition,o.howMany,o.sourcePosition),t.splice(n,1,...r),n+=r.length-1}return t}getTransformedByDeltas(e){const t=[pg.createFromRange(this)];for(const n of e)for(let e=0;e<t.length;e++){const o=t[e].getTransformedByDelta(n);t.splice(e,1,...o),e+=o.length-1}for(let n=0;n<t.length;n++){const e=t[n];for(let o=n+1;o<t.length;o++){const n=t[o];(e.containsRange(n)||n.containsRange(e)||e.isEqual(n))&&t.splice(o,1)}}return t}getCommonAncestor(){return this.start.getCommonAncestor(this.end)}_getTransformedByDocumentChange(e,t,n,o,r){if('insert'==e)return this._getTransformedByInsertion(n,o,!1,!1);else{const e=pg.createFromPositionAndShift(r,o);if('merge'==t&&this.isCollapsed&&(this.start.isEqual(e.start)||this.start.isEqual(e.end))){const t=this.start.offset-e.start.offset;return[new pg(n.getShiftedBy(t))]}if('split'==t&&this.isCollapsed&&this.end.isEqual(e.end))return[new pg(n.getShiftedBy(o))];if((e.containsPosition(this.start)||e.start.isEqual(this.start))&&this.containsPosition(e.end)&&this.end.isAfter(n)){const e=this.start._getCombined(r,n._getTransformedByDeletion(r,o)),t=this.end._getTransformedByMove(r,n,o,!1,!1);return[new pg(e,t)]}if((e.containsPosition(this.end)||e.end.isEqual(this.end))&&this.containsPosition(e.start)&&this.start.isBefore(n)){const e=this.start._getTransformedByMove(r,n,o,!0,!1),t=this.end._getCombined(r,n._getTransformedByDeletion(r,o));return[new pg(e,t)]}return this._getTransformedByMove(r,n,o)}}_getTransformedByInsertion(e,t,n=!1,o=!1){if(n&&this.containsPosition(e))return[new pg(this.start,e),new pg(e._getTransformedByInsertion(e,t,!0),this.end._getTransformedByInsertion(e,t,this.isCollapsed))];else{const n=pg.createFromRange(this),r=!!n.isCollapsed||o;return n.start=n.start._getTransformedByInsertion(e,t,!o),n.end=n.end._getTransformedByInsertion(e,t,r),[n]}}_getTransformedByMove(e,t,n){if(this.isCollapsed){const o=this.start._getTransformedByMove(e,t,n,!0,!1);return[new pg(o)]}let o;const r=new pg(e,e.getShiftedBy(n)),i=this.getDifference(r);let a=null;const s=this.getIntersection(r);1==i.length?a=new pg(i[0].start._getTransformedByDeletion(e,n),i[0].end._getTransformedByDeletion(e,n)):2==i.length&&(a=new pg(this.start,this.end._getTransformedByDeletion(e,n)));const l=t._getTransformedByDeletion(e,n);return o=a?a._getTransformedByInsertion(l,n,null!==s):[],s&&o.push(new pg(s.start._getCombined(r.start,l),s.end._getCombined(r.start,l))),o}static createFromPositionAndShift(e,t){const n=e,o=e.getShiftedBy(t);return 0<t?new this(n,o):new this(o,n)}static createFromParentsAndOffsets(e,t,n,o){return new this(cg.createFromParentAndOffset(e,t),cg.createFromParentAndOffset(n,o))}static createFromRange(e){return new this(e.start,e.end)}static createIn(e){return this.createFromParentsAndOffsets(e,0,e,e.maxOffset)}static createOn(e){return this.createFromPositionAndShift(cg.createBefore(e),e.offsetSize)}static createCollapsedAt(e,t){const n=cg.createAt(e,t),o=cg.createFromPosition(n);return new pg(n,o)}static createFromRanges(e){if(0===e.length)throw new bd('range-create-from-ranges-empty-array: At least one range has to be passed.');else if(1==e.length)return this.createFromRange(e[0]);const t=e[0];e.sort((e,t)=>e.start.isAfter(t.start)?1:-1);const n=e.indexOf(t),o=new this(t.start,t.end);for(let t=n-1;0<=t&&e[t].end.isEqual(o.start);t++)o.start=cg.createFromPosition(e[t].start);for(let t=n+1;t<e.length&&e[t].start.isEqual(o.end);t++)o.end=cg.createFromPosition(e[t].end);return o}static fromJSON(e,t){return new this(cg.fromJSON(e.start,t),cg.fromJSON(e.end,t))}}class ug{constructor(){this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap,this._viewToModelLengthCallbacks=new Map,this._markerNameToElements=new Map,this.on('modelToViewPosition',(e,t)=>{if(!t.viewPosition){const e=this._modelToViewMapping.get(t.modelPosition.parent);t.viewPosition=this._findPositionIn(e,t.modelPosition.offset)}},{priority:'low'}),this.on('viewToModelPosition',(e,t)=>{if(t.modelPosition)return;let n=t.viewPosition.parent,o=this._viewToModelMapping.get(n);for(;!o;)n=n.parent,o=this._viewToModelMapping.get(n);const r=this._toModelOffset(t.viewPosition.parent,t.viewPosition.offset,n);t.modelPosition=cg.createFromParentAndOffset(o,r)},{priority:'low'})}bindElements(e,t){this._modelToViewMapping.set(e,t),this._viewToModelMapping.set(t,e)}unbindViewElement(e){const t=this.toModelElement(e);this._viewToModelMapping.delete(e),this._modelToViewMapping.get(t)==e&&this._modelToViewMapping.delete(t)}unbindModelElement(e){const t=this.toViewElement(e);this._modelToViewMapping.delete(e),this._viewToModelMapping.get(t)==e&&this._viewToModelMapping.delete(t)}bindElementToMarker(e,t){const n=this._markerNameToElements.get(t)||new Set;n.add(e),this._markerNameToElements.set(t,n)}unbindElementsFromMarkerName(e){this._markerNameToElements.delete(e)}clearBindings(){this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap,this._markerNameToElements=new Map}toModelElement(e){return this._viewToModelMapping.get(e)}toViewElement(e){return this._modelToViewMapping.get(e)}toModelRange(e){return new pg(this.toModelPosition(e.start),this.toModelPosition(e.end))}toViewRange(e){return new ju(this.toViewPosition(e.start),this.toViewPosition(e.end))}toModelPosition(e){const t={viewPosition:e,mapper:this};return this.fire('viewToModelPosition',t),t.modelPosition}toViewPosition(e,t={isPhantom:!1}){const n={modelPosition:e,mapper:this,isPhantom:t.isPhantom};return this.fire('modelToViewPosition',n),n.viewPosition}markerNameToElements(e){const t=this._markerNameToElements.get(e);if(!t)return null;const n=new Set;for(const o of t)if(o.is('attributeElement'))for(const e of o.getElementsWithSameId())n.add(e);else n.add(o);return n}registerViewToModelLength(e,t){this._viewToModelLengthCallbacks.set(e,t)}_toModelOffset(e,t,n){if(n!=e){const o=this._toModelOffset(e.parent,e.index,n),r=this._toModelOffset(e,t,e);return o+r}if(e.is('text'))return t;let o=0;for(let r=0;r<t;r++)o+=this.getModelLength(e.getChild(r));return o}getModelLength(e){if(this._viewToModelLengthCallbacks.get(e.name)){const t=this._viewToModelLengthCallbacks.get(e.name);return t(e)}if(this._viewToModelMapping.has(e))return 1;if(e.is('text'))return e.data.length;if(e.is('uiElement'))return 0;else{let t=0;for(const n of e.getChildren())t+=this.getModelLength(n);return t}}_findPositionIn(e,t){let n=0,o=0,r=0,i;if(e.is('text'))return new zu(e,t);for(;o<t;)i=e.getChild(r),n=this.getModelLength(i),o+=n,r++;return o==t?this._moveViewPositionToTextNode(new zu(e,r)):this._findPositionIn(i,t-(o-n))}_moveViewPositionToTextNode(e){const t=e.nodeBefore,n=e.nodeAfter;if(t instanceof Kp)return new zu(t,t.data.length);return n instanceof Kp?new zu(n,0):e}}_(ug,Ad);class mg{constructor(){this._consumable=new Map,this._textProxyRegistry=new Map}add(e,t){t=pt(t),e instanceof ig&&(e=this._getSymbolForTextProxy(e)),this._consumable.has(e)||this._consumable.set(e,new Map),this._consumable.get(e).set(t,!0)}consume(e,t){return t=pt(t),e instanceof ig&&(e=this._getSymbolForTextProxy(e)),!!this.test(e,t)&&(this._consumable.get(e).set(t,!1),!0)}test(e,t){t=pt(t),e instanceof ig&&(e=this._getSymbolForTextProxy(e));const n=this._consumable.get(e);if(n===void 0)return null;const o=n.get(t);return void 0===o?null:o}revert(e,t){t=pt(t),e instanceof ig&&(e=this._getSymbolForTextProxy(e));const n=this.test(e,t);return!1===n?(this._consumable.get(e).set(t,!0),!0):!0!==n&&null}_getSymbolForTextProxy(e){let t=null;const n=this._textProxyRegistry.get(e.startOffset);if(n){const o=n.get(e.endOffset);o&&(t=o.get(e.parent))}return t||(t=this._addSymbolForTextProxy(e.startOffset,e.endOffset,e.parent)),t}_addSymbolForTextProxy(e,t,n){const o=Symbol('textProxySymbol');let r,i;return r=this._textProxyRegistry.get(e),r||(r=new Map,this._textProxyRegistry.set(e,r)),i=r.get(t),i||(i=new Map,r.set(t,i)),i.set(n,o),o}}class gg{constructor(e={}){this.conversionApi=Ru({dispatcher:this},e)}convertChanges(e,t){for(const n of e.getMarkersToRemove())this.convertMarkerRemove(n.name,n.range,t);for(const n of e.getChanges())'insert'==n.type?this.convertInsert(pg.createFromPositionAndShift(n.position,n.length),t):'remove'==n.type?this.convertRemove(n.position,n.length,n.name,t):this.convertAttribute(n.range,n.attributeKey,n.attributeOldValue,n.attributeNewValue,t);for(const n of e.getMarkersToAdd())this.convertMarkerAdd(n.name,n.range,t)}convertInsert(e,t){this.conversionApi.writer=t,this.conversionApi.consumable=this._createInsertConsumable(e);for(const n of e){const e=n.item,t=pg.createFromPositionAndShift(n.previousPosition,n.length),o={item:e,range:t};this._testAndFire('insert',o);for(const t of e.getAttributeKeys())o.attributeKey=t,o.attributeOldValue=null,o.attributeNewValue=e.getAttribute(t),this._testAndFire(`attribute:${t}`,o)}this._clearConversionApi()}convertRemove(e,t,n,o){this.conversionApi.writer=o,this.fire('remove:'+n,{position:e,length:t},this.conversionApi),this._clearConversionApi()}convertAttribute(e,t,n,o,r){this.conversionApi.writer=r,this.conversionApi.consumable=this._createConsumableForRange(e,`attribute:${t}`);for(const i of e){const e=i.item,r=pg.createFromPositionAndShift(i.previousPosition,i.length);this._testAndFire(`attribute:${t}`,{item:e,range:r,attributeKey:t,attributeOldValue:n,attributeNewValue:o})}this._clearConversionApi()}convertSelection(e,t,n){const o=Array.from(t.getMarkersAtPosition(e.getFirstPosition()));if(this.conversionApi.writer=n,this.conversionApi.consumable=this._createSelectionConsumable(e,o),this.fire('selection',{selection:e},this.conversionApi),!!e.isCollapsed){for(const t of o){const n=t.getRange();if(!ut(e.getFirstPosition(),t,this.conversionApi.mapper))continue;const o={item:e,markerName:t.name,markerRange:n};this.conversionApi.consumable.test(e,'addMarker:'+t.name)&&this.fire('addMarker:'+t.name,o,this.conversionApi)}for(const t of e.getAttributeKeys()){const n={item:e,range:e.getFirstRange(),attributeKey:t,attributeOldValue:null,attributeNewValue:e.getAttribute(t)};this.conversionApi.consumable.test(e,'attribute:'+n.attributeKey)&&this.fire('attribute:'+n.attributeKey,n,this.conversionApi)}this._clearConversionApi()}}convertMarkerAdd(e,t,n){if(t.root.document&&'$graveyard'!=t.root.rootName){this.conversionApi.writer=n;const o='addMarker:'+e;if(t.isCollapsed){const n=new mg;return n.add(t,o),this.conversionApi.consumable=n,void this.fire(o,{markerName:e,markerRange:t},this.conversionApi)}this.conversionApi.consumable=this._createConsumableForRange(t,o);for(const n of t.getItems()){if(!this.conversionApi.consumable.test(n,o))continue;const r={item:n,range:pg.createOn(n),markerName:e,markerRange:t};this.fire(o,r,this.conversionApi)}this._clearConversionApi()}}convertMarkerRemove(e,t,n){t.root.document&&'$graveyard'!=t.root.rootName&&(this.conversionApi.writer=n,this.fire('removeMarker:'+e,{markerName:e,markerRange:t},this.conversionApi),this._clearConversionApi())}_createInsertConsumable(e){const t=new mg;for(const n of e){const e=n.item;t.add(e,'insert');for(const n of e.getAttributeKeys())t.add(e,'attribute:'+n)}return t}_createConsumableForRange(e,t){const n=new mg;for(const o of e.getItems())n.add(o,t);return n}_createSelectionConsumable(e,t){const n=new mg;n.add(e,'selection');for(const o of t)n.add(e,'addMarker:'+o.name);for(const o of e.getAttributeKeys())n.add(e,'attribute:'+o);return n}_testAndFire(e,t){if(this.conversionApi.consumable.test(t.item,e)){const n=t.item.name||'$text';this.fire(e+':'+n,t,this.conversionApi)}}_clearConversionApi(){delete this.conversionApi.writer,delete this.conversionApi.consumable}}_(gg,Ad);class hg{constructor(e,t,n){this._lastRangeBackward=!1,this._ranges=[],this._attrs=new Map,e&&this.setTo(e,t,n)}get anchor(){if(0<this._ranges.length){const e=this._ranges[this._ranges.length-1];return this._lastRangeBackward?e.end:e.start}return null}get focus(){if(0<this._ranges.length){const e=this._ranges[this._ranges.length-1];return this._lastRangeBackward?e.start:e.end}return null}get isCollapsed(){const e=this._ranges.length;return!(1!==e)&&this._ranges[0].isCollapsed}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}isEqual(e){if(this.rangeCount!=e.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(e.anchor)||!this.focus.isEqual(e.focus))return!1;for(const t of this._ranges){let n=!1;for(const o of e._ranges)if(t.isEqual(o)){n=!0;break}if(!n)return!1}return!0}*getRanges(){for(const e of this._ranges)yield pg.createFromRange(e)}getFirstRange(){let e=null;for(const t of this._ranges)(!e||t.start.isBefore(e.start))&&(e=t);return e?pg.createFromRange(e):null}getLastRange(){let e=null;for(const t of this._ranges)(!e||t.end.isAfter(e.end))&&(e=t);return e?pg.createFromRange(e):null}getFirstPosition(){const e=this.getFirstRange();return e?cg.createFromPosition(e.start):null}getLastPosition(){const e=this.getLastRange();return e?cg.createFromPosition(e.end):null}setTo(e,t,n){if(null===e)this._setRanges([]);else if(e instanceof hg)this._setRanges(e.getRanges(),e.isBackward);else if(e&&'function'==typeof e.getRanges)this._setRanges(e.getRanges(),e.isBackward);else if(e instanceof pg)this._setRanges([e],!!t&&!!t.backward);else if(e instanceof cg)this._setRanges([new pg(e)]);else if(e instanceof og){const o=!!n&&!!n.backward;let r;if('in'==t)r=pg.createIn(e);else if('on'==t)r=pg.createOn(e);else if(t!==void 0)r=pg.createCollapsedAt(e,t);else throw new bd('model-selection-setTo-required-second-parameter: selection.setTo requires the second parameter when the first parameter is a node.');this._setRanges([r],o)}else if(R(e))this._setRanges(e,t&&!!t.backward);else throw new bd('model-selection-setTo-not-selectable: Cannot set selection to given place.')}_setRanges(e,t=!1){e=Array.from(e);const n=e.some((e)=>{if(!(e instanceof pg))throw new bd('model-selection-added-not-range: Trying to add an object that is not an instance of Range.');return this._ranges.every((t)=>!t.isEqual(e))});if(e.length!==this._ranges.length||n){this._removeAllRanges();for(const t of e)this._pushRange(t);this._lastRangeBackward=!!t,this.fire('change:range',{directChange:!0})}}setFocus(e,t){if(null===this.anchor)throw new bd('model-selection-setFocus-no-ranges: Cannot set selection focus if there are no ranges in selection.');const n=cg.createAt(e,t);if('same'!=n.compareWith(this.focus)){const e=this.anchor;this._ranges.length&&this._popRange(),'before'==n.compareWith(e)?(this._pushRange(new pg(n,e)),this._lastRangeBackward=!0):(this._pushRange(new pg(e,n)),this._lastRangeBackward=!1),this.fire('change:range',{directChange:!0})}}getAttribute(e){return this._attrs.get(e)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}hasAttribute(e){return this._attrs.has(e)}removeAttribute(e){this.hasAttribute(e)&&(this._attrs.delete(e),this.fire('change:attribute',{attributeKeys:[e],directChange:!0}))}setAttribute(e,t){this.getAttribute(e)!==t&&(this._attrs.set(e,t),this.fire('change:attribute',{attributeKeys:[e],directChange:!0}))}getSelectedElement(){if(1!==this.rangeCount)return null;const e=this.getFirstRange(),t=e.start.nodeAfter,n=e.end.nodeBefore;return t instanceof sg&&t==n?t:null}*getSelectedBlocks(){const e=new WeakSet;for(const t of this.getRanges()){const n=gt(t.start,e);n&&(yield n);for(const n of t.getWalker())'elementEnd'==n.type&&mt(n.item,e)&&(yield n.item);const o=gt(t.end,e);o&&!t.end.isTouching(cg.createAt(o))&&(yield o)}}containsEntireContent(e=this.anchor.root){const t=cg.createAt(e),n=cg.createAt(e,'end');return t.isTouching(this.getFirstPosition())&&n.isTouching(this.getLastPosition())}_pushRange(e){this._checkRange(e),this._ranges.push(pg.createFromRange(e))}_checkRange(e){for(let t=0;t<this._ranges.length;t++)if(e.isIntersecting(this._ranges[t]))throw new bd('model-selection-range-intersects: Trying to add a range that intersects with another range from selection.',{addedRange:e,intersectingRange:this._ranges[t]})}_removeAllRanges(){for(;0<this._ranges.length;)this._popRange()}_popRange(){this._ranges.pop()}}_(hg,Ad);class fg extends pg{constructor(e,t){super(e,t),ht.call(this)}detach(){this.stopListening()}}_(fg,Ad);const bg='selection:';class _g{constructor(e){this._selection=new kg(e),this._selection.delegate('change:range').to(this),this._selection.delegate('change:attribute').to(this)}get isCollapsed(){return this._selection.isCollapsed}get anchor(){return this._selection.anchor}get focus(){return this._selection.focus}get rangeCount(){return this._selection.rangeCount}get hasOwnRange(){return this._selection.hasOwnRange}get isBackward(){return this._selection.isBackward}get isGravityOverridden(){return this._selection.isGravityOverridden}get _ranges(){return this._selection._ranges}getRanges(){return this._selection.getRanges()}getFirstPosition(){return this._selection.getFirstPosition()}getLastPosition(){return this._selection.getLastPosition()}getFirstRange(){return this._selection.getFirstRange()}getLastRange(){return this._selection.getLastRange()}getSelectedBlocks(){return this._selection.getSelectedBlocks()}getSelectedElement(){return this._selection.getSelectedElement()}containsEntireContent(e){return this._selection.containsEntireContent(e)}destroy(){this._selection.destroy()}getAttributeKeys(){return this._selection.getAttributeKeys()}getAttributes(){return this._selection.getAttributes()}getAttribute(e){return this._selection.getAttribute(e)}hasAttribute(e){return this._selection.hasAttribute(e)}_setFocus(e,t){this._selection.setFocus(e,t)}_setTo(e,t,n){this._selection.setTo(e,t,n)}_setAttribute(e,t){this._selection.setAttribute(e,t)}_removeAttribute(e){this._selection.removeAttribute(e)}_getStoredAttributes(){return this._selection._getStoredAttributes()}_overrideGravity(){return this._selection.overrideGravity()}_restoreGravity(e){this._selection.restoreGravity(e)}static _getStoreAttributeKey(e){return bg+e}static _isStoreAttributeKey(e){return e.startsWith(bg)}}_(_g,Ad);class kg extends hg{constructor(e){super(),this._model=e.model,this._document=e,this._attributePriority=new Map,this._fixGraveyardRangesData=[],this._hasChangedRange=!1,this._overriddenGravityRegister=new Set,this.on('change:range',()=>{for(const e of this.getRanges())if(!this._document._validateSelectionRange(e))throw new bd('document-selection-wrong-position: Range from document selection starts or ends at incorrect position.',{range:e})}),this.listenTo(this._document,'change',(e,t)=>{this._updateAttributes(!1),_t(this._model,t)}),this.listenTo(this._model,'applyOperation',()=>{for(;this._fixGraveyardRangesData.length;){const{liveRange:e,sourcePosition:t}=this._fixGraveyardRangesData.shift();this._fixGraveyardSelection(e,t)}this._hasChangedRange&&(this._hasChangedRange=!1,this.fire('change:range',{directChange:!1}))},{priority:'lowest'})}get isCollapsed(){const e=this._ranges.length;return 0===e?this._document._getDefaultRange().isCollapsed:super.isCollapsed}get anchor(){return super.anchor||this._document._getDefaultRange().start}get focus(){return super.focus||this._document._getDefaultRange().end}get rangeCount(){return this._ranges.length?this._ranges.length:1}get hasOwnRange(){return 0<this._ranges.length}get isGravityOverridden(){return!!this._overriddenGravityRegister.size}destroy(){for(let e=0;e<this._ranges.length;e++)this._ranges[e].detach();this.stopListening()}*getRanges(){this._ranges.length?yield*super.getRanges():yield this._document._getDefaultRange()}getFirstRange(){return super.getFirstRange()||this._document._getDefaultRange()}getLastRange(){return super.getLastRange()||this._document._getDefaultRange()}setTo(e,t,n){super.setTo(e,t,n),this._refreshAttributes()}setFocus(e,t){super.setFocus(e,t),this._refreshAttributes()}setAttribute(e,t){if(this._setAttribute(e,t)){this.fire('change:attribute',{attributeKeys:[e],directChange:!0})}}removeAttribute(e){if(this._removeAttribute(e)){this.fire('change:attribute',{attributeKeys:[e],directChange:!0})}}overrideGravity(){const e=s();return this._overriddenGravityRegister.add(e),1===this._overriddenGravityRegister.size&&this._refreshAttributes(),e}restoreGravity(e){if(!this._overriddenGravityRegister.has(e))throw new bd('document-selection-gravity-wrong-restore: Attempting to restore the selection gravity for an unknown UID.',{uid:e});this._overriddenGravityRegister.delete(e),this.isGravityOverridden||this._refreshAttributes()}_refreshAttributes(){this._updateAttributes(!0)}_popRange(){this._ranges.pop().detach()}_pushRange(e){const t=this._prepareRange(e);t&&this._ranges.push(t)}_prepareRange(e){if(this._checkRange(e),e.root==this._document.graveyard)return void Zm.warn('model-selection-range-in-graveyard: Trying to add a Range that is in the graveyard root. Range rejected.');const t=fg.createFromRange(e);return t.on('change:range',(e,n,o)=>{this._hasChangedRange=!0,t.root==this._document.graveyard&&this._fixGraveyardRangesData.push({liveRange:t,sourcePosition:o.sourcePosition})}),t}_updateAttributes(e){const t=lt(this._getSurroundingAttributes()),n=lt(this.getAttributes());if(e)this._attributePriority=new Map,this._attrs=new Map;else for(const[e,t]of this._attributePriority)'low'==t&&(this._attrs.delete(e),this._attributePriority.delete(e));this._setAttributesTo(t);const o=[];for(const[t,r]of this.getAttributes())n.has(t)&&n.get(t)===r||o.push(t);for(const[t]of n)this.hasAttribute(t)||o.push(t);0<o.length&&this.fire('change:attribute',{attributeKeys:o,directChange:!1})}_setAttribute(e,t,n=!0){const o=n?'normal':'low';if('low'==o&&'normal'==this._attributePriority.get(e))return!1;const r=super.getAttribute(e);return r!==t&&(this._attrs.set(e,t),this._attributePriority.set(e,o),!0)}_removeAttribute(e,t=!0){const n=t?'normal':'low';return('low'!=n||'normal'!=this._attributePriority.get(e))&&(this._attributePriority.set(e,n),!!super.hasAttribute(e))&&(this._attrs.delete(e),!0)}_setAttributesTo(e){const t=new Set;for(const[t,n]of this.getAttributes())e.get(t)!==n&&this._removeAttribute(t,!1);for(const[n,o]of e){const e=this._setAttribute(n,o,!1);e&&t.add(n)}return t}*_getStoredAttributes(){const e=this.getFirstPosition().parent;if(this.isCollapsed&&e.isEmpty)for(const t of e.getAttributeKeys())if(t.startsWith(bg)){const n=t.substr(bg.length);yield[n,e.getAttribute(t)]}}_getSurroundingAttributes(){const e=this.getFirstPosition(),t=this._model.schema;let n=null;if(!this.isCollapsed){const e=this.getFirstRange();for(const o of e){if(o.item.is('element')&&t.isObject(o.item))break;'text'==o.type&&null===n&&(n=o.item.getAttributes())}}else{const t=e.textNode?e.textNode:e.nodeBefore,o=e.textNode?e.textNode:e.nodeAfter;if(this.isGravityOverridden||(n=bt(t)),n||(n=bt(o)),!this.isGravityOverridden&&!n)for(let e=t;e&&!n;)e=e.previousSibling,n=bt(e);if(!n)for(let e=o;e&&!n;)e=e.nextSibling,n=bt(e);n||(n=this._getStoredAttributes())}return n}_fixGraveyardSelection(e,t){const n=cg.createFromPosition(t),o=this._model.schema.getNearestSelectionRange(n),r=this._ranges.indexOf(e);if(this._ranges.splice(r,1),e.detach(),o){const e=this._prepareRange(o);this._ranges.splice(r,0,e)}}}var wg=function(e){return Wp(e,!0,!0)};class yg{constructor(e){this.model=e,this.view=new ng,this.mapper=new ug,this.downcastDispatcher=new gg({mapper:this.mapper});const t=this.model.document,n=t.selection,o=this.model.markers;this.listenTo(t,'change',()=>{this.view.change((e)=>{this.downcastDispatcher.convertChanges(t.differ,e),this.downcastDispatcher.convertSelection(n,o,e)})},{priority:'low'}),this.listenTo(this.view.document,'selectionChange',Ot(this.model,this.mapper)),this.downcastDispatcher.on('insert:$text',Et(),{priority:'lowest'}),this.downcastDispatcher.on('remove',Pt(),{priority:'low'}),this.downcastDispatcher.on('selection',Vt(),{priority:'low'}),this.downcastDispatcher.on('selection',It(),{priority:'low'}),this.downcastDispatcher.on('selection',Nt(),{priority:'low'}),this.view.document.roots.bindTo(this.model.document.roots).using((e)=>{if('$graveyard'==e.rootName)return null;const t=new Bu(e.name);return t.rootName=e.rootName,t._document=this.view.document,this.mapper.bindElements(e,t),t})}destroy(){this.view.destroy(),this.stopListening()}}_(yg,Lu);class vg{constructor(e,t=[]){this._editor=e,this._availablePlugins=new Map,this._plugins=new Map;for(const n of t)this._availablePlugins.set(n,n),n.pluginName&&this._availablePlugins.set(n.pluginName,n)}*[Symbol.iterator](){for(const e of this._plugins)'function'==typeof e[0]&&(yield e)}get(e){return this._plugins.get(e)}load(e,t=[]){function n(e){return p.includes(e)||a.get(e)||l.has(e)?void 0:o(e).catch((t)=>{throw Zm.error('plugincollection-load: It was not possible to load the plugin.',{plugin:e}),t})}function o(e){return new Promise((o)=>{l.add(e),e.requires&&e.requires.forEach((o)=>{const i=r(o);if(t.includes(i))throw new bd('plugincollection-required: Cannot load a plugin because one of its dependencies is listed inthe `removePlugins` option.',{plugin:i,requiredBy:e});n(i)});const i=new e(s);a._add(e,i),d.push(i),o()})}function r(e){return'function'==typeof e?e:a._availablePlugins.get(e)}function i(e){return e.map((e)=>r(e)).filter((e)=>!!e)}const a=this,s=this._editor,l=new Set,d=[],c=i(e),p=i(t),u=function(e){const t=[];for(const n of e)r(n)||t.push(n);return t.length?t:null}(e);if(u){const e='plugincollection-plugin-not-found: Some plugins are not available and could not be loaded.';return Zm.error(e,{plugins:u}),Promise.reject(new bd(e,{plugins:u}))}return Promise.all(c.map(n)).then(()=>d)}destroy(){const e=Array.from(this).map(([,e])=>e).filter((e)=>'function'==typeof e.destroy).map((e)=>e.destroy());return Promise.all(e)}_add(e,t){this._plugins.set(e,t);const n=e.pluginName;n&&(this._plugins.has(n)?Zm.warn('plugincollection-plugin-name-conflict: Two plugins with the same name were loaded.',{pluginName:n,plugin1:this._plugins.get(n).constructor,plugin2:e}):this._plugins.set(n,t))}}class xg{constructor(){this._commands=new Map}add(e,t){this._commands.set(e,t)}get(e){return this._commands.get(e)}execute(e,...t){const n=this.get(e);if(!n)throw new bd('commandcollection-command-not-found: Command does not exist.',{commandName:e});n.execute(...t)}*names(){yield*this._commands.keys()}*commands(){yield*this._commands.values()}[Symbol.iterator](){return this._commands[Symbol.iterator]()}destroy(){for(const e of this.commands())e.destroy()}}window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={});class Cg{constructor(e){this.language=e||'en',this.t=(...e)=>this._t(...e)}_t(e,t){let n=Lt(this.language,e);return t&&(n=n.replace(/%(\d+)/g,(e,n)=>n<t.length?t[n]:e)),n}}class Ag{constructor(){this._consumables=new Map}add(e,t){let n;return e.is('text')||e.is('documentFragment')?void this._consumables.set(e,!0):void(this._consumables.has(e)?n=this._consumables.get(e):(n=new Tg,this._consumables.set(e,n)),n.add(t))}test(e,t){const n=this._consumables.get(e);return void 0===n?null:e.is('text')||e.is('documentFragment')?n:n.test(t)}consume(e,t){return!!this.test(e,t)&&(e.is('text')||e.is('documentFragment')?this._consumables.set(e,!1):this._consumables.get(e).consume(t),!0)}revert(e,t){const n=this._consumables.get(e);n!==void 0&&(e.is('text')||e.is('documentFragment')?this._consumables.set(e,!0):n.revert(t))}static consumablesFromElement(e){const t={name:!0,attributes:[],classes:[],styles:[]},n=e.getAttributeKeys();for(const o of n)'style'!=o&&'class'!=o&&t.attributes.push(o);const o=e.getClassNames();for(const n of o)t.classes.push(n);const r=e.getStyleNames();for(const n of r)t.styles.push(n);return t}static createFrom(e,t){if(t||(t=new Ag),e.is('text'))return t.add(e),t;e.is('element')&&t.add(e,Ag.consumablesFromElement(e)),e.is('documentFragment')&&t.add(e);for(const n of e.getChildren())t=Ag.createFrom(n,t);return t}}class Tg{constructor(){this._canConsumeName=null,this._consumables={attributes:new Map,styles:new Map,classes:new Map}}add(e){for(const t in e.name&&(this._canConsumeName=!0),this._consumables)t in e&&this._add(t,e[t])}test(e){if(e.name&&!this._canConsumeName)return this._canConsumeName;for(const t in this._consumables)if(t in e){const n=this._test(t,e[t]);if(!0!==n)return n}return!0}consume(e){for(const t in e.name&&(this._canConsumeName=!1),this._consumables)t in e&&this._consume(t,e[t])}revert(e){for(const t in e.name&&(this._canConsumeName=!0),this._consumables)t in e&&this._revert(t,e[t])}_add(e,t){const n=Ec(t)?t:[t],o=this._consumables[e];for(const r of n){if('attributes'===e&&('class'===r||'style'===r))throw new bd('viewconsumable-invalid-attribute: Classes and styles should be handled separately.');o.set(r,!0)}}_test(e,t){const n=Ec(t)?t:[t],o=this._consumables[e];for(const r of n)if('attributes'===e&&('class'===r||'style'===r)){const e='class'==r?'classes':'styles',t=this._test(e,[...this._consumables[e].keys()]);if(!0!==t)return t}else{const e=o.get(r);if(e===void 0)return null;if(!e)return!1}return!0}_consume(e,t){const n=Ec(t)?t:[t],o=this._consumables[e];for(const r of n)if('attributes'===e&&('class'===r||'style'===r)){const e='class'==r?'classes':'styles';this._consume(e,[...this._consumables[e].keys()])}else o.set(r,!1)}_revert(e,t){const n=Ec(t)?t:[t],o=this._consumables[e];for(const r of n)if('attributes'===e&&('class'===r||'style'===r)){const e='class'==r?'classes':'styles';this._revert(e,[...this._consumables[e].keys()])}else{const e=o.get(r);!1===e&&o.set(r,!0)}}}class Eg{constructor(){this._sourceDefinitions={},this.decorate('checkChild'),this.decorate('checkAttribute'),this.on('checkAttribute',(e,t)=>{t[0]=new Pg(t[0])},{priority:'highest'}),this.on('checkChild',(e,t)=>{t[0]=new Pg(t[0]),t[1]=this.getDefinition(t[1])},{priority:'highest'})}register(e,t){if(this._sourceDefinitions[e])throw new bd('schema-cannot-register-item-twice: A single item cannot be registered twice in the schema.',{itemName:e});this._sourceDefinitions[e]=[Object.assign({},t)],this._clearCache()}extend(e,t){if(!this._sourceDefinitions[e])throw new bd('schema-cannot-extend-missing-item: Cannot extend an item which was not registered yet.',{itemName:e});this._sourceDefinitions[e].push(Object.assign({},t)),this._clearCache()}getDefinitions(){return this._compiledDefinitions||this._compile(),this._compiledDefinitions}getDefinition(e){let t;return t='string'==typeof e?e:e.is&&(e.is('text')||e.is('textProxy'))?'$text':e.name,this.getDefinitions()[t]}isRegistered(e){return!!this.getDefinition(e)}isBlock(e){const t=this.getDefinition(e);return!!(t&&t.isBlock)}isLimit(e){const t=this.getDefinition(e);return!!(t&&t.isLimit)}isObject(e){const t=this.getDefinition(e);return!!(t&&t.isObject)}checkChild(e,t){return!!t&&this._checkContextMatch(t,e)}checkAttribute(e,t){const n=this.getDefinition(e.last);return!!n&&n.allowAttributes.includes(t)}checkMerge(e,t=null){if(e instanceof cg){const t=e.nodeBefore,n=e.nodeAfter;if(!(t instanceof sg))throw new bd('schema-check-merge-no-element-before: The node before the merge position must be an element.');if(!(n instanceof sg))throw new bd('schema-check-merge-no-element-after: The node after the merge position must be an element.');return this.checkMerge(t,n)}for(const n of t.getChildren())if(!this.checkChild(e,n))return!1;return!0}addChildCheck(e){this.on('checkChild',(t,[n,o])=>{if(o){const r=e(n,o);'boolean'==typeof r&&(t.stop(),t.return=r)}},{priority:'high'})}addAttributeCheck(e){this.on('checkAttribute',(t,[n,o])=>{const r=e(n,o);'boolean'==typeof r&&(t.stop(),t.return=r)},{priority:'high'})}getLimitElement(e){let t=Array.from(e.getRanges()).reduce((e,t)=>{const n=t.getCommonAncestor();return e?e.getCommonAncestor(n,{includeSelf:!0}):n},null);for(;!this.isLimit(t)&&t.parent;)t=t.parent;return t}checkAttributeInSelection(e,t){if(e.isCollapsed)return this.checkAttribute([...e.getFirstPosition().getAncestors(),'$text'],t);else{const n=e.getRanges();for(const e of n)for(const n of e)if(this.checkAttribute(n.item,t))return!0}return!1}getValidRanges(e,t){const n=[];for(const o of e){let e=o.start,r=o.start;const i=o.end;for(const i of o.getWalker())this.checkAttribute(i.item,t)||(!r.isEqual(e)&&n.push(new pg(r,e)),r=i.nextPosition),e=i.nextPosition;r&&!r.isEqual(i)&&n.push(new pg(r,i))}return n}getNearestSelectionRange(e,t='both'){if(this.checkChild(e,'$text'))return new pg(e);let n,o;('both'==t||'backward'==t)&&(n=new lg({startPosition:e,direction:'backward'})),('both'==t||'forward'==t)&&(o=new lg({startPosition:e}));for(const r of Yt(n,o)){const e=r.walker==n?'elementEnd':'elementStart',t=r.value;if(t.type==e&&this.isObject(t.item))return pg.createOn(t.item);if(this.checkChild(t.nextPosition,'$text'))return new pg(t.nextPosition)}return null}findAllowedParent(e,t){for(let n=t.parent;n;){if(this.checkChild(n,e))return n;if(this.isLimit(n)||this.isObject(n))return null;n=n.parent}return null}removeDisallowedAttributes(e,t){for(const n of e){for(const e of n.getAttributeKeys())this.checkAttribute(n,e)||t.removeAttribute(e,n);n.is('element')&&this.removeDisallowedAttributes(n.getChildren(),t)}}_clearCache(){this._compiledDefinitions=null}_compile(){const e={},t=this._sourceDefinitions,n=Object.keys(t);for(const o of n)e[o]=Mt(t[o],o);for(const t of n)Bt(e,t);for(const t of n)qt(e,t);for(const t of n)zt(e,t),jt(e,t);for(const t of n)Ut(e,t),Ht(e,t);this._compiledDefinitions=e}_checkContextMatch(e,t,n=t.length-1){const o=t.getItem(n);if(!e.allowIn.includes(o.name))return!1;else if(0==n)return!0;else{const e=this.getDefinition(o);return this._checkContextMatch(e,t,n-1)}}}_(Eg,Lu);class Pg{constructor(e){return e instanceof Pg?e:void('string'==typeof e?e=[e]:!Array.isArray(e)&&(e=e.getAncestors({includeSelf:!0})),e[0]&&'string'!=typeof e[0]&&e[0].is('documentFragment')&&e.shift(),this._items=e.map(Jt))}get length(){return this._items.length}get last(){return this._items[this._items.length-1]}[Symbol.iterator](){return this._items[Symbol.iterator]()}push(e){const t=new Pg([e]);return t._items=[...this._items,...t._items],t}getItem(e){return this._items[e]}*getNames(){yield*this._items.map((e)=>e.name)}endsWith(e){return Array.from(this.getNames()).join(' ').endsWith(e)}}class Sg{constructor(e={}){this._removeIfEmpty=new Set,this._modelCursor=null,this.conversionApi=Object.assign({},e),this.conversionApi.convertItem=this._convertItem.bind(this),this.conversionApi.convertChildren=this._convertChildren.bind(this),this.conversionApi.splitToAllowedParent=this._splitToAllowedParent.bind(this)}convert(e,t,n=['$root']){this.fire('viewCleanup',e),this._modelCursor=Xt(n,t),this.conversionApi.writer=t,this.conversionApi.consumable=Ag.createFrom(e),this.conversionApi.store={};const{modelRange:o}=this._convertItem(e,this._modelCursor),r=t.createDocumentFragment();if(o){this._removeEmptyElements();for(const e of Array.from(this._modelCursor.parent.getChildren()))t.append(e,r);r.markers=Qt(r,t)}return this._modelCursor=null,this._removeIfEmpty.clear(),this.conversionApi.writer=null,this.conversionApi.store=null,r}_convertItem(e,t){const n=Object.assign({viewItem:e,modelCursor:t,modelRange:null});if(e.is('element')?this.fire('element:'+e.name,n,this.conversionApi):e.is('text')?this.fire('text',n,this.conversionApi):this.fire('documentFragment',n,this.conversionApi),n.modelRange&&!(n.modelRange instanceof pg))throw new bd('view-conversion-dispatcher-incorrect-result: Incorrect conversion result was dropped.');return{modelRange:n.modelRange,modelCursor:n.modelCursor}}_convertChildren(e,t){const n=new pg(t);let o=t;for(const r of Array.from(e.getChildren())){const e=this._convertItem(r,o);e.modelRange instanceof pg&&(n.end=e.modelRange.end,o=e.modelCursor)}return{modelRange:n,modelCursor:o}}_splitToAllowedParent(e,t){const n=this.conversionApi.schema.findAllowedParent(e,t);if(!n)return null;if(n===t.parent)return{position:t};if(this._modelCursor.parent.getAncestors().includes(n))return null;const o=this.conversionApi.writer.split(t,n);for(const n of o.range.getPositions())n.isEqual(o.position)||this._removeIfEmpty.add(n.parent);return{position:o.position,cursorParent:o.range.end.parent}}_removeEmptyElements(){let e=!1;for(const t of this._removeIfEmpty)t.isEmpty&&(this.conversionApi.writer.remove(t),this._removeIfEmpty.delete(t),e=!0);e&&this._removeEmptyElements()}}_(Sg,Ad);class Rg{constructor(e,t){this.model=e,this.processor=t,this.mapper=new ug,this.downcastDispatcher=new gg({mapper:this.mapper}),this.downcastDispatcher.on('insert:$text',Et(),{priority:'lowest'}),this.upcastDispatcher=new Sg({schema:e.schema}),this.upcastDispatcher.on('text',mn(),{priority:'lowest'}),this.upcastDispatcher.on('element',un(),{priority:'lowest'}),this.upcastDispatcher.on('documentFragment',un(),{priority:'lowest'}),this.decorate('init')}get(e='main'){return this.stringify(this.model.document.getRoot(e))}stringify(e){const t=this.toView(e);return this.processor.toData(t)}toView(e){const t=pg.createIn(e),n=new om,o=new rm(new Gu());if(this.mapper.bindElements(e,n),this.downcastDispatcher.convertInsert(t,o),!e.is('documentFragment')){const t=gn(e);for(const[e,n]of t)this.downcastDispatcher.convertMarkerAdd(e,n,o)}return this.mapper.clearBindings(),n}init(e,t='main'){if(this.model.document.version)throw new bd('datacontroller-init-document-not-empty: Trying to set initial data to not empty document.');const n=this.model.document.getRoot(t);return this.model.enqueueChange('transparent',(t)=>{t.insert(this.parse(e,n),n)}),Promise.resolve()}set(e,t='main'){const n=this.model.document.getRoot(t);this.model.enqueueChange('transparent',(t)=>{t.setSelection(null),t.removeSelectionAttribute(this.model.document.selection.getAttributeKeys()),t.remove(pg.createIn(n)),t.insert(this.parse(e,n),n)})}parse(e,t='$root'){const n=this.processor.toView(e);return this.toModel(n,t)}toModel(e,t='$root'){return this.model.change((n)=>this.upcastDispatcher.convert(e,n,t))}destroy(){}}_(Rg,Lu);class Og{constructor(){this._dispatchersGroups=new Map}register(e,t){if(this._dispatchersGroups.has(e))throw new bd('conversion-register-group-exists: Trying to register a group name that was already registered.');this._dispatchersGroups.set(e,t)}for(e){const t=this._getDispatchers(e);return{add(e){return hn(t,e),this}}}elementToElement(e){this.for('downcast').add(kt(e));for(const{model:t,view:n}of fn(e))this.for('upcast').add(en({model:t,view:n,priority:e.priority}))}attributeToElement(e){this.for('downcast').add(wt(e));for(const{model:t,view:n}of fn(e))this.for('upcast').add(tn({view:n,model:t,priority:e.priority}))}attributeToAttribute(e){this.for('downcast').add(yt(e));for(const{model:t,view:n}of fn(e))this.for('upcast').add(nn({view:n,model:t}))}_getDispatchers(e){const t=this._dispatchersGroups.get(e);if(!t)throw new bd('conversion-for-unknown-group: Trying to add a converter to an unknown dispatchers group.');return t}}class Ig{constructor(e){this.baseVersion=e,this.isDocumentOperation=null!==this.baseVersion}_validate(){}toJSON(){const e=Gp(this,!0);return e.__className=this.constructor.className,delete e.delta,delete e.isDocumentOperation,e}static get className(){return'engine.model.operation.Operation'}static fromJSON(e){return new this(e.baseVersion)}}class Ng{constructor(e){this.markers=new Map,this._children=new ag,e&&this._insertChild(0,e)}[Symbol.iterator](){return this.getChildren()}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}get root(){return this}get parent(){return null}is(e){return'documentFragment'==e}getChild(e){return this._children.getNode(e)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(e){return this._children.getNodeIndex(e)}getChildStartOffset(e){return this._children.getNodeStartOffset(e)}getPath(){return[]}getNodeByPath(e){let t=this;for(const n of e)t=t.getChild(t.offsetToIndex(n));return t}offsetToIndex(e){return this._children.offsetToIndex(e)}toJSON(){const e=[];for(const t of this._children)e.push(t.toJSON());return e}static fromJSON(e){const t=[];for(const n of e)n.name?t.push(sg.fromJSON(n)):t.push(rg.fromJSON(n));return new Ng(t)}_appendChild(e){this._insertChild(this.childCount,e)}_insertChild(e,t){const n=_n(t);for(const o of n)null!==o.parent&&o._remove(),o.parent=this;this._children._insertNodes(e,n)}_removeChildren(e,t=1){const n=this._children._removeNodes(e,t);for(const o of n)o.parent=null;return n}}var Vg=function(e,t){return Lm(e,t)};class Lg extends Ig{constructor(e,t,n,o,r){super(r),this.range=pg.createFromRange(e),this.key=t,this.oldValue=n===void 0?null:n,this.newValue=o===void 0?null:o}get type(){return null===this.oldValue?'addAttribute':null===this.newValue?'removeAttribute':'changeAttribute'}clone(){return new Lg(this.range,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new Lg(this.range,this.key,this.newValue,this.oldValue,this.baseVersion+1)}_validate(){for(const e of this.range.getItems()){if(null!==this.oldValue&&!Vg(e.getAttribute(this.key),this.oldValue))throw new bd('attribute-operation-wrong-old-value: Changed node has different attribute value than operation\'s old attribute value.',{item:e,key:this.key,value:this.oldValue});if(null===this.oldValue&&null!==this.newValue&&e.hasAttribute(this.key))throw new bd('attribute-operation-attribute-exists: The attribute with given key already exists.',{node:e,key:this.key})}}_execute(){Vg(this.oldValue,this.newValue)||vn(this.range,this.key,this.newValue)}static get className(){return'engine.model.operation.AttributeOperation'}static fromJSON(e,t){return new Lg(pg.fromJSON(e.range,t),e.key,e.oldValue,e.newValue,e.baseVersion)}}class Dg extends Ig{constructor(e,t,n,o){super(o),this.sourcePosition=cg.createFromPosition(e),this.howMany=t,this.targetPosition=cg.createFromPosition(n),this.isSticky=!1}get type(){return'move'}clone(){const e=new this.constructor(this.sourcePosition,this.howMany,this.targetPosition,this.baseVersion);return e.isSticky=this.isSticky,e}getMovedRangeStart(){return this.targetPosition._getTransformedByDeletion(this.sourcePosition,this.howMany)}getReversed(){const e=this.sourcePosition._getTransformedByInsertion(this.targetPosition,this.howMany),t=new this.constructor(this.getMovedRangeStart(),this.howMany,e,this.baseVersion+1);return t.isSticky=this.isSticky,t}_validate(){const e=this.sourcePosition.parent,t=this.targetPosition.parent,n=this.sourcePosition.offset,o=this.targetPosition.offset;if(!e||!t)throw new bd('move-operation-position-invalid: Source position or target position is invalid.');else if(n+this.howMany>e.maxOffset)throw new bd('move-operation-nodes-do-not-exist: The nodes which should be moved do not exist.');else if(e===t&&n<o&&o<n+this.howMany)throw new bd('move-operation-range-into-itself: Trying to move a range of nodes to the inside of that range.');else if(this.sourcePosition.root==this.targetPosition.root&&'prefix'==P(this.sourcePosition.getParentPath(),this.targetPosition.getParentPath())){const e=this.sourcePosition.path.length-1;if(this.targetPosition.path[e]>=n&&this.targetPosition.path[e]<n+this.howMany)throw new bd('move-operation-node-into-itself: Trying to move a range of nodes into one of nodes from that range.')}}_execute(){yn(pg.createFromPositionAndShift(this.sourcePosition,this.howMany),this.targetPosition)}static get className(){return'engine.model.operation.MoveOperation'}static fromJSON(e,t){const n=cg.fromJSON(e.sourcePosition,t),o=cg.fromJSON(e.targetPosition,t),r=new this(n,e.howMany,o,e.baseVersion);return e.isSticky&&(r.isSticky=!0),r}}class Fg extends Dg{get position(){return this.targetPosition}set position(e){this.targetPosition=e}get type(){return'reinsert'}getReversed(){const e=this.sourcePosition._getTransformedByInsertion(this.targetPosition,this.howMany);return new Mg(this.getMovedRangeStart(),this.howMany,e,this.baseVersion+1)}_validate(){if(super._validate(),!this.sourcePosition.root.document)throw new bd('reinsert-operation-on-detached-item: Cannot reinsert detached item.');if(!this.targetPosition.root.document)throw new bd('reinsert-operation-to-detached-parent: Cannot reinsert item to detached parent.')}static get className(){return'engine.model.operation.ReinsertOperation'}}class Mg extends Dg{get type(){return'remove'}getReversed(){const e=this.sourcePosition._getTransformedByInsertion(this.targetPosition,this.howMany);return new Fg(this.getMovedRangeStart(),this.howMany,e,this.baseVersion+1)}_validate(){if(super._validate(),!this.sourcePosition.root.document)throw new bd('remove-operation-on-detached-item: Cannot remove detached item.')}static get className(){return'engine.model.operation.RemoveOperation'}}class Bg extends Ig{constructor(e,t,n){super(n),this.position=cg.createFromPosition(e),this.nodes=new ag(xn(t))}get type(){return'insert'}clone(){const e=new ag([...this.nodes].map((e)=>e._clone(!0)));return new Bg(this.position,e,this.baseVersion)}getReversed(){const e=this.position.root.document.graveyard,t=new cg(e,[0]);return new Mg(this.position,this.nodes.maxOffset,t,this.baseVersion+1)}_validate(){const e=this.position.parent;if(!e||e.maxOffset<this.position.offset)throw new bd('insert-operation-position-invalid: Insertion position is invalid.')}_execute(){const e=this.nodes;this.nodes=new ag([...e].map((e)=>e._clone(!0))),kn(this.position,e)}static get className(){return'engine.model.operation.InsertOperation'}static fromJSON(e,t){const n=[];for(const o of e.nodes)o.name?n.push(sg.fromJSON(o)):n.push(rg.fromJSON(o));return new Bg(cg.fromJSON(e.position,t),n,e.baseVersion)}}class qg extends Ig{constructor(e,t,n,o,r){super(r),this.name=e,this.oldRange=t?pg.createFromRange(t):null,this.newRange=n?pg.createFromRange(n):null,this._markers=o}get type(){return'marker'}clone(){return new qg(this.name,this.oldRange,this.newRange,this._markers,this.baseVersion)}getReversed(){return new qg(this.name,this.newRange,this.oldRange,this._markers,this.baseVersion+1)}_execute(){const e=this.newRange?'_set':'_remove';this._markers[e](this.name,this.newRange,!0)}toJSON(){const e=super.toJSON();return delete e._markers,e}static get className(){return'engine.model.operation.MarkerOperation'}static fromJSON(e,t){return new qg(e.name,e.oldRange?pg.fromJSON(e.oldRange,t):null,e.newRange?pg.fromJSON(e.newRange,t):null,t.model.markers,e.baseVersion)}}class zg extends Ig{get type(){return'noop'}clone(){return new zg(this.baseVersion)}getReversed(){return new zg(this.baseVersion+1)}_execute(){}static get className(){return'engine.model.operation.NoOperation'}}class jg extends Ig{constructor(e,t,n,o){super(o),this.position=e,this.oldName=t,this.newName=n}get type(){return'rename'}clone(){return new jg(cg.createFromPosition(this.position),this.oldName,this.newName,this.baseVersion)}getReversed(){return new jg(cg.createFromPosition(this.position),this.newName,this.oldName,this.baseVersion+1)}_validate(){const e=this.position.nodeAfter;if(!(e instanceof sg))throw new bd('rename-operation-wrong-position: Given position is invalid or node after it is not an instance of Element.');else if(e.name!==this.oldName)throw new bd('rename-operation-wrong-name: Element to change has different name than operation\'s old name.')}_execute(){const e=this.position.nodeAfter;e.name=this.newName}static get className(){return'engine.model.operation.RenameOperation'}static fromJSON(e,t){return new jg(cg.fromJSON(e.position,t),e.oldName,e.newName,e.baseVersion)}}class Ug extends Ig{constructor(e,t,n,o,r){super(r),this.root=e,this.key=t,this.oldValue=n,this.newValue=o}get type(){return null===this.oldValue?'addRootAttribute':null===this.newValue?'removeRootAttribute':'changeRootAttribute'}clone(){return new Ug(this.root,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new Ug(this.root,this.key,this.newValue,this.oldValue,this.baseVersion+1)}_validate(){if(this.root!=this.root.root||this.root.is('documentFragment'))throw new bd('rootattribute-operation-not-a-root: The element to change is not a root element.',{root:this.root,key:this.key});if(null!==this.oldValue&&this.root.getAttribute(this.key)!==this.oldValue)throw new bd('rootattribute-operation-wrong-old-value: Changed node has different attribute value than operation\'s old attribute value.',{root:this.root,key:this.key});if(null===this.oldValue&&null!==this.newValue&&this.root.hasAttribute(this.key))throw new bd('rootattribute-operation-attribute-exists: The attribute with given key already exists.',{root:this.root,key:this.key})}_execute(){null===this.newValue?this.root._removeAttribute(this.key):this.root._setAttribute(this.key,this.newValue)}static get className(){return'engine.model.operation.RootAttributeOperation'}static fromJSON(e,t){if(!t.getRoot(e.root))throw new bd('rootattribute-operation-fromjson-no-root: Cannot create RootAttributeOperation. Root with specified name does not exist.',{rootName:e});return new Ug(t.getRoot(e.root),e.key,e.oldValue,e.newValue,e.baseVersion)}}const Hg={};Hg[Lg.className]=Lg,Hg[Bg.className]=Bg,Hg[qg.className]=qg,Hg[Dg.className]=Dg,Hg[zg.className]=zg,Hg[Ig.className]=Ig,Hg[Fg.className]=Fg,Hg[Mg.className]=Mg,Hg[jg.className]=jg,Hg[Ug.className]=Ug;class Wg{static fromJSON(e,t){return Hg[e.__className].fromJSON(e,t)}}const Gg=new Map;class $g{static fromJSON(e,t){if(!Gg.has(e.__className))throw new bd('delta-fromjson-no-deserializer: This delta has no defined deserializer',{name:e.__className});const n=Gg.get(e.__className),o=new n;for(const n of e.operations)o.addOperation(Wg.fromJSON(n,t));for(const n in e)'__className'!=n&&void 0===o[n]&&(o[n]=e[n]);return o}static register(e){Gg.set(e.className,e)}}class Kg{constructor(){this.batch=null,this.operations=[]}get baseVersion(){return 0<this.operations.length?this.operations[0].baseVersion:null}set baseVersion(e){for(const t of this.operations)t.baseVersion=e++}get _reverseDeltaClass(){return Kg}addOperation(e){return e.delta=this,this.operations.push(e),e}clone(){const e=new this.constructor;for(const t of this.operations)e.addOperation(t.clone());return e}getReversed(){const e=new this._reverseDeltaClass;for(const t of this.operations)e.addOperation(t.getReversed());e.operations.reverse();for(let t=0;t<e.operations.length;t++)e.operations[t].baseVersion=this.operations[this.operations.length-1].baseVersion+t+1;return e}toJSON(){const e=Gp(this);return e.__className=this.constructor.className,delete e.batch,e}static get className(){return'engine.model.delta.Delta'}}$g.register(Kg);class Zg extends Kg{get type(){return'attribute'}get key(){return this.operations[0]?this.operations[0].key:null}get value(){return this.operations[0]?this.operations[0].newValue:null}get range(){if(this._range)return this._range;let e=null,t=null;for(const n of this.operations)n instanceof zg||((null===e||e.isAfter(n.range.start))&&(e=n.range.start),(null===t||t.isBefore(n.range.end))&&(t=n.range.end));return e&&t?(this._range=new pg(e,t),this._range):null}get _reverseDeltaClass(){return Zg}toJSON(){const e=super.toJSON();return delete e._range,e}static get className(){return'engine.model.delta.AttributeDelta'}}$g.register(Zg);class Jg extends Kg{get type(){return'split'}get position(){return this._moveOperation?this._moveOperation.sourcePosition:null}get _cloneOperation(){return this.operations[0]||null}get _moveOperation(){return this.operations[1]&&this.operations[1]instanceof Dg?this.operations[1]:null}get _reverseDeltaClass(){return Yg}static get className(){return'engine.model.delta.SplitDelta'}}$g.register(Jg);class Yg extends Kg{get type(){return'merge'}get position(){return this._removeOperation?this._removeOperation.sourcePosition:null}get _removeOperation(){return this.operations[1]||null}get _reverseDeltaClass(){return Jg}static get className(){return'engine.model.delta.MergeDelta'}}$g.register(Yg);class Qg extends Kg{get type(){return'move'}get howMany(){return this._moveOperation?this._moveOperation.howMany:null}get sourcePosition(){return this._moveOperation?this._moveOperation.sourcePosition:null}get targetPosition(){return this._moveOperation?this._moveOperation.targetPosition:null}get _moveOperation(){return this.operations[0]||null}get _reverseDeltaClass(){return Qg}static get className(){return'engine.model.delta.MoveDelta'}}$g.register(Qg);class Xg extends Qg{static get className(){return'engine.model.delta.RemoveDelta'}}$g.register(Xg);class eh extends Kg{get type(){return'rename'}get _reverseDeltaClass(){return eh}static get className(){return'engine.model.delta.RenameDelta'}}$g.register(eh);class th extends Kg{get type(){return'wrap'}get range(){const e=this._moveOperation;return e?pg.createFromPositionAndShift(e.sourcePosition,e.howMany):null}get howMany(){const e=this.range;return e?e.end.offset-e.start.offset:0}get _insertOperation(){return this.operations[0]||null}get _moveOperation(){return this.operations[1]||null}get _reverseDeltaClass(){return nh}static get className(){return'engine.model.delta.WrapDelta'}}$g.register(th);class nh extends Kg{get type(){return'unwrap'}get position(){return this._moveOperation?this._moveOperation.targetPosition:null}get _moveOperation(){return this.operations[0]||null}get _reverseDeltaClass(){return th}static get className(){return'engine.model.delta.UnwrapDelta'}}$g.register(nh);class oh extends Kg{get type(){return'insert'}get position(){return this._insertOperation?this._insertOperation.position:null}get nodes(){return this._insertOperation?this._insertOperation.nodes:null}get _insertOperation(){return this.operations[0]||null}get _reverseDeltaClass(){return Xg}static get className(){return'engine.model.delta.InsertDelta'}}$g.register(oh);class rh extends oh{static get className(){return'engine.model.delta.WeakInsertDelta'}}$g.register(rh);var ih=function(e,t,n={isStrong:!1}){let o,r;e instanceof Bg?o=ah.InsertOperation:e instanceof Lg?o=ah.AttributeOperation:e instanceof Ug?o=ah.RootAttributeOperation:e instanceof jg?o=ah.RenameOperation:e instanceof qg?o=ah.MarkerOperation:e instanceof Dg?o=ah.MoveOperation:r=En,o&&(t instanceof Bg?r=o.InsertOperation:t instanceof Lg?r=o.AttributeOperation:t instanceof Ug?r=o.RootAttributeOperation:t instanceof jg?r=o.RenameOperation:t instanceof qg?r=o.MarkerOperation:t instanceof Dg?r=o.MoveOperation:r=En);const i=r(e,t,n);return Pn(e.baseVersion,i)};const ah={InsertOperation:{InsertOperation(e,t,n){const o=e.clone(),r=void 0===n.insertBefore?!n.isStrong:n.insertBefore;return o.position=o.position._getTransformedByInsertion(t.position,t.nodes.maxOffset,r),[o]},AttributeOperation:En,RootAttributeOperation:En,RenameOperation:En,MarkerOperation:En,MoveOperation(e,t,n){const o=e.clone(),r=void 0===n.insertBefore?!n.isStrong:n.insertBefore;return o.position=e.position._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,r,t.isSticky&&!n.forceNotSticky),[o]}},AttributeOperation:{InsertOperation(e,t){const n=e.range._getTransformedByInsertion(t.position,t.nodes.maxOffset,!0,!1);return n.reverse().map((t)=>new Lg(t,e.key,e.oldValue,e.newValue,e.baseVersion))},AttributeOperation(e,t,n){if(e.key===t.key){const o=e.range.getDifference(t.range).map((t)=>new Lg(t,e.key,e.oldValue,e.newValue,e.baseVersion)),r=e.range.getIntersection(t.range);return r&&(n.isStrong?o.push(new Lg(r,t.key,t.newValue,e.newValue,e.baseVersion)):0===o.length&&o.push(new zg(0))),o}return[e.clone()]},RootAttributeOperation:En,RenameOperation:En,MarkerOperation:En,MoveOperation(e,t){const n=pg.createFromPositionAndShift(t.sourcePosition,t.howMany);let o=[];const r=Rn(e.range.getDifference(n)),i=e.range.getIntersection(n);return null!==r&&(r.start=r.start._getTransformedByDeletion(t.sourcePosition,t.howMany),r.end=r.end._getTransformedByDeletion(t.sourcePosition,t.howMany),o=r._getTransformedByInsertion(t.getMovedRangeStart(),t.howMany,!0,!1).reverse()),null!==i&&(i.start=i.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),i.end=i.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),o.push(i)),o.map((t)=>new Lg(t,e.key,e.oldValue,e.newValue,e.baseVersion))}},RootAttributeOperation:{InsertOperation:En,AttributeOperation:En,RootAttributeOperation(e,t,n){return e.root!==t.root||e.key!==t.key||(e.newValue===t.newValue||n.isStrong)&&e.newValue!==t.newValue?[e.clone()]:[new zg(e.baseVersion)]},RenameOperation:En,MarkerOperation:En,MoveOperation:En},RenameOperation:{InsertOperation(e,t){const n=e.clone();return n.position=n.position._getTransformedByInsertion(t.position,t.nodes.maxOffset,!0),[n]},AttributeOperation:En,RootAttributeOperation:En,RenameOperation(e,t,n){const o=e.clone();if(e.position.isEqual(t.position))if(n.isStrong)o.oldName=t.newName;else return[new zg(e.baseVersion)];return[o]},MarkerOperation:En,MoveOperation(e,t){const n=e.clone(),o=n.position.isEqual(t.sourcePosition);return n.position=n.position._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,!0,o),[n]}},MarkerOperation:{InsertOperation(e,t){const n=e.clone();return n.oldRange&&(n.oldRange=n.oldRange._getTransformedByInsertion(t.position,t.nodes.maxOffset,!1,!1)[0]),n.newRange&&(n.newRange=n.newRange._getTransformedByInsertion(t.position,t.nodes.maxOffset,!1,!1)[0]),[n]},AttributeOperation:En,RootAttributeOperation:En,RenameOperation:En,MarkerOperation(e,t,n){const o=e.clone();if(e.name==t.name)if(n.isStrong)o.oldRange=t.newRange;else return[new zg(e.baseVersion)];return[o]},MoveOperation(e,t){const n=e.clone();if(n.oldRange){const e=n.oldRange._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany);n.oldRange=pg.createFromRanges(e)}if(n.newRange){const e=n.newRange._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany);n.newRange=pg.createFromRanges(e)}return[n]}},MoveOperation:{InsertOperation(e,t,n){let o=pg.createFromPositionAndShift(e.sourcePosition,e.howMany);const r=e.isSticky&&!n.forceNotSticky;o=o._getTransformedByInsertion(t.position,t.nodes.maxOffset,!1,r)[0];const i=void 0===n.insertBefore?!n.isStrong:n.insertBefore,a=new e.constructor(o.start,o.end.offset-o.start.offset,e.targetPosition._getTransformedByInsertion(t.position,t.nodes.maxOffset,i),e.baseVersion);return a.isSticky=e.isSticky,[a]},AttributeOperation:En,RootAttributeOperation:En,RenameOperation:En,MarkerOperation:En,MoveOperation(e,t,n){const o=pg.createFromPositionAndShift(e.sourcePosition,e.howMany),r=pg.createFromPositionAndShift(t.sourcePosition,t.howMany);let i=n.isStrong;const a=e.isSticky&&!n.forceNotSticky,s=void 0===n.insertBefore?!i:n.insertBefore,l=e.targetPosition._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,s,t.isSticky&&!n.forceNotSticky);if(Sn(e,t)&&Sn(t,e))return[t.getReversed()];const d=o.containsPosition(t.targetPosition)||o.start.isEqual(t.targetPosition)&&a||o.end.isEqual(t.targetPosition)&&a;if(d&&o.containsRange(r,!0))return o.start=o.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,!a),o.end=o.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,a),On([o],l,e);const c=r.containsPosition(e.targetPosition)||r.start.isEqual(e.targetPosition)&&t.isSticky&&!n.forceNotSticky||r.end.isEqual(e.targetPosition)&&t.isSticky&&!n.forceNotSticky;if(c&&r.containsRange(o,!0))return o.start=o.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),o.end=o.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),On([o],l,e);const p=P(e.sourcePosition.getParentPath(),t.sourcePosition.getParentPath());if('prefix'==p||'extension'==p)return o.start=o.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,!a),o.end=o.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,a),On([o],l,e);n.forceWeakRemove||(e instanceof Mg&&!(t instanceof Mg)?i=!0:!(e instanceof Mg)&&t instanceof Mg&&(i=!1));const u=[],m=o.getDifference(r);for(const o of m){o.start=o.start._getTransformedByDeletion(t.sourcePosition,t.howMany),o.end=o.end._getTransformedByDeletion(t.sourcePosition,t.howMany);const e='same'==P(o.start.getParentPath(),t.getMovedRangeStart().getParentPath()),n=o._getTransformedByInsertion(t.getMovedRangeStart(),t.howMany,e,a);u.push(...n)}const g=o.getIntersection(r);return null!==g&&i&&!d&&(g.start=g.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),g.end=g.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),0===u.length?u.push(g):1==u.length?r.start.isBefore(o.start)||r.start.isEqual(o.start)?u.unshift(g):u.push(g):u.splice(1,0,g)),0===u.length?[new zg(e.baseVersion)]:On(u,l,e)}}};var ot=function(e,t,n){var o=-1,r=e.length;0>t&&(t=-t>r?0:r+t),n=n>r?r:n,0>n&&(n+=r),r=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(r);++o<r;)i[o]=e[o+t];return i},sh=Math.ceil,lh=function(e){return Ec(e)||Ac(e)},dh=Nn,ch=function(e,t,n){for(var o=e.length,r=t+(n?0:-1);n?r--:++r<o;){var i=e[r];if(i!==i)return r}return-1},ph=function(e,t,n){if(t!==t)return ch(e,n);for(var o=n-1,r=e.length;++o<r;)if(e[o]===t)return o;return-1},uh=function(e,t){return!!e.length&&-1<ph(e,t,0)},mh=function(e,t,n){for(var o=-1,r=e.length;++o<r;)if(n(t,e[o]))return!0;return!1},gh=function(e,t){for(var n=-1,o=e.length,r=Array(o);++n<o;)r[n]=t(e[n],n,e);return r},hh=function(e){return function(t){return e(t)}},fh=function(e,t){return e.has(t)},bh=function(e,t,n,o){var r=-1,i=uh,a=!0,s=e.length,l=[],d=t.length;if(!s)return l;n&&(t=gh(t,hh(n))),o?(i=mh,a=!1):t.length>=200&&(i=fh,a=!1,t=new _m(t));outer:for(;++r<s;){var c=e[r],p=n?n(c):c;if(c=o||0!==c?c:0,a&&p===p){for(var u=d;u--;)if(t[u]===p)continue outer;l.push(c)}else i(t,p,o)||l.push(c)}return l},_h=hu(function(e,t){return wc(e)?bh(e,dh(t,1,wc,!0)):[]}),kh=1,wh=2,yh=function(e){return e===e&&!Od(e)},vh=function(e,t){return gh(t,function(t){return[t,e[t]]})},xh=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=[e,e]}),n},Ch=function(e){return function(t){var n=up(t);return n=='[object Map]'?vp(t):n=='[object Set]'?xh(t):vh(t,e(t))}}(Dc),Ah=function(e){for(var t=Ch(e),n=t.length;n--;)t[n][2]=yh(t[n][1]);return t},Th=function(e,t){return function(n){return null!=n&&n[e]===t&&(t!==void 0||e in Object(n))}},Eh=function(e){var t=Ah(e);return 1==t.length&&t[0][2]?Th(t[0][0],t[0][1]):function(n){return n===e||Vn(n,e,t)}},Ph='Expected a function';Ln.Cache=oc;var Sh=Rp?Rp.prototype:void 0,Rh=Sh?Sh.toString:void 0,Oh=function(e){if('string'==typeof e)return e;if(ou(e))return Rh?Rh.call(e):'';var t=e+'';return'0'==t&&1/e==-(1/0)?'-0':t},Ih=function(e){return null==e?'':Oh(e)},Nh=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g,Vh=/\\(\\)?/g,Lh=Ln(function(e){var t=[];return Ih(e).replace(Nh,function(e,n,o,r){t.push(o?r.replace(Vh,'$1'):n||e)}),t}),Dh=function(e){return Ec(e)?e:Lh(e)},Fh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Mh=/^\w*$/,Bh=Dn,qh=function(e){if('string'==typeof e||ou(e))return e;var t=e+'';return'0'==t&&1/e==-(1/0)?'-0':t},zh=function(e,t){t=Bh(t,e)?[t]:Dh(t);for(var n=0,o=t.length;null!=e&&n<o;)e=e[qh(t[n++])];return n&&n==o?e:void 0},jh=function(e,t,n){var o=null==e?void 0:zh(e,t);return o===void 0?n:o},Uh=function(e,t,n){t=Bh(t,e)?[t]:Dh(t);for(var o=-1,r=t.length,i;++o<r;){var a=qh(t[o]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}if(i)return i;var r=e?e.length:0;return!!r&&_c(r)&&Nc(a,r)&&(Ec(e)||Rc(e)||Ac(e))},Hh=function(e,t){return null!=e&&Uh(e,t,Fn)},Wh=function(e,t){return Bh(e)&&yh(t)?Th(qh(e),t):function(n){var o=jh(n,e);return o===void 0&&o===t?Hh(n,e):Lm(t,o,void 0,1|2)}},Gh=function(e){return e},$h=function(e){return function(t){return zh(t,e)}},Kh=function(e){return Bh(e)?fc(qh(e)):$h(e)},Zh=function(e){return'function'==typeof e?e:null==e?Gh:'object'==typeof e?Ec(e)?Wh(e[0],e[1]):Eh(e):Kh(e)},Jh=hu(function(e,t){var n=dg(t);return wc(n)&&(n=void 0),wc(e)?bh(e,dh(t,1,wc,!0),Zh(n)):[]}),Yh=hu(function(e,t){var n=dg(t);return wc(n)&&(n=void 0),wc(e)?bh(e,dh(t,1,wc,!0),void 0,n):[]}),Qh=function(e,t,n){var o=e?e.length:0;return o?(t=n||void 0===t?1:mu(t),ot(e,0>t?0:t,o)):[]},Xh=function(e,t,n){var o=e?e.length:0;return o?(t=n||void 0===t?1:mu(t),t=o-t,ot(e,0,0>t?0:t)):[]},ef=function(e,t,n,o){for(var r=e.length,i=o?r:-1;(o?i--:++i<r)&&t(e[i],i,e););return n?ot(e,o?0:i,o?i+1:r):ot(e,o?i+1:0,o?r:i)},tf=function(e,t,n){return e===e&&(void 0!==n&&(e=e<=n?e:n),void 0!==t&&(e=e>=t?e:t)),e},nf=function(e){return e?tf(mu(e),0,4294967295):0},of=function(e,t,n,o){var r=e.length;for(n=mu(n),0>n&&(n=-n>r?0:r+n),o=void 0===o||o>r?r:mu(o),0>o&&(o+=r),o=n>o?0:nf(o);n<o;)e[n++]=t;return e},rf=function(e,t,n){for(var o=e.length,r=n?o:-1;n?r--:++r<o;)if(t(e[r],r,e))return r;return-1},af=function(e){return e&&e.length?e[0]:void 0},sf=function(t,n,o){for(var r=o?mh:uh,i=t[0].length,a=t.length,s=a,l=Array(a),d=Infinity,c=[];s--;){var p=t[s];s&&n&&(p=gh(p,hh(n))),d=e(p.length,d),l[s]=!o&&(n||120<=i&&120<=p.length)?new _m(s&&p):void 0}p=t[0];var u=-1,m=l[0];outer:for(;++u<i&&c.length<d;){var g=p[u],h=n?n(g):g;if(g=o||0!==g?g:0,m?!fh(m,h):!r(c,h,o)){for(s=a;--s;){var f=l[s];if(f?!fh(f,h):!r(t[s],h,o))continue outer}m&&m.push(h),c.push(g)}}return c},lf=function(e){return wc(e)?e:[]},df=hu(function(e){var t=gh(e,lf);return t.length&&t[0]===e[0]?sf(t):[]}),cf=hu(function(e){var t=dg(e),n=gh(e,lf);return t===dg(n)?t=void 0:n.pop(),n.length&&n[0]===e[0]?sf(n,Zh(t)):[]}),pf=hu(function(e){var t=dg(e),n=gh(e,lf);return t===dg(n)?t=void 0:n.pop(),n.length&&n[0]===e[0]?sf(n,void 0,t):[]}),uf=Array.prototype,mf=uf.join,gf=function(e,t){var n=e.length;if(n)return t+=0>t?n:0,Nc(t,n)?e[t]:void 0},hf=function(e,t,n,o){for(var r=n-1,i=e.length;++r<i;)if(o(e[r],t))return r;return-1},ff=Array.prototype,bf=ff.splice,_f=function(e,t,n,o){var r=o?hf:ph,i=-1,a=t.length,s=e;for(n&&(s=gh(e,hh(n)));++i<a;)for(var l=0,d=t[i],c=n?n(d):d;-1<(l=r(s,c,l,o));)s!==e&&bf.call(s,l,1),bf.call(e,l,1);return e},kf=function(e,t){return e&&e.length&&t&&t.length?_f(e,t):e},wf=hu(kf),yf=function(e,t){for(var n=-1,o=t.length,r=Array(o);++n<o;)r[n]=null==e?void 0:jh(e,t[n]);return r},vf=function(e,t){return 1==t.length?e:zh(e,ot(t,0,-1))},xf=Array.prototype,Cf=xf.splice,Af=function(e,t){for(var n=e?t.length:0,o=n-1;n--;){var r=t[n];if(n==o||r!==i){var i=r;if(Nc(r))Cf.call(e,r,1);else if(!Bh(r,e)){var a=Dh(r),s=vf(e,a);null!=s&&delete s[qh(dg(a))]}else delete e[qh(r)]}}return e},Tf=function(e,t){if(e!==t){var n=e!==void 0,o=null===e,r=e===e,i=ou(e),a=t!==void 0,s=null===t,l=t===t,d=ou(t);if(!s&&!d&&!i&&e>t||i&&a&&l&&!s&&!d||o&&a&&l||!n&&l||!r)return 1;if(!o&&!i&&!d&&e<t||d&&n&&r&&!o&&!i||s&&n&&r||!a&&r||!l)return-1}return 0},Ef=hu(function(e,t){t=dh(t,1);var n=e?e.length:0,o=yf(e,t);return Af(e,gh(t,function(e){return Nc(e,n)?+e:e}).sort(Tf)),o}),Pf=Array.prototype,Sf=Pf.reverse,Rf=function(n,o,r,i){o=r(o);for(var a=0,s=n?n.length:0,l=o!==o,d=null===o,c=ou(o),p=void 0===o;a<s;){var u=t((a+s)/2),m=r(n[u]),g=m!==void 0,h=null===m,f=m===m,b=ou(m);if(l)var _=i||f;else _=p?f&&(i||g):d?f&&g&&(i||!h):c?f&&g&&!h&&(i||!b):!(h||b)&&(i?m<=o:m<o);_?a=u+1:s=u}return e(s,4294967295-1)},Of=function(e,t,n){var o=0,r=e?e.length:o;if('number'==typeof t&&t===t&&r<=4294967295>>>1){for(;o<r;){var i=o+r>>>1,a=e[i];null!==a&&!ou(a)&&(n?a<=t:a<t)?o=i+1:r=i}return r}return Rf(e,t,Gh,n)},If=function(e,t){for(var n=-1,o=e.length,r=0,i=[];++n<o;){var a=e[n],s=t?t(a):a;if(!n||!Td(s,l)){var l=s;i[r++]=0===a?0:a}}return i},Nf=Yc&&1/Ep(new Yc([,-0]))[1]==1/0?function(e){return new Yc(e)}:function(){},Vf=function(e,t,n){var o=-1,r=uh,i=e.length,a=!0,s=[],l=s;if(n)a=!1,r=mh;else if(i>=200){var d=t?null:Nf(e);if(d)return Ep(d);a=!1,r=fh,l=new _m}else l=t?[]:s;outer:for(;++o<i;){var c=e[o],p=t?t(c):c;if(c=n||0!==c?c:0,a&&p===p){for(var u=l.length;u--;)if(l[u]===p)continue outer;t&&l.push(p),s.push(c)}else r(l,p,n)||(l!==s&&l.push(p),s.push(c))}return s},Lf=hu(function(e){return Vf(dh(e,1,wc,!0))}),Df=hu(function(e){var t=dg(e);return wc(t)&&(t=void 0),Vf(dh(e,1,wc,!0),Zh(t))}),Ff=hu(function(e){var t=dg(e);return wc(t)&&(t=void 0),Vf(dh(e,1,wc,!0),void 0,t)}),Mf=function(e,t){for(var n=-1,o=e.length,r=0,i=[];++n<o;){var a=e[n];t(a,n,e)&&(i[r++]=a)}return i},Bf=function(e){if(!(e&&e.length))return[];var t=0;return e=Mf(e,function(e){if(wc(e))return t=rd(e.length,t),!0}),hc(t,function(t){return gh(e,fc(t))})},qf=function(e,t){if(!(e&&e.length))return[];var n=Bf(e);return null==t?n:gh(n,function(e){return eu(t,void 0,e)})},zf=hu(function(e,t){return wc(e)?bh(e,t):[]}),jf=function(e,t,n){for(var o=-1,r=e.length;++o<r;)var i=i?Uc(bh(i,e[o],t,n),bh(e[o],i,t,n)):e[o];return i&&i.length?Vf(i,t,n):[]},Uf=hu(function(e){return jf(Mf(e,wc))}),Hf=hu(function(e){var t=dg(e);return wc(t)&&(t=void 0),jf(Mf(e,wc),Zh(t))}),Wf=hu(function(e){var t=dg(e);return wc(t)&&(t=void 0),jf(Mf(e,wc),void 0,t)}),Gf=hu(Bf),$f=function(e,t,n){for(var o=-1,r=e.length,i=t.length,a={};++o<r;){var s=o<i?t[o]:void 0;n(a,e[o],s)}return a},Kf=function(e,t,n,o){t=Bh(t,e)?[t]:Dh(t);for(var r=-1,i=t.length,a=e;null!=a&&++r<i;){var s=qh(t[r]);if(Od(a)){var l=n;if(r!=i-1){var d=a[s];l=o?o(d,s,a):void 0,l===void 0&&(l=null==d?Nc(t[r+1])?[]:{}:d)}lc(a,s,l)}a=a[s]}return e},Zf=hu(function(e){var t=e.length,n=1<t?e[t-1]:void 0;return n='function'==typeof n?(e.pop(),n):void 0,qf(e,n)}),Jf={chunk:function(e,t,n){t=(n?Xp(e,t,n):void 0===t)?1:rd(mu(t),0);var o=e?e.length:0;if(!o||1>t)return[];for(var r=0,i=0,a=Array(sh(o/t));r<o;)a[i++]=ot(e,r,r+=t);return a},compact:function(e){for(var t=-1,n=e?e.length:0,o=0,r=[];++t<n;){var i=e[t];i&&(r[o++]=i)}return r},concat:function(){for(var e=arguments.length,t=Array(e?e-1:0),n=arguments[0],o=e;o--;)t[o-1]=arguments[o];return e?Uc(Ec(n)?Bc(n):[n],dh(t,1)):[]},difference:_h,differenceBy:Jh,differenceWith:Yh,drop:Qh,dropRight:Xh,dropRightWhile:function(e,t){return e&&e.length?ef(e,Zh(t,3),!0,!0):[]},dropWhile:function(e,t){return e&&e.length?ef(e,Zh(t,3),!0):[]},fill:function(e,t,n,o){var r=e?e.length:0;return r?(n&&'number'!=typeof n&&Xp(e,t,n)&&(n=0,o=r),of(e,t,n,o)):[]},findIndex:function(e,t){return e&&e.length?rf(e,Zh(t,3)):-1},findLastIndex:function(e,t){return e&&e.length?rf(e,Zh(t,3),!0):-1},first:af,flatten:function(e){var t=e?e.length:0;return t?dh(e,1):[]},flattenDeep:function(e){var t=e?e.length:0;return t?dh(e,1/0):[]},flattenDepth:function(e,t){var n=e?e.length:0;return n?(t=void 0===t?1:mu(t),dh(e,t)):[]},fromPairs:function(e){for(var t=-1,n=e?e.length:0,o={};++t<n;){var r=e[t];o[r[0]]=r[1]}return o},head:af,indexOf:function(e,t,n){var o=e?e.length:0;return o?(n=mu(n),0>n&&(n=rd(o+n,0)),ph(e,t,n)):-1},initial:function(e){return Xh(e,1)},intersection:df,intersectionBy:cf,intersectionWith:pf,join:function(e,t){return e?mf.call(e,t):''},last:dg,lastIndexOf:function(t,n,o){var r=t?t.length:0;if(!r)return-1;var i=r;if(void 0!==o&&(i=mu(o),i=(0>i?rd(r+i,0):e(i,r-1))+1),n!==n)return ch(t,i,!0);for(;i--;)if(t[i]===n)return i;return-1},nth:function(e,t){return e&&e.length?gf(e,mu(t)):void 0},pull:wf,pullAll:kf,pullAllBy:function(e,t,n){return e&&e.length&&t&&t.length?_f(e,t,Zh(n)):e},pullAllWith:function(e,t,n){return e&&e.length&&t&&t.length?_f(e,t,void 0,n):e},pullAt:Ef,remove:function(e,t){var n=[];if(!(e&&e.length))return n;var o=-1,r=[],i=e.length;for(t=Zh(t,3);++o<i;){var a=e[o];t(a,o,e)&&(n.push(a),r.push(o))}return Af(e,r),n},reverse:function(e){return e?Sf.call(e):e},slice:function(e,t,n){var o=e?e.length:0;return o?(n&&'number'!=typeof n&&Xp(e,t,n)?(t=0,n=o):(t=null==t?0:mu(t),n=void 0===n?o:mu(n)),ot(e,t,n)):[]},sortedIndex:function(e,t){return Of(e,t)},sortedIndexBy:function(e,t,n){return Rf(e,t,Zh(n))},sortedIndexOf:function(e,t){var n=e?e.length:0;if(n){var o=Of(e,t);if(o<n&&Td(e[o],t))return o}return-1},sortedLastIndex:function(e,t){return Of(e,t,!0)},sortedLastIndexBy:function(e,t,n){return Rf(e,t,Zh(n),!0)},sortedLastIndexOf:function(e,t){var n=e?e.length:0;if(n){var o=Of(e,t,!0)-1;if(Td(e[o],t))return o}return-1},sortedUniq:function(e){return e&&e.length?If(e):[]},sortedUniqBy:function(e,t){return e&&e.length?If(e,Zh(t)):[]},tail:function(e){return Qh(e,1)},take:function(e,t,n){return e&&e.length?(t=n||void 0===t?1:mu(t),ot(e,0,0>t?0:t)):[]},takeRight:function(e,t,n){var o=e?e.length:0;return o?(t=n||void 0===t?1:mu(t),t=o-t,ot(e,0>t?0:t,o)):[]},takeRightWhile:function(e,t){return e&&e.length?ef(e,Zh(t,3),!1,!0):[]},takeWhile:function(e,t){return e&&e.length?ef(e,Zh(t,3)):[]},union:Lf,unionBy:Df,unionWith:Ff,uniq:function(e){return e&&e.length?Vf(e):[]},uniqBy:function(e,t){return e&&e.length?Vf(e,Zh(t)):[]},uniqWith:function(e,t){return e&&e.length?Vf(e,void 0,t):[]},unzip:Bf,unzipWith:qf,without:zf,xor:Uf,xorBy:Hf,xorWith:Wf,zip:Gf,zipObject:function(e,t){return $f(e||[],t||[],lc)},zipObjectDeep:function(e,t){return $f(e||[],t||[],Kf)},zipWith:Zf};const Yf=new Map,Qf={transform(e,t,n){const o=Qf.getTransformationCase(e,t)||Qf.defaultTransform,r=o(e,t,Object.assign({},n)),i=Jf.last(t.operations).baseVersion;return Mn(i,r)},defaultTransform(e,t,n){const o=[];let r=t.operations,a=[];for(const i of e.operations){const e=[i];for(const t of r)for(let o=0;o<e.length;o++){const r=e[o],i=ih(r,t,n);Array.prototype.splice.apply(e,[o,1].concat(i)),o+=i.length-1;const s=Object.assign({},n);s.isStrong=!n.isStrong,s.insertBefore=n.insertBefore===void 0?void 0:!n.insertBefore;const l=ih(t,r,s);Array.prototype.push.apply(a,l)}r=a,a=[];for(const t of e)o.push(t)}return Kn(e.constructor,o)},addTransformationCase(e,t,n){let o=Yf.get(e);o||(o=new Map,Yf.set(e,o)),o.set(t,n)},getTransformationCase(e,t){let n=Yf.get(e.constructor);if(!n||!n.get(t.constructor)){const o=Yf.keys();for(const r of o)if(e instanceof r&&Yf.get(r).get(t.constructor)){n=Yf.get(r);break}}return n?n.get(t.constructor):void 0},transformDeltaSets(e,t,n=null){const o=Array.from(e),r=Array.from(t),i=null!==n,a={isStrong:!0};if(i){a.wasAffected=new Map,a.originalDelta=new Map,a.document=n,a.undoMode=!0;for(const e of r)a.originalDelta.set(e,e)}for(let s=0;s<o.length;s++){const e=[o[s]];for(let t=0;t<r.length;t++){const n=[r[t]];for(let t=0;t<e.length;t++)for(let o=0;o<n.length;o++){i&&zn(e[t],n[o],a);const r=Qf.transform(e[t],n[o],{insertBefore:a.insertBefore,forceNotSticky:a.forceNotSticky,isStrong:a.isStrong,forceWeakRemove:a.forceWeakRemove,undoMode:a.undoMode}),s=Qf.transform(n[o],e[t],{insertBefore:!a.insertBefore,forceNotSticky:a.forceNotSticky,isStrong:!a.isStrong,forceWeakRemove:a.forceWeakRemove,undoMode:a.undoMode});if(i){$n(e[t],r,a);const i=a.originalDelta.get(n[o]);for(const e of s)a.originalDelta.set(e,i)}e.splice(t,1,...r),t+=r.length-1,n.splice(o,1,...s),o+=s.length-1}r.splice(t,1,...n),t+=n.length-1}o.splice(s,1,...e),s+=e.length-1}const s=Bn(o)-Bn(e),l=Bn(r)-Bn(t);return l<s?qn(r,s-l):s<l&&qn(o,l-s),{deltasA:o,deltasB:r}}};var Xf=Qf;class eb extends Kg{get type(){return'marker'}get _reverseDeltaClass(){return eb}static get className(){return'engine.model.delta.MarkerDelta'}}$g.register(eb);const tb=Xf.addTransformationCase,nb=Xf.defaultTransform;tb(Zg,rh,(e,t,n)=>{const o=nb(e,t,n);return e.range.containsPosition(t.position)&&o.push(Jn(t,e)),o}),tb(Zg,Jg,(e,t,n)=>{if(!t.position)return nb(e,t,n);const o=n.undoMode,r=new cg(t.position.root,t.position.path.slice(0,-1)),i=nb(e,t,n);if(o||!(t._cloneOperation instanceof Bg))return i;for(const o of e.operations)if(o.range.containsPosition(r)||o.range.start.isEqual(r)){const e=new Zg,n=r.getShiftedBy(1),a=cg.createFromPosition(n);a.path.push(0);const s=t._cloneOperation.nodes.getNode(0).getAttribute(o.key);e.addOperation(new Lg(new pg(n,a),o.key,s===void 0?null:s,o.newValue,0)),i.push(e);break}return i}),tb(oh,Yg,(e,t,n)=>{if(!t.position)return nb(e,t,n);const o=n.undoMode;return!o&&e.position.isEqual(t.position)?[t.getReversed(),e.clone()]:nb(e,t,n)}),tb(eb,Jg,Zn),tb(eb,Yg,Zn),tb(eb,th,Zn),tb(eb,nh,Zn),tb(eb,Qg,Zn),tb(eb,eh,Zn),tb(Qg,Yg,(e,t,n)=>{const o=n.undoMode;if(o||!t.position)return nb(e,t,n);const r=e.sourcePosition.root==t.position.root&&'same'===P(e.sourcePosition.getParentPath(),t.position.getParentPath()),i=e.sourcePosition.offset<=t.position.offset&&e.sourcePosition.offset+e.howMany>t.position.offset;return r&&i?[t.getReversed(),e.clone()]:nb(e,t,n)}),tb(Yg,oh,(e,t,n)=>{if(!e.position)return nb(e,t,n);const o=n.undoMode;return!o&&e.position.isEqual(t.position)?[Yn()]:nb(e,t,n)}),tb(Yg,Qg,(e,t,n)=>{const o=n.undoMode;if(o||!e.position)return nb(e,t,n);const r=e.position.root==t.sourcePosition.root&&'same'===P(e.position.getParentPath(),t.sourcePosition.getParentPath()),i=t.sourcePosition.offset<=e.position.offset&&t.sourcePosition.offset+t.howMany>e.position.offset;return r&&i?[Yn()]:nb(e,t,n)}),tb(Jg,Jg,(e,t,n)=>{const o=n.undoMode;if(o)return nb(e,t,n);if(!e.position||!t.position)return nb(e,t,n);const r=e.position.getParentPath(),i=t.position.getParentPath();if(e.position.root==t.position.root&&'same'==P(r,i))if(e=e.clone(),e.position.offset<t.position.offset||e.position.offset==t.position.offset&&n.isStrong){e._cloneOperation instanceof Fg&&t._cloneOperation instanceof Fg&&e._cloneOperation.sourcePosition.offset>t._cloneOperation.sourcePosition.offset&&e._cloneOperation.sourcePosition.offset--;const n=pg.createFromPositionAndShift(e.position,e._moveOperation.howMany),o=pg.createFromPositionAndShift(t.position,t._moveOperation.howMany),r=n.getDifference(o);let i=0;for(const e of r)i+=e.end.offset-e.start.offset;return 0==i?(e.operations.pop(),e.addOperation(new zg(e.operations[0].baseVersion+1))):e.operations[1].howMany=i,[e]}else{const o=Object.assign({},n);return o.isStrong=!0,o.insertBefore=!0,nb(e,t,o)}return nb(e,t,n)}),tb(Jg,nh,(e,t,n)=>e.position?e.position.root==t.position.root&&'same'===P(t.position.path,e.position.getParentPath())?[Yn()]:nb(e,t,n):nb(e,t,n)),tb(Jg,th,(e,t,n)=>{if(!e.position)return nb(e,t,n);const o=e.position.root==t.range.start.root,r=o&&'same'===P(e.position.getParentPath(),t.range.start.getParentPath()),i=t.range.start.offset<e.position.offset&&t.range.end.offset>=e.position.offset;if(r&&i)return[Yn()];if(o&&'same'===P(e.position.getParentPath(),t.range.end.getShiftedBy(-1).path)){const n=e.clone(),o=cg.createFromPosition(t.range.start);o.path.push(t.howMany-1);const r=o.getShiftedBy(1);n._cloneOperation.position=r;const i=cg.createFromPosition(o);i.path.push(e.position.offset),n._moveOperation.sourcePosition=i;const a=cg.createFromPosition(r);return a.path.push(0),n._moveOperation.targetPosition=a,[n]}return nb(e,t,n)}),tb(Jg,Zg,(e,t,n)=>{if(!e.position)return nb(e,t,n);e=e.clone();const o=n.undoMode,r=new cg(e.position.root,e.position.path.slice(0,-1));if(o||!(e._cloneOperation instanceof Bg))return[e];for(const o of t.operations)if(o.range.containsPosition(r)||o.range.start.isEqual(r)){null===o.newValue?e._cloneOperation.nodes.getNode(0)._removeAttribute(o.key):e._cloneOperation.nodes.getNode(0)._setAttribute(o.key,o.newValue);break}return[e]}),tb(nh,Jg,(e,t,n)=>t.position?e.position.root==t.position.root&&'same'===P(e.position.path,t.position.getParentPath())?[t.getReversed(),e.clone()]:nb(e,t,n):nb(e,t,n)),tb(rh,Zg,(e,t)=>{const n=[e.clone()];return t.range.containsPosition(e.position)&&n.push(Jn(e,t)),n}),tb(th,Jg,(e,t,n)=>{if(!t.position)return nb(e,t,n);const o=e.range.start.root==t.position.root,r=o&&'same'===P(e.range.start.getParentPath(),t.position.getParentPath()),i=e.range.start.offset<t.position.offset&&e.range.end.offset>=t.position.offset;if(r&&i)return[t.getReversed(),e.clone()];if(o&&'same'===P(t.position.getParentPath(),e.range.end.getShiftedBy(-1).path)){const t=e.clone();return t._insertOperation.position.offset++,t._moveOperation.howMany++,t._moveOperation.targetPosition.path[t._moveOperation.targetPosition.path.length-2]++,[t]}return nb(e,t,n)}),tb(eh,Jg,(e,t,n)=>{const o=n.undoMode,r=nb(e,t,n);if(o||!(t._cloneOperation instanceof Bg))return r;const i=t._cloneOperation.position.getShiftedBy(-1);if(i&&e.operations[0].position.isEqual(i)){const t=e.clone();t.operations[0].position=i.getShiftedBy(1),r.push(t)}return r}),tb(Jg,eh,(e,t,n)=>{e=e.clone();const o=n.undoMode;if(o||!(e._cloneOperation instanceof Bg))return[e];const r=e._cloneOperation.position.getShiftedBy(-1);if(r&&!o&&t.operations[0].position.isEqual(r)){const n=t.clone();return n.operations[0].position=r.getShiftedBy(1),n.operations[0].oldName=e._cloneOperation.nodes.getNode(0).name,[e,n]}return[e]}),tb(Xg,Jg,(e,t,n)=>{const o=nb(e,t,n),r=t._cloneOperation.position||t._cloneOperation.targetPosition;if(!r)return nb(e,t,n);const i=n.undoMode;if(i)return o;for(const i of o)if(i instanceof Xg){const e=i._moveOperation,t=e.sourcePosition.getShiftedBy(e.howMany);t.isEqual(r)&&(e.howMany+=1)}return o}),tb(Jg,Xg,(e,t,n)=>{const o=n.undoMode;if(o)return nb(e,t,n);const r=e._cloneOperation.position||e._cloneOperation.targetPosition;if(!r)return nb(e,t,n);t=t.clone();const i=t._moveOperation,a=i.sourcePosition.getShiftedBy(i.howMany);return a.isEqual(r)&&(i.howMany+=1),nb(e,t,n)});class ob{constructor(e='default'){this.deltas=[],this.type=e}get baseVersion(){for(const e of this.deltas)if(null!==e.baseVersion)return e.baseVersion;return null}addDelta(e){return e.batch=this,this.deltas.push(e),e}*getOperations(){for(const e of this.deltas)yield*e.operations}}class rb extends Kg{static get className(){return'engine.model.delta.RootAttributeDelta'}}$g.register(rb);class ib extends Ig{constructor(e,t){super(null),this.sourcePosition=cg.createFromPosition(e),this.howMany=t}get type(){return'detach'}_validate(){if(this.sourcePosition.root.document)throw new bd('detach-operation-on-document-node: Cannot detach document node.')}_execute(){wn(pg.createFromPositionAndShift(this.sourcePosition,this.howMany))}static get className(){return'engine.model.operation.DetachOperation'}}class ab extends sg{constructor(e,t,n='main'){super(t),this._doc=e,this.rootName=n}get document(){return this._doc}is(e,t){return t?'rootElement'==e&&t==this.name||super.is(e,t):'rootElement'==e||super.is(e)}toJSON(){return this.rootName}}class sb{constructor(e,t){this.model=e,this.batch=t}createText(e,t){return new rg(e,t)}createElement(e,t){return new sg(e,t)}createDocumentFragment(){return new Ng}insert(e,t,n){this._assertWriterUsedCorrectly();const o=cg.createAt(t,n),r=e instanceof rg&&!e.parent?new rh:new oh;if(e.parent){if(no(e.root,o.root))return void this.move(pg.createOn(e),o);if(e.root.document)throw new Error('model-writer-insert-forbidden-move: Cannot move a node from a document to a different tree.');else this.remove(e)}const i=o.root.document?o.root.document.version:null,a=new Bg(o,e,i);if(this.batch.addDelta(r),r.addOperation(a),this.model.applyOperation(a),e instanceof Ng)for(const[t,n]of e.markers){const e=cg.createAt(n.root),r=new pg(n.start._getCombined(e,o),n.end._getCombined(e,o));this.addMarker(t,{range:r,usingOperation:!0})}}insertText(e,t,n,o){t instanceof Ng||t instanceof sg||t instanceof cg?this.insert(this.createText(e),t,n):this.insert(this.createText(e,t),n,o)}insertElement(e,t,n,o){t instanceof Ng||t instanceof sg||t instanceof cg?this.insert(this.createElement(e),t,n):this.insert(this.createElement(e,t),n,o)}append(e,t){this.insert(e,t,'end')}appendText(e,t,n){t instanceof Ng||t instanceof sg?this.insert(this.createText(e),t,'end'):this.insert(this.createText(e,t),n,'end')}appendElement(e,t,n){t instanceof Ng||t instanceof sg?this.insert(this.createElement(e),t,'end'):this.insert(this.createElement(e,t),n,'end')}setAttribute(e,t,n){this._assertWriterUsedCorrectly(),n instanceof pg?Qn(this,e,t,n):Xn(this,e,t,n)}setAttributes(e,t){for(const[n,o]of lt(e))this.setAttribute(n,o,t)}removeAttribute(e,t){this._assertWriterUsedCorrectly(),t instanceof pg?Qn(this,e,null,t):Xn(this,e,null,t)}clearAttributes(e){this._assertWriterUsedCorrectly();const t=(e)=>{for(const t of e.getAttributeKeys())this.removeAttribute(t,e)};if(!(e instanceof pg))t(e);else for(const n of e.getItems())t(n)}move(e,t,n){if(this._assertWriterUsedCorrectly(),!(e instanceof pg))throw new bd('writer-move-invalid-range: Invalid range to move.');if(!e.isFlat)throw new bd('writer-move-range-not-flat: Range to move is not flat.');const o=cg.createAt(t,n);if(!no(e.root,o.root))throw new bd('writer-move-different-document: Range is going to be moved between different documents.');const r=new Qg;this.batch.addDelta(r);const i=e.root.document?e.root.document.version:null,a=new Dg(e.start,e.end.offset-e.start.offset,o,i);r.addOperation(a),this.model.applyOperation(a)}remove(e){this._assertWriterUsedCorrectly();const t=(e,t)=>{const n=new Xg;this.batch.addDelta(n),to(e,t,n,this.model)};if(e instanceof pg){const n=e.getMinimalFlatRanges().reverse();for(const e of n)t(e.start,e.end.offset-e.start.offset)}else{const n=e.is('text')?e.offsetSize:1;t(cg.createBefore(e),n)}}merge(e){this._assertWriterUsedCorrectly();const t=new Yg;this.batch.addDelta(t);const n=e.nodeBefore,o=e.nodeAfter;if(!(n instanceof sg))throw new bd('writer-merge-no-element-before: Node before merge position must be an element.');if(!(o instanceof sg))throw new bd('writer-merge-no-element-after: Node after merge position must be an element.');const r=cg.createFromParentAndOffset(o,0),i=cg.createFromParentAndOffset(n,n.maxOffset),a=e.root.document?e.root.document.version:null,s=new Dg(r,o.maxOffset,i,a);s.isSticky=!0,t.addOperation(s),this.model.applyOperation(s),to(e,1,t,this.model)}rename(e,t){if(this._assertWriterUsedCorrectly(),!(e instanceof sg))throw new bd('writer-rename-not-element-instance: Trying to rename an object which is not an instance of Element.');const n=new eh;this.batch.addDelta(n);const o=e.root.document?e.root.document.version:null,r=new jg(cg.createBefore(e),e.name,t,o);n.addOperation(r),this.model.applyOperation(r)}split(e,t){this._assertWriterUsedCorrectly();let n=e.parent;if(!n.parent)throw new bd('writer-split-element-no-parent: Element with no parent can not be split.');if(t||(t=n.parent),!e.parent.getAncestors({includeSelf:!0}).includes(t))throw new bd('writer-split-invalid-limit-element: Limit element is not a position ancestor.');let o,r;do{const t=new Jg;this.batch.addDelta(t);const i=new sg(n.name,n.getAttributes()),a=n.root.document?n.root.document.version:null,s=new Bg(cg.createAfter(n),i,a);t.addOperation(s),this.model.applyOperation(s);const l=null===a?null:a+1,d=new Dg(e,n.maxOffset-e.offset,cg.createFromParentAndOffset(i,0),l);d.isSticky=!0,t.addOperation(d),this.model.applyOperation(d),o||r||(o=n,r=i),e=cg.createBefore(i),n=e.parent}while(n!==t);return{position:e,range:new pg(cg.createAt(o,'end'),cg.createAt(r))}}wrap(e,t){if(this._assertWriterUsedCorrectly(),!e.isFlat)throw new bd('writer-wrap-range-not-flat: Range to wrap is not flat.');const n=t instanceof sg?t:new sg(t);if(0<n.childCount)throw new bd('writer-wrap-element-not-empty: Element to wrap with is not empty.');if(null!==n.parent)throw new bd('writer-wrap-element-attached: Element to wrap with is already attached to tree model.');const o=new th;this.batch.addDelta(o);const r=e.root.document?e.root.document.version:null,i=new Bg(e.end,n,r);o.addOperation(i),this.model.applyOperation(i);const a=null===r?null:r+1,s=cg.createFromParentAndOffset(n,0),l=new Dg(e.start,e.end.offset-e.start.offset,s,a);o.addOperation(l),this.model.applyOperation(l)}unwrap(e){if(this._assertWriterUsedCorrectly(),null===e.parent)throw new bd('writer-unwrap-element-no-parent: Trying to unwrap an element which has no parent.');const t=new nh;this.batch.addDelta(t);const n=cg.createFromParentAndOffset(e,0),o=n.root.document?n.root.document.version:null,r=new Dg(n,e.maxOffset,cg.createBefore(e),o);r.isSticky=!0,t.addOperation(r),this.model.applyOperation(r),to(cg.createBefore(e),1,t,this.model)}addMarker(e,t){if(this._assertWriterUsedCorrectly(),!t||'boolean'!=typeof t.usingOperation)throw new bd('writer-addMarker-no-usingOperations: The options.usingOperations parameter is required when adding a new marker.');const n=t.usingOperation,o=t.range;if(this.model.markers.has(e))throw new bd('writer-addMarker-marker-exists: Marker with provided name already exists.');if(!o)throw new bd('writer-addMarker-no-range: Range parameter is required when adding a new marker.');return n?(eo(this,e,null,o),this.model.markers.get(e)):this.model.markers._set(e,o,n)}updateMarker(e,t){this._assertWriterUsedCorrectly();const n='string'==typeof e?e:e.name,o=this.model.markers.get(n);if(!o)throw new bd('writer-updateMarker-marker-not-exists: Marker with provided name does not exists.');const r=t&&t.range,i=!!t&&'boolean'==typeof t.usingOperation;if(!i&&!r)throw new bd('writer-updateMarker-wrong-options: One of options is required - provide range or usingOperations.');if(i&&t.usingOperation!==o.managedUsingOperations){if(t.usingOperation)eo(this,n,null,r?r:o.getRange());else{const e=o.getRange();eo(this,n,e,null),this.model.markers._set(n,r?r:e)}return}o.managedUsingOperations?eo(this,n,o.getRange(),r):this.model.markers._set(n,r)}removeMarker(e){this._assertWriterUsedCorrectly();const t='string'==typeof e?e:e.name;if(!this.model.markers.has(t))throw new bd('writer-removeMarker-no-marker: Trying to remove marker which does not exist.');const n=this.model.markers.get(t);if(!n.managedUsingOperations)return void this.model.markers._remove(t);const o=n.getRange();eo(this,t,o,null)}setSelection(e,t,n){this._assertWriterUsedCorrectly(),this.model.document.selection._setTo(e,t,n)}setSelectionFocus(e,t){this._assertWriterUsedCorrectly(),this.model.document.selection._setFocus(e,t)}setSelectionAttribute(e,t){if(this._assertWriterUsedCorrectly(),'string'==typeof e)this._setSelectionAttribute(e,t);else for(const[t,n]of lt(e))this._setSelectionAttribute(t,n)}removeSelectionAttribute(e){if(this._assertWriterUsedCorrectly(),'string'==typeof e)this._removeSelectionAttribute(e);else for(const t of e)this._removeSelectionAttribute(t)}overrideSelectionGravity(){return this.model.document.selection._overrideGravity()}restoreSelectionGravity(e){this.model.document.selection._restoreGravity(e)}_setSelectionAttribute(e,t){const n=this.model.document.selection;if(n.isCollapsed&&n.anchor.parent.isEmpty){const o=_g._getStoreAttributeKey(e);this.setAttribute(o,t,n.anchor.parent)}n._setAttribute(e,t)}_removeSelectionAttribute(e){const t=this.model.document.selection;if(t.isCollapsed&&t.anchor.parent.isEmpty){const n=_g._getStoreAttributeKey(e);this.removeAttribute(n,t.anchor.parent)}t._removeAttribute(e)}_assertWriterUsedCorrectly(){if(this.model._currentWriter!==this)throw new bd('writer-incorrect-use: Trying to use a writer outside the change() block.')}}class lb{constructor(e){this._markerCollection=e,this._changesInElement=new Map,this._elementSnapshots=new Map,this._changedMarkers=new Map,this._changeCount=0,this._cachedChanges=null,this._cachedChangesWithGraveyard=null}get isEmpty(){return 0==this._changesInElement.size&&0==this._changedMarkers.size}bufferOperation(e){switch(e.type){case'insert':{if(this._isInInsertedElement(e.position.parent))return;this._markInsert(e.position.parent,e.position.offset,e.nodes.maxOffset);break}case'addAttribute':case'removeAttribute':case'changeAttribute':{for(const t of e.range.getItems())this._isInInsertedElement(t.parent)||this._markAttribute(t);break}case'remove':case'move':case'reinsert':{const t=this._isInInsertedElement(e.sourcePosition.parent),n=this._isInInsertedElement(e.targetPosition.parent);t||this._markRemove(e.sourcePosition.parent,e.sourcePosition.offset,e.howMany),n||this._markInsert(e.targetPosition.parent,e.getMovedRangeStart().offset,e.howMany);break}case'rename':{if(this._isInInsertedElement(e.position.parent))return;this._markRemove(e.position.parent,e.position.offset,1),this._markInsert(e.position.parent,e.position.offset,1);const t=pg.createFromPositionAndShift(e.position,1);for(const e of this._markerCollection.getMarkersIntersectingRange(t)){const t=e.getRange();this.bufferMarkerChange(e.name,t,t)}break}}this._cachedChanges=null}bufferMarkerChange(e,t,n){const o=this._changedMarkers.get(e);o?(o.newRange=n,null==o.oldRange&&null==o.newRange&&this._changedMarkers.delete(e)):this._changedMarkers.set(e,{oldRange:t,newRange:n})}getMarkersToRemove(){const e=[];for(const[t,n]of this._changedMarkers)null!=n.oldRange&&e.push({name:t,range:n.oldRange});return e}getMarkersToAdd(){const e=[];for(const[t,n]of this._changedMarkers)null!=n.newRange&&e.push({name:t,range:n.newRange});return e}getChanges(e={includeChangesInGraveyard:!1}){if(this._cachedChanges)return e.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice();const t=[];for(const n of this._changesInElement.keys()){const e=this._changesInElement.get(n).sort((e,t)=>e.offset===t.offset?e.type==t.type?0:'remove'==e.type?-1:1:e.offset<t.offset?-1:1),o=this._elementSnapshots.get(n),r=oo(n.getChildren()),a=ro(o.length,e);let s=0,i=0;for(const e of a)if('i'===e)t.push(this._getInsertDiff(n,s,r[s].name)),s++;else if('r'===e)t.push(this._getRemoveDiff(n,s,o[i].name)),i++;else if('a'===e){const e=r[s].attributes,a=o[i].attributes;let l;if('$text'==r[s].name)l=pg.createFromParentsAndOffsets(n,s,n,s+1);else{const e=n.offsetToIndex(s);l=pg.createFromParentsAndOffsets(n,s,n.getChild(e),0)}t.push(...this._getAttributesDiff(l,a,e)),s++,i++}else s++,i++}t.sort((e,t)=>e.position.root==t.position.root?e.position.isEqual(t.position)?e.changeCount<t.changeCount?-1:1:e.position.isBefore(t.position)?-1:1:e.position.root.rootName<t.position.root.rootName?-1:1);for(let n=1;n<t.length;n++){const e=t[n-1],o=t[n],r='remove'==e.type&&'remove'==o.type&&'$text'==e.name&&'$text'==o.name&&e.position.isEqual(o.position),i='insert'==e.type&&'insert'==o.type&&'$text'==e.name&&'$text'==o.name&&e.position.parent==o.position.parent&&e.position.offset+e.length==o.position.offset,a='attribute'==e.type&&'attribute'==o.type&&e.position.parent==o.position.parent&&e.range.isFlat&&o.range.isFlat&&e.position.offset+e.length==o.position.offset&&e.attributeKey==o.attributeKey&&e.attributeOldValue==o.attributeOldValue&&e.attributeNewValue==o.attributeNewValue;(r||i||a)&&(t[n-1].length++,a&&(t[n-1].range.end=t[n-1].range.end.getShiftedBy(1)),t.splice(n,1),n--)}for(const n of t)delete n.changeCount,'attribute'==n.type&&(delete n.position,delete n.length);return this._changeCount=0,this._cachedChangesWithGraveyard=t.slice(),this._cachedChanges=t.slice().filter(io),e.includeChangesInGraveyard?this._cachedChangesWithGraveyard:this._cachedChanges}reset(){this._changesInElement.clear(),this._elementSnapshots.clear(),this._changedMarkers.clear(),this._cachedChanges=null}_markInsert(e,t,n){const o={type:'insert',offset:t,howMany:n,count:this._changeCount++};this._markChange(e,o)}_markRemove(e,t,n){const o={type:'remove',offset:t,howMany:n,count:this._changeCount++};this._markChange(e,o),this._removeAllNestedChanges(e,t,n)}_markAttribute(e){const t={type:'attribute',offset:e.startOffset,howMany:e.offsetSize,count:this._changeCount++};this._markChange(e.parent,t)}_markChange(e,t){this._makeSnapshot(e);const n=this._getChangesForElement(e);this._handleChange(t,n),n.push(t);for(let o=0;o<n.length;o++)1>n[o].howMany&&(n.splice(o,1),o--)}_getChangesForElement(e){let t;return this._changesInElement.has(e)?t=this._changesInElement.get(e):(t=[],this._changesInElement.set(e,t)),t}_makeSnapshot(e){this._elementSnapshots.has(e)||this._elementSnapshots.set(e,oo(e.getChildren()))}_handleChange(e,t){e.nodesToHandle=e.howMany;for(const n of t){const o=e.offset+e.howMany,r=n.offset+n.howMany;if('insert'==e.type&&('insert'==n.type&&(e.offset<=n.offset?n.offset+=e.howMany:e.offset<r&&(n.howMany+=e.nodesToHandle,e.nodesToHandle=0)),'remove'==n.type&&e.offset<n.offset&&(n.offset+=e.howMany),'attribute'==n.type))if(e.offset<=n.offset)n.offset+=e.howMany;else if(e.offset<r){const r=n.howMany;n.howMany=e.offset-n.offset,t.unshift({type:'attribute',offset:o,howMany:r-n.howMany,count:this._changeCount++})}if('remove'==e.type){if('insert'==n.type)if(o<=n.offset)n.offset-=e.howMany;else if(o<=r){if(e.offset<n.offset){const t=o-n.offset;n.offset=e.offset,n.howMany-=t,e.nodesToHandle-=t}else n.howMany-=e.nodesToHandle,e.nodesToHandle=0;}else if(e.offset<=n.offset)e.nodesToHandle-=n.howMany,n.howMany=0;else if(e.offset<r){const t=r-e.offset;n.howMany-=t,e.nodesToHandle-=t}if('remove'==n.type&&(o<=n.offset?n.offset-=e.howMany:e.offset<n.offset&&(e.nodesToHandle+=n.howMany,n.howMany=0)),'attribute'==n.type)if(o<=n.offset)n.offset-=e.howMany;else if(e.offset<n.offset){const t=o-n.offset;n.offset=e.offset,n.howMany-=t}else if(e.offset<r)if(o<=r){const o=n.howMany;n.howMany=e.offset-n.offset;const r=o-n.howMany-e.nodesToHandle;t.unshift({type:'attribute',offset:e.offset,howMany:r,count:this._changeCount++})}else n.howMany-=r-e.offset}if('attribute'==e.type){if('insert'==n.type)if(e.offset<n.offset&&o>n.offset){if(o>r){const e={type:'attribute',offset:r,howMany:o-r,count:this._changeCount++};this._handleChange(e,t),t.push(e)}e.nodesToHandle=n.offset-e.offset,e.howMany=e.nodesToHandle}else e.offset>=n.offset&&e.offset<r&&(o>r?(e.nodesToHandle=o-r,e.offset=r):e.nodesToHandle=0);'attribute'==n.type&&(e.offset>=n.offset&&o<=r?(e.nodesToHandle=0,e.howMany=0,e.offset=0):e.offset<=n.offset&&o>=r&&(n.howMany=0))}}e.howMany=e.nodesToHandle,delete e.nodesToHandle}_getInsertDiff(e,t,n){return{type:'insert',position:cg.createFromParentAndOffset(e,t),name:n,length:1,changeCount:this._changeCount++}}_getRemoveDiff(e,t,n){return{type:'remove',position:cg.createFromParentAndOffset(e,t),name:n,length:1,changeCount:this._changeCount++}}_getAttributesDiff(e,t,n){const o=[];n=new Map(n);for(const[r,i]of t){const t=n.has(r)?n.get(r):null;t!==i&&o.push({type:'attribute',position:e.start,range:pg.createFromRange(e),length:1,attributeKey:r,attributeOldValue:i,attributeNewValue:t,changeCount:this._changeCount++}),n.delete(r)}for(const[r,i]of n)o.push({type:'attribute',position:e.start,range:pg.createFromRange(e),length:1,attributeKey:r,attributeOldValue:null,attributeNewValue:i,changeCount:this._changeCount++});return o}_isInInsertedElement(e){const t=e.parent;if(!t)return!1;const n=this._changesInElement.get(t),o=e.startOffset;if(n)for(const e of n)if('insert'==e.type&&o>=e.offset&&o<e.offset+e.howMany)return!0;return this._isInInsertedElement(t)}_removeAllNestedChanges(e,t,n){const o=pg.createFromParentsAndOffsets(e,t,e,t+n);for(const r of o.getItems({shallow:!0}))r.is('element')&&(this._elementSnapshots.delete(r),this._changesInElement.delete(r),this._removeAllNestedChanges(r,0,r.maxOffset))}}class db{constructor(){this._deltas=[],this._historyPoints=new Map,this._undoPairs=new Map,this._undoneDeltas=new Set}addDelta(e){if(0<e.operations.length&&!this._historyPoints.has(e.baseVersion)){const t=this._deltas.length;this._deltas[t]=e,this._historyPoints.set(e.baseVersion,t)}}*getDeltas(e=0,t=od){if(0!==this._deltas.length){let n=this._getIndex(e);if(-1!=n)for(;n<this._deltas.length;){const e=this._deltas[n++];if(e.baseVersion>=t)break;yield e}}}getDelta(e){const t=this._historyPoints.get(e);return t===void 0?null:this._deltas[t]}setDeltaAsUndone(e,t){this._undoPairs.set(t,e),this._undoneDeltas.add(e)}isUndoingDelta(e){return this._undoPairs.has(e)}isUndoneDelta(e){return this._undoneDeltas.has(e)}getUndoneDelta(e){return this._undoPairs.get(e)}_getIndex(e){const t=this._historyPoints.get(e);if(t===void 0){const t=this._deltas[this._deltas.length-1],n=t.baseVersion+t.operations.length;if(0>e||e>=n)return-1;throw new bd('model-history-wrong-version: Given base version points to the middle of a delta.')}return t}}const cb='$graveyard';class pb{constructor(e){this.model=e,this.version=0,this.history=new db(this),this.selection=new _g(this),this.roots=new Wu({idProperty:'rootName'}),this.differ=new lb(e.markers),this._postFixers=new Set,this.createRoot('$root',cb),this.listenTo(e,'applyOperation',(e,t)=>{const n=t[0];if(n.isDocumentOperation&&n.baseVersion!==this.version)throw new bd('model-document-applyOperation-wrong-version: Only operations with matching versions can be applied.',{operation:n})},{priority:'highest'}),this.listenTo(e,'applyOperation',(e,t)=>{const n=t[0];n.isDocumentOperation&&this.differ.bufferOperation(n)},{priority:'high'}),this.listenTo(e,'applyOperation',(e,t)=>{const n=t[0];n.isDocumentOperation&&(this.version++,this.history.addDelta(n.delta))},{priority:'low'});let t=!1;this.listenTo(this.selection,'change',()=>{t=!0}),this.listenTo(e,'_change',(e,n)=>{(!this.differ.isEmpty||t)&&(this._callPostFixers(n),this.fire('change',n.batch),this.differ.reset(),t=!1)}),this.listenTo(e.markers,'update',(e,t,n,o)=>{this.differ.bufferMarkerChange(t.name,n,o),null===n&&t.on('change',(e,n)=>{this.differ.bufferMarkerChange(t.name,n,t.getRange())})})}get graveyard(){return this.getRoot(cb)}createRoot(e='$root',t='main'){if(this.roots.get(t))throw new bd('model-document-createRoot-name-exists: Root with specified name already exists.',{name:t});const n=new ab(this,e,t);return this.roots.add(n),n}destroy(){this.selection.destroy(),this.stopListening()}getRoot(e='main'){return this.roots.get(e)}getRootNames(){return Array.from(this.roots,(e)=>e.rootName).filter((e)=>e!=cb)}registerPostFixer(e){this._postFixers.add(e)}toJSON(){const e=Gp(this);return e.selection='[engine.model.DocumentSelection]',e.model='[engine.model.Model]',e}_getDefaultRoot(){for(const e of this.roots)if(e!==this.graveyard)return e;return this.graveyard}_getDefaultRange(){const e=this._getDefaultRoot(),t=this.model.schema,n=new cg(e,[0]),o=t.getNearestSelectionRange(n);return o||new pg(n)}_validateSelectionRange(e){return uo(e.start)&&uo(e.end)}_callPostFixers(e){let t=!1;do for(const n of this._postFixers)if(t=n(e),t)break;while(t)}}_(pb,Ad);class ub{constructor(){this._markers=new Map}[Symbol.iterator](){return this._markers.values()}has(e){return this._markers.has(e)}get(e){return this._markers.get(e)||null}_set(e,t,n=!1){const o=e instanceof mb?e.name:e,r=this._markers.get(o);if(r){const e=r.getRange();let i=!1;return e.isEqual(t)||(r._attachLiveRange(fg.createFromRange(t)),i=!0),n!=r.managedUsingOperations&&(r._managedUsingOperations=n,i=!0),i&&this.fire('update:'+o,r,e,t),r}const i=fg.createFromRange(t),a=new mb(o,i,n);return this._markers.set(o,a),this.fire('update:'+o,a,null,t),a}_remove(e){const t=e instanceof mb?e.name:e,n=this._markers.get(t);return!!n&&(this._markers.delete(t),this.fire('update:'+t,n,n.getRange(),null),this._destroyMarker(n),!0)}*getMarkersAtPosition(e){for(const t of this)t.getRange().containsPosition(e)&&(yield t)}*getMarkersIntersectingRange(e){for(const t of this)null!==t.getRange().getIntersection(e)&&(yield t)}destroy(){for(const e of this._markers.values())this._destroyMarker(e);this._markers=null,this.stopListening()}*getMarkersGroup(e){for(const t of this._markers.values())t.name.startsWith(e+':')&&(yield t)}_destroyMarker(e){e.stopListening(),e._detachLiveRange()}}_(ub,Ad);class mb{constructor(e,t,n){this.name=e,this._managedUsingOperations=n,this._liveRange=this._attachLiveRange(t)}get managedUsingOperations(){if(!this._liveRange)throw new bd('marker-destroyed: Cannot use a destroyed marker instance.');return this._managedUsingOperations}getStart(){if(!this._liveRange)throw new bd('marker-destroyed: Cannot use a destroyed marker instance.');return cg.createFromPosition(this._liveRange.start)}getEnd(){if(!this._liveRange)throw new bd('marker-destroyed: Cannot use a destroyed marker instance.');return cg.createFromPosition(this._liveRange.end)}getRange(){if(!this._liveRange)throw new bd('marker-destroyed: Cannot use a destroyed marker instance.');return pg.createFromRange(this._liveRange)}_attachLiveRange(e){return this._liveRange&&this._detachLiveRange(),e.delegate('change:range').to(this),e.delegate('change:content').to(this),this._liveRange=e,e}_detachLiveRange(){this._liveRange.stopDelegating('change:range',this),this._liveRange.stopDelegating('change:content',this),this._liveRange.detach(),this._liveRange=null}}_(mb,Ad);class gb extends cg{constructor(e,t,n){if(super(e,t),!this.root.is('rootElement'))throw new bd('model-liveposition-root-not-rootelement: LivePosition\'s root has to be an instance of RootElement.');this.stickiness=n||'sticksToNext',mo.call(this)}detach(){this.stopListening()}}_(gb,Ad);class hb{constructor(e,t,n){this.model=e,this.writer=t,this.position=n,this.canMergeWith=new Set([this.position.parent]),this.schema=e.schema,this._filterAttributesOf=[]}handleNodes(e,t){e=Array.from(e);for(let n=0;n<e.length;n++){const o=e[n];this._handleNode(o,{isFirst:0===n&&t.isFirst,isLast:n===e.length-1&&t.isLast})}this.schema.removeDisallowedAttributes(this._filterAttributesOf,this.writer),this._filterAttributesOf=[]}getSelectionRange(){return this.nodeToSelect?pg.createOn(this.nodeToSelect):this.model.schema.getNearestSelectionRange(this.position)}_handleNode(e,t){if(this.schema.isObject(e))return void this._handleObject(e,t);const n=this._checkAndSplitToAllowedPosition(e,t);return n?void(this._insert(e),this._mergeSiblingsOf(e,t)):void this._handleDisallowedNode(e,t)}_handleObject(e,t){this._checkAndSplitToAllowedPosition(e)?this._insert(e):this._tryAutoparagraphing(e,t)}_handleDisallowedNode(e,t){e.is('element')?this.handleNodes(e.getChildren(),t):this._tryAutoparagraphing(e,t)}_insert(e){if(!this.schema.checkChild(this.position,e))return void Zm.error('insertcontent-wrong-position: The node cannot be inserted on the given position.',{node:e,position:this.position});const t=gb.createFromPosition(this.position);this.writer.insert(e,this.position),this.position=cg.createFromPosition(t),t.detach(),this.nodeToSelect=this.schema.isObject(e)&&!this.schema.checkChild(this.position,'$text')?e:null,this._filterAttributesOf.push(e)}_mergeSiblingsOf(e,t){if(e instanceof sg){const n=this._canMergeLeft(e,t),o=this._canMergeRight(e,t),r=gb.createBefore(e),i=gb.createAfter(e);if(n){const e=gb.createFromPosition(this.position);this.writer.merge(r),this.position=cg.createFromPosition(e),e.detach()}if(o){this.position.isEqual(i)||Zm.error('insertcontent-wrong-position-on-merge: The insertion position should equal the merge position'),this.position=cg.createAt(i.nodeBefore,'end');const e=new gb(this.position.root,this.position.path,'sticksToPrevious');this.writer.merge(i),this.position=cg.createFromPosition(e),e.detach()}(n||o)&&this._filterAttributesOf.push(this.position.parent),r.detach(),i.detach()}}_canMergeLeft(e,t){const n=e.previousSibling;return t.isFirst&&n instanceof sg&&this.canMergeWith.has(n)&&this.model.schema.checkMerge(n,e)}_canMergeRight(e,t){const n=e.nextSibling;return t.isLast&&n instanceof sg&&this.canMergeWith.has(n)&&this.model.schema.checkMerge(e,n)}_tryAutoparagraphing(e,t){const n=this.writer.createElement('paragraph');this._getAllowedIn(n,this.position.parent)&&this.schema.checkChild(n,e)&&(n._appendChild(e),this._handleNode(n,t))}_checkAndSplitToAllowedPosition(e){const t=this._getAllowedIn(e,this.position.parent);if(!t)return!1;for(;t!=this.position.parent;){if(this.schema.isLimit(this.position.parent))return!1;if(this.position.isAtStart){const e=this.position.parent;this.position=cg.createBefore(e),e.isEmpty&&this.writer.remove(e)}else if(this.position.isAtEnd)this.position=cg.createAfter(this.position.parent);else{const e=cg.createAfter(this.position.parent);this.writer.split(this.position),this.position=e,this.canMergeWith.add(this.position.nodeAfter)}}return!0}_getAllowedIn(e,t){return this.schema.checkChild(t,e)?t:t.parent?this._getAllowedIn(e,t.parent):null}}const fb=' ,.?!:;"-()';class bb{constructor(){this.markers=new ub,this.document=new pb(this),this.schema=new Eg,this._pendingChanges=[],this._currentWriter=null,['insertContent','deleteContent','modifySelection','getSelectedContent','applyOperation'].forEach((e)=>this.decorate(e)),this.on('applyOperation',(e,t)=>{const n=t[0];n._validate()},{priority:'highest'}),this.schema.register('$root',{isLimit:!0}),this.schema.register('$block',{allowIn:'$root',isBlock:!0}),this.schema.register('$text',{allowIn:'$block'}),this.schema.register('$clipboardHolder',{allowContentOf:'$root',isLimit:!0}),this.schema.extend('$text',{allowIn:'$clipboardHolder'}),this.schema.register('$marker',{allowIn:['$root','$block']})}change(e){return 0===this._pendingChanges.length?(this._pendingChanges.push({batch:new ob,callback:e}),this._runPendingChanges()[0]):e(this._currentWriter)}enqueueChange(e,t){'string'==typeof e?e=new ob(e):'function'==typeof e&&(t=e,e=new ob),this._pendingChanges.push({batch:e,callback:t}),1==this._pendingChanges.length&&this._runPendingChanges()}applyOperation(e){e._execute()}transformDeltas(e,t,n=!1){return Xf.transformDeltaSets(e,t,n?this.document:null)}insertContent(e,t){ho(this,e,t)}deleteContent(e,t){fo(this,e,t)}modifySelection(e,t){xo(this,e,t)}getSelectedContent(e){return Ro(this,e)}hasContent(e){if(e instanceof sg&&(e=pg.createIn(e)),e.isCollapsed)return!1;for(const t of e.getItems())if(t.is('textProxy')||this.schema.isObject(t))return!0;return!1}destroy(){this.document.destroy(),this.stopListening()}_runPendingChanges(){const e=[];for(;this._pendingChanges.length;){const t=this._pendingChanges[0].batch;this._currentWriter=new sb(this,t);const n=this._pendingChanges[0].callback(this._currentWriter);e.push(n),this.fire('_change',this._currentWriter),this._pendingChanges.shift(),this._currentWriter=null}return e}}_(bb,Lu);class _b{constructor(){this._listener=Object.create(hm)}listenTo(e){this._listener.listenTo(e,'keydown',(e,t)=>{this._listener.fire('_keydown:'+re(t),t)})}set(e,t,n={}){const o=ie(e),r=n.priority;this._listener.listenTo(this._listener,'_keydown:'+o,(e,n)=>{t(n,()=>{n.preventDefault(),n.stopPropagation(),e.stop()}),e.return=!0},{priority:r})}press(e){return!!this._listener.fire('_keydown:'+re(e),e)}destroy(){this._listener.stopListening()}}class kb extends _b{constructor(e){super(),this.editor=e}set(e,t,n={}){if('string'==typeof t){const e=t;t=(t,n)=>{this.editor.execute(e),n()}}super.set(e,t,n)}}class wb{constructor(e){const t=this.constructor.build&&this.constructor.build.plugins;this.config=new hd(e,this.constructor.build&&this.constructor.build.config),this.config.define('plugins',t),this.plugins=new vg(this,t),this.commands=new xg,this.locale=new Cg(this.config.get('language')),this.t=this.locale.t,this.set('isReadOnly',!1),this.model=new bb,this.data=new Rg(this.model),this.editing=new yg(this.model),this.editing.view.document.bind('isReadOnly').to(this),this.conversion=new Og,this.conversion.register('downcast',[this.editing.downcastDispatcher,this.data.downcastDispatcher]),this.conversion.register('editingDowncast',[this.editing.downcastDispatcher]),this.conversion.register('dataDowncast',[this.data.downcastDispatcher]),this.conversion.register('upcast',[this.data.upcastDispatcher]),this.keystrokes=new kb(this),this.keystrokes.listenTo(this.editing.view.document)}initPlugins(){function e(e,t){return e.reduce((e,n)=>n[t]?e.then(n[t].bind(n)):e,Promise.resolve())}const t=this,n=this.config;return function(){const e=n.get('plugins')||[],o=n.get('removePlugins')||[];return t.plugins.load(e,o)}().then((t)=>e(t,'init').then(()=>e(t,'afterInit'))).then(()=>this.fire('pluginsReady'))}destroy(){return this.fire('destroy'),this.stopListening(),this.commands.destroy(),this.plugins.destroy().then(()=>{this.model.destroy(),this.data.destroy(),this.editing.destroy(),this.keystrokes.destroy()})}execute(...e){this.commands.execute(...e)}static create(e){return new Promise((t)=>{const n=new this(e);t(n.initPlugins().then(()=>{n.fire('dataReady'),n.fire('ready')}).then(()=>n))})}}_(wb,Lu);class yb{getHtml(e){const t=document.implementation.createHTMLDocument(''),n=t.createElement('div');return n.appendChild(e),n.innerHTML}}class vb{constructor(){this._domParser=new DOMParser,this._domConverter=new mm({blockFiller:sm}),this._htmlWriter=new yb}toData(e){const t=this._domConverter.viewToDom(e,document);return this._htmlWriter.getHtml(t)}toView(e){const t=this._toDom(e);return this._domConverter.domToView(t)}_toDom(e){const t=this._domParser.parseFromString(e,'text/html'),n=t.createDocumentFragment(),o=t.body.childNodes;for(;0<o.length;)n.appendChild(o[0]);return n}}class xb{constructor(e){this.editor=e}destroy(){this.stopListening()}}_(xb,Lu);class Cb extends Wu{constructor(e){super({idProperty:'viewUid'}),this.on('add',(e,t,n)=>{t.isRendered||t.render(),t.element&&this._parentElement&&this._parentElement.insertBefore(t.element,this._parentElement.children[n])}),this.on('remove',(e,t)=>{t.element&&this._parentElement&&t.element.remove()}),this.locale=e,this._parentElement=null}destroy(){this.map((e)=>e.destroy())}setParent(e){this._parentElement=e}delegate(...e){if(!e.length||!Io(e))throw new bd('ui-viewcollection-delegate-wrong-events: All event names must be strings.');return{to:(t)=>{for(const n of this)for(const o of e)n.delegate(o).to(t);this.on('add',(n,o)=>{for(const r of e)o.delegate(r).to(t)}),this.on('remove',(n,o)=>{for(const r of e)o.stopDelegating(r,t)})}}}}_(Wu,Lu);var Ab=function(e,t){return Wp(e,!0,!0,t)};class Tb{constructor(e){Object.assign(this,qo(Bo(e))),this._isRendered=!1,this._revertData=null}render(){const e=this._renderNode({intoFragment:!0});return this._isRendered=!0,e}apply(e){return this._revertData=Xo(),this._renderNode({node:e,isApplying:!0,revertData:this._revertData}),e}revert(e){if(!this._revertData)throw new bd('ui-template-revert-not-applied: Attempting to revert a template which has not been applied yet.');this._revertTemplateFromNode(e,this._revertData)}*getViews(){function*e(t){if(t.children)for(const n of t.children)Jo(n)?yield n:Yo(n)&&(yield*e(n))}yield*e(this)}static bind(e,t){return{to(n,o){return new Pb({eventNameOrFunction:n,attribute:n,observable:e,emitter:t,callback:o})},if(n,o,r){return new Sb({observable:e,emitter:t,attribute:n,valueIfTrue:o,callback:r})}}}static extend(e,t){e._isRendered&&Zm.warn('template-extend-render: Attempting to extend a template which has already been rendered.'),Ko(e,qo(Bo(t)))}_renderNode(e){let t;if(t=e.node?this.tag&&this.text:this.tag?this.text:!this.text,t)throw new bd('ui-template-wrong-syntax: Node definition must have either "tag" or "text" when rendering a new Node.');return this.text?this._renderText(e):this._renderElement(e)}_renderElement(e){let t=e.node;return t||(t=e.node=document.createElementNS(this.ns||'http://www.w3.org/1999/xhtml',this.tag)),this._renderAttributes(e),this._renderElementChildren(e),this._setUpListeners(e),t}_renderText(e){let t=e.node;return t?e.revertData.text=t.textContent:t=e.node=document.createTextNode(''),No(this.text)?this._bindToObservable({schema:this.text,updater:Do(t),data:e}):t.textContent=this.text.join(''),t}_renderAttributes(e){let t,n,o,r;if(this.attributes){const i=e.node,a=e.revertData;for(t in this.attributes)if(o=i.getAttribute(t),n=this.attributes[t],a&&(a.attributes[t]=o),r=Od(n[0])&&n[0].ns?n[0].ns:null,No(n)){const s=r?n[0].value:n;a&&er(t)&&s.unshift(o),this._bindToObservable({schema:s,updater:Fo(i,t,r),data:e})}else'style'==t&&'string'!=typeof n[0]?this._renderStyleAttribute(n[0],e):(a&&o&&er(t)&&n.unshift(o),n=n.map((e)=>e?e.value||e:e).reduce((e,t)=>e.concat(t),[]).reduce(Go,''),Zo(n)||i.setAttributeNS(r,t,n))}}_renderStyleAttribute(e,t){const n=t.node;for(const o in e){const r=e[o];No(r)?this._bindToObservable({schema:[r],updater:Mo(n,o),data:t}):n.style[o]=r}}_renderElementChildren(e){const t=e.node,n=e.intoFragment?document.createDocumentFragment():t,o=e.isApplying;let r=0;for(const i of this.children)if(Qo(i)){if(!o){i.setParent(t);for(const e of i)n.appendChild(e.element)}}else if(Jo(i))o||(!i.isRendered&&i.render(),n.appendChild(i.element));else if(Be(i))n.appendChild(i);else if(o){const t=e.revertData,o=Xo();t.children.push(o),i._renderNode({node:n.childNodes[r++],isApplying:!0,revertData:o})}else n.appendChild(i.render());e.intoFragment&&t.appendChild(n)}_setUpListeners(e){if(this.eventListeners)for(const t in this.eventListeners){const n=this.eventListeners[t].map((n)=>{const[o,r]=t.split('@');return n.activateDomEventListener(o,r,e)});e.revertData&&e.revertData.bindings.push(n)}}_bindToObservable({schema:e,updater:t,data:n}){const o=n.revertData;Lo(e,t,n);const r=e.filter((e)=>!Zo(e)).filter((e)=>e.observable).map((o)=>o.activateAttributeListener(e,t,n));o&&o.bindings.push(r)}_revertTemplateFromNode(e,t){for(const n of t.bindings)for(const e of n)e();if(t.text)return void(e.textContent=t.text);for(const n in t.attributes){const o=t.attributes[n];null===o?e.removeAttribute(n):e.setAttribute(n,o)}for(let n=0;n<t.children.length;++n)this._revertTemplateFromNode(e.childNodes[n],t.children[n])}}_(Tb,Ad);class Eb{constructor(e){Object.assign(this,e)}getValue(e){const t=this.observable[this.attribute];return this.callback?this.callback(t,e):t}activateAttributeListener(e,t,n){const o=()=>Lo(e,t,n);return this.emitter.listenTo(this.observable,'change:'+this.attribute,o),()=>{this.emitter.stopListening(this.observable,'change:'+this.attribute,o)}}}class Pb extends Eb{activateDomEventListener(e,t,n){const o=(e,n)=>{(!t||n.target.matches(t))&&('function'==typeof this.eventNameOrFunction?this.eventNameOrFunction(n):this.observable.fire(this.eventNameOrFunction,n))};return this.emitter.listenTo(n.node,e,o),()=>{this.emitter.stopListening(n.node,e,o)}}}class Sb extends Eb{getValue(e){const t=super.getValue(e);return!Zo(t)&&(this.valueIfTrue||!0)}}var Rb=i(27),Ob=i.n(Rb);class Ib{constructor(e){this.element=null,this.isRendered=!1,this.locale=e,this.t=e&&e.t,this._viewCollections=new Wu,this._unboundChildren=this.createCollection(),this._viewCollections.on('add',(t,n)=>{n.locale=e}),this.decorate('render')}get bindTemplate(){return this._bindTemplate?this._bindTemplate:this._bindTemplate=Tb.bind(this,this)}createCollection(){const e=new Cb;return this._viewCollections.add(e),e}registerChild(e){R(e)||(e=[e]);for(const t of e)this._unboundChildren.add(t)}deregisterChild(e){R(e)||(e=[e]);for(const t of e)this._unboundChildren.remove(t)}setTemplate(e){this.template=new Tb(e)}extendTemplate(e){Tb.extend(this.template,e)}render(){if(this.isRendered)throw new bd('ui-view-render-already-rendered: This View has already been rendered.');this.template&&(this.element=this.template.render(),this.registerChild(this.template.getViews())),this.isRendered=!0}destroy(){this.stopListening(),this._viewCollections.map((e)=>e.destroy())}}_(Ib,hm),_(Ib,Lu);var Nb=i(30),Vb=i.n(Nb);const Lb=ar('px'),Db=um.document.body;class Fb extends Ib{constructor(e){super(e);const t=this.bindTemplate;this.set('top',0),this.set('left',0),this.set('position','arrow_nw'),this.set('isVisible',!1),this.set('withArrow',!0),this.set('className'),this.content=this.createCollection(),this.setTemplate({tag:'div',attributes:{class:['ck','ck-balloon-panel',t.to('position',(e)=>`ck-balloon-panel_${e}`),t.if('isVisible','ck-balloon-panel_visible'),t.if('withArrow','ck-balloon-panel_with-arrow'),t.to('className')],style:{top:t.to('top',Lb),left:t.to('left',Lb)}},children:this.content})}show(){this.isVisible=!0}hide(){this.isVisible=!1}attachTo(e){this.show();const t=Fb.defaultPositions,n=Object.assign({},{element:this.element,positions:[t.southArrowNorth,t.southArrowNorthWest,t.southArrowNorthEast,t.northArrowSouth,t.northArrowSouthWest,t.northArrowSouthEast],limiter:Db,fitInViewport:!0},e),{top:o,left:r,name:i}=nr(n);Object.assign(this,{top:o,left:r,position:i})}pin(e){this.unpin(),this._pinWhenIsVisibleCallback=()=>{this.isVisible?this._startPinning(e):this._stopPinning()},this._startPinning(e),this.listenTo(this,'change:isVisible',this._pinWhenIsVisibleCallback)}unpin(){this._pinWhenIsVisibleCallback&&(this._stopPinning(),this.stopListening(this,'change:isVisible',this._pinWhenIsVisibleCallback),this._pinWhenIsVisibleCallback=null,this.hide())}_startPinning(e){this.attachTo(e);const t=sr(e.target),n=e.limiter?sr(e.limiter):Db;this.listenTo(um.document,'scroll',(o,r)=>{const i=r.target,a=t&&i.contains(t),s=n&&i.contains(n);(a||s||!t||!n)&&this.attachTo(e)},{useCapture:!0}),this.listenTo(um.window,'resize',()=>{this.attachTo(e)})}_stopPinning(){this.stopListening(um.document,'scroll'),this.stopListening(um.window,'resize')}}Fb.arrowHorizontalOffset=25,Fb.arrowVerticalOffset=10,Fb.defaultPositions={northArrowSouth:(e,t)=>({top:lr(e,t),left:e.left+e.width/2-t.width/2,name:'arrow_s'}),northArrowSouthEast:(e,t)=>({top:lr(e,t),left:e.left+e.width/2-t.width+Fb.arrowHorizontalOffset,name:'arrow_se'}),northArrowSouthWest:(e,t)=>({top:lr(e,t),left:e.left+e.width/2-Fb.arrowHorizontalOffset,name:'arrow_sw'}),northWestArrowSouth:(e,t)=>({top:lr(e,t),left:e.left-t.width/2,name:'arrow_s'}),northWestArrowSouthWest:(e,t)=>({top:lr(e,t),left:e.left-Fb.arrowHorizontalOffset,name:'arrow_sw'}),northWestArrowSouthEast:(e,t)=>({top:lr(e,t),left:e.left-t.width+Fb.arrowHorizontalOffset,name:'arrow_se'}),northEastArrowSouth:(e,t)=>({top:lr(e,t),left:e.right-t.width/2,name:'arrow_s'}),northEastArrowSouthEast:(e,t)=>({top:lr(e,t),left:e.right-t.width+Fb.arrowHorizontalOffset,name:'arrow_se'}),northEastArrowSouthWest:(e,t)=>({top:lr(e,t),left:e.right-Fb.arrowHorizontalOffset,name:'arrow_sw'}),southArrowNorth:(e,t)=>({top:dr(e,t),left:e.left+e.width/2-t.width/2,name:'arrow_n'}),southArrowNorthEast:(e,t)=>({top:dr(e,t),left:e.left+e.width/2-t.width+Fb.arrowHorizontalOffset,name:'arrow_ne'}),southArrowNorthWest:(e,t)=>({top:dr(e,t),left:e.left+e.width/2-Fb.arrowHorizontalOffset,name:'arrow_nw'}),southWestArrowNorth:(e,t)=>({top:dr(e,t),left:e.left-t.width/2,name:'arrow_n'}),southWestArrowNorthWest:(e,t)=>({top:dr(e,t),left:e.left-Fb.arrowHorizontalOffset,name:'arrow_nw'}),southWestArrowNorthEast:(e,t)=>({top:dr(e,t),left:e.left-t.width+Fb.arrowHorizontalOffset,name:'arrow_ne'}),southEastArrowNorth:(e,t)=>({top:dr(e,t),left:e.right-t.width/2,name:'arrow_n'}),southEastArrowNorthEast:(e,t)=>({top:dr(e,t),left:e.right-t.width+Fb.arrowHorizontalOffset,name:'arrow_ne'}),southEastArrowNorthWest:(e,t)=>({top:dr(e,t),left:e.right-Fb.arrowHorizontalOffset,name:'arrow_nw'})};class Mb extends xb{static get pluginName(){return'ContextualBalloon'}init(){this.view=new Fb,this.positionLimiter=()=>{const e=this.editor.editing.view,t=e.document,n=t.selection.editableElement;return n?e.domConverter.mapViewToDom(n.root):null},this._stack=new Map,this.editor.ui.view.body.add(this.view),this.editor.ui.focusTracker.add(this.view.element)}get visibleView(){const e=this._stack.get(this.view.content.get(0));return e?e.view:null}hasView(e){return this._stack.has(e)}add(e){if(this.hasView(e.view))throw new bd('contextualballoon-add-view-exist: Cannot add configuration of the same view twice.');this.visibleView&&this.view.content.remove(this.visibleView),this._stack.set(e.view,e),this._show(e)}remove(e){if(!this.hasView(e))throw new bd('contextualballoon-remove-view-not-exist: Cannot remove configuration of not existing view.');if(this.visibleView===e){this.view.content.remove(e),this._stack.delete(e);const t=Array.from(this._stack.values()).pop();t?this._show(t):this.view.hide()}else this._stack.delete(e)}updatePosition(e){e&&(this._stack.get(this.visibleView).position=e),this.view.pin(this._getBalloonPosition())}_show({view:e,balloonClassName:t=''}){this.view.className=t,this.view.content.add(e),this.view.pin(this._getBalloonPosition())}_getBalloonPosition(){let e=cr(this._stack.values()).position;return e&&!e.limiter&&(e=Object.assign({},e,{limiter:this.positionLimiter})),e}}class Bb{constructor(){this.set('isFocused',!1),this.focusedElement=null,this._elements=new Set,this._nextEventLoopTimeout=null}add(e){if(this._elements.has(e))throw new bd('focusTracker-add-element-already-exist');this.listenTo(e,'focus',()=>this._focus(e),{useCapture:!0}),this.listenTo(e,'blur',()=>this._blur(),{useCapture:!0}),this._elements.add(e)}remove(e){e===this.focusedElement&&this._blur(e),this._elements.has(e)&&(this.stopListening(e),this._elements.delete(e))}_focus(e){clearTimeout(this._nextEventLoopTimeout),this.focusedElement=e,this.isFocused=!0}_blur(){clearTimeout(this._nextEventLoopTimeout),this._nextEventLoopTimeout=setTimeout(()=>{this.focusedElement=null,this.isFocused=!1},0)}}_(Bb,hm),_(Bb,Lu);class qb{constructor(e){if(Object.assign(this,e),e.actions&&e.keystrokeHandler)for(const t in e.actions){let n=e.actions[t];'string'==typeof n&&(n=[n]);for(const o of n)e.keystrokeHandler.set(o,(e,n)=>{this[t](),n()})}}get first(){return this.focusables.find(pr)||null}get last(){return this.focusables.filter(pr).slice(-1)[0]||null}get next(){return this._getFocusableItem(1)}get previous(){return this._getFocusableItem(-1)}get current(){let e=null;return null===this.focusTracker.focusedElement?null:(this.focusables.find((t,n)=>{const o=t.element===this.focusTracker.focusedElement;return o&&(e=n),o}),e)}focusFirst(){this._focus(this.first)}focusLast(){this._focus(this.last)}focusNext(){this._focus(this.next)}focusPrevious(){this._focus(this.previous)}_focus(e){e&&e.focus()}_getFocusableItem(e){const t=this.current,n=this.focusables.length;if(!n)return null;if(null===t)return this[1===e?'first':'last'];let o=(t+n+e)%n;do{const t=this.focusables.get(o);if(pr(t))return t;o=(o+n+e)%n}while(o!==t);return null}}class zb extends Ib{constructor(e){super(e),this.setTemplate({tag:'span',attributes:{class:['ck','ck-toolbar__separator']}})}}var jb=i(32),Ub=i.n(jb);class Hb extends Ib{constructor(e){super(e);const t=this.bindTemplate;this.items=this.createCollection(),this.focusTracker=new Bb,this.keystrokes=new _b,this.set('isVertical',!1),this.set('className'),this._focusCycler=new qb({focusables:this.items,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:['arrowleft','arrowup'],focusNext:['arrowright','arrowdown']}}),this.setTemplate({tag:'div',attributes:{class:['ck','ck-toolbar',t.if('isVertical','ck-toolbar_vertical'),t.to('className')]},children:this.items,on:{mousedown:ur(this)}})}render(){super.render();for(const e of this.items)this.focusTracker.add(e.element);this.items.on('add',(e,t)=>{this.focusTracker.add(t.element)}),this.items.on('remove',(e,t)=>{this.focusTracker.remove(t.element)}),this.keystrokes.listenTo(this.element)}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}fillFromConfig(e,t){e.map((e)=>{'|'==e?this.items.add(new zb):t.has(e)?this.items.add(t.create(e)):Zm.warn('toolbarview-item-unavailable: The requested toolbar item is unavailable.',{name:e})})}}class Wb extends xb{static get pluginName(){return'BalloonToolbar'}static get requires(){return[Mb]}init(){const e=this.editor;this.toolbarView=new Hb(e.locale),this.toolbarView.extendTemplate({attributes:{class:['ck-toolbar_floating']}}),this.toolbarView.render(),this._balloon=e.plugins.get(Mb),this._fireSelectionChangeDebounced=Gm(()=>this.fire('_selectionChangeDebounced'),200),this._handleSelectionChange(),this._handleFocusChange(),this.decorate('show')}afterInit(){const e=mr(this.editor.config.get('balloonToolbar')),t=this.editor.ui.componentFactory;this.toolbarView.fillFromConfig(e.items,t)}_handleFocusChange(){const e=this.editor;this.listenTo(e.ui.focusTracker,'change:isFocused',(e,t,n)=>{this._balloon.visibleView!==this.toolbarView||n||this.hide()})}_handleSelectionChange(){const e=this.editor.model.document.selection,t=this.editor.editing.view.document;this.listenTo(e,'change:range',(t,n)=>{(n.directChange||e.isCollapsed)&&this.hide(),this._fireSelectionChangeDebounced()}),this.listenTo(this,'_selectionChangeDebounced',()=>{t.isFocused&&!t.selection.isCollapsed&&this.show()})}show(){this._balloon.hasView(this.toolbarView)||Array.from(this.toolbarView.items).every((e)=>void 0!==e.isEnabled&&!e.isEnabled)||(this.listenTo(this.editor.editing.view,'render',()=>{this._balloon.updatePosition(this._getBalloonPositionData())}),this._balloon.add({view:this.toolbarView,position:this._getBalloonPositionData(),balloonClassName:'ck-toolbar-container'}))}hide(){this._balloon.hasView(this.toolbarView)&&(this.stopListening(this.editor.editing.view,'render'),this._balloon.remove(this.toolbarView))}_getBalloonPositionData(){const e=this.editor,t=e.editing.view,n=t.document,o=n.selection.isBackward;return{target:()=>{const e=n.selection.getFirstRange(),r=eg.getDomRangeRects(t.domConverter.viewRangeToDom(e));return o?r[0]:(1<r.length&&0===r[r.length-1].width&&r.pop(),r[r.length-1])},positions:gr(o)}}destroy(){this._fireSelectionChangeDebounced.cancel(),this.stopListening(),super.destroy()}}class Gb{constructor(e){this.editor=e,this._components=new Map}*names(){for(const e of this._components.values())yield e.originalName}add(e,t){if(this.has(e))throw new bd('componentfactory-item-exists: The item already exists in the component factory.',{name:e});this._components.set(hr(e),{callback:t,originalName:e})}create(e){if(!this.has(e))throw new bd('componentfactory-item-missing: The required component is not registered in the factory.',{name:e});return this._components.get(hr(e)).callback(this.editor.locale)}has(e){return this._components.has(hr(e))}}class $b{constructor(e,t){this.editor=e,this.view=t,this.componentFactory=new Gb(e),this.focusTracker=new Bb}init(){const e=this.editor,t=this.view,n=e.plugins.get('BalloonToolbar');t.render();const o=e.editing.view.document.getRoot();t.editable.bind('isReadOnly').to(o),t.editable.bind('isFocused').to(this.focusTracker),e.editing.view.attachDomRoot(t.editableElement),t.editable.name=o.rootName,this.focusTracker.add(t.editableElement),fr({origin:e.editing.view,originFocusTracker:this.focusTracker,originKeystrokeHandler:e.keystrokes,toolbar:n.toolbarView,beforeFocus(){n.show()},afterBlur(){n.hide()}})}destroy(){this.view.destroy()}}var Kb=i(34),Zb=i.n(Kb);class Jb extends Ib{constructor(e){super(e),this.body=this.createCollection()}render(){super.render(),this._renderBodyCollection()}destroy(){return this._bodyCollectionContainer.remove(),super.destroy()}_renderBodyCollection(){const e=this._bodyCollectionContainer=new Tb({tag:'div',attributes:{class:['ck','ck-reset_all','ck-body','ck-rounded-corners']},children:this.body}).render();document.body.appendChild(e)}}class Yb extends Ib{constructor(e,t){super(e);const n=this.bindTemplate;t&&(this.element=this.editableElement=t),this.setTemplate({tag:'div',attributes:{class:['ck','ck-content','ck-editor__editable','ck-rounded-corners',n.to('isFocused',(e)=>e?'ck-focused':'ck-blurred')],contenteditable:n.to('isReadOnly',(e)=>!e)}}),this.set('isReadOnly',!1),this.set('isFocused',!1),this.externalElement=t}render(){super.render(),this.externalElement?this.template.apply(this.element=this.externalElement):this.editableElement=this.element}destroy(){this.externalElement&&this.template.revert(this.externalElement),super.destroy()}}class Qb extends Yb{constructor(e,n){super(e,n);const o=this.bindTemplate,r=this.t;this.set('name',null);this.extendTemplate({attributes:{role:'textbox',"aria-label":o.to('name',(e)=>r('v',[e])),class:'ck-editor__editable_inline'}})}}class Xb extends Jb{constructor(e,t){super(e),this.editable=new Qb(e,t),this.registerChild(this.editable)}get editableElement(){return this.editable.element}}const e_={setData(e){this.data.set(e)},getData(){return this.data.get()}};var t_=e_;const n_={updateElement(){br(this.element,this.data.get())}};var o_=n_;class r_ extends wb{constructor(e,t){super(t),this.element=e,this.config.get('plugins').push(Wb),this.config.define('balloonToolbar',this.config.get('toolbar')),this.data.processor=new vb,this.model.document.createRoot(),this.ui=new $b(this,new Xb(this.locale,e)),kr(this)}destroy(){const e=this.getData();return this.ui.destroy(),super.destroy().then(()=>br(this.element,e))}static create(e,t){return new Promise((n)=>{const o=new this(e,t);n(o.initPlugins().then(()=>{o.ui.init(),o.fire('uiReady')}).then(()=>o.data.init(_r(e))).then(()=>{o.fire('dataReady'),o.fire('ready')}).then(()=>o))})}}_(r_,t_),_(r_,o_);class i_{constructor(e,t){this.editor=e,this.view=t,this.componentFactory=new Gb(e),this.focusTracker=new Bb,this._toolbarConfig=mr(e.config.get('toolbar'))}init(){const e=this.editor,t=this.view;t.render(),t.stickyPanel.bind('isActive').to(this.focusTracker,'isFocused'),t.stickyPanel.limiterElement=t.element,this._toolbarConfig.viewportTopOffset&&(t.stickyPanel.viewportTopOffset=this._toolbarConfig.viewportTopOffset);const n=e.editing.view.document.getRoot();t.editable.bind('isReadOnly').to(n),t.editable.bind('isFocused').to(e.editing.view.document),t.editable.name=n.rootName,this.focusTracker.add(this.view.editableElement),this.view.toolbar.fillFromConfig(this._toolbarConfig.items,this.componentFactory),fr({origin:e.editing.view,originFocusTracker:this.focusTracker,originKeystrokeHandler:e.keystrokes,toolbar:this.view.toolbar})}destroy(){this.view.destroy()}}var a_=i(36),s_=i.n(a_);class l_ extends Ib{constructor(e){super(e),this.set('text'),this.set('for');const t=this.bindTemplate;this.setTemplate({tag:'label',attributes:{class:['ck','ck-label'],for:t.to('for')},children:[{text:t.to('text')}]})}}class d_ extends Jb{constructor(e){super(e);const t=s();this.top=this.createCollection(),this.main=this.createCollection(),this._voiceLabelView=this._createVoiceLabel(t),this.setTemplate({tag:'div',attributes:{class:['ck','ck-reset','ck-editor','ck-rounded-corners'],role:'application',dir:'ltr',lang:e.language,"aria-labelledby":`ck-editor__aria-label_${t}`},children:[this._voiceLabelView,{tag:'div',attributes:{class:['ck','ck-editor__top','ck-reset_all'],role:'presentation'},children:this.top},{tag:'div',attributes:{class:['ck','ck-editor__main'],role:'presentation'},children:this.main}]})}_createVoiceLabel(e){const n=this.t,t=new l_;return t.text=n('u'),t.extendTemplate({attributes:{id:`ck-editor__aria-label_${e}`,class:'ck-voice-label'}}),t}}var c_=i(38),p_=i.n(c_);const u_=ar('px');class m_ extends Ib{constructor(e){super(e);const t=this.bindTemplate;this.set('isActive',!1),this.set('isSticky',!1),this.set('limiterElement',null),this.set('limiterBottomOffset',50),this.set('viewportTopOffset',0),this.set('_marginLeft',null),this.set('_isStickyToTheLimiter',!1),this.set('_hasViewportTopOffset',!1),this.content=this.createCollection(),this._contentPanelPlaceholder=new Tb({tag:'div',attributes:{class:['ck','ck-sticky-panel__placeholder'],style:{display:t.to('isSticky',(e)=>e?'block':'none'),height:t.to('isSticky',(e)=>e?u_(this._panelRect.height):null)}}}).render(),this._contentPanel=new Tb({tag:'div',attributes:{class:['ck','ck-sticky-panel__content',t.if('isSticky','ck-sticky-panel__content_sticky'),t.if('_isStickyToTheLimiter','ck-sticky-panel__content_sticky_bottom-limit')],style:{width:t.to('isSticky',(e)=>e?u_(this._contentPanelPlaceholder.getBoundingClientRect().width):null),top:t.to('_hasViewportTopOffset',(e)=>e?u_(this.viewportTopOffset):null),bottom:t.to('_isStickyToTheLimiter',(e)=>e?u_(this.limiterBottomOffset):null),marginLeft:t.to('_marginLeft')}},children:this.content}).render(),this.setTemplate({tag:'div',attributes:{class:['ck','ck-sticky-panel']},children:[this._contentPanelPlaceholder,this._contentPanel]})}render(){super.render(),this._checkIfShouldBeSticky(),this.listenTo(um.window,'scroll',()=>{this._checkIfShouldBeSticky()}),this.listenTo(this,'change:isActive',()=>{this._checkIfShouldBeSticky()})}_checkIfShouldBeSticky(){const e=this._panelRect=this._contentPanel.getBoundingClientRect();let t;this.limiterElement?(t=this._limiterRect=this.limiterElement.getBoundingClientRect(),this.isSticky=this.isActive&&t.top<this.viewportTopOffset&&this._panelRect.height+this.limiterBottomOffset<t.height):this.isSticky=!1,this.isSticky?(this._isStickyToTheLimiter=t.bottom<e.height+this.limiterBottomOffset+this.viewportTopOffset,this._hasViewportTopOffset=!this._isStickyToTheLimiter&&!!this.viewportTopOffset,this._marginLeft=this._isStickyToTheLimiter?null:u_(-um.window.scrollX)):(this._isStickyToTheLimiter=!1,this._hasViewportTopOffset=!1,this._marginLeft=null)}}var g_=i(40),h_=i.n(g_);class f_ extends d_{constructor(e){super(e),this.stickyPanel=new m_(e),this.toolbar=new Hb(e),this.editable=new Qb(e)}render(){super.render(),this.stickyPanel.content.add(this.toolbar),this.top.add(this.stickyPanel),this.main.add(this.editable)}get editableElement(){return this.editable.element}}class b_{constructor(){this._replacedElements=[]}replace(e,t){this._replacedElements.push({element:e,newElement:t}),e.style.display='none',t&&e.parentNode.insertBefore(t,e.nextSibling)}restore(){this._replacedElements.forEach(({element:e,newElement:t})=>{e.style.display='',t&&t.remove()}),this._replacedElements=[]}}class __ extends wb{constructor(e,t){super(t),this._elementReplacer=new b_,this.element=e,this.data.processor=new vb,this.model.document.createRoot(),this.ui=new i_(this,new f_(this.locale)),kr(this)}destroy(){return this.updateElement(),this._elementReplacer.restore(),this.ui.destroy(),super.destroy()}static create(e,t){return new Promise((n)=>{const o=new this(e,t);n(o.initPlugins().then(()=>o.ui.init()).then(()=>{o._elementReplacer.replace(e,o.ui.view.element),o.fire('uiReady')}).then(()=>o.editing.view.attachDomRoot(o.ui.view.editableElement)).then(()=>o.data.init(_r(e))).then(()=>{o.fire('dataReady'),o.fire('ready')}).then(()=>o))})}}_(__,t_),_(__,o_);class k_{constructor(e){this.files=wr(e),this._native=e}get types(){return this._native.types}getData(e){return this._native.getData(e)}setData(e,t){this._native.setData(e,t)}}class w_ extends Bm{constructor(e){function t(e,t){t.preventDefault();const o=t.dropRange?[t.dropRange]:Array.from(n.selection.getRanges());n.fire('clipboardInput',{dataTransfer:t.dataTransfer,targetRanges:o})}super(e);const n=this.document;this.domEventType=['paste','copy','cut','drop','dragover'],this.listenTo(n,'paste',t,{priority:'low'}),this.listenTo(n,'drop',t,{priority:'low'})}onDomEvent(e){const t={dataTransfer:new k_(e.clipboardData?e.clipboardData:e.dataTransfer)};'drop'==e.type&&(t.dropRange=yr(this.view,e)),this.fire(e.type,e,t)}}const y_=['figcaption','li'];class v_ extends xb{static get pluginName(){return'Clipboard'}init(){function e(e,o){const i=o.dataTransfer;o.preventDefault();const a=t.data.toView(t.model.getSelectedContent(n.selection));r.fire('clipboardOutput',{dataTransfer:i,content:a,method:e.name})}const t=this.editor,n=t.model.document,o=t.editing.view,r=o.document;this._htmlDataProcessor=new vb,o.addObserver(w_),this.listenTo(r,'clipboardInput',(e,n)=>{if(t.isReadOnly)return;const r=n.dataTransfer;let i='';r.getData('text/html')?i=xr(r.getData('text/html')):r.getData('text/plain')&&(i=vr(r.getData('text/plain'))),i=this._htmlDataProcessor.toView(i),this.fire('inputTransformation',{content:i}),o.scrollToTheSelection()},{priority:'low'}),this.listenTo(this,'inputTransformation',(e,t)=>{if(!t.content.isEmpty){const e=this.editor.data,o=this.editor.model,r=e.toModel(t.content,'$clipboardHolder');if(0==r.childCount)return;o.insertContent(r,n.selection)}},{priority:'low'}),this.listenTo(r,'copy',e,{priority:'low'}),this.listenTo(r,'cut',(n,o)=>{t.isReadOnly?o.preventDefault():e(n,o)},{priority:'low'}),this.listenTo(r,'clipboardOutput',(e,o)=>{o.content.isEmpty||(o.dataTransfer.setData('text/html',this._htmlDataProcessor.toData(o.content)),o.dataTransfer.setData('text/plain',Cr(o.content))),'cut'==o.method&&t.model.deleteContent(n.selection)},{priority:'low'})}}class x_{constructor(e){this.editor=e,this.set('value',void 0),this.set('isEnabled',!1),this.decorate('execute'),this.listenTo(this.editor.model.document,'change',()=>{this.refresh()}),this.on('execute',(e)=>{this.isEnabled||e.stop()},{priority:'high'}),this.listenTo(e,'change:isReadOnly',(e,t,n)=>{n?(this.on('beforeChange:isEnabled',Ar,{priority:'highest'}),this.isEnabled=!1):(this.off('beforeChange:isEnabled',Ar),this.refresh())})}refresh(){this.isEnabled=!0}execute(){}destroy(){this.stopListening()}}_(x_,Lu);class C_ extends x_{execute(){const e=this.editor.model,t=e.document;e.change((n)=>{Tr(this.editor.model,n,t.selection,e.schema),this.fire('afterExecute',{writer:n})})}}class A_ extends bm{constructor(e){super(e);const t=this.document;t.on('keydown',(e,n)=>{if(this.isEnabled&&n.keyCode==tm.enter){let o;t.once('enter',(e)=>o=e,{priority:'highest'}),t.fire('enter',new Mm(t,n.domEvent)),o&&o.stop.called&&e.stop()}})}observe(){}}class T_ extends xb{static get pluginName(){return'Enter'}init(){const e=this.editor,t=e.editing.view,n=t.document;t.addObserver(A_),e.commands.add('enter',new C_(e)),this.listenTo(n,'enter',(n,o)=>{e.execute('enter'),o.preventDefault(),t.scrollToTheSelection()},{priority:'low'})}}class E_{constructor(e,t=20){this.model=e,this.size=0,this.limit=t,this.isLocked=!1,this._changeCallback=(e,t)=>{'transparent'!=t.type&&t!==this._batch&&this._reset(!0)},this._selectionChangeCallback=()=>{this._reset()},this.model.document.on('change',this._changeCallback),this.model.document.selection.on('change:range',this._selectionChangeCallback),this.model.document.selection.on('change:attribute',this._selectionChangeCallback)}get batch(){return this._batch||(this._batch=new ob),this._batch}input(e){this.size+=e,this.size>=this.limit&&this._reset(!0)}lock(){this.isLocked=!0}unlock(){this.isLocked=!1}destroy(){this.model.document.off('change',this._changeCallback),this.model.document.selection.off('change:range',this._selectionChangeCallback),this.model.document.selection.off('change:attribute',this._selectionChangeCallback)}_reset(e){(!this.isLocked||e)&&(this._batch=null,this.size=0)}}class P_ extends x_{constructor(e,t){super(e),this._buffer=new E_(e.model,t)}get buffer(){return this._buffer}destroy(){super.destroy(),this._buffer.destroy()}execute(e={}){const t=this.editor.model,n=t.document,o=e.text||'',r=o.length,i=e.range||n.selection.getFirstRange(),a=e.resultRange;t.enqueueChange(this._buffer.batch,(e)=>{const t=i.isCollapsed;this._buffer.lock(),t||e.remove(i),o&&e.insertText(o,n.selection.getAttributes(),i.start),a?e.setSelection(a):t&&e.setSelection(i.start.getShiftedBy(r)),this._buffer.unlock(),this._buffer.input(r)})}}class S_ extends xb{static get pluginName(){return'Input'}init(){const e=this.editor,t=e.editing.view,n=new P_(e,e.config.get('typing.undoStep')||20);e.commands.add('input',n),this.listenTo(t.document,'keydown',(e,t)=>{this._handleKeydown(t,n)},{priority:'lowest'}),this.listenTo(t.document,'mutations',(e,t,n)=>{this._handleMutations(t,n)})}_handleKeydown(e,t){const n=this.editor.model,o=n.document,r=t.buffer;!t.isEnabled||Sr(e)||o.selection.isCollapsed||(r.lock(),n.enqueueChange(r.batch,()=>{this.editor.model.deleteContent(o.selection)}),r.unlock())}_handleMutations(e,t){new R_(this.editor).handle(e,t)}}class R_{constructor(e){this.editor=e,this.editing=this.editor.editing}handle(e,t){if(Nr(e))this._handleContainerChildrenMutations(e,t);else for(const n of e)this._handleTextMutation(n,t),this._handleTextNodeInsertion(n)}_handleContainerChildrenMutations(e,t){const n=Ir(e);if(!n)return;const o=this.editor.editing.view.domConverter,r=o.mapViewToDom(n),i=new mm,a=this.editor.data.toModel(i.domToView(r)).getChild(0),s=this.editor.editing.mapper.toModelElement(n);if(!s)return;const l=Array.from(a.getChildren()),d=Array.from(s.getChildren());if(!Vr(l)||!Vr(d))return;const c=l.map((e)=>e.data).join('').replace(/\u00A0/g,' '),p=d.map((e)=>e.data).join('');if(p===c)return;const u=Se(p,c),{firstChangeAt:m,insertions:g,deletions:h}=Lr(u);let f=null;t&&(f=this.editing.mapper.toModelRange(t.getFirstRange()));const b=c.substr(m,g),_=pg.createFromParentsAndOffsets(s,m,s,m+h);this.editor.execute('input',{text:b,range:_,resultRange:f})}_handleTextMutation(e,t){if('text'!=e.type)return;const n=e.newText.replace(/\u00A0/g,' '),o=e.oldText.replace(/\u00A0/g,' '),r=Se(o,n),{firstChangeAt:i,insertions:a,deletions:s}=Lr(r);let l=null;t&&(l=this.editing.mapper.toModelRange(t.getFirstRange()));const d=new zu(e.node,i),c=this.editing.mapper.toModelPosition(d),p=pg.createFromPositionAndShift(c,s),u=n.substr(i,a);this.editor.execute('input',{text:u,range:p,resultRange:l})}_handleTextNodeInsertion(e){if('children'==e.type){const t=Or(e),n=new zu(e.node,t.index),o=this.editing.mapper.toModelPosition(n),r=t.values[0].data;this.editor.execute('input',{text:r.replace(/\u00A0/g,' '),range:new pg(o)})}}}const O_=[re('arrowUp'),re('arrowRight'),re('arrowDown'),re('arrowLeft'),9,16,17,18,20,27,33,34,35,36,229];for(let e=112;135>=e;e++)O_.push(e);class I_ extends x_{constructor(e,t){super(e),this.direction=t,this._buffer=new E_(e.model,e.config.get('typing.undoStep'))}execute(e={}){const t=this.editor.model,n=t.document;t.enqueueChange(this._buffer.batch,(o)=>{this._buffer.lock();const r=new hg(n.selection),i=r.isCollapsed;if(r.isCollapsed&&t.modifySelection(r,{direction:this.direction,unit:e.unit}),this._shouldEntireContentBeReplacedWithParagraph(e.sequence||1))return void this._replaceEntireContentWithParagraph(o);if(r.isCollapsed)return;let a=0;r.getFirstRange().getMinimalFlatRanges().forEach((e)=>{a+=ee(e.getWalker({singleCharacters:!0,ignoreElementEnd:!0,shallow:!0}))}),t.deleteContent(r,{doNotResetEntireContent:i}),this._buffer.input(a),o.setSelection(r),this._buffer.unlock()})}_shouldEntireContentBeReplacedWithParagraph(e){if(1<e)return!1;const t=this.editor.model,n=t.document,o=n.selection,r=t.schema.getLimitElement(o),i=o.isCollapsed&&o.containsEntireContent(r);if(!i)return!1;if(!t.schema.checkChild(r,'paragraph'))return!1;const a=r.getChild(0);return!(a&&'paragraph'===a.name)}_replaceEntireContentWithParagraph(e){const t=this.editor.model,n=t.document,o=n.selection,r=t.schema.getLimitElement(o),i=new sg('paragraph');e.remove(pg.createIn(r)),e.insert(i,r),e.setSelection(i,0)}}class N_ extends bm{constructor(e){super(e);const t=e.document;let n=0;t.on('keyup',(e,t)=>{(t.keyCode==tm.delete||t.keyCode==tm.backspace)&&(n=0)}),t.on('keydown',(e,o)=>{const r={};if(o.keyCode==tm.delete)r.direction='forward',r.unit='character';else if(o.keyCode==tm.backspace)r.direction='backward',r.unit='codePoint';else return;const i=Qu.isMac?o.altKey:o.ctrlKey;r.unit=i?'word':r.unit,r.sequence=++n;let a;t.once('delete',(e)=>a=e,{priority:'highest'}),t.fire('delete',new Mm(t,o.domEvent,r)),a&&a.stop.called&&e.stop()})}observe(){}}class V_ extends xb{static get pluginName(){return'Delete'}init(){const e=this.editor,t=e.editing.view,n=t.document;t.addObserver(N_),e.commands.add('forwardDelete',new I_(e,'forward')),e.commands.add('delete',new I_(e,'backward')),this.listenTo(n,'delete',(n,o)=>{e.execute('forward'==o.direction?'forwardDelete':'delete',{unit:o.unit,sequence:o.sequence}),o.preventDefault(),t.scrollToTheSelection()})}}class L_ extends xb{static get requires(){return[S_,V_]}static get pluginName(){return'Typing'}}class D_ extends x_{constructor(e){super(e),this._stack=[],this._createdBatches=new WeakSet,this.refresh()}refresh(){this.isEnabled=0<this._stack.length}addBatch(e){const t=this.editor.model.document.selection,n={ranges:t.hasOwnRange?Array.from(t.getRanges()):[],isBackward:t.isBackward};this._stack.push({batch:e,selection:n}),this.refresh()}clearStack(){this._stack=[],this.refresh()}_restoreSelection(e,t,n){const o=this.editor.model,r=o.document,i=[];for(const o of e){const e=Dr(o,n),t=e.find((e)=>e.start.root!=r.graveyard);t&&i.push(t)}i.length&&o.change((e)=>{e.setSelection(i,{backward:t})})}_undo(e,t){const n=this.editor.model,o=n.document;this._createdBatches.add(t);const r=e.deltas.slice();r.reverse();for(const i of r)if(i.operations.some((e)=>e.isDocumentOperation)){const e=i.baseVersion+i.operations.length,r=Array.from(o.history.getDeltas(e)),a=n.transformDeltas([i.getReversed()],r,!0),s=a.deltasA;for(const e of s){e.baseVersion=o.version,t.addDelta(e);for(const t of e.operations)n.applyOperation(t);o.history.setDeltaAsUndone(i,e)}}}}class F_ extends D_{execute(e=null){const t=e?this._stack.findIndex((t)=>t.batch==e):this._stack.length-1,n=this._stack.splice(t,1)[0],o=new ob;this.editor.model.enqueueChange(o,()=>{this._undo(n.batch,o);const e=this.editor.model.document.history.getDeltas(n.batch.baseVersion);this._restoreSelection(n.selection.ranges,n.selection.isBackward,e),this.fire('revert',n.batch,o)}),this.refresh()}}class M_ extends D_{execute(){const e=this._stack.pop(),t=new ob;this.editor.model.enqueueChange(t,()=>{const n=e.batch.deltas[e.batch.deltas.length-1],o=n.baseVersion+n.operations.length,r=this.editor.model.document.history.getDeltas(o);this._restoreSelection(e.selection.ranges,e.selection.isBackward,r),this._undo(e.batch,t)}),this.refresh()}}class B_ extends xb{constructor(e){super(e),this._batchRegistry=new WeakSet}init(){const e=this.editor;this._undoCommand=new F_(e),this._redoCommand=new M_(e),e.commands.add('undo',this._undoCommand),e.commands.add('redo',this._redoCommand),this.listenTo(e.model,'applyOperation',(e,t)=>{const n=t[0];if(n.isDocumentOperation){const e=n.delta.batch;this._batchRegistry.has(e)||'transparent'==e.type||(this._redoCommand._createdBatches.has(e)?this._undoCommand.addBatch(e):!this._undoCommand._createdBatches.has(e)&&(this._undoCommand.addBatch(e),this._redoCommand.clearStack()),this._batchRegistry.add(e))}},{priority:'highest'}),this.listenTo(this._undoCommand,'revert',(e,t,n)=>{this._redoCommand.addBatch(n)}),e.keystrokes.set('CTRL+Z','undo'),e.keystrokes.set('CTRL+Y','redo'),e.keystrokes.set('CTRL+SHIFT+Z','redo')}}var q_=i(42),z_=i.n(q_);class j_ extends Ib{constructor(){super();const e=this.bindTemplate;this.set('content',''),this.set('viewBox','0 0 20 20'),this.set('fillColor',''),this.setTemplate({tag:'svg',ns:'http://www.w3.org/2000/svg',attributes:{class:['ck','ck-icon'],viewBox:e.to('viewBox')}})}render(){super.render(),this._updateXMLContent(),this._colorFillPaths(),this.on('change:content',()=>{this._updateXMLContent(),this._colorFillPaths()}),this.on('change:fillColor',()=>{this._colorFillPaths()})}_updateXMLContent(){if(this.content){const e=new DOMParser().parseFromString(this.content.trim(),'image/svg+xml'),t=e.querySelector('svg'),n=t.getAttribute('viewBox');for(n&&(this.viewBox=n),this.element.innerHTML='';0<t.childNodes.length;)this.element.appendChild(t.childNodes[0])}}_colorFillPaths(){this.fillColor&&this.element.querySelectorAll('.ck-icon__fill').forEach((e)=>{e.style.fill=this.fillColor})}}var U_=i(44),H_=i.n(U_);class W_ extends Ib{constructor(e){super(e),this.set('text',''),this.set('position','s');const t=this.bindTemplate;this.setTemplate({tag:'span',attributes:{class:['ck','ck-tooltip',t.to('position',(e)=>'ck-tooltip_'+e),t.if('text','ck-hidden',(e)=>!e.trim())]},children:[{tag:'span',attributes:{class:['ck','ck-tooltip__text']},children:[{text:t.to('text')}]}]})}}var G_=i(46),$_=i.n(G_);class K_ extends Ib{constructor(e){super(e);const t=this.bindTemplate;this.set('icon'),this.set('isEnabled',!0),this.set('isOn',!1),this.set('isVisible',!0),this.set('keystroke'),this.set('label'),this.set('tabindex',-1),this.set('tooltip'),this.set('tooltipPosition','s'),this.set('type','button'),this.set('withText',!1),this.children=this.createCollection(),this.tooltipView=this._createTooltipView(),this.labelView=this._createLabelView(),this.iconView=new j_,this.iconView.extendTemplate({attributes:{class:'ck-button__icon'}}),this.bind('_tooltipString').to(this,'tooltip',this,'label',this,'keystroke',this._getTooltipString.bind(this)),this.setTemplate({tag:'button',attributes:{class:['ck','ck-button',t.to('isEnabled',(e)=>e?'ck-enabled':'ck-disabled'),t.if('isVisible','ck-hidden',(e)=>!e),t.to('isOn',(e)=>e?'ck-on':'ck-off'),t.if('withText','ck-button_with-text')],type:t.to('type',(e)=>e?e:'button'),tabindex:t.to('tabindex')},children:this.children,on:{mousedown:t.to((e)=>{e.preventDefault()}),click:t.to((e)=>{this.isEnabled?this.fire('execute'):e.preventDefault()})}})}render(){super.render(),this.icon&&(this.iconView.bind('content').to(this,'icon'),this.children.add(this.iconView)),this.children.add(this.tooltipView),this.children.add(this.labelView)}focus(){this.element.focus()}_createTooltipView(){const e=new W_;return e.bind('text').to(this,'_tooltipString'),e.bind('position').to(this,'tooltipPosition'),e}_createLabelView(){const e=new Ib;return e.setTemplate({tag:'span',attributes:{class:['ck','ck-button__label']},children:[{text:this.bindTemplate.to('label')}]}),e}_getTooltipString(e,t,n){return e?'string'==typeof e?e:(n&&(n=ae(n)),e instanceof Function?e(t,n):`${t}${n?` (${n})`:''}`):''}}var Z_=i(48),J_=i.n(Z_),Y_=i(49),Q_=i.n(Y_);class X_ extends xb{init(){const e=this.editor,n=e.t;this._addButton('undo',n('w'),'CTRL+Z',J_.a),this._addButton('redo',n('x'),'CTRL+Y',Q_.a)}_addButton(e,t,n,o){const r=this.editor;r.ui.componentFactory.add(e,(i)=>{const a=r.commands.get(e),s=new K_(i);return s.set({label:t,icon:o,keystroke:n,tooltip:!0}),s.bind('isEnabled').to(a,'isEnabled'),this.listenTo(s,'execute',()=>r.execute(e)),s})}}class ek extends xb{static get requires(){return[B_,X_]}static get pluginName(){return'Undo'}}class tk extends xb{static get requires(){return[v_,T_,L_,ek]}static get pluginName(){return'Essentials'}}class nk extends xb{static get pluginName(){return'PendingActions'}init(){this.set('isPending',!1),this._actions=new Wu({idProperty:'_id'}),this._actions.delegate('add','remove').to(this)}add(e){if('string'!=typeof e)throw new bd('pendingactions-add-invalid-message: Message has to be a string.');const t=Object.create(Lu);return t.set('message',e),this._actions.add(t),this.isPending=!0,t}remove(e){this._actions.remove(e),this.isPending=!!this._actions.length}get first(){return this._actions.get(0)}[Symbol.iterator](){return this._actions[Symbol.iterator]()}}class ok{constructor(){const e=new window.FileReader;this._reader=e,this.set('loaded',0),e.onprogress=(e)=>{this.loaded=e.loaded}}get error(){return this._reader.error}read(e){const t=this._reader;return this.total=e.size,new Promise((n,o)=>{t.onload=()=>{n(t.result)},t.onerror=()=>{o('error')},t.onabort=()=>{o('aborted')},this._reader.readAsDataURL(e)})}abort(){this._reader.abort()}}_(ok,Lu);class rk extends xb{static get pluginName(){return'FileRepository'}static get requires(){return[nk]}init(){this.loaders=new Wu,this.loaders.on('add',()=>this._updatePendingAction()),this.loaders.on('remove',()=>this._updatePendingAction()),this._pendingAction=null,this.set('uploaded',0),this.set('uploadTotal',null),this.bind('uploadedPercent').to(this,'uploaded',this,'uploadTotal',(e,t)=>t?100*(e/t):0)}getLoader(e){for(const t of this.loaders)if(t.file==e)return t;return null}createLoader(e){if(!this.createUploadAdapter)return Zm.error('filerepository-no-upload-adapter: Upload adapter is not defined.'),null;const t=new ik(e);return t._adapter=this.createUploadAdapter(t),this.loaders.add(t),t.on('change:uploaded',()=>{let e=0;for(const t of this.loaders)e+=t.uploaded;this.uploaded=e}),t.on('change:uploadTotal',()=>{let e=0;for(const t of this.loaders)t.uploadTotal&&(e+=t.uploadTotal);this.uploadTotal=e}),t}destroyLoader(e){const t=e instanceof ik?e:this.getLoader(e);t._destroy(),this.loaders.remove(t)}_updatePendingAction(){const e=this.editor.plugins.get(nk);if(!this.loaders.length)e.remove(this._pendingAction),this._pendingAction=null;else if(!this._pendingAction){const n=this.editor.t,t=(e)=>`${n('s')} ${parseInt(e)}%.`;this._pendingAction=e.add(t(this.uploadedPercent)),this._pendingAction.bind('message').to(this,'uploadedPercent',t)}}}_(rk,Lu);class ik{constructor(e,t){this.id=s(),this.file=e,this._adapter=t,this._reader=new ok,this.set('status','idle'),this.set('uploaded',0),this.set('uploadTotal',null),this.bind('uploadedPercent').to(this,'uploaded',this,'uploadTotal',(e,t)=>t?100*(e/t):0),this.set('uploadResponse',null)}read(){if('idle'!=this.status)throw new bd('filerepository-read-wrong-status: You cannot call read if the status is different than idle.');return this.status='reading',this._reader.read(this.file).then((e)=>(this.status='idle',e)).catch((e)=>{if('aborted'===e)throw this.status='aborted','aborted';throw this.status='error',this._reader.error})}upload(){if('idle'!=this.status)throw new bd('filerepository-upload-wrong-status: You cannot call upload if the status is different than idle.');return this.status='uploading',this._adapter.upload().then((e)=>(this.uploadResponse=e,this.status='idle',e)).catch((e)=>{if('aborted'===this.status)throw'aborted';throw this.status='error',e})}abort(){const e=this.status;this.status='aborted','reading'==e&&this._reader.abort(),'uploading'==e&&this._adapter.abort&&this._adapter.abort(),this._destroy()}_destroy(){this._reader=void 0,this._adapter=void 0,this.data=void 0,this.uploadResponse=void 0,this.file=void 0}}_(ik,Lu);const ak='ckCsrfToken',sk=40,lk='abcdefghijklmnopqrstuvwxyz0123456789';class dk extends xb{static get requires(){return[rk]}static get pluginName(){return'CKFinderUploadAdapter'}init(){const e=this.editor.config.get('ckfinder.uploadUrl');e&&(this.editor.plugins.get(rk).createUploadAdapter=(t)=>new ck(t,e,this.editor.t))}}class ck{constructor(e,n,o){this.loader=e,this.url=n,this.t=o}upload(){return new Promise((e,t)=>{this._initRequest(),this._initListeners(e,t),this._sendRequest()})}abort(){this.xhr&&this.xhr.abort()}_initRequest(){const e=this.xhr=new XMLHttpRequest;e.open('POST',this.url,!0),e.responseType='json'}_initListeners(e,n){const o=this.xhr,r=this.loader,i=this.t,t=i('a')+` ${r.file.name}.`;o.addEventListener('error',()=>n(t)),o.addEventListener('abort',()=>n()),o.addEventListener('load',()=>{const r=o.response;return r&&r.uploaded?void e({default:r.url}):n(r&&r.error&&r.error.message?r.error.message:t)}),o.upload&&o.upload.addEventListener('progress',(e)=>{e.lengthComputable&&(r.uploadTotal=e.total,r.uploaded=e.loaded)})}_sendRequest(){const e=new FormData;e.append('upload',this.loader.file),e.append('ckCsrfToken',Mr()),this.xhr.send(e)}}class pk{constructor(e,t,n){let o;if('function'==typeof n)o=n;else{o=()=>{e.execute(n)}}e.model.document.on('change',(n,r)=>{if('transparent'==r.type)return;const i=Array.from(e.model.document.differ.getChanges()),a=i[0];if(1!=i.length||'insert'!==a.type||'$text'!=a.name||1!=a.length)return;const s=a.position.textNode||a.position.nodeAfter;if(!s.parent.is('paragraph'))return;const l=t.exec(s.data);l&&e.model.enqueueChange((e)=>{const t=pg.createFromParentsAndOffsets(s.parent,0,s.parent,l[0].length);e.remove(t),o({match:l})})})}}class uk{constructor(e,t,n){let o,r,i,a;t instanceof RegExp?o=t:i=t,'string'==typeof n?r=n:a=n,i=i||((e)=>{let t;const n=[],r=[];for(;null!==(t=o.exec(e))&&!(t&&4>t.length);){let{index:e,1:o,2:i,3:a}=t;e+=t[0].length-(o+i+a).length;const s=[e,e+o.length],l=[e+o.length+i.length,e+o.length+i.length+a.length];n.push(s),n.push(l),r.push([e+o.length,e+o.length+i.length])}return{remove:n,format:r}}),a=a||((e,t)=>{for(const n of t)e.setAttribute(r,!0,n);e.removeSelectionAttribute(r)}),e.model.document.on('change',(t,n)=>{if('transparent'==n.type)return;const o=e.model.document.selection;if(!o.isCollapsed)return;const s=Array.from(e.model.document.differ.getChanges()),l=s[0];if(1!=s.length||'insert'!==l.type||'$text'!=l.name||1!=l.length)return;const d=o.focus.parent,c=jr(d).slice(0,o.focus.offset),p=i(c),u=Ur(d,p.format),m=Ur(d,p.remove);u.length&&m.length&&e.model.enqueueChange((t)=>{const n=e.model.schema.getValidRanges(u,r);a(t,n);for(const e of m.reverse())t.remove(e)})})}}class mk extends xb{static get pluginName(){return'Autoformat'}afterInit(){this._addListAutoformats(),this._addBasicStylesAutoformats(),this._addHeadingAutoformats(),this._addBlockQuoteAutoformats()}_addListAutoformats(){const e=this.editor.commands;e.get('bulletedList')&&new pk(this.editor,/^[*-]\s$/,'bulletedList'),e.get('numberedList')&&new pk(this.editor,/^\d+[.|)]\s$/,'numberedList')}_addBasicStylesAutoformats(){const e=this.editor.commands;e.get('bold')&&(new uk(this.editor,/(\*\*)([^*]+)(\*\*)$/g,'bold'),new uk(this.editor,/(__)([^_]+)(__)$/g,'bold')),e.get('italic')&&(new uk(this.editor,/(?:^|[^*])(\*)([^*_]+)(\*)$/g,'italic'),new uk(this.editor,/(?:^|[^_])(_)([^_]+)(_)$/g,'italic')),e.get('code')&&new uk(this.editor,/(`)([^`]+)(`)$/g,'code')}_addHeadingAutoformats(){const e=this.editor.commands.get('heading');e&&e.modelElements.filter((e)=>e.match(/^heading[1-6]$/)).forEach((e)=>{const t=e[7],n=new RegExp(`^(#{${t}})\\s$`);new pk(this.editor,n,()=>{this.editor.execute('heading',{value:e})})})}_addBlockQuoteAutoformats(){this.editor.commands.get('blockQuote')&&new pk(this.editor,/^>\s$/,'blockQuote')}}class gk extends x_{constructor(e,t){super(e),this.attributeKey=t}refresh(){const e=this.editor.model,t=e.document;this.value=t.selection.hasAttribute(this.attributeKey),this.isEnabled=e.schema.checkAttributeInSelection(t.selection,this.attributeKey)}execute(e={}){const t=this.editor.model,n=t.document,o=n.selection,r=e.forceValue===void 0?!this.value:e.forceValue;t.change((e)=>{if(o.isCollapsed)r?e.setSelectionAttribute(this.attributeKey,!0):e.removeSelectionAttribute(this.attributeKey);else{const n=t.schema.getValidRanges(o.getRanges(),this.attributeKey);for(const t of n)r?e.setAttribute(this.attributeKey,r,t):e.removeAttribute(this.attributeKey,t)}})}}const hk='bold';class fk extends xb{init(){const e=this.editor;e.model.schema.extend('$text',{allowAttributes:hk}),e.conversion.attributeToElement({model:hk,view:'strong',upcastAlso:['b',{styles:{"font-weight":'bold'}}]}),e.commands.add(hk,new gk(e,hk)),e.keystrokes.set('CTRL+B',hk)}}var bk=i(50),_k=i.n(bk);const kk='bold';class wk extends xb{init(){const e=this.editor,n=e.t;e.ui.componentFactory.add(kk,(t)=>{const o=e.commands.get(kk),r=new K_(t);return r.set({label:n('b'),icon:_k.a,keystroke:'CTRL+B',tooltip:!0}),r.bind('isOn','isEnabled').to(o,'value','isEnabled'),this.listenTo(r,'execute',()=>e.execute(kk)),r})}}class yk extends xb{static get requires(){return[fk,wk]}static get pluginName(){return'Bold'}}const vk='italic';class xk extends xb{init(){const e=this.editor;e.model.schema.extend('$text',{allowAttributes:vk}),e.conversion.attributeToElement({model:vk,view:'i',upcastAlso:['em',{styles:{"font-style":'italic'}}]}),e.commands.add(vk,new gk(e,vk)),e.keystrokes.set('CTRL+I',vk)}}var Ck=i(51),Ak=i.n(Ck);const Tk='italic';class Ek extends xb{init(){const e=this.editor,n=e.t;e.ui.componentFactory.add(Tk,(t)=>{const o=e.commands.get(Tk),r=new K_(t);return r.set({label:n('e'),icon:Ak.a,keystroke:'CTRL+I',tooltip:!0}),r.bind('isOn','isEnabled').to(o,'value','isEnabled'),this.listenTo(r,'execute',()=>e.execute(Tk)),r})}}class Pk extends xb{static get requires(){return[xk,Ek]}static get pluginName(){return'Italic'}}class Sk extends x_{refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(){const e=this.editor.model,t=e.document,n=e.schema,o=Array.from(t.selection.getSelectedBlocks());e.change((e)=>{if(this.value)this._removeQuote(e,o.filter(Hr));else{const t=o.filter((e)=>Hr(e)||Gr(n,e));this._applyQuote(e,t)}})}_getValue(){const e=cr(this.editor.model.document.selection.getSelectedBlocks());return!!(e&&Hr(e))}_checkEnabled(){if(this.value)return!0;const e=this.editor.model.document.selection,t=this.editor.model.schema,n=cr(e.getSelectedBlocks());return!!n&&Gr(t,n)}_removeQuote(e,t){Wr(t).reverse().forEach((t)=>{if(t.start.isAtStart&&t.end.isAtEnd)return void e.unwrap(t.start.parent);if(t.start.isAtStart){const n=cg.createBefore(t.start.parent);return void e.move(t,n)}t.end.isAtEnd||e.split(t.end);const n=cg.createAfter(t.end.parent);e.move(t,n)})}_applyQuote(e,t){const n=[];Wr(t).reverse().forEach((t)=>{let o=Hr(t.start);o||(o=new sg('blockQuote'),e.wrap(t,o)),n.push(o)}),n.reverse().reduce((t,n)=>t.nextSibling==n?(e.merge(cg.createAfter(t)),t):n)}}class Rk extends xb{init(){const e=this.editor,t=e.model.schema;e.commands.add('blockQuote',new Sk(e)),t.register('blockQuote',{allowWhere:'$block',allowContentOf:'$root'}),t.addChildCheck((e,t)=>{if(e.endsWith('blockQuote')&&'blockQuote'==t.name)return!1}),e.conversion.elementToElement({model:'blockQuote',view:'blockquote'})}afterInit(){const e=this.editor,t=e.commands.get('blockQuote');this.listenTo(this.editor.editing.view.document,'enter',(e,n)=>{const o=this.editor.model.document,r=o.selection.getLastPosition().parent;o.selection.isCollapsed&&r.isEmpty&&t.value&&(this.editor.execute('blockQuote'),this.editor.editing.view.scrollToTheSelection(),n.preventDefault(),e.stop())})}}var Ok=i(52),Ik=i.n(Ok),Nk=i(53),Vk=i.n(Nk);class Lk extends xb{init(){const e=this.editor,n=e.t;e.ui.componentFactory.add('blockQuote',(t)=>{const o=e.commands.get('blockQuote'),r=new K_(t);return r.set({label:n('d'),icon:Ik.a,tooltip:!0}),r.bind('isOn','isEnabled').to(o,'value','isEnabled'),this.listenTo(r,'execute',()=>e.execute('blockQuote')),r})}}class Dk extends xb{static get requires(){return[Rk,Lk]}static get pluginName(){return'BlockQuote'}}const Fk=/^data:(\S*?);base64,/;class Mk{constructor(e,t,n){if(!e)throw new Error('File must be provided');if(!t)throw new Error('Token must be provided');if(!n)throw new Error('Api address must be provided');this.file=Kr(e)?$r(e):e,this._token=t,this._apiAddress=n}onProgress(e){return this.on('progress',(t,n)=>e(n)),this}onError(e){return this.once('error',(t,n)=>e(n)),this}abort(){this.xhr.abort()}send(){return this._prepareRequest(),this._attachXHRListeners(),this._sendRequest()}_prepareRequest(){const e=new XMLHttpRequest;e.open('POST',this._apiAddress),e.setRequestHeader('Authorization',this._token.value),e.responseType='json',this.xhr=e}_attachXHRListeners(){function e(e){return()=>t.fire('error',e)}const t=this,n=this.xhr;n.addEventListener('error',e('Network Error')),n.addEventListener('abort',e('Abort')),n.upload&&n.upload.addEventListener('progress',(e)=>{e.lengthComputable&&this.fire('progress',{total:e.total,uploaded:e.loaded})}),n.addEventListener('load',()=>{const e=n.status,t=n.response;if(200>e||299<e)return this.fire('error',t.message||t.error)})}_sendRequest(){const e=new FormData,t=this.xhr;return e.append('file',this.file),new Promise((n,o)=>{t.addEventListener('load',()=>{const e=t.status,r=t.response;return 200>e||299<e?o(r.message||r.error):n(r)}),t.addEventListener('error',()=>o('Network Error')),t.addEventListener('abort',()=>o('Abort')),t.send(e)})}}_(Mk,Ad);const Bk={refreshInterval:36e5,autoRefresh:!0};class qk{constructor(e,t=Bk){if(!e)throw new Error('`tokenUrl` must be provided');this.set('value',t.initValue),this._tokenUrl=e,this._options=Object.assign({},Bk,t)}init(){return new Promise((e,t)=>(this._options.autoRefresh&&this._startRefreshing(),this.value?void e(this):void this._refreshToken().then(e).catch(t)))}_refreshToken(){return new Promise((e,t)=>{const n=new XMLHttpRequest;n.open('GET',this._tokenUrl),n.addEventListener('load',()=>{const o=n.status,r=n.response;return 200>o||299<o?t('Cannot download new token!'):(this.set('value',r),e(this))}),n.addEventListener('error',()=>t('Network Error')),n.addEventListener('abort',()=>t('Abort')),n.send()})}_startRefreshing(){this._refreshInterval=setInterval(this._refreshToken.bind(this),this._options.refreshInterval)}_stopRefreshing(){clearInterval(this._refreshInterval)}static create(e,t=Bk){const n=new qk(e,t);return n.init()}}_(qk,Lu);class zk extends xb{init(){const e=this.editor,t=e.config,n=t.get('cloudServices')||{};for(const e in n)this[e]=n[e];return this.tokenUrl?(this.token=new zk.Token(this.tokenUrl),this.token.init()):void(this.token=null)}}zk.Token=qk;class jk extends xb{static get requires(){return[rk,zk]}init(){const e=this.editor,t=e.plugins.get(zk),n=t.token,o=t.uploadUrl;n&&(this._uploadGateway=new jk._UploadGateway(n,o),e.plugins.get(rk).createUploadAdapter=(e)=>new Uk(this._uploadGateway,e))}}class Uk{constructor(e,t){this.uploadGateway=e,this.loader=t}upload(){return this.fileUploader=this.uploadGateway.upload(this.loader.file),this.fileUploader.on('progress',(e,t)=>{this.loader.uploadTotal=t.total,this.loader.uploaded=t.uploaded}),this.fileUploader.send()}abort(){this.fileUploader.abort()}}jk._UploadGateway=class{constructor(e,t){if(!e)throw new Error('Token must be provided');if(!t)throw new Error('Api address must be provided');this._token=e,this._apiAddress=t}upload(e){return new Mk(e,this._token,this._apiAddress)}};class Hk{constructor(){this._stack=[]}add(e,t){const n=this._stack,o=n[0];this._insertDescriptor(e);const r=n[0];o===r||Qr(o,r)||this.fire('change:top',{oldDescriptor:o,newDescriptor:r,writer:t})}remove(e,t){const n=this._stack,o=n[0];this._removeDescriptor(e);const r=n[0];o===r||Qr(o,r)||this.fire('change:top',{oldDescriptor:o,newDescriptor:r,writer:t})}_insertDescriptor(e){const t=this._stack,n=t.findIndex((t)=>t.id===e.id);if(!Qr(e,t[n])){-1<n&&t.splice(n,1);let o=0;for(;t[o]&&Xr(t[o],e);)o++;t.splice(o,0,e)}}_removeDescriptor(e){const t=this._stack,n=t.findIndex((t)=>t.id===e);-1<n&&t.splice(n,1)}}_(Hk,Ad);const Wk=Symbol('isWidget'),Gk=Symbol('label'),$k='ck-widget',Kk='ck-widget_selected',Zk=Symbol('isImage');class Jk extends xb{init(){const e=this.editor,n=e.model.schema,o=e.t,t=e.conversion;n.register('image',{isObject:!0,isBlock:!0,allowWhere:'$block',allowAttributes:['alt','src','srcset']}),t.for('dataDowncast').add(kt({model:'image',view:(e,t)=>ui(t)})),t.for('editingDowncast').add(kt({model:'image',view:(e,t)=>li(ui(t),t,o('c'))})),t.for('downcast').add(Yr('src')).add(Yr('alt')).add(Jr()),t.for('upcast').add(en({view:{name:'img',attributes:{src:!0}},model:(e,t)=>t.createElement('image',{src:e.getAttribute('src')})})).add(nn({view:{name:'img',key:'alt'},model:'alt'})).add(nn({view:{name:'img',key:'srcset'},model:{key:'srcset',value:(e)=>{const t={data:e.getAttribute('srcset')};return e.hasAttribute('width')&&(t.width=e.getAttribute('width')),t}}})).add(Zr())}}class Yk extends Bm{constructor(e){super(e),this.domEventType='mousedown'}onDomEvent(e){this.fire(e.type,e)}}var Qk=i(55),Xk=i.n(Qk);const ew=ie('Ctrl+A');class tw extends xb{static get pluginName(){return'Widget'}init(){const e=this.editor.editing.view,t=e.document;this._previouslySelected=new Set,this.editor.editing.downcastDispatcher.on('selection',(e,t,n)=>{this._clearPreviouslySelectedWidgets(n.writer);const o=n.writer,r=o.document.selection,i=r.getSelectedElement();for(const a of r.getRanges())for(const e of a){const t=e.item;t.is('element')&&ti(t)&&(o.addClass(Kk,t),this._previouslySelected.add(t),t==i&&o.setSelection(r.getRanges(),{fake:!0,label:ii(i)}))}},{priority:'low'}),e.addObserver(Yk),this.listenTo(t,'mousedown',(...e)=>this._onMousedown(...e)),this.listenTo(t,'keydown',(...e)=>this._onKeydown(...e),{priority:'high'}),this.listenTo(t,'delete',(e,t)=>{this._handleDelete('forward'==t.direction)&&(t.preventDefault(),e.stop())},{priority:'high'})}_onMousedown(e,t){const n=this.editor,o=n.editing.view,r=o.document;let i=t.target;if(!hi(i)&&(ti(i)||(i=i.findAncestor(ti),!!i))){t.preventDefault(),r.isFocused||o.focus();const e=n.editing.mapper.toModelElement(i);this._setSelectionOverElement(e)}}_onKeydown(e,t){const n=t.keyCode,o=n==tm.delete||n==tm.arrowdown||n==tm.arrowright;let r=!1;mi(n)?r=this._handleArrowKeys(o):gi(t)&&(r=this._selectAllNestedEditableContent()||this._selectAllContent()),r&&(t.preventDefault(),e.stop())}_handleDelete(e){if(this.editor.isReadOnly)return;const t=this.editor.model.document,n=t.selection;if(!n.isCollapsed)return;const o=this._getObjectElementNextToSelection(e);if(o)return this.editor.model.change((e)=>{for(let t=n.anchor.parent;t.isEmpty;){const n=t;t=n.parent,e.remove(n)}this._setSelectionOverElement(o)}),!0}_handleArrowKeys(e){const t=this.editor.model,n=t.schema,o=t.document,r=o.selection,i=r.getSelectedElement();if(i&&n.isObject(i)){const o=e?r.getLastPosition():r.getFirstPosition(),i=n.getNearestSelectionRange(o,e?'forward':'backward');return i&&t.change((e)=>{e.setSelection(i)}),!0}if(r.isCollapsed){const t=this._getObjectElementNextToSelection(e);if(t instanceof sg&&n.isObject(t))return this._setSelectionOverElement(t),!0}}_selectAllNestedEditableContent(){const e=this.editor.model,t=e.document.selection,n=e.schema.getLimitElement(t);return t.getFirstRange().root!=n&&(e.change((e)=>{e.setSelection(pg.createIn(n))}),!0)}_selectAllContent(){const e=this.editor.model,t=this.editor.editing,n=t.view,o=n.document,r=o.selection,i=r.getSelectedElement();if(i&&ti(i)){const n=t.mapper.toModelElement(i.parent);return e.change((e)=>{e.setSelection(pg.createIn(n))}),!0}return!1}_setSelectionOverElement(e){this.editor.model.change((t)=>{t.setSelection(pg.createOn(e))})}_getObjectElementNextToSelection(e){const t=this.editor.model,n=t.schema,o=t.document.selection,r=new hg(o);t.modifySelection(r,{direction:e?'forward':'backward'});const i=e?r.focus.nodeBefore:r.focus.nodeAfter;return i instanceof sg&&n.isObject(i)?i:null}_clearPreviouslySelectedWidgets(e){for(const t of this._previouslySelected)e.removeClass(Kk,t);this._previouslySelected.clear()}}class nw extends x_{refresh(){const e=this.editor.model.document.selection.getSelectedElement();this.isEnabled=pi(e),this.value=!!(pi(e)&&e.hasAttribute('alt'))&&e.getAttribute('alt')}execute(e){const t=this.editor.model,n=t.document.selection.getSelectedElement();t.change((t)=>{t.setAttribute('alt',e.newValue,n)})}}class ow extends xb{init(){this.editor.commands.add('imageTextAlternative',new nw(this.editor))}}class rw extends Ib{constructor(e,t){super(e);const n=`ck-input-${s()}`;this.set('label'),this.set('value'),this.set('isReadOnly',!1),this.labelView=this._createLabelView(n),this.inputView=this._createInputView(t,n);const o=this.bindTemplate;this.setTemplate({tag:'div',attributes:{class:['ck','ck-labeled-input',o.if('isReadOnly','ck-disabled')]},children:[this.labelView,this.inputView]})}_createLabelView(e){const t=new l_(this.locale);return t.for=e,t.bind('text').to(this,'label'),t}_createInputView(e,t){const n=new e(this.locale);return n.id=t,n.bind('value').to(this),n.bind('isReadOnly').to(this),n}select(){this.inputView.select()}focus(){this.inputView.focus()}}var iw=i(57),aw=i.n(iw);class sw extends Ib{constructor(e){super(e),this.set('value'),this.set('id'),this.set('placeholder'),this.set('isReadOnly',!1);const t=this.bindTemplate;this.setTemplate({tag:'input',attributes:{type:'text',class:['ck','ck-input','ck-input-text'],id:t.to('id'),placeholder:t.to('placeholder'),readonly:t.to('isReadOnly')}})}render(){super.render();const e=(e)=>{this.element.value=e||0===e?e:''};e(this.value),this.on('change:value',(t,n,o)=>{e(o)})}select(){this.element.select()}focus(){this.element.focus()}}var lw=i(9),dw=i.n(lw),cw=i(10),pw=i.n(cw),uw=i(59),mw=i.n(uw);class gw extends Ib{constructor(e){super(e);const n=this.locale.t;this.focusTracker=new Bb,this.keystrokes=new _b,this.labeledInput=this._createLabeledInputView(),this.saveButtonView=this._createButton(n('y'),dw.a,'ck-button-save'),this.saveButtonView.type='submit',this.cancelButtonView=this._createButton(n('z'),pw.a,'ck-button-cancel','cancel'),this._focusables=new Cb,this._focusCycler=new qb({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:'shift + tab',focusNext:'tab'}}),this.setTemplate({tag:'form',attributes:{class:['ck','ck-text-alternative-form'],tabindex:'-1'},children:[this.labeledInput,this.saveButtonView,this.cancelButtonView]})}render(){super.render(),this.keystrokes.listenTo(this.element),bi({view:this}),[this.labeledInput,this.saveButtonView,this.cancelButtonView].forEach((e)=>{this._focusables.add(e),this.focusTracker.add(e.element)})}_createButton(e,t,n,o){const r=new K_(this.locale);return r.set({label:e,icon:t,tooltip:!0}),r.extendTemplate({attributes:{class:n}}),o&&r.delegate('execute').to(this,o),r}_createLabeledInputView(){const e=this.locale.t,t=new rw(this.locale,sw);return t.label=e('aa'),t.inputView.placeholder=e('aa'),t}}var hw=i(61),fw=i.n(hw);class bw extends xb{static get requires(){return[Mb]}init(){this._createButton(),this._createForm()}_createButton(){const e=this.editor,n=e.t;e.ui.componentFactory.add('imageTextAlternative',(t)=>{const o=e.commands.get('imageTextAlternative'),r=new K_(t);return r.set({label:n('t'),icon:fw.a,tooltip:!0}),r.bind('isEnabled').to(o,'isEnabled'),this.listenTo(r,'execute',()=>this._showForm()),r})}_createForm(){const e=this.editor,t=e.editing.view,n=t.document;this._balloon=this.editor.plugins.get('ContextualBalloon'),this._form=new gw(e.locale),this._form.render(),this.listenTo(this._form,'submit',()=>{e.execute('imageTextAlternative',{newValue:this._form.labeledInput.inputView.element.value}),this._hideForm(!0)}),this.listenTo(this._form,'cancel',()=>{this._hideForm(!0)}),this._form.keystrokes.set('Esc',(e,t)=>{this._hideForm(!0),t()}),this.listenTo(t,'render',()=>{ci(n.selection)?this._isVisible&&_i(e):this._hideForm(!0)}),fi({emitter:this._form,activator:()=>this._isVisible,contextElements:[this._form.element],callback:()=>this._hideForm()})}_showForm(){if(!this._isVisible){const e=this.editor,t=e.commands.get('imageTextAlternative'),n=this._form.labeledInput;this._balloon.hasView(this._form)||this._balloon.add({view:this._form,position:ki(e)}),n.value=n.inputView.element.value=t.value||'',this._form.labeledInput.select()}}_hideForm(e){this._isVisible&&(this._balloon.remove(this._form),e&&this.editor.editing.view.focus())}get _isVisible(){return this._balloon.visibleView==this._form}}class _w extends xb{static get requires(){return[ow,bw]}static get pluginName(){return'ImageTextAlternative'}}var kw=i(62),ww=i.n(kw);class yw extends xb{static get requires(){return[Jk,tw,_w]}static get pluginName(){return'Image'}}class vw extends Ib{constructor(e){super(e),this.buttonView=new K_(e),this._fileInputView=new xw(e),this._fileInputView.bind('acceptedType').to(this),this._fileInputView.bind('allowMultipleFiles').to(this),this._fileInputView.delegate('done').to(this),this.setTemplate({tag:'span',attributes:{class:'ck-file-dialog-button'},children:[this.buttonView,this._fileInputView]}),this.buttonView.on('execute',()=>{this._fileInputView.open()})}focus(){this.buttonView.focus()}}class xw extends Ib{constructor(e){super(e),this.set('acceptedType'),this.set('allowMultipleFiles',!1);const t=this.bindTemplate;this.setTemplate({tag:'input',attributes:{class:['ck-hidden'],type:'file',tabindex:'-1',accept:t.to('acceptedType'),multiple:t.to('allowMultipleFiles')},on:{change:t.to(()=>{this.element&&this.element.files&&this.element.files.length&&this.fire('done',this.element.files),this.element.value=''})}})}open(){this.element.click()}}var Cw=i(64),Aw=i.n(Cw);class Tw extends xb{init(){const e=this.editor,n=e.t;e.ui.componentFactory.add('imageUpload',(t)=>{const o=new vw(t),r=e.commands.get('imageUpload');return o.set({acceptedType:'image/*',allowMultipleFiles:!0}),o.buttonView.set({label:n('n'),icon:Aw.a,tooltip:!0}),o.buttonView.bind('isEnabled').to(r),o.on('done',(t,n)=>{for(const o of Array.from(n)){const t=yi(e.model.document.selection);wi(o)&&e.execute('imageUpload',{file:o,insertAt:t})}}),o})}}var Ew=i(65),Pw=i.n(Ew),Sw=i(66),Rw=i.n(Sw),Ow=i(68),Iw=i.n(Ow);class Nw extends xb{constructor(e){super(e),this.placeholder='data:image/svg+xml;utf8,'+encodeURIComponent(Pw.a)}init(){const e=this.editor;e.editing.downcastDispatcher.on('attribute:uploadStatus:image',(...e)=>this.uploadStatusChange(...e))}uploadStatusChange(e,t,n){const o=this.editor,r=t.item,i=r.getAttribute('uploadId');if(n.consumable.consume(t.item,e.name)){const e=o.plugins.get(rk),a=i?t.attributeNewValue:null,s=this.placeholder,l=o.editing.mapper.toViewElement(r),d=n.writer;if('reading'==a)return vi(l,d),void Ci(s,l,d);if('uploading'==a){const t=e.loaders.get(i);return vi(l,d),void(t?(Ai(l,d),Ti(l,d,t,o.editing.view)):Ci(s,l,d))}'complete'==a&&e.loaders.get(i)&&Pi(l,d,o.editing.view),Ei(l,d),Ai(l,d),xi(l,d)}}}const Vw=Symbol('progress-bar');class Lw extends x_{execute(e){const t=this.editor,n=t.model.document,o=e.file,r=t.plugins.get(rk);t.model.change((i)=>{const a=r.createLoader(o);if(!a)return;const s=new sg('image',{uploadId:a.id});let l;l=e.insertAt?new hg([new pg(e.insertAt)]):n.selection,t.model.insertContent(s,l),s.parent&&i.setSelection(pg.createOn(s))})}}class Dw extends xb{static get pluginName(){return'Notification'}init(){this.on('show:warning',(e,t)=>{window.alert(t.message)},{priority:'lowest'})}showSuccess(e,t={}){this._showNotification({message:e,type:'success',namespace:t.namespace,title:t.title})}showInfo(e,t={}){this._showNotification({message:e,type:'info',namespace:t.namespace,title:t.title})}showWarning(e,t={}){this._showNotification({message:e,type:'warning',namespace:t.namespace,title:t.title})}_showNotification(e){const t=`show:${e.type}`+(e.namespace?`:${e.namespace}`:'');this.fire(t,{message:e.message,type:e.type,title:e.title||''})}}class Fw extends xb{static get requires(){return[rk,Dw]}init(){const e=this.editor,t=e.model.document,n=e.model.schema,o=e.plugins.get(rk);n.extend('image',{allowAttributes:['uploadId','uploadStatus']}),e.commands.add('imageUpload',new Lw(e)),e.editing.view.document.on('clipboardInput',(n,o)=>{if(Oi(o.dataTransfer))return;let r=new hg(o.targetRanges.map((t)=>e.editing.mapper.toModelRange(t)));for(const i of o.dataTransfer.files){const o=yi(r);wi(i)&&(e.execute('imageUpload',{file:i,insertAt:o}),n.stop()),r=t.selection}}),e.editing.view.document.on('dragover',(e,t)=>{t.preventDefault()}),t.on('change',()=>{const e=t.differ.getChanges({includeChangesInGraveyard:!0});for(const t of e)if('insert'==t.type&&'image'==t.name){const e=t.position.nodeAfter,n='$graveyard'==t.position.root.rootName,r=e.getAttribute('uploadId');if(!r)continue;const i=o.loaders.get(r);if(!i)continue;n?i.abort():'idle'==i.status&&this._load(i,e)}})}_load(e,n){function o(){i.enqueueChange('transparent',(e)=>{e.removeAttribute('uploadId',n),e.removeAttribute('uploadStatus',n)}),t.destroyLoader(e)}const r=this.editor,i=r.model,a=r.locale.t,t=r.plugins.get(rk),s=r.plugins.get(Dw);return i.enqueueChange('transparent',(e)=>{e.setAttribute('uploadStatus','reading',n)}),e.read().then((t)=>{const o=r.editing.mapper.toViewElement(n),a=o.getChild(0),s=e.upload();return r.editing.view.change((e)=>{e.setAttribute('src',t,a)}),i.enqueueChange('transparent',(e)=>{e.setAttribute('uploadStatus','uploading',n)}),s}).then((e)=>{i.enqueueChange('transparent',(t)=>{t.setAttributes({uploadStatus:'complete',src:e.default},n);let o=0;const r=Object.keys(e).filter((e)=>{const t=parseInt(e,10);if(!isNaN(t))return o=rd(o,t),!0}).map((t)=>`${e[t]} ${t}w`).join(', ');''!=r&&t.setAttribute('srcset',{data:r,width:o},n)}),o()}).catch((t)=>{if('error'!==e.status&&'aborted'!==e.status)throw t;'error'==e.status&&s.showWarning(t,{title:a('o'),namespace:'upload'}),o(),i.enqueueChange('transparent',(e)=>{e.remove(n)})})}}class Mw extends xb{static get pluginName(){return'ImageUpload'}static get requires(){return[Fw,Tw,Nw]}}class Bw extends xb{static get requires(){return[jk,yw,Mw]}static get pluginName(){return'EasyImage'}}class qw extends x_{refresh(){const e=this.editor.model,t=e.document,n=cr(t.selection.getSelectedBlocks());this.value=!!n&&n.is('paragraph'),this.isEnabled=!!n&&Ii(n,e.schema)}execute(e={}){const t=this.editor.model,n=t.document;t.change((o)=>{const r=(e.selection||n.selection).getSelectedBlocks();for(const e of r)!e.is('paragraph')&&Ii(e,t.schema)&&o.rename(e,'paragraph')})}}class zw extends xb{static get pluginName(){return'Paragraph'}init(){const e=this.editor,t=e.model,n=e.data;e.commands.add('paragraph',new qw(e)),t.schema.register('paragraph',{inheritAllFrom:'$block'}),e.conversion.elementToElement({model:'paragraph',view:'p'}),n.upcastDispatcher.on('element',(e,t,n)=>{if(n.consumable.test(t.viewItem,{name:t.viewItem.name}))if(zw.paragraphLikeElements.has(t.viewItem.name)){if(t.viewItem.isEmpty)return;const e=n.writer.createElement('paragraph'),o=n.splitToAllowedParent(e,t.modelCursor);if(!o)return;n.writer.insert(e,o.position);const{modelRange:r}=n.convertChildren(t.viewItem,cg.createAt(e));t.modelRange=new pg(cg.createBefore(e),r.end),t.modelCursor=t.modelRange.end}else Vi(t.viewItem,t.modelCursor,n.schema)&&(t=Object.assign(t,Ni(t.viewItem,t.modelCursor,n)))},{priority:'low'}),n.upcastDispatcher.on('text',(e,t,n)=>{t.modelRange||Vi(t.viewItem,t.modelCursor,n.schema)&&(t=Object.assign(t,Ni(t.viewItem,t.modelCursor,n)))},{priority:'lowest'}),t.document.registerPostFixer((e)=>this._autoparagraphEmptyRoots(e)),e.on('dataReady',()=>{t.enqueueChange('transparent',(e)=>this._autoparagraphEmptyRoots(e))},{priority:'lowest'})}_autoparagraphEmptyRoots(e){const t=this.editor.model;for(const n of t.document.getRootNames()){const o=t.document.getRoot(n);if(o.isEmpty&&'$graveyard'!=o.rootName&&t.schema.checkChild(o,'paragraph'))return e.insertElement('paragraph',o),!0}}}zw.paragraphLikeElements=new Set(['blockquote','dd','div','dt','h1','h2','h3','h4','h5','h6','li','p','td']);class jw extends x_{constructor(e,t){super(e),this.modelElements=t}refresh(){const e=cr(this.editor.model.document.selection.getSelectedBlocks());this.value=!!e&&this.modelElements.includes(e.name)&&e.name,this.isEnabled=!!e&&this.modelElements.some((t)=>Li(e,t,this.editor.model.schema))}execute(e){const t=this.editor.model,n=t.document,o=e.value;t.change((e)=>{const r=Array.from(n.selection.getSelectedBlocks()).filter((e)=>Li(e,o,t.schema));for(const t of r)t.is(o)||e.rename(t,o)})}}const Uw='paragraph';class Hw extends xb{constructor(e){super(e),e.config.define('heading',{options:[{model:'paragraph',title:'Paragraph',class:'ck-heading_paragraph'},{model:'heading1',view:'h2',title:'Heading 1',class:'ck-heading_heading1'},{model:'heading2',view:'h3',title:'Heading 2',class:'ck-heading_heading2'},{model:'heading3',view:'h4',title:'Heading 3',class:'ck-heading_heading3'}]})}static get requires(){return[zw]}init(){const e=this.editor,t=e.config.get('heading.options'),n=[];for(const o of t)o.model!==Uw&&(e.model.schema.register(o.model,{inheritAllFrom:'$block'}),e.conversion.elementToElement(o),n.push(o.model));e.commands.add('heading',new jw(e,n))}afterInit(){const e=this.editor,t=e.commands.get('enter'),n=e.config.get('heading.options');t&&this.listenTo(t,'afterExecute',(t,o)=>{const r=e.model.document.selection.getFirstPosition().parent,i=n.some((e)=>r.is(e.model));i&&!r.is(Uw)&&0===r.childCount&&o.writer.rename(r,Uw)})}}class Ww{constructor(e,t){t&&Ru(this,t),e&&this.set(e)}}_(Ww,Lu);class Gw extends Ib{constructor(e){super(e);const t=this.bindTemplate;this.set('isVisible',!1),this.children=this.createCollection(),this.setTemplate({tag:'div',attributes:{class:['ck','ck-reset','ck-dropdown__panel',t.if('isVisible','ck-dropdown__panel-visible')]},children:this.children,on:{selectstart:t.to((e)=>e.preventDefault())}})}focus(){this.children.length&&this.children.first.focus()}focusLast(){if(this.children.length){const e=this.children.last;'function'==typeof e.focusLast?e.focusLast():e.focus()}}}var $w=i(70),Kw=i.n($w);class Zw extends Ib{constructor(e,t,n){super(e);const o=this.bindTemplate;this.buttonView=t,this.panelView=n,this.set('isOpen',!1),this.set('isEnabled',!0),this.focusTracker=new Bb,this.keystrokes=new _b,this.setTemplate({tag:'div',attributes:{class:['ck','ck-dropdown',o.to('isEnabled',(e)=>e?'':'ck-disabled')]},children:[t,n]}),t.extendTemplate({attributes:{class:['ck-dropdown__button']}})}render(){super.render(),this.listenTo(this.buttonView,'open',()=>{this.isOpen=!this.isOpen}),this.panelView.bind('isVisible').to(this,'isOpen'),this.keystrokes.listenTo(this.element),this.focusTracker.add(this.element);const e=(e,t)=>{this.isOpen&&(this.buttonView.focus(),this.isOpen=!1,t())};this.keystrokes.set('arrowdown',(e,t)=>{this.buttonView.isEnabled&&!this.isOpen&&(this.isOpen=!0,t())}),this.keystrokes.set('arrowright',(e,t)=>{this.isOpen&&t()}),this.keystrokes.set('arrowleft',e),this.keystrokes.set('esc',e)}focus(){this.buttonView.focus()}}var Jw=i(72),Yw=i.n(Jw);class Qw extends K_{constructor(e){super(e),this.arrowView=this._createArrowView(),this.delegate('execute').to(this,'open')}render(){super.render(),this.children.add(this.arrowView)}_createArrowView(){const e=new j_;return e.content=Yw.a,e.extendTemplate({attributes:{class:'ck-dropdown__arrow'}}),e}}var Xw=i(73),ey=i.n(Xw);class ty extends Ib{constructor(){super(),this.items=this.createCollection(),this.focusTracker=new Bb,this.keystrokes=new _b,this._focusCycler=new qb({focusables:this.items,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:'arrowup',focusNext:'arrowdown'}}),this.setTemplate({tag:'ul',attributes:{class:['ck','ck-reset','ck-list']},children:this.items})}render(){super.render();for(const e of this.items)this.focusTracker.add(e.element);this.items.on('add',(e,t)=>{this.focusTracker.add(t.element)}),this.items.on('remove',(e,t)=>{this.focusTracker.remove(t.element)}),this.keystrokes.listenTo(this.element)}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}}class ny extends Ib{constructor(){super(),this.set('tabindex',-1),this.keystrokes=new _b;const e=this.bindTemplate;this.setTemplate({tag:'li',attributes:{class:['ck','ck-list__item',e.to('class'),e.if('isActive','ck-list__item_active')],style:e.to('style'),tabindex:e.to('tabindex')},children:[{text:e.to('label')}],on:{click:e.to('execute')}})}render(){super.render();const e=(e,t)=>{this.fire('execute'),t()};this.keystrokes.listenTo(this.element),this.keystrokes.set('Enter',e),this.keystrokes.set('Space',e)}focus(){this.element.focus()}}var oy=i(75),ry=i.n(oy),iy=i(77),ay=i.n(iy),sy=i(11),ly=i.n(sy);class dy extends xb{init(){const e=this.editor,n=e.t,t=ji(e),o=n('g'),r=n('h');e.ui.componentFactory.add('heading',(n)=>{const i={},a=new Wu,s=e.commands.get('heading'),l=e.commands.get('paragraph'),d=[s];for(const e of t){const t=new Ww({label:e.title,class:e.class});'paragraph'===e.model?(t.bind('isActive').to(l,'value'),t.set('commandName','paragraph'),d.push(l)):(t.bind('isActive').to(s,'value',(t)=>t===e.model),t.set({commandName:'heading',commandValue:e.model})),a.add(t),i[e.model]=e.title}const c=Di(n);return Fi(c,a),c.buttonView.set({isOn:!1,withText:!0,tooltip:r}),c.extendTemplate({attributes:{class:['ck-heading-dropdown']}}),c.bind('isEnabled').toMany(d,'isEnabled',(...e)=>e.some((e)=>e)),c.buttonView.bind('label').to(s,'value',l,'value',(e,t)=>{const n=e||t&&'paragraph';return i[n]?i[n]:o}),this.listenTo(c,'execute',(t)=>{e.execute(t.source.commandName,t.source.commandValue?{value:t.source.commandValue}:void 0),e.editing.view.focus()}),c})}}class cy extends xb{static get requires(){return[Hw,dy]}static get pluginName(){return'Heading'}}var py=i(80),uy=i.n(py);const my=new WeakMap,gy=Symbol('imageCaption');class hy extends xb{init(){const e=this.editor,n=e.editing.view,o=e.model.schema,r=e.data,i=e.editing,a=e.t;o.register('caption',{allowIn:'image',allowContentOf:'$block',isLimit:!0}),e.model.document.registerPostFixer((e)=>this._insertMissingModelCaptionElement(e)),e.conversion.for('upcast').add(en({view:Ki,model:'caption'}));r.downcastDispatcher.on('insert:caption',Zi((e)=>e.createContainerElement('figcaption'),!1));const t=Gi(n,a('f'));i.downcastDispatcher.on('insert:caption',Zi(t)),i.downcastDispatcher.on('insert',this._fixCaptionVisibility((e)=>e.item),{priority:'high'}),i.downcastDispatcher.on('remove',this._fixCaptionVisibility((e)=>e.position.parent),{priority:'high'}),n.document.registerPostFixer((e)=>this._updateCaptionVisibility(e))}_updateCaptionVisibility(e){const t=this.editor.editing.mapper,n=this._lastSelectedCaption;let o;const r=this.editor.model.document.selection,i=r.getSelectedElement();if(i&&i.is('image')){const e=$i(i);o=t.toViewElement(e)}const a=r.getFirstPosition(),s=Yi(a.parent);if(s&&(o=t.toViewElement(s)),o)return n?n===o?Xi(o,e):(Qi(n,e),this._lastSelectedCaption=o,Xi(o,e)):(this._lastSelectedCaption=o,Xi(o,e));if(n){const t=Qi(n,e);return this._lastSelectedCaption=null,t}return!1}_fixCaptionVisibility(e){return(t,n,o)=>{const r=e(n),i=Yi(r),a=this.editor.editing.mapper,s=o.writer;if(i){const e=a.toViewElement(i);e&&(i.childCount?s.removeClass('ck-hidden',e):s.addClass('ck-hidden',e))}}}_insertMissingModelCaptionElement(e){const t=this.editor.model,n=t.document.differ.getChanges();for(const t of n)if('insert'==t.type&&'image'==t.name){const n=t.position.nodeAfter;if(!$i(n))return e.appendElement('caption',n),!0}}}var fy=i(82),by=i.n(fy);class _y extends xb{static get requires(){return[hy]}static get pluginName(){return'ImageCaption'}}class ky extends x_{constructor(e,t){super(e),this._defaultStyle=!1,this.styles=t.reduce((e,t)=>(e[t.name]=t,t.isDefault&&(this._defaultStyle=t.name),e),{})}refresh(){const e=this.editor.model.document.selection.getSelectedElement();if(this.isEnabled=pi(e),!e)this.value=!1;else if(e.hasAttribute('imageStyle')){const t=e.getAttribute('imageStyle');this.value=!!this.styles[t]&&t}else this.value=this._defaultStyle}execute(e){const t=e.value,n=this.editor.model,o=n.document.selection.getSelectedElement();n.change((e)=>{this.styles[t].isDefault?e.removeAttribute('imageStyle',o):e.setAttribute('imageStyle',t,o)})}}var wy=i(84),yy=i.n(wy),vy=i(12),xy=i.n(vy),Cy=i(13),Ay=i.n(Cy),Ty=i(14),Ey=i.n(Ty);const Py={full:{name:'full',title:'Full size image',icon:yy.a,isDefault:!0},side:{name:'side',title:'Side image',icon:Ey.a,className:'image-style-side'},alignLeft:{name:'alignLeft',title:'Left aligned image',icon:xy.a,className:'image-style-align-left'},alignCenter:{name:'alignCenter',title:'Centered image',icon:Ay.a,className:'image-style-align-center'},alignRight:{name:'alignRight',title:'Right aligned image',icon:Ey.a,className:'image-style-align-right'}},Sy={full:yy.a,left:xy.a,right:Ey.a,center:Ay.a};class Ry extends xb{static get requires(){return[Jk]}static get pluginName(){return'ImageStyleEditing'}init(){const e=this.editor,t=e.model.schema,n=e.data,o=e.editing;e.config.define('image.styles',['full','side']);const r=oa(e.config.get('image.styles'));t.extend('image',{allowAttributes:'imageStyle'});const i=ea(r);o.downcastDispatcher.on('attribute:imageStyle:image',i),n.downcastDispatcher.on('attribute:imageStyle:image',i),n.upcastDispatcher.on('element:figure',ta(r),{priority:'low'}),e.commands.add('imageStyle',new ky(e,r))}}var Oy=i(85),Iy=i.n(Oy);class Ny extends xb{get localizedDefaultStylesTitles(){const e=this.editor.t;return{"Full size image":e('i'),"Side image":e('j'),"Left aligned image":e('k'),"Centered image":e('l'),"Right aligned image":e('m')}}init(){const e=this.editor,t=e.config.get('image.styles'),n=ia(oa(t),this.localizedDefaultStylesTitles);for(const e of n)this._createButton(e)}_createButton(e){const t=this.editor,n=`imageStyle:${e.name}`;t.ui.componentFactory.add(n,(n)=>{const o=t.commands.get('imageStyle'),r=new K_(n);return r.set({label:e.title,icon:e.icon,tooltip:!0}),r.bind('isEnabled').to(o,'isEnabled'),r.bind('isOn').to(o,'value',(t)=>t===e.name),this.listenTo(r,'execute',()=>t.execute('imageStyle',{value:e.name})),r})}}class Vy extends xb{static get requires(){return[Ry,Ny]}static get pluginName(){return'ImageStyle'}}class Ly extends xb{static get requires(){return[Mb]}static get pluginName(){return'ImageToolbar'}init(){const e=this.editor,t=e.plugins.get('BalloonToolbar');t&&this.listenTo(t,'show',(t)=>{ci(e.editing.view.document.selection)&&t.stop()},{priority:'high'})}afterInit(){const e=this.editor,t=e.config.get('image.toolbar');t&&t.length&&(this._balloon=this.editor.plugins.get('ContextualBalloon'),this._toolbar=new Hb,this._toolbar.fillFromConfig(t,e.ui.componentFactory),this.listenTo(e.editing.view,'render',()=>{this._checkIsVisible()}),this.listenTo(e.ui.focusTracker,'change:isFocused',()=>{this._checkIsVisible()},{priority:'low'}))}_checkIsVisible(){const e=this.editor;e.ui.focusTracker.isFocused?ci(e.editing.view.document.selection)?this._showToolbar():this._hideToolbar():this._hideToolbar()}_showToolbar(){const e=this.editor;this._isVisible?_i(e):!this._balloon.hasView(this._toolbar)&&this._balloon.add({view:this._toolbar,position:ki(e),balloonClassName:'ck-toolbar-container'})}_hideToolbar(){this._isVisible&&this._balloon.remove(this._toolbar)}get _isVisible(){return this._balloon.visibleView==this._toolbar}}class Dy extends x_{refresh(){const e=this.editor.model,t=e.document;this.value=t.selection.getAttribute('linkHref'),this.isEnabled=e.schema.checkAttributeInSelection(t.selection,'linkHref')}execute(e){const t=this.editor.model,n=t.document.selection;t.change((o)=>{if(n.isCollapsed){const t=n.getFirstPosition();if(n.hasAttribute('linkHref')){const t=aa(n.getFirstPosition(),n.getAttribute('linkHref'));o.setAttribute('linkHref',e,t),o.setSelection(t)}else if(''!==e){const r=lt(n.getAttributes());r.set('linkHref',e);const i=o.createText(e,r);o.insert(i,t),o.setSelection(pg.createOn(i))}}else{const r=t.schema.getValidRanges(n.getRanges(),'linkHref');for(const t of r)o.setAttribute('linkHref',e,t)}})}}class Fy extends x_{refresh(){this.isEnabled=this.editor.model.document.selection.hasAttribute('linkHref')}execute(){const e=this.editor.model,t=e.document.selection;e.change((e)=>{const n=t.isCollapsed?[aa(t.getFirstPosition(),t.getAttribute('linkHref'))]:t.getRanges();for(const t of n)e.removeAttribute('linkHref',t)})}}const My=Symbol('linkElement'),By=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,qy=/^(?:(?:https?|ftps?|mailto):|[^a-z]|[a-z+.-]+(?:[^a-z+.:-]|$))/i;class zy{constructor(e,t,n){this.model=e,this.attribute=n,this._modelSelection=e.document.selection,this._overrideUid=null,this._isNextGravityRestorationSkipped=!1,t.listenTo(this._modelSelection,'change:range',(e,t)=>this._isNextGravityRestorationSkipped?void(this._isNextGravityRestorationSkipped=!1):void(!this._isGravityOverridden||!t.directChange&&ma(this._modelSelection.getFirstPosition(),n)||this._restoreGravity()))}handleForwardMovement(e,t){const n=this.attribute;return this._isGravityOverridden||e.isAtStart&&this._hasSelectionAttribute?void 0:fa(e,n)&&this._hasSelectionAttribute?(this._preventCaretMovement(t),this._removeSelectionAttribute(),!0):ga(e,n)?(this._preventCaretMovement(t),this._overrideGravity(),!0):ha(e,n)&&this._hasSelectionAttribute?(this._preventCaretMovement(t),this._overrideGravity(),!0):void 0}handleBackwardMovement(e,t){const n=this.attribute;if(this._isGravityOverridden)return fa(e,n)&&this._hasSelectionAttribute?(this._preventCaretMovement(t),this._restoreGravity(),this._removeSelectionAttribute(),!0):(this._preventCaretMovement(t),this._restoreGravity(),e.isAtStart&&this._removeSelectionAttribute(),!0);return fa(e,n)&&!this._hasSelectionAttribute?(this._preventCaretMovement(t),this._setSelectionAttributeFromTheNodeBefore(e),!0):e.isAtEnd&&ha(e,n)?this._hasSelectionAttribute?void(ba(e,n)&&(this._skipNextAutomaticGravityRestoration(),this._overrideGravity())):(this._preventCaretMovement(t),this._setSelectionAttributeFromTheNodeBefore(e),!0):e.isAtStart?this._hasSelectionAttribute?(this._removeSelectionAttribute(),this._preventCaretMovement(t),!0):void 0:void(ba(e,n)&&(this._skipNextAutomaticGravityRestoration(),this._overrideGravity()))}get _isGravityOverridden(){return!!this._overrideUid}get _hasSelectionAttribute(){return this._modelSelection.hasAttribute(this.attribute)}_overrideGravity(){this._overrideUid=this.model.change((e)=>e.overrideSelectionGravity())}_restoreGravity(){this.model.change((e)=>{e.restoreSelectionGravity(this._overrideUid),this._overrideUid=null})}_preventCaretMovement(e){e.preventDefault()}_removeSelectionAttribute(){this.model.change((e)=>{e.removeSelectionAttribute(this.attribute)})}_setSelectionAttributeFromTheNodeBefore(e){const t=this.attribute;this.model.change((n)=>{n.setSelectionAttribute(this.attribute,e.nodeBefore.getAttribute(t))})}_skipNextAutomaticGravityRestoration(){this._isNextGravityRestorationSkipped=!0}}var jy=i(87),Uy=i.n(jy);const Hy='ck-link_selected';class Wy extends xb{init(){const e=this.editor;e.model.schema.extend('$text',{allowAttributes:'linkHref'}),e.conversion.for('dataDowncast').add(wt({model:'linkHref',view:da})),e.conversion.for('editingDowncast').add(wt({model:'linkHref',view:(e,t)=>da(ca(e),t)})),e.conversion.for('upcast').add(tn({view:{name:'a',attributes:{href:!0}},model:{key:'linkHref',value:(e)=>e.getAttribute('href')}})),e.commands.add('link',new Dy(e)),e.commands.add('unlink',new Fy(e)),ua(e.editing.view,e.model,this,'linkHref'),this._setupLinkHighlight()}_setupLinkHighlight(){const e=this.editor,t=e.editing.view,n=new Set;t.document.registerPostFixer((t)=>{const o=e.model.document.selection;if(o.hasAttribute('linkHref')){const r=aa(o.getFirstPosition(),o.getAttribute('linkHref')),i=e.editing.mapper.toViewRange(r);for(const e of i.getItems())e.is('a')&&(t.addClass(Hy,e),n.add(e))}}),e.conversion.for('editingDowncast').add((e)=>{function o(){t.change((e)=>{for(const t of n.values())e.removeClass(Hy,t),n.delete(t)})}e.on('insert',o,{priority:'highest'}),e.on('remove',o,{priority:'highest'}),e.on('attribute',o,{priority:'highest'}),e.on('selection',o,{priority:'highest'})})}}class Gy extends Bm{constructor(e){super(e),this.domEventType='click'}onDomEvent(e){this.fire(e.type,e)}}var $y=i(89),Ky=i.n($y);class Zy extends Ib{constructor(e){super(e);const n=e.t;this.focusTracker=new Bb,this.keystrokes=new _b,this.urlInputView=this._createUrlInput(),this.saveButtonView=this._createButton(n('y'),dw.a,'ck-button-save'),this.saveButtonView.type='submit',this.cancelButtonView=this._createButton(n('z'),pw.a,'ck-button-cancel','cancel'),this._focusables=new Cb,this._focusCycler=new qb({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:'shift + tab',focusNext:'tab'}}),this.setTemplate({tag:'form',attributes:{class:['ck','ck-link-form'],tabindex:'-1'},children:[this.urlInputView,this.saveButtonView,this.cancelButtonView]})}render(){super.render(),bi({view:this});const e=[this.urlInputView,this.saveButtonView,this.cancelButtonView];e.forEach((e)=>{this._focusables.add(e),this.focusTracker.add(e.element)}),this.keystrokes.listenTo(this.element)}focus(){this._focusCycler.focusFirst()}_createUrlInput(){const e=this.locale.t,t=new rw(this.locale,sw);return t.label=e('af'),t.inputView.placeholder='https://example.com',t}_createButton(e,t,n,o){const r=new K_(this.locale);return r.set({label:e,icon:t,tooltip:!0}),r.extendTemplate({attributes:{class:n}}),o&&r.delegate('execute').to(this,o),r}}var Jy=i(91),Yy=i.n(Jy),Qy=i(92),Xy=i.n(Qy),ev=i(93),tv=i.n(ev);class nv extends Ib{constructor(e){super(e);const n=e.t;this.focusTracker=new Bb,this.keystrokes=new _b,this.previewButtonView=this._createPreviewButton(),this.unlinkButtonView=this._createButton(n('ab'),Yy.a,'unlink'),this.editButtonView=this._createButton(n('ac'),Xy.a,'edit'),this.set('href'),this._focusables=new Cb,this._focusCycler=new qb({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:'shift + tab',focusNext:'tab'}}),this.setTemplate({tag:'div',attributes:{class:['ck','ck-link-actions'],tabindex:'-1'},children:[this.previewButtonView,this.editButtonView,this.unlinkButtonView]})}render(){super.render();const e=[this.previewButtonView,this.editButtonView,this.unlinkButtonView];e.forEach((e)=>{this._focusables.add(e),this.focusTracker.add(e.element)}),this.keystrokes.listenTo(this.element)}focus(){this._focusCycler.focusFirst()}_createButton(e,t,n){const o=new K_(this.locale);return o.set({label:e,icon:t,tooltip:!0}),o.delegate('execute').to(this,n),o}_createPreviewButton(){const e=new K_(this.locale),n=this.bindTemplate,o=this.t;return e.set({withText:!0,tooltip:o('ad')}),e.extendTemplate({attributes:{class:['ck','ck-link-actions__preview'],href:n.to('href',(e)=>e&&ca(e)),target:'_blank'}}),e.bind('label').to(this,'href',(e)=>e||o('ae')),e.bind('isEnabled').to(this,'href',(e)=>!!e),e.template.tag='a',e.template.eventListeners={},e}}var ov=i(95),rv=i.n(ov);const iv='Ctrl+K';class av extends xb{static get requires(){return[Mb]}init(){const e=this.editor;e.editing.view.addObserver(Gy),this.actionsView=this._createActionsView(),this.formView=this._createFormView(),this._balloon=e.plugins.get(Mb),this._createToolbarLinkButton(),this._enableUserBalloonInteractions()}_createActionsView(){const e=this.editor,t=new nv(e.locale),n=e.commands.get('link'),o=e.commands.get('unlink');return t.bind('href').to(n,'value'),t.editButtonView.bind('isEnabled').to(n),t.unlinkButtonView.bind('isEnabled').to(o),this.listenTo(t,'edit',()=>{this._addFormView()}),this.listenTo(t,'unlink',()=>{e.execute('unlink'),this._hideUI()}),t.keystrokes.set('Esc',(e,t)=>{this._hideUI(),t()}),t.keystrokes.set(iv,(e,t)=>{this._addFormView(),t()}),t}_createFormView(){const e=this.editor,t=new Zy(e.locale),n=e.commands.get('link');return t.urlInputView.bind('value').to(n,'value'),t.urlInputView.bind('isReadOnly').to(n,'isEnabled',(e)=>!e),t.saveButtonView.bind('isEnabled').to(n),this.listenTo(t,'submit',()=>{e.execute('link',t.urlInputView.inputView.element.value),this._removeFormView()}),this.listenTo(t,'cancel',()=>{this._removeFormView()}),t.keystrokes.set('Esc',(e,t)=>{this._removeFormView(),t()}),t}_createToolbarLinkButton(){const e=this.editor,n=e.commands.get('link'),o=e.t;e.keystrokes.set(iv,(e,t)=>{t(),n.isEnabled&&this._showUI()}),e.ui.componentFactory.add('link',(e)=>{const t=new K_(e);return t.isEnabled=!0,t.label=o('p'),t.icon=rv.a,t.keystroke=iv,t.tooltip=!0,t.bind('isEnabled').to(n,'isEnabled'),this.listenTo(t,'execute',()=>this._showUI()),t})}_enableUserBalloonInteractions(){const e=this.editor.editing.view.document;this.listenTo(e,'click',()=>{const e=this._getSelectedLinkElement();e&&this._showUI()}),this.editor.keystrokes.set('Tab',(e,t)=>{this._areActionsVisible&&!this.actionsView.focusTracker.isFocused&&(this.actionsView.focus(),t())},{priority:'high'}),this.editor.keystrokes.set('Esc',(e,t)=>{this._isUIVisible&&(this._hideUI(),t())}),fi({emitter:this.formView,activator:()=>this._isUIVisible,contextElements:[this._balloon.view.element],callback:()=>this._hideUI()})}_addActionsView(){this._areActionsInPanel||this._balloon.add({view:this.actionsView,position:this._getBalloonPositionData()})}_addFormView(){if(!this._isFormInPanel){const e=this.editor,t=e.commands.get('link');this._balloon.add({view:this.formView,position:this._getBalloonPositionData()}),this.formView.urlInputView.select(),this.formView.urlInputView.inputView.element.value=t.value||''}}_removeFormView(){this._isFormInPanel&&(this._balloon.remove(this.formView),this.editor.editing.view.focus())}_showUI(){const e=this.editor,t=e.commands.get('link');t.isEnabled&&(this._getSelectedLinkElement()?this._areActionsVisible?this._addFormView():this._addActionsView():(this._addActionsView(),this._addFormView()),this._startUpdatingUIOnViewRender())}_hideUI(){if(this._isUIInPanel){const e=this.editor.editing.view;this.stopListening(e,'render'),this._removeFormView(),this._balloon.remove(this.actionsView),e.focus()}}_startUpdatingUIOnViewRender(){function e(){return o.document.selection.focus.getAncestors().reverse().find((e)=>e.is('element'))}const t=this.editor,n=t.editing,o=n.view;let r=this._getSelectedLinkElement(),i=e();this.listenTo(o,'render',()=>{const t=this._getSelectedLinkElement(),n=e();(!r||t)&&(r||n===i)?this._balloon.updatePosition(this._getBalloonPositionData()):this._hideUI(),r=t,i=n})}get _isFormInPanel(){return this._balloon.hasView(this.formView)}get _areActionsInPanel(){return this._balloon.hasView(this.actionsView)}get _areActionsVisible(){return this._balloon.visibleView===this.actionsView}get _isUIInPanel(){return this._isFormInPanel||this._areActionsInPanel}get _isUIVisible(){const e=this._balloon.visibleView;return e==this.formView||this._areActionsVisible}_getBalloonPositionData(){const e=this.editor.editing.view,t=e.document,n=this._getSelectedLinkElement(),o=n?e.domConverter.mapViewToDom(n):e.domConverter.viewRangeToDom(t.selection.getFirstRange());return{target:o}}_getSelectedLinkElement(){const e=this.editor.editing.view.document.selection;if(e.isCollapsed)return _a(e.getFirstPosition());else{const t=e.getFirstRange().getTrimmed(),n=_a(t.start),o=_a(t.end);return n&&n==o?ju.createIn(n).getTrimmed().isEqual(t)?n:null:null}}}class sv extends xb{static get requires(){return[Wy,av]}static get pluginName(){return'Link'}}class lv extends x_{constructor(e,t){super(e),this.type='bulleted'==t?'bulleted':'numbered'}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(){const e=this.editor.model,t=e.document,n=Array.from(t.selection.getSelectedBlocks()).filter((t)=>wa(t,e.schema)),o=!0===this.value;e.change((e)=>{if(o){let t=n[n.length-1].nextSibling,o=od,r=[];for(;t&&'listItem'==t.name&&0!==t.getAttribute('indent');){const e=t.getAttribute('indent');e<o&&(o=e);const n=e-o;r.push({element:t,indent:n}),t=t.nextSibling}r=r.reverse();for(const t of r)e.setAttribute('indent',t.indent,t.element)}if(!o){let e=od;for(const t of n)t.is('listItem')&&t.getAttribute('indent')<e&&(e=t.getAttribute('indent'));e=0===e?1:e,ka(n,!0,e),ka(n,!1,e)}for(const t of n.reverse())o&&'listItem'==t.name?e.rename(t,'paragraph'):o||'listItem'==t.name?o||'listItem'!=t.name||t.getAttribute('type')==this.type||e.setAttribute('type',this.type,t):(e.setAttributes({type:this.type,indent:0},t),e.rename(t,'listItem'))})}_getValue(){const e=cr(this.editor.model.document.selection.getSelectedBlocks());return!!e&&e.is('listItem')&&e.getAttribute('type')==this.type}_checkEnabled(){if(this.value)return!0;const e=this.editor.model.document.selection,t=this.editor.model.schema,n=cr(e.getSelectedBlocks());return!!n&&wa(n,t)}}class dv extends x_{constructor(e,t){super(e),this._indentBy='forward'==t?1:-1}refresh(){this.isEnabled=this._checkEnabled()}execute(){const e=this.editor.model,t=e.document;let n=Array.from(t.selection.getSelectedBlocks());e.change((e)=>{const t=n[n.length-1];for(let o=t.nextSibling;o&&'listItem'==o.name&&o.getAttribute('indent')>t.getAttribute('indent');)n.push(o),o=o.nextSibling;0>this._indentBy&&(n=n.reverse());for(const t of n){const n=t.getAttribute('indent')+this._indentBy;0>n?e.rename(t,'paragraph'):e.setAttribute('indent',n,t)}})}_checkEnabled(){const e=cr(this.editor.model.document.selection.getSelectedBlocks());if(!e||!e.is('listItem'))return!1;if(0<this._indentBy){const t=e.getAttribute('indent'),n=e.getAttribute('type');for(let o=e.previousSibling;o&&o.is('listItem')&&o.getAttribute('indent')>=t;){if(o.getAttribute('indent')==t)return o.getAttribute('type')==n;o=o.previousSibling}return!1}return!0}}class cv extends xb{static get requires(){return[zw]}init(){const e=this.editor;e.model.schema.register('listItem',{inheritAllFrom:'$block',allowAttributes:['type','indent']});const t=e.data,n=e.editing;e.model.document.registerPostFixer((t)=>Va(e.model,t)),n.mapper.registerViewToModelLength('li',ja),t.mapper.registerViewToModelLength('li',ja),n.mapper.on('modelToViewPosition',Ia),n.mapper.on('viewToModelPosition',Na),t.mapper.on('modelToViewPosition',Ia),n.downcastDispatcher.on('insert',Ea,{priority:'high'}),n.downcastDispatcher.on('insert:listItem',xa),t.downcastDispatcher.on('insert',Ea,{priority:'high'}),t.downcastDispatcher.on('insert:listItem',xa),n.downcastDispatcher.on('attribute:type:listItem',Aa),t.downcastDispatcher.on('attribute:type:listItem',Aa),n.downcastDispatcher.on('attribute:indent:listItem',Ta),t.downcastDispatcher.on('attribute:indent:listItem',Ta),n.downcastDispatcher.on('remove:listItem',Ca),n.downcastDispatcher.on('remove',Pa,{priority:'low'}),t.downcastDispatcher.on('remove:listItem',Ca),t.downcastDispatcher.on('remove',Pa,{priority:'low'}),t.upcastDispatcher.on('element:ul',Ra,{priority:'high'}),t.upcastDispatcher.on('element:ol',Ra,{priority:'high'}),t.upcastDispatcher.on('element:li',Oa,{priority:'high'}),t.upcastDispatcher.on('element:li',Sa),e.model.on('insertContent',La,{priority:'high'}),e.commands.add('numberedList',new lv(e,'numbered')),e.commands.add('bulletedList',new lv(e,'bulleted')),e.commands.add('indentList',new dv(e,'forward')),e.commands.add('outdentList',new dv(e,'backward'));const o=this.editor.editing.view.document;this.listenTo(o,'enter',(e,t)=>{const n=this.editor.model.document,o=n.selection.getLastPosition().parent;n.selection.isCollapsed&&'listItem'==o.name&&o.isEmpty&&(this.editor.execute('outdentList'),t.preventDefault(),e.stop())}),this.listenTo(o,'delete',(e,t)=>{if('backward'===t.direction){const n=this.editor.model.document.selection;if(n.isCollapsed){const o=n.getFirstPosition();if(o.isAtStart){const n=o.parent;if('listItem'===n.name){const o=n.previousSibling&&'listItem'===n.previousSibling.name;o||(this.editor.execute('outdentList'),t.preventDefault(),e.stop())}}}}},{priority:'high'});const r=(e)=>(t,n)=>{const o=this.editor.commands.get(e);o.isEnabled&&(this.editor.execute(e),n())};this.editor.keystrokes.set('Tab',r('indentList')),this.editor.keystrokes.set('Shift+Tab',r('outdentList'))}}var pv=i(96),uv=i.n(pv),mv=i(97),gv=i.n(mv);class hv extends xb{init(){const e=this.editor.t;this._addButton('numberedList',e('q'),uv.a),this._addButton('bulletedList',e('r'),gv.a)}_addButton(e,t,n){const o=this.editor;o.ui.componentFactory.add(e,(r)=>{const i=o.commands.get(e),a=new K_(r);return a.set({label:t,icon:n,tooltip:!0}),a.bind('isOn','isEnabled').to(i,'value','isEnabled'),this.listenTo(a,'execute',()=>o.execute(e)),a})}}class fv extends xb{static get requires(){return[cv,hv]}static get pluginName(){return'List'}}class bv{constructor(e,t={}){this.table=e,this.startRow=t.startRow||0,this.endRow='number'==typeof t.endRow?t.endRow:void 0,this.includeSpanned=!!t.includeSpanned,this.column='number'==typeof t.column?t.column:void 0,this._skipRows=new Set,this._row=0,this._column=0,this._cell=0,this._spannedCells=new Map}[Symbol.iterator](){return this}next(){const e=this.table.getChild(this._row);if(!e||this._isOverEndRow())return{done:!0};if(this._isSpanned(this._row,this._column)){const e=this._column,t=this._formatOutValue(void 0,e);this._column++;const n=!this.includeSpanned||this._shouldSkipRow()||this._shouldSkipColumn(e,1);return n?this.next():t}const t=e.getChild(this._cell);if(!t)return this._row++,this._column=0,this._cell=0,this.next();const n=parseInt(t.getAttribute('colspan')||1),o=parseInt(t.getAttribute('rowspan')||1);(1<n||1<o)&&this._recordSpans(this._row,this._column,o,n);const r=this._column,i=this._formatOutValue(t,r,o,n);this._column++,this._cell++;const a=this._shouldSkipRow()||this._shouldSkipColumn(r,n);return a?this.next():i}skipRow(e){this._skipRows.add(e)}_isOverEndRow(){return this.endRow!==void 0&&this._row>this.endRow}_formatOutValue(e,t,n=1,o=1){return{done:!1,value:{cell:e,row:this._row,column:t,rowspan:n,colspan:o,cellIndex:this._cell}}}_shouldSkipRow(){const e=this._row<this.startRow,t=this._skipRows.has(this._row);return e||t}_shouldSkipColumn(e,t){if(this.column===void 0)return!1;const n=e===this.column,o=e<this.column&&e+t>this.column;return!n&&!o}_isSpanned(e,t){if(!this._spannedCells.has(e))return!1;const n=this._spannedCells.get(e);return n.has(t)}_recordSpans(e,t,n,o){for(let r=t+1;r<=t+o-1;r++)this._markSpannedCell(e,r);for(let r=e+1;r<e+n;r++)for(let e=t;e<=t+o-1;e++)this._markSpannedCell(r,e)}_markSpannedCell(e,t){this._spannedCells.has(e)||this._spannedCells.set(e,new Map);const n=this._spannedCells.get(e);n.set(t,!0)}}class _v extends xb{static get pluginName(){return'TableUtils'}getCellLocation(e){const t=e.parent,n=t.parent,o=n.getChildIndex(t),r=new bv(n,{startRow:o,endRow:o});for(const{cell:t,row:n,column:o}of r)if(t===e)return{row:n,column:o}}createTable(e,t,n){const o=this.editor.model;o.change((o)=>{const r=o.createElement('table');o.insert(r,e),ps(o,r,0,t,n)})}insertRows(e,t={}){const n=this.editor.model,o=t.at||0,r=t.rows||1;n.change((t)=>{const n=e.getAttribute('headingRows')||0;if(n>o&&t.setAttribute('headingRows',n+r,e),0===o||o===e.childCount)return void ps(t,e,o,r,this.getColumns(e));const i=new bv(e,{endRow:o});let a=0;for(const{row:e,rowspan:n,colspan:s,cell:l}of i){e<o&&e+n>o&&t.setAttribute('rowspan',n+r,l),e===o&&(a+=s)}ps(t,e,o,r,a)})}insertColumns(e,t={}){const n=this.editor.model,o=t.at||0,r=t.columns||1;n.change((t)=>{const n=e.getAttribute('headingColumns');o<n&&t.setAttribute('headingColumns',n+r,e);const i=this.getColumns(e);if(0===o||i===o){for(const n of e.getChildren())us(r,t,cg.createAt(n,o?'end':0));return}const a=new bv(e,{column:o,includeSpanned:!0});for(const{row:n,column:i,cell:s,colspan:l,rowspan:d,cellIndex:c}of a)if(i===o){const o=cg.createFromParentAndOffset(e.getChild(n),c);us(r,t,o)}else if(t.setAttribute('colspan',l+r,s),a.skipRow(n),1<d)for(let e=n+1;e<n+d;e++)a.skipRow(e)})}splitCellVertically(e,t=2){const n=this.editor.model,o=ds(e),r=parseInt(e.getAttribute('rowspan')||1),i=parseInt(e.getAttribute('colspan')||1);n.change((n)=>{if(1<i){const{newCellsSpan:o,updatedSpan:a}=ms(i,t);cs('colspan',a,e,n);const s={};1<o&&(s.colspan=o),1<r&&(s.rowspan=r);const l=i>t?t-1:i-1;us(l,n,cg.createAfter(e),s)}if(i<t){const a=t-i,s=[...new bv(o)],{column:l}=s.find(({cell:t})=>t===e),d=s.filter(({cell:t,colspan:n,column:o})=>{return t!==e&&o===l||o<l&&o+n>l});for(const{cell:e,colspan:t}of d)n.setAttribute('colspan',t+a,e);const c={};1<r&&(c.rowspan=r),us(a,n,cg.createAfter(e),c);const p=o.getAttribute('headingColumns')||0;p>l&&cs('headingColumns',p+a,o,n)}})}splitCellHorizontally(e,t=2){const n=this.editor.model,o=ds(e),r=o.getChildIndex(e.parent),i=parseInt(e.getAttribute('rowspan')||1),a=parseInt(e.getAttribute('colspan')||1);n.change((n)=>{if(1<i){const s=[...new bv(o,{startRow:r,endRow:r+i-1,includeSpanned:!0})],{newCellsSpan:l,updatedSpan:d}=ms(i,t);cs('rowspan',d,e,n);const{column:c}=s.find(({cell:t})=>t===e),p={};1<l&&(p.rowspan=l),1<a&&(p.colspan=a);for(const{column:e,row:t,cellIndex:i}of s){if(t>=r+d&&e===c&&0==(t+r+d)%l){const e=cg.createFromParentAndOffset(o.getChild(t),i);n.insertElement('tableCell',p,e)}}}if(i<t){const s=t-i,l=[...new bv(o,{startRow:0,endRow:r})];for(const{cell:t,rowspan:o,row:i}of l)if(t!==e&&i+o>r){n.setAttribute('rowspan',o+s,t)}const d={};1<a&&(d.colspan=a),ps(n,o,r+1,s,1,d);const c=o.getAttribute('headingRows')||0;c>r&&cs('headingRows',c+s,o,n)}})}getColumns(e){const t=e.getChild(0);return[...t.getChildren()].reduce((e,t)=>{const n=parseInt(t.getAttribute('colspan')||1);return e+n},0)}}class kv extends x_{refresh(){const e=this.editor.model,t=e.document.selection,n=e.schema,o=gs(t.getFirstPosition());this.isEnabled=n.checkChild(o,'table')}execute(e={}){const t=this.editor.model,n=t.document.selection,o=this.editor.plugins.get(_v),r=parseInt(e.rows)||2,i=parseInt(e.columns)||2,a=n.getFirstPosition(),s=a.parent===a.root,l=s?cg.createAt(a):cg.createAfter(a.parent);o.createTable(l,r,i)}}class wv extends x_{constructor(e,t={}){super(e),this.order=t.order||'below'}refresh(){const e=this.editor.model.document.selection,t=ds(e.getFirstPosition());this.isEnabled=!!t}execute(){const e=this.editor,t=e.model.document.selection,n=e.plugins.get(_v),o=t.getFirstPosition().parent,r=ds(t.getFirstPosition()),i=r.getChildIndex(o.parent),a='below'===this.order?i+1:i;n.insertRows(r,{rows:1,at:a})}}class yv extends x_{constructor(e,t={}){super(e),this.order=t.order||'after'}refresh(){const e=this.editor.model.document.selection,t=ds(e.getFirstPosition());this.isEnabled=!!t}execute(){const e=this.editor,t=e.model.document.selection,n=e.plugins.get(_v),o=ds(t.getFirstPosition()),r=t.getFirstPosition().parent,{column:i}=n.getCellLocation(r),a='after'===this.order?i+1:i;n.insertColumns(o,{columns:1,at:a})}}class vv extends x_{constructor(e,t={}){super(e),this.direction=t.direction||'horizontally'}refresh(){const e=this.editor.model,t=e.document,n=t.selection.getFirstPosition().parent;this.isEnabled=n.is('tableCell')}execute(){const e=this.editor.model,t=e.document,n=t.selection,o=n.getFirstPosition(),r=o.parent,i='horizontally'===this.direction,a=this.editor.plugins.get(_v);i?a.splitCellHorizontally(r,2):a.splitCellVertically(r,2)}}class xv extends x_{constructor(e,t){super(e),this.direction=t.direction,this.isHorizontal='right'==this.direction||'left'==this.direction}refresh(){const e=this._getMergeableCell();this.isEnabled=!!e,this.value=e}execute(){const e=this.editor.model,t=e.document,n=t.selection.getFirstPosition().parent,o=this.value,r=this.direction;e.change((e)=>{const t='right'==r||'down'==r,i=t?n:o,a=t?o:n;e.move(pg.createIn(a),cg.createAt(i,'end')),e.remove(a);const s=this.isHorizontal?'colspan':'rowspan',l=parseInt(n.getAttribute(s)||1),d=parseInt(o.getAttribute(s)||1);e.setAttribute(s,l+d,i),e.setSelection(pg.createIn(i))})}_getMergeableCell(){const e=this.editor.model,t=e.document,n=t.selection.getFirstPosition().parent;if(n.is('tableCell')){const e=this.isHorizontal?hs(n,this.direction):fs(n,this.direction);if(e){const t=this.isHorizontal?'rowspan':'colspan',o=parseInt(n.getAttribute(t)||1),r=parseInt(e.getAttribute(t)||1);if(r===o)return e}}}}class Cv extends x_{refresh(){const e=this.editor.model,t=e.document,n=t.selection.getFirstPosition().parent;this.isEnabled=n.is('tableCell')&&1<n.parent.parent.childCount}execute(){const e=this.editor.model,t=e.document.selection,n=t.getFirstPosition(),o=n.parent,r=o.parent,i=r.parent,a=i.getChildIndex(r),s=i.getAttribute('headingRows')||0;e.change((e)=>{s&&a<=s&&cs('headingRows',s-1,i,e,0);const t=[...new bv(i,{endRow:a})],n=new Map;t.filter(({row:e,rowspan:t})=>e===a&&1<t).forEach(({column:e,cell:t,rowspan:o})=>n.set(e,{cell:t,rowspanToSet:o-1})),t.filter(({row:e,rowspan:t})=>e<=a-1&&e+t>a).forEach(({cell:t,rowspan:n})=>cs('rowspan',n-1,t,e));const o=a+1,l=new bv(i,{includeSpanned:!0,startRow:o,endRow:o});let d;for(const{row:t,column:o,cell:r}of[...l])if(n.has(o)){const{cell:r,rowspanToSet:a}=n.get(o),s=d?cg.createAfter(d):cg.createAt(i.getChild(t));e.move(pg.createOn(r),s),cs('rowspan',a,r,e),d=r}else d=r;e.remove(r)})}}class Av extends x_{refresh(){const e=this.editor,t=e.model.document.selection,n=e.plugins.get(_v),o=t.getFirstPosition().parent;this.isEnabled=o.is('tableCell')&&1<n.getColumns(o.parent.parent)}execute(){const e=this.editor.model,t=e.document.selection,n=t.getFirstPosition(),o=n.parent,r=o.parent,i=r.parent,a=i.getAttribute('headingColumns')||0,s=i.getChildIndex(r),l=[...new bv(i)],d=l.find((e)=>e.cell===o),c=d.column;e.change((e)=>{a&&s<=a&&e.setAttribute('headingColumns',a-1,i);for(const{cell:t,column:n,colspan:o}of l)n<=c&&1<o&&n+o>c?cs('colspan',o-1,t,e):n===c&&e.remove(t)})}}class Tv extends x_{refresh(){const e=this.editor.model,t=e.document,n=t.selection,o=ds(n.getFirstPosition());this.isEnabled=!!o}execute(e={}){const t=this.editor.model,n=t.document,o=n.selection,r=parseInt(e.rows)||0,i=ds(o.getFirstPosition());t.change((t)=>{const n=i.getAttribute('headingRows')||0;if(n!==r&&0<r){const e=bs(i,r,n);for(const n of e)ks(n,r,t)}const o=parseInt(e.columns)||0;_s(i,'headingColumns',o,t),_s(i,'headingRows',r,t)})}}var Ev=i(98),Pv=i.n(Ev);class Sv extends xb{init(){const e=this.editor,t=e.model.schema,n=e.conversion;t.register('table',{allowWhere:'$block',allowAttributes:['headingRows','headingColumns'],isObject:!0}),t.register('tableRow',{allowIn:'table'}),t.register('tableCell',{allowIn:'tableRow',allowContentOf:'$block',allowAttributes:['colspan','rowspan'],isLimit:!0}),n.for('upcast').add(Ua()),n.for('editingDowncast').add(Ga({asWidget:!0})),n.for('dataDowncast').add(Ga()),n.for('upcast').add(en({model:'tableRow',view:'tr'})),n.for('editingDowncast').add($a({asWidget:!0})),n.for('dataDowncast').add($a()),n.for('downcast').add(Ya()),n.for('upcast').add(en({model:'tableCell',view:'td'})),n.for('upcast').add(en({model:'tableCell',view:'th'})),n.for('editingDowncast').add(Ka({asWidget:!0})),n.for('dataDowncast').add(Ka()),n.attributeToAttribute({model:'colspan',view:'colspan'}),n.attributeToAttribute({model:'rowspan',view:'rowspan'}),n.for('editingDowncast').add(Ja({asWidget:!0})),n.for('dataDowncast').add(Ja()),n.for('editingDowncast').add(Za({asWidget:!0})),n.for('dataDowncast').add(Za()),e.commands.add('insertTable',new kv(e)),e.commands.add('insertRowAbove',new wv(e,{order:'above'})),e.commands.add('insertRowBelow',new wv(e,{order:'below'})),e.commands.add('insertColumnBefore',new yv(e,{order:'before'})),e.commands.add('insertColumnAfter',new yv(e,{order:'after'})),e.commands.add('removeRow',new Cv(e)),e.commands.add('removeColumn',new Av(e)),e.commands.add('splitCellVertically',new vv(e,{direction:'vertically'})),e.commands.add('splitCellHorizontally',new vv(e,{direction:'horizontally'})),e.commands.add('mergeCellRight',new xv(e,{direction:'right'})),e.commands.add('mergeCellLeft',new xv(e,{direction:'left'})),e.commands.add('mergeCellDown',new xv(e,{direction:'down'})),e.commands.add('mergeCellUp',new xv(e,{direction:'up'})),e.commands.add('setTableHeaders',new Tv(e)),this.listenTo(e.editing.view.document,'keydown',(...e)=>this._handleTabOnSelectedTable(...e)),this.listenTo(e.editing.view.document,'keydown',(...e)=>this._handleTabInsideTable(...e))}static get requires(){return[_v]}_handleTabOnSelectedTable(e,t){const n=t.keyCode==tm.tab;if(n&&!t.ctrlKey){const n=this.editor,o=n.model.document.selection;if(!o.isCollapsed&&1===o.rangeCount&&o.getFirstRange().isFlat){const r=o.getSelectedElement();if(!r||'table'!=r.name)return;e.stop(),t.preventDefault(),t.stopPropagation(),n.model.change((e)=>{e.setSelection(pg.createIn(r.getChild(0).getChild(0)))})}}}_handleTabInsideTable(e,t){const n=t.keyCode==tm.tab;if(!n||t.ctrlKey)return;const o=this.editor,r=o.model.document.selection,i=ds(r.getFirstPosition());if(!i)return;t.preventDefault(),t.stopPropagation();const a=r.focus.parent,s=a.parent,l=i.getChildIndex(s),d=s.getChildIndex(a),c=!t.shiftKey,p=0===d;if(!c&&p&&0===l)return;const u=d===s.childCount-1,m=l===i.childCount-1;c&&m&&u&&o.plugins.get(_v).insertRows(i,{at:i.childCount});let g;if(c&&u){const e=i.getChild(l+1);g=e.getChild(0)}else if(!c&&p){const e=i.getChild(l-1);g=e.getChild(e.childCount-1)}else g=s.getChild(d+(c?1:-1));o.model.change((e)=>{e.setSelection(pg.createIn(g))})}}class Rv extends xb{init(){const e=this.editor;e.ui.componentFactory.add('insertTable',(t)=>{const n=e.commands.get('insertTable'),o=new K_(t);return o.bind('isEnabled').to(n),o.set({icon:Ay.a,label:'Insert table',tooltip:!0}),o.on('execute',()=>{e.execute('insertTable'),e.editing.view.focus()}),o}),e.ui.componentFactory.add('insertRowBelow',(t)=>{const n=e.commands.get('insertRowBelow'),o=new K_(t);return o.bind('isEnabled').to(n),o.set({icon:xy.a,label:'Insert row',tooltip:!0}),o.on('execute',()=>{e.execute('insertRowBelow'),e.editing.view.focus()}),o}),e.ui.componentFactory.add('insertColumnAfter',(t)=>{const n=e.commands.get('insertColumnAfter'),o=new K_(t);return o.bind('isEnabled').to(n),o.set({icon:Ey.a,label:'Insert column',tooltip:!0}),o.on('execute',()=>{e.execute('insertColumnAfter'),e.editing.view.focus()}),o})}}class Ov extends xb{static get requires(){return[Sv,Rv,tw]}static get pluginName(){return'Table'}}class Iv{getHtml(e){const t=document.implementation.createHTMLDocument(''),n=t.createElement('div');return n.appendChild(e),n.innerHTML}}const Nv='https://docs.ckeditor.com/ckeditor5/latest/framework/guides/support/error-codes.html';class Vv extends Error{constructor(e,t){e=ws(e),t&&(e+=' '+JSON.stringify(t)),super(e),this.name='CKEditorError',this.data=t}static isCKEditorError(e){return e instanceof Vv}}var Lv=function(){return function e(){e.called=!0}};class Dv{constructor(e,t){this.source=e,this.name=t,this.path=[],this.stop=Lv(),this.off=Lv()}}const Fv={get(e){return'number'==typeof e?e:this[e]||this.normal},highest:1e5,high:1e3,normal:0,low:-1e3,lowest:-1e5};const Mv=Symbol('listeningTo'),Bv=Symbol('emitterId'),qv={on(e,t,n={}){this.listenTo(this,e,t,n)},once(e,t,n){this.listenTo(this,e,function(e,...n){e.off(),t.call(this,e,...n)},n)},off(e,t){this.stopListening(this,e,t)},listenTo(e,t,n,o={}){let r,i;this[Mv]||(this[Mv]={});const a=this[Mv];xs(e)||vs(e);const s=xs(e);(r=a[s])||(r=a[s]={emitter:e,callbacks:{}}),(i=r.callbacks[t])||(i=r.callbacks[t]=[]),i.push(n),Ts(e,t);const l=Es(e,t),d=Fv.get(o.priority),c={callback:n,priority:d};for(const r of l){let e=!1;for(let t=0;t<r.length;t++)if(r[t].priority<d){r.splice(t,0,c),e=!0;break}e||r.push(c)}},stopListening(e,t,n){const o=this[Mv];let r=e&&xs(e);const i=o&&r&&o[r],a=i&&t&&i.callbacks[t];if(o&&(!e||i)&&(!t||a))if(n)Rs(e,t,n);else if(a){for(;n=a.pop();)Rs(e,t,n);delete i.callbacks[t]}else if(i){for(t in i.callbacks)this.stopListening(e,t);delete o[r]}else{for(r in o)this.stopListening(o[r].emitter);delete this[Mv]}},fire(e,...t){const n=e instanceof Dv?e:new Dv(this,e),o=n.name;let r=Ps(this,o);if(n.path.push(this),r){const e=[n,...t];r=Array.from(r);for(let t=0;t<r.length&&(r[t].callback.apply(this,e),n.off.called&&(delete n.off.called,Rs(this,o,r[t].callback)),!n.stop.called);t++);}if(this._delegations){const e=this._delegations.get(o),r=this._delegations.get('*');e&&Ss(e,n,t),r&&Ss(r,n,t)}return n.return},delegate(...e){return{to:(t,n)=>{this._delegations||(this._delegations=new Map);for(const o of e){const e=this._delegations.get(o);e?e.set(t,n):this._delegations.set(o,new Map([[t,n]]))}}}},stopDelegating(e,t){if(this._delegations)if(!e)this._delegations.clear();else if(!t)this._delegations.delete(e);else{const n=this._delegations.get(e);n&&n.delete(t)}}};var zv=qv,jv=function(e,t){return e===t||e!==e&&t!==t},Uv=function(e,t){for(var n=e.length;n--;)if(jv(e[n][0],t))return n;return-1},Hv=Array.prototype,Wv=Hv.splice;Is.prototype.clear=function(){this.__data__=[]},Is.prototype['delete']=function(e){var t=this.__data__,n=Uv(t,e);if(0>n)return!1;var o=t.length-1;return n==o?t.pop():Wv.call(t,n,1),!0},Is.prototype.get=function(e){var t=this.__data__,n=Uv(t,e);return 0>n?void 0:t[n][1]},Is.prototype.has=function(e){return-1<Uv(this.__data__,e)},Is.prototype.set=function(e,t){var n=this.__data__,o=Uv(n,e);return 0>o?n.push([e,t]):n[o][1]=t,this};var Gv=Is,$v=function(e){var t=typeof e;return!!e&&('object'==t||'function'==t)},Kv=Object.prototype,Zv=Kv.toString,Jv=function(e){var t=$v(e)?Zv.call(e):'';return t=='[object Function]'||t=='[object GeneratorFunction]'},Yv=function(e){var t=!1;if(null!=e&&'function'!=typeof e.toString)try{t=!!(e+'')}catch(t){}return t},Qv=Function.prototype.toString,Xv=function(e){if(null!=e){try{return Qv.call(e)}catch(t){}try{return e+''}catch(t){}}return''},ex=/[\\^$.*+?()[\]{}|]/g,tx=/^\[object .+?Constructor\]$/,nx=Object.prototype,ox=Function.prototype.toString,rx=nx.hasOwnProperty,ix=RegExp('^'+ox.call(rx).replace(ex,'\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,'$1.*?')+'$'),ax=function(e){if(!$v(e))return!1;var t=Jv(e)||Yv(e)?ix:tx;return t.test(Xv(e))},sx=function(e,t){var n=e[t];return ax(n)?n:void 0},lx=sx(Object,'create'),dx=lx,cx=Object.prototype,px=cx.hasOwnProperty,ux=Object.prototype,mx=ux.hasOwnProperty;Ns.prototype.clear=function(){this.__data__=dx?dx(null):{}},Ns.prototype['delete']=function(e){return this.has(e)&&delete this.__data__[e]},Ns.prototype.get=function(e){var t=this.__data__;if(dx){var n=t[e];return n==='__lodash_hash_undefined__'?void 0:n}return px.call(t,e)?t[e]:void 0},Ns.prototype.has=function(e){var t=this.__data__;return dx?t[e]!==void 0:mx.call(t,e)},Ns.prototype.set=function(e,t){var n=this.__data__;return n[e]=dx&&void 0===t?'__lodash_hash_undefined__':t,this};var gx=Ns,hx=i(3),fx=sx(hx.a,'Map'),bx=fx,_x=function(e){var t=typeof e;return'string'==t||'number'==t||'symbol'==t||'boolean'==t?'__proto__'!==e:null===e},kx=function(e,t){var n=e.__data__;return _x(t)?n['string'==typeof t?'string':'hash']:n.map};Vs.prototype.clear=function(){this.__data__={hash:new gx,map:new(bx||Gv),string:new gx}},Vs.prototype['delete']=function(e){return kx(this,e)['delete'](e)},Vs.prototype.get=function(e){return kx(this,e).get(e)},Vs.prototype.has=function(e){return kx(this,e).has(e)},Vs.prototype.set=function(e,t){return kx(this,e).set(e,t),this};Ls.prototype.clear=function(){this.__data__=new Gv},Ls.prototype['delete']=function(e){return this.__data__['delete'](e)},Ls.prototype.get=function(e){return this.__data__.get(e)},Ls.prototype.has=function(e){return this.__data__.has(e)},Ls.prototype.set=function(e,t){var n=this.__data__;return n instanceof Gv&&n.__data__.length==200&&(n=this.__data__=new Vs(n.__data__)),n.set(e,t),this};var wx=Ls,yx=function(e,t){for(var n=-1,o=e.length;++n<o&&!(!1===t(e[n],n,e)););return e},vx=Object.prototype,xx=vx.hasOwnProperty,Cx=Ds,Ax=function(e,t,n,o){n||(n={});for(var r=-1,i=t.length;++r<i;){var a=t[r],s=o?o(n[a],e[a],a,n,e):e[a];Cx(n,a,s)}return n},Tx=Object.getPrototypeOf,Ex=function(e){return Tx(Object(e))},Px=Object.prototype,Sx=Px.hasOwnProperty,Rx=Object.keys,Ox=function(e){return Rx(Object(e))},Ix=function(e,t){for(var n=-1,o=Array(e);++n<e;)o[n]=t(n);return o},Nx=function(e){return function(t){return null==t?void 0:t[e]}}('length'),Vx=function(e){return'number'==typeof e&&-1<e&&0==e%1&&e<=9007199254740991},Lx=function(e){return null!=e&&Vx(Nx(e))&&!Jv(e)},Dx=function(e){return!!e&&'object'==typeof e},Fx=function(e){return Dx(e)&&Lx(e)},Mx=Object.prototype,Bx=Mx.hasOwnProperty,qx=Mx.toString,zx=Mx.propertyIsEnumerable,jx=function(e){return Fx(e)&&Bx.call(e,'callee')&&(!zx.call(e,'callee')||qx.call(e)=='[object Arguments]')},Ux=Array.isArray,Hx=Ux,Wx=Object.prototype,Gx=Wx.toString,$x=function(e){return'string'==typeof e||!Hx(e)&&Dx(e)&&Gx.call(e)=='[object String]'},Kx=function(e){var t=e?e.length:void 0;return Vx(t)&&(Hx(e)||$x(e)||jx(e))?Ix(t,String):null},Zx=/^(?:0|[1-9]\d*)$/,Jx=function(e,t){return t=null==t?9007199254740991:t,!!t&&('number'==typeof e||Zx.test(e))&&-1<e&&0==e%1&&e<t},Yx=Object.prototype,Qx=function(e){var t=e&&e.constructor,n='function'==typeof t&&t.prototype||Yx;return e===n},Xx=function(e){var t=Qx(e);if(!(t||Lx(e)))return Ox(e);var n=Kx(e),o=n||[],r=o.length;for(var i in e)!Fs(e,i)||!!n&&('length'==i||Jx(i,r))||t&&'constructor'==i||o.push(i);return o},eC=function(e,t){return e&&Ax(t,Xx(t),e)},tC=function(e,t){if(t)return e.slice();var n=new e.constructor(e.length);return e.copy(n),n},nC=function(e,t){var n=-1,o=e.length;for(t||(t=Array(o));++n<o;)t[n]=e[n];return t},oC=Object.getOwnPropertySymbols;oC||(Ms=function(){return[]});var rC=Ms,iC=function(e,t){return Ax(e,rC(e),t)},aC=function(e,t){for(var n=-1,o=t.length,r=e.length;++n<o;)e[r+n]=t[n];return e},sC=function(e,t,n){var o=t(e);return Hx(e)?o:aC(o,n(e))},lC=function(e){return sC(e,Xx,rC)},dC=sx(hx.a,'DataView'),cC=dC,pC=sx(hx.a,'Promise'),uC=pC,mC=sx(hx.a,'Set'),gC=mC,hC=sx(hx.a,'WeakMap'),fC=hC,bC='[object Map]',_C='[object Promise]',kC='[object Set]',wC='[object WeakMap]',yC='[object DataView]',vC=Object.prototype,xC=vC.toString,CC=Xv(cC),AC=Xv(bx),TC=Xv(uC),EC=Xv(gC),PC=Xv(fC);(cC&&Bs(new cC(new ArrayBuffer(1)))!=yC||bx&&Bs(new bx)!=bC||uC&&Bs(uC.resolve())!=_C||gC&&Bs(new gC)!=kC||fC&&Bs(new fC)!=wC)&&(Bs=function(e){var t=xC.call(e),n=t=='[object Object]'?e.constructor:void 0,o=n?Xv(n):void 0;if(o)switch(o){case CC:return yC;case AC:return bC;case TC:return _C;case EC:return kC;case PC:return wC;}return t});var SC=Bs,RC=Object.prototype,OC=RC.hasOwnProperty,IC=function(e){var t=e.length,n=e.constructor(t);return t&&'string'==typeof e[0]&&OC.call(e,'index')&&(n.index=e.index,n.input=e.input),n},NC=hx.a.Uint8Array,VC=NC,LC=function(e){var t=new e.constructor(e.byteLength);return new VC(t).set(new VC(e)),t},DC=function(e,t){var n=t?LC(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)},FC=function(e,t){return e.set(t[0],t[1]),e},MC=function(e,t,n,o){var r=-1,i=e.length;for(o&&i&&(n=e[++r]);++r<i;)n=t(n,e[r],r,e);return n},BC=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,o){n[++t]=[o,e]}),n},qC=function(e,t,n){var o=t?n(BC(e),!0):BC(e);return MC(o,FC,new e.constructor)},zC=/\w*$/,jC=function(e){var t=new e.constructor(e.source,zC.exec(e));return t.lastIndex=e.lastIndex,t},UC=function(e,t){return e.add(t),e},HC=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n},WC=function(e,t,n){var o=t?n(HC(e),!0):HC(e);return MC(o,UC,new e.constructor)},GC=hx.a.Symbol,$C=GC,KC=$C?$C.prototype:void 0,ZC=KC?KC.valueOf:void 0,JC=function(e){return ZC?Object(ZC.call(e)):{}},YC=function(e,t){var n=t?LC(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)},QC=function(e,t,n,o){var r=e.constructor;return t==='[object ArrayBuffer]'?LC(e):t==='[object Boolean]'||t==='[object Date]'?new r(+e):t==='[object DataView]'?DC(e,o):t==='[object Float32Array]'||t==='[object Float64Array]'||t==='[object Int8Array]'||t==='[object Int16Array]'||t==='[object Int32Array]'||t==='[object Uint8Array]'||t==='[object Uint8ClampedArray]'||t==='[object Uint16Array]'||t==='[object Uint32Array]'?YC(e,o):t==='[object Map]'?qC(e,o,n):t==='[object Number]'||t==='[object String]'?new r(e):t==='[object RegExp]'?jC(e):t==='[object Set]'?WC(e,o,n):t==='[object Symbol]'?JC(e):void 0},XC=Object.create,eA=function(e){return $v(e)?XC(e):{}},tA=function(e){return'function'!=typeof e.constructor||Qx(e)?{}:eA(Ex(e))},nA=i(101),oA='[object Arguments]',rA='[object Function]',iA='[object GeneratorFunction]',aA='[object Object]',sA={};sA[oA]=sA['[object Array]']=sA['[object ArrayBuffer]']=sA['[object DataView]']=sA['[object Boolean]']=sA['[object Date]']=sA['[object Float32Array]']=sA['[object Float64Array]']=sA['[object Int8Array]']=sA['[object Int16Array]']=sA['[object Int32Array]']=sA['[object Map]']=sA['[object Number]']=sA[aA]=sA['[object RegExp]']=sA['[object Set]']=sA['[object String]']=sA['[object Symbol]']=sA['[object Uint8Array]']=sA['[object Uint8ClampedArray]']=sA['[object Uint16Array]']=sA['[object Uint32Array]']=!0,sA['[object Error]']=sA[rA]=sA['[object WeakMap]']=!1;var lA=function(e){return qs(e,!1,!0)};class dA{constructor(){this.parent=null}get index(){let e;if(!this.parent)return null;if(-1==(e=this.parent.getChildIndex(this)))throw new Vv('view-node-not-found-in-parent: The node\'s parent does not contain this node.');return e}get nextSibling(){const e=this.index;return null!==e&&this.parent.getChild(e+1)||null}get previousSibling(){const e=this.index;return null!==e&&this.parent.getChild(e-1)||null}get root(){let e=this;for(;e.parent;)e=e.parent;return e}get document(){return this.parent instanceof dA?this.parent.document:null}getPath(){const e=[];for(let t=this;t.parent;)e.unshift(t.index),t=t.parent;return e}getAncestors(e={includeSelf:!1,parentFirst:!1}){const t=[];for(let n=e.includeSelf?this:this.parent;n;)t[e.parentFirst?'push':'unshift'](n),n=n.parent;return t}getCommonAncestor(e,t={}){const n=this.getAncestors(t),o=e.getAncestors(t);let r=0;for(;n[r]==o[r]&&n[r];)r++;return 0==r?null:n[r-1]}isBefore(e){if(this==e)return!1;if(this.root!==e.root)return!1;const t=this.getPath(),n=e.getPath(),o=zs(t,n);return!('prefix'!==o)||'extension'!==o&&t[o]<n[o]}isAfter(e){return this!=e&&!(this.root!==e.root)&&!this.isBefore(e)}_remove(){this.parent._removeChildren(this.index)}_fireChange(e,t){this.fire('change:'+e,t),this.parent&&this.parent._fireChange(e,t)}toJSON(){const e=lA(this);return delete e.parent,e}is(e){return'node'==e}}Os(dA,zv);class cA extends dA{constructor(e){super(),this._textData=e}is(e){return'text'==e||super.is(e)}get data(){return this._textData}get _data(){return this.data}set _data(e){this._fireChange('text',this),this._textData=e}isSimilar(e){return!!(e instanceof cA)&&(this===e||this.data===e.data)}_clone(){return new cA(this.data)}}class pA{constructor(e,t,n){if(this.textNode=e,0>t||t>e.data.length)throw new Vv('view-textproxy-wrong-offsetintext: Given offsetInText value is incorrect.');if(0>n||t+n>e.data.length)throw new Vv('view-textproxy-wrong-length: Given length value is incorrect.');this.data=e.data.substring(t,t+n),this.offsetInText=t}get offsetSize(){return this.data.length}get isPartial(){return this.data.length!==this.textNode.data.length}get parent(){return this.textNode.parent}get root(){return this.textNode.root}get document(){return this.textNode.document}is(e){return'textProxy'==e}getAncestors(e={includeSelf:!1,parentFirst:!1}){const t=[];for(let n=e.includeSelf?this.textNode:this.parent;null!==n;)t[e.parentFirst?'push':'unshift'](n),n=n.parent;return t}}var uA=Object.prototype,mA=Function.prototype.toString,gA=uA.hasOwnProperty,hA=mA.call(Object),fA=uA.toString,bA=function(e){if(!Dx(e)||fA.call(e)!='[object Object]'||Yv(e))return!1;var t=Ex(e);if(null===t)return!0;var n=gA.call(t,'constructor')&&t.constructor;return'function'==typeof n&&n instanceof n&&mA.call(n)==hA};class _A{constructor(...e){this._patterns=[],this.add(...e)}add(...e){for(let t of e)('string'==typeof t||t instanceof RegExp)&&(t={name:t}),t.classes&&('string'==typeof t.classes||t.classes instanceof RegExp)&&(t.classes=[t.classes]),this._patterns.push(t)}match(...e){for(const t of e)for(const e of this._patterns){const n=Hs(t,e);if(n)return{element:t,pattern:e,match:n}}return null}matchAll(...e){const t=[];for(const n of e)for(const e of this._patterns){const o=Hs(n,e);o&&t.push({element:n,pattern:e,match:o})}return 0<t.length?t:null}getElementName(){if(1!==this._patterns.length)return null;const e=this._patterns[0],t=e.name;return'function'!=typeof e&&t&&!(t instanceof RegExp)?t:null}}class kA extends dA{constructor(e,t,n){if(super(),this.name=e,this._attrs=Zs(t),this._children=[],n&&this._insertChild(0,n),this._classes=new Set,this._attrs.has('class')){const e=this._attrs.get('class');Ys(this._classes,e),this._attrs.delete('class')}this._styles=new Map,this._attrs.has('style')&&(Js(this._styles,this._attrs.get('style')),this._attrs.delete('style')),this._customProperties=new Map}get childCount(){return this._children.length}get isEmpty(){return 0===this._children.length}is(e,t=null){return t?'element'==e&&t==this.name:'element'==e||e==this.name||super.is(e)}getChild(e){return this._children[e]}getChildIndex(e){return this._children.indexOf(e)}getChildren(){return this._children[Symbol.iterator]()}*getAttributeKeys(){0<this._classes.size&&(yield'class'),0<this._styles.size&&(yield'style');for(const e of this._attrs.keys())yield e}*getAttributes(){yield*this._attrs.entries(),0<this._classes.size&&(yield['class',this.getAttribute('class')]),0<this._styles.size&&(yield['style',this.getAttribute('style')])}getAttribute(e){if('class'==e)return 0<this._classes.size?[...this._classes].join(' '):void 0;if('style'==e){if(0<this._styles.size){let e='';for(const[t,n]of this._styles)e+=`${t}:${n};`;return e}return}return this._attrs.get(e)}hasAttribute(e){return'class'==e?0<this._classes.size:'style'==e?0<this._styles.size:this._attrs.has(e)}isSimilar(e){if(!(e instanceof kA))return!1;if(this===e)return!0;if(this.name!=e.name)return!1;if(this._attrs.size!==e._attrs.size||this._classes.size!==e._classes.size||this._styles.size!==e._styles.size)return!1;for(const[t,n]of this._attrs)if(!e._attrs.has(t)||e._attrs.get(t)!==n)return!1;for(const t of this._classes)if(!e._classes.has(t))return!1;for(const[t,n]of this._styles)if(!e._styles.has(t)||e._styles.get(t)!==n)return!1;return!0}hasClass(...e){for(const t of e)if(!this._classes.has(t))return!1;return!0}getClassNames(){return this._classes.keys()}getStyle(e){return this._styles.get(e)}getStyleNames(){return this._styles.keys()}hasStyle(...e){for(const t of e)if(!this._styles.has(t))return!1;return!0}findAncestor(...e){const t=new _A(...e);for(let n=this.parent;n;){if(t.match(n))return n;n=n.parent}return null}getCustomProperty(e){return this._customProperties.get(e)}*getCustomProperties(){yield*this._customProperties.entries()}getIdentity(){const e=Array.from(this._classes).sort().join(','),t=Array.from(this._styles).map((e)=>`${e[0]}:${e[1]}`).sort().join(';'),n=Array.from(this._attrs).map((e)=>`${e[0]}="${e[1]}"`).sort().join(' ');return this.name+(''==e?'':` class="${e}"`)+(''==t?'':` style="${t}"`)+(''==n?'':` ${n}`)}_clone(e=!1){const t=[];if(e)for(const n of this.getChildren())t.push(n._clone(e));const n=new this.constructor(this.name,this._attrs,t);return n._classes=new Set(this._classes),n._styles=new Map(this._styles),n._customProperties=new Map(this._customProperties),n.getFillerOffset=this.getFillerOffset,n}_appendChild(e){return this._insertChild(this.childCount,e)}_insertChild(e,t){this._fireChange('children',this);let n=0;const o=Qs(t);for(const r of o)null!==r.parent&&r._remove(),r.parent=this,this._children.splice(e,0,r),e++,n++;return n}_removeChildren(e,t=1){this._fireChange('children',this);for(let n=e;n<e+t;n++)this._children[n].parent=null;return this._children.splice(e,t)}_setAttribute(e,t){t=t+'',this._fireChange('attributes',this),'class'==e?Ys(this._classes,t):'style'==e?Js(this._styles,t):this._attrs.set(e,t)}_removeAttribute(e){return this._fireChange('attributes',this),'class'==e?!!(0<this._classes.size)&&(this._classes.clear(),!0):'style'==e?!!(0<this._styles.size)&&(this._styles.clear(),!0):this._attrs.delete(e)}_addClass(e){this._fireChange('attributes',this),e=Array.isArray(e)?e:[e],e.forEach((e)=>this._classes.add(e))}_removeClass(e){this._fireChange('attributes',this),e=Array.isArray(e)?e:[e],e.forEach((e)=>this._classes.delete(e))}_setStyle(e,t){if(this._fireChange('attributes',this),bA(e)){const t=Object.keys(e);for(const n of t)this._styles.set(n,e[n])}else this._styles.set(e,t)}_removeStyle(e){this._fireChange('attributes',this),e=Array.isArray(e)?e:[e],e.forEach((e)=>this._styles.delete(e))}_setCustomProperty(e,t){this._customProperties.set(e,t)}_removeCustomProperty(e){return this._customProperties.delete(e)}}class wA{constructor(e={}){if(!e.boundaries&&!e.startPosition)throw new Vv('view-tree-walker-no-start-position: Neither boundaries nor starting position have been defined.');if(e.direction&&'forward'!=e.direction&&'backward'!=e.direction)throw new Vv('view-tree-walker-unknown-direction: Only `backward` and `forward` direction allowed.',{direction:e.direction});this.boundaries=e.boundaries||null,this.position=e.startPosition?rT.createFromPosition(e.startPosition):rT.createFromPosition(e.boundaries['backward'==e.direction?'end':'start']),this.direction=e.direction||'forward',this.singleCharacters=!!e.singleCharacters,this.shallow=!!e.shallow,this.ignoreElementEnd=!!e.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null}[Symbol.iterator](){return this}skip(e){let t,n,o;do o=this.position,({done:t,value:n}=this.next());while(!t&&e(n));t||(this.position=o)}next(){return'forward'==this.direction?this._next():this._previous()}_next(){let e=rT.createFromPosition(this.position);const t=this.position,n=e.parent;if(null===n.parent&&e.offset===n.childCount)return{done:!0};if(n===this._boundaryEndParent&&e.offset==this.boundaries.end.offset)return{done:!0};let o;if(n instanceof cA){if(e.isAtEnd)return this.position=rT.createAfter(n),this._next();o=n.data[e.offset]}else o=n.getChild(e.offset);if(o instanceof kA)return this.shallow?e.offset++:e=new rT(o,0),this.position=e,this._formatReturnValue('elementStart',o,t,e,1);if(!(o instanceof cA)){if('string'==typeof o){let o;if(this.singleCharacters)o=1;else{const t=n===this._boundaryEndParent?this.boundaries.end.offset:n.data.length;o=t-e.offset}const r=new pA(n,e.offset,o);return e.offset+=o,this.position=e,this._formatReturnValue('text',r,t,e,o)}return e=rT.createAfter(n),this.position=e,this.ignoreElementEnd?this._next():this._formatReturnValue('elementEnd',n,t,e)}if(this.singleCharacters)return e=new rT(o,0),this.position=e,this._next();else{let n=o.data.length,r;return o==this._boundaryEndParent?(n=this.boundaries.end.offset,r=new pA(o,0,n),e=rT.createAfter(r)):(r=new pA(o,0,o.data.length),e.offset++),this.position=e,this._formatReturnValue('text',r,t,e,n)}}_previous(){let e=rT.createFromPosition(this.position);const t=this.position,n=e.parent;if(null===n.parent&&0===e.offset)return{done:!0};if(n==this._boundaryStartParent&&e.offset==this.boundaries.start.offset)return{done:!0};let o;if(n instanceof cA){if(e.isAtStart)return this.position=rT.createBefore(n),this._previous();o=n.data[e.offset-1]}else o=n.getChild(e.offset-1);if(o instanceof kA)return this.shallow?(e.offset--,this.position=e,this._formatReturnValue('elementStart',o,t,e,1)):(e=new rT(o,o.childCount),this.position=e,this.ignoreElementEnd?this._previous():this._formatReturnValue('elementEnd',o,t,e));if(!(o instanceof cA)){if('string'==typeof o){let o;if(!this.singleCharacters){const t=n===this._boundaryStartParent?this.boundaries.start.offset:0;o=e.offset-t}else o=1;e.offset-=o;const r=new pA(n,e.offset,o);return this.position=e,this._formatReturnValue('text',r,t,e,o)}return e=rT.createBefore(n),this.position=e,this._formatReturnValue('elementStart',n,t,e,1)}if(this.singleCharacters)return e=new rT(o,o.data.length),this.position=e,this._previous();else{let n=o.data.length,r;if(o==this._boundaryStartParent){const t=this.boundaries.start.offset;r=new pA(o,t,o.data.length-t),n=r.data.length,e=rT.createBefore(r)}else r=new pA(o,0,o.data.length),e.offset--;return this.position=e,this._formatReturnValue('text',r,t,e,n)}}_formatReturnValue(e,t,n,o,r){return t instanceof pA&&(t.offsetInText+t.data.length==t.textNode.data.length&&('forward'!=this.direction||this.boundaries&&this.boundaries.end.isEqual(this.position)?n=rT.createAfter(t.textNode):(o=rT.createAfter(t.textNode),this.position=o)),0===t.offsetInText&&('backward'!=this.direction||this.boundaries&&this.boundaries.start.isEqual(this.position)?n=rT.createBefore(t.textNode):(o=rT.createBefore(t.textNode),this.position=o))),{done:!1,value:{type:e,item:t,previousPosition:n,nextPosition:o,length:r}}}}class yA extends kA{constructor(e,t,n){super(e,t,n),this.getFillerOffset=Xs}is(e,t=null){return t?'containerElement'==e&&t==this.name||super.is(e,t):'containerElement'==e||super.is(e)}}var vA=function(e,t,n){var o=n.length;return 0===o?e.call(t):1===o?e.call(t,n[0]):2===o?e.call(t,n[0],n[1]):3===o?e.call(t,n[0],n[1],n[2]):e.apply(t,n)},xA=Object.prototype,CA=xA.toString,AA=function(e){return'symbol'==typeof e||Dx(e)&&CA.call(e)=='[object Symbol]'},TA=0/0,EA=/^\s+|\s+$/g,PA=/^[-+]0x[0-9a-f]+$/i,SA=/^0b[01]+$/i,RA=/^0o[0-7]+$/i,OA=parseInt,IA=function(e){if('number'==typeof e)return e;if(AA(e))return TA;if($v(e)){var t=Jv(e.valueOf)?e.valueOf():e;e=$v(t)?t+'':t}if('string'!=typeof e)return 0===e?e:+e;e=e.replace(EA,'');var n=SA.test(e);return n||RA.test(e)?OA(e.slice(2),n?2:8):PA.test(e)?TA:+e},NA=1/0,VA=function(e){if(!e)return 0===e?e:0;if(e=IA(e),e===NA||e===-NA){var t=0>e?-1:1;return t*17976931348623157e292}return e===e?e:0},LA=function(e){var t=VA(e),n=t%1;return t===t?n?t-n:t:0},DA=rd,FA=function(e,t){if('function'!=typeof e)throw new TypeError('Expected a function');return t=DA(void 0===t?e.length-1:LA(t),0),function(){for(var n=arguments,o=-1,r=DA(n.length-t,0),i=Array(r);++o<r;)i[o]=n[t+o];switch(t){case 0:return e.call(this,i);case 1:return e.call(this,n[0],i);case 2:return e.call(this,n[0],n[1],i);}var a=Array(t+1);for(o=-1;++o<t;)a[o]=n[o];return a[t]=i,vA(e,this,a)}},MA=hx.a.Reflect,BA=MA,qA=function(e){for(var t=[],n;!(n=e.next()).done;)t.push(n.value);return t},zA=Object.prototype,jA=BA?BA.enumerate:void 0,UA=zA.propertyIsEnumerable;jA&&!UA.call({valueOf:1},'valueOf')&&(tl=function(e){return qA(jA(e))});var HA=tl,WA=Object.prototype,GA=WA.hasOwnProperty,$A=function(e){for(var t=-1,n=Qx(e),o=HA(e),r=o.length,i=Kx(e),a=i||[],s=a.length;++t<r;){var l=o[t];!!i&&('length'==l||Jx(l,s))||'constructor'==l&&(n||!GA.call(e,l))||a.push(l)}return a},KA=Object.prototype,ZA=KA.propertyIsEnumerable,JA=!ZA.call({valueOf:1},'valueOf'),YA=function(e){return FA(function(t,n){var o=-1,r=n.length,i=1<r?n[r-1]:void 0,a=2<r?n[2]:void 0;for(i=3<e.length&&'function'==typeof i?(r--,i):void 0,a&&el(n[0],n[1],a)&&(i=3>r?void 0:i,r=1),t=Object(t);++o<r;){var s=n[o];s&&e(t,s,o,i)}return t})}(function(e,t){if(JA||Qx(t)||Lx(t))return void Ax(t,$A(t),e);for(var n in t)Cx(e,n,t[n])});const QA=Symbol('observableProperties'),XA=Symbol('boundObservables'),eT=Symbol('boundProperties'),tT={set(e,t){if($v(e))return void Object.keys(e).forEach((t)=>{this.set(t,e[t])},this);nl(this);const n=this[QA];if(e in this&&!n.has(e))throw new Vv('observable-set-cannot-override: Cannot override an existing property.');Object.defineProperty(this,e,{enumerable:!0,configurable:!0,get(){return n.get(e)},set(t){const o=n.get(e);o===t&&n.has(e)||(n.set(e,t),this.fire('change:'+e,e,t,o))}}),this[e]=t},bind(...e){if(!e.length||!al(e))throw new Vv('observable-bind-wrong-properties: All properties must be strings.');if(new Set(e).size!==e.length)throw new Vv('observable-bind-duplicate-properties: Properties must be unique.');nl(this);const t=this[eT];e.forEach((e)=>{if(t.has(e))throw new Vv('observable-bind-rebind: Cannot bind the same property more that once.')});const n=new Map;return e.forEach((e)=>{const o={property:e,to:[]};t.set(e,o),n.set(e,o)}),{to:ol,toMany:rl,_observable:this,_bindProperties:e,_to:[],_bindings:n}},unbind(...e){if(!(QA in this))return;const t=this[eT],n=this[XA];if(e.length){if(!al(e))throw new Vv('observable-unbind-wrong-properties: Properties must be strings.');e.forEach((e)=>{const o=t.get(e);if(!o)return;let r,i,a,s;o.to.forEach((e)=>{r=e[0],i=e[1],a=n.get(r),s=a[i],s.delete(o),s.size||delete a[i],Object.keys(a).length||(n.delete(r),this.stopListening(r,'change'))}),t.delete(e)})}else n.forEach((e,t)=>{this.stopListening(t,'change')}),n.clear(),t.clear()},decorate(e){const t=this[e];if(!t)throw new Vv('observablemixin-cannot-decorate-undefined: Cannot decorate an undefined method.',{object:this,methodName:e});this.on(e,(e,n)=>{e.return=t.apply(this,n)}),this[e]=function(...t){return this.fire(e,t)}}};YA(tT,zv);const nT=Symbol('document');class oT extends yA{constructor(e,t,n){super(e,t,n),this.set('isReadOnly',!1),this.set('isFocused',!1)}get document(){return this.getCustomProperty(nT)}set _document(e){if(this.getCustomProperty(nT))throw new Vv('view-editableelement-document-already-set: View document is already set.');this._setCustomProperty(nT,e),this.bind('isReadOnly').to(e),this.bind('isFocused').to(e,'isFocused',(t)=>t&&e.selection.editableElement==this),this.listenTo(e.selection,'change',()=>{this.isFocused=e.isFocused&&e.selection.editableElement==this})}}Os(oT,tT);class rT{constructor(e,t){this.parent=e,this.offset=t}get nodeAfter(){return this.parent.is('text')?null:this.parent.getChild(this.offset)||null}get nodeBefore(){return this.parent.is('text')?null:this.parent.getChild(this.offset-1)||null}get isAtStart(){return 0===this.offset}get isAtEnd(){const e=this.parent.is('text')?this.parent.data.length:this.parent.childCount;return this.offset===e}get root(){return this.parent.root}get editableElement(){let e=this.parent;for(;!(e instanceof oT);)if(e.parent)e=e.parent;else return null;return e}getShiftedBy(e){const t=rT.createFromPosition(this),n=t.offset+e;return t.offset=0>n?0:n,t}getLastMatchingPosition(e,t={}){t.startPosition=this;const n=new wA(t);return n.skip(e),n.position}getAncestors(){return this.parent.is('documentFragment')?[this.parent]:this.parent.getAncestors({includeSelf:!0})}getCommonAncestor(e){const t=this.getAncestors(),n=e.getAncestors();let o=0;for(;t[o]==n[o]&&t[o];)o++;return 0==o?null:t[o-1]}isEqual(e){return this.parent==e.parent&&this.offset==e.offset}isBefore(e){return'before'==this.compareWith(e)}isAfter(e){return'after'==this.compareWith(e)}compareWith(e){if(this.root!==e.root)return'different';if(this.isEqual(e))return'same';const t=this.parent.is('node')?this.parent.getPath():[],n=e.parent.is('node')?e.parent.getPath():[];t.push(this.offset),n.push(e.offset);const o=zs(t,n);return'prefix'===o?'before':'extension'===o?'after':t[o]<n[o]?'before':'after'}static createAt(e,t){if(e instanceof rT)return this.createFromPosition(e);else{const n=e;if('end'==t)t=n.is('text')?n.data.length:n.childCount;else{if('before'==t)return this.createBefore(n);if('after'==t)return this.createAfter(n);t||(t=0)}return new rT(n,t)}}static createAfter(e){if(e.is('textProxy'))return new rT(e.textNode,e.offsetInText+e.data.length);if(!e.parent)throw new Vv('view-position-after-root: You can not make position after root.',{root:e});return new rT(e.parent,e.index+1)}static createBefore(e){if(e.is('textProxy'))return new rT(e.textNode,e.offsetInText);if(!e.parent)throw new Vv('view-position-before-root: You can not make position before root.',{root:e});return new rT(e.parent,e.index)}static createFromPosition(e){return new this(e.parent,e.offset)}}class iT{constructor(e,t=null){this.start=rT.createFromPosition(e),this.end=t?rT.createFromPosition(t):rT.createFromPosition(e)}*[Symbol.iterator](){yield*new wA({boundaries:this,ignoreElementEnd:!0})}get isCollapsed(){return this.start.isEqual(this.end)}get isFlat(){return this.start.parent===this.end.parent}get root(){return this.start.root}getEnlarged(){let e=this.start.getLastMatchingPosition(ul,{direction:'backward'}),t=this.end.getLastMatchingPosition(ul);return e.parent.is('text')&&e.isAtStart&&(e=rT.createBefore(e.parent)),t.parent.is('text')&&t.isAtEnd&&(t=rT.createAfter(t.parent)),new iT(e,t)}getTrimmed(){let e=this.start.getLastMatchingPosition(ul);if(e.isAfter(this.end)||e.isEqual(this.end))return new iT(e,e);let t=this.end.getLastMatchingPosition(ul,{direction:'backward'});const n=e.nodeAfter,o=t.nodeBefore;return n&&n.is('text')&&(e=new rT(n,0)),o&&o.is('text')&&(t=new rT(o,o.data.length)),new iT(e,t)}isEqual(e){return this==e||this.start.isEqual(e.start)&&this.end.isEqual(e.end)}containsPosition(e){return e.isAfter(this.start)&&e.isBefore(this.end)}containsRange(e,t=!1){e.isCollapsed&&(t=!1);const n=this.containsPosition(e.start)||t&&this.start.isEqual(e.start),o=this.containsPosition(e.end)||t&&this.end.isEqual(e.end);return n&&o}getDifference(e){const t=[];return this.isIntersecting(e)?(this.containsPosition(e.start)&&t.push(new iT(this.start,e.start)),this.containsPosition(e.end)&&t.push(new iT(e.end,this.end))):t.push(iT.createFromRange(this)),t}getIntersection(e){if(this.isIntersecting(e)){let t=this.start,n=this.end;return this.containsPosition(e.start)&&(t=e.start),this.containsPosition(e.end)&&(n=e.end),new iT(t,n)}return null}getWalker(e={}){return e.boundaries=this,new wA(e)}getCommonAncestor(){return this.start.getCommonAncestor(this.end)}*getItems(e={}){e.boundaries=this,e.ignoreElementEnd=!0;const t=new wA(e);for(const n of t)yield n.item}*getPositions(e={}){e.boundaries=this;const t=new wA(e);yield t.position;for(const n of t)yield n.nextPosition}isIntersecting(e){return this.start.isBefore(e.end)&&this.end.isAfter(e.start)}static createFromParentsAndOffsets(e,t,n,o){return new this(new rT(e,t),new rT(n,o))}static createFromRange(e){return new this(e.start,e.end)}static createFromPositionAndShift(e,t){const n=e,o=e.getShiftedBy(t);return 0<t?new this(n,o):new this(o,n)}static createIn(e){return this.createFromParentsAndOffsets(e,0,e,e.childCount)}static createOn(e){const t=e.is('textProxy')?e.offsetSize:1;return this.createFromPositionAndShift(rT.createBefore(e),t)}static createCollapsedAt(e,t){const n=rT.createAt(e,t),o=rT.createFromPosition(n);return new iT(n,o)}}class aT{constructor(e=null,t,n){this._selection=new sT,this._selection.delegate('change').to(this),this._selection.setTo(e,t,n)}get isFake(){return this._selection.isFake}get fakeSelectionLabel(){return this._selection.fakeSelectionLabel}get anchor(){return this._selection.anchor}get focus(){return this._selection.focus}get isCollapsed(){return this._selection.isCollapsed}get rangeCount(){return this._selection.rangeCount}get isBackward(){return this._selection.isBackward}get editableElement(){return this._selection.editableElement}get _ranges(){return this._selection._ranges}*getRanges(){yield*this._selection.getRanges()}getFirstRange(){return this._selection.getFirstRange()}getLastRange(){return this._selection.getLastRange()}getFirstPosition(){return this._selection.getFirstPosition()}getLastPosition(){return this._selection.getLastPosition()}getSelectedElement(){return this._selection.getSelectedElement()}isEqual(e){return this._selection.isEqual(e)}isSimilar(e){return this._selection.isSimilar(e)}_setTo(e,t,n){this._selection.setTo(e,t,n)}_setFocus(e,t){this._selection.setFocus(e,t)}}Os(aT,zv);class sT{constructor(e=null,t,n){this._ranges=[],this._lastRangeBackward=!1,this._isFake=!1,this._fakeSelectionLabel='',this.setTo(e,t,n)}get isFake(){return this._isFake}get fakeSelectionLabel(){return this._fakeSelectionLabel}get anchor(){if(!this._ranges.length)return null;const e=this._ranges[this._ranges.length-1],t=this._lastRangeBackward?e.end:e.start;return rT.createFromPosition(t)}get focus(){if(!this._ranges.length)return null;const e=this._ranges[this._ranges.length-1],t=this._lastRangeBackward?e.start:e.end;return rT.createFromPosition(t)}get isCollapsed(){return 1===this.rangeCount&&this._ranges[0].isCollapsed}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}get editableElement(){return this.anchor?this.anchor.editableElement:null}*getRanges(){for(const e of this._ranges)yield iT.createFromRange(e)}getFirstRange(){let e=null;for(const t of this._ranges)(!e||t.start.isBefore(e.start))&&(e=t);return e?iT.createFromRange(e):null}getLastRange(){let e=null;for(const t of this._ranges)(!e||t.end.isAfter(e.end))&&(e=t);return e?iT.createFromRange(e):null}getFirstPosition(){const e=this.getFirstRange();return e?rT.createFromPosition(e.start):null}getLastPosition(){const e=this.getLastRange();return e?rT.createFromPosition(e.end):null}isEqual(e){if(this.isFake!=e.isFake)return!1;if(this.isFake&&this.fakeSelectionLabel!=e.fakeSelectionLabel)return!1;if(this.rangeCount!=e.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(e.anchor)||!this.focus.isEqual(e.focus))return!1;for(const t of this._ranges){let n=!1;for(const o of e._ranges)if(t.isEqual(o)){n=!0;break}if(!n)return!1}return!0}isSimilar(e){if(this.isBackward!=e.isBackward)return!1;const t=ml(this.getRanges()),n=ml(e.getRanges());if(t!=n)return!1;if(0==t)return!0;for(let t of this.getRanges()){t=t.getTrimmed();let n=!1;for(let o of e.getRanges())if(o=o.getTrimmed(),t.start.isEqual(o.start)&&t.end.isEqual(o.end)){n=!0;break}if(!n)return!1}return!0}getSelectedElement(){if(1!==this.rangeCount)return null;const e=this.getFirstRange(),t=e.start.nodeAfter,n=e.end.nodeBefore;return t instanceof kA&&t==n?t:null}setTo(e,t,n){if(null===e)this._setRanges([]),this._setFakeOptions(t);else if(e instanceof sT||e instanceof aT)this._setRanges(e.getRanges(),e.isBackward),this._setFakeOptions({fake:e.isFake,label:e.fakeSelectionLabel});else if(e instanceof iT)this._setRanges([e],t&&t.backward),this._setFakeOptions(t);else if(e instanceof rT)this._setRanges([new iT(e)]),this._setFakeOptions(t);else if(e instanceof dA){const o=!!n&&!!n.backward;let r;if(t===void 0)throw new Vv('view-selection-setTo-required-second-parameter: selection.setTo requires the second parameter when the first parameter is a node.');else r='in'==t?iT.createIn(e):'on'==t?iT.createOn(e):iT.createCollapsedAt(e,t);this._setRanges([r],o),this._setFakeOptions(n)}else if(Us(e))this._setRanges(e,t&&t.backward),this._setFakeOptions(t);else throw new Vv('view-selection-setTo-not-selectable: Cannot set selection to given place.');this.fire('change')}setFocus(e,t){if(null===this.anchor)throw new Vv('view-selection-setFocus-no-ranges: Cannot set selection focus if there are no ranges in selection.');const n=rT.createAt(e,t);if('same'!=n.compareWith(this.focus)){const e=this.anchor;this._ranges.pop(),'before'==n.compareWith(e)?this._addRange(new iT(n,e),!0):this._addRange(new iT(e,n)),this.fire('change')}}_setRanges(e,t=!1){e=Array.from(e),this._ranges=[];for(const n of e)this._addRange(n);this._lastRangeBackward=!!t}_setFakeOptions(e={}){this._isFake=!!e.fake,this._fakeSelectionLabel=e.fake?e.label||'':''}_addRange(e,t=!1){if(!(e instanceof iT))throw new Vv('view-selection-invalid-range: Invalid Range.');this._pushRange(e),this._lastRangeBackward=!!t}_pushRange(e){for(const t of this._ranges)if(e.isIntersecting(t))throw new Vv('view-selection-range-intersects: Trying to add a range that intersects with another range from selection.',{addedRange:e,intersectingRange:t});this._ranges.push(iT.createFromRange(e))}}Os(sT,zv);class lT{constructor(e){this._children=[],e&&this._insertChild(0,e)}[Symbol.iterator](){return this._children[Symbol.iterator]()}get childCount(){return this._children.length}get isEmpty(){return 0===this.childCount}get root(){return this}get parent(){return null}is(e){return'documentFragment'==e}_appendChild(e){return this._insertChild(this.childCount,e)}getChild(e){return this._children[e]}getChildIndex(e){return this._children.indexOf(e)}getChildren(){return this._children[Symbol.iterator]()}_insertChild(e,t){this._fireChange('children',this);let n=0;const o=gl(t);for(const r of o)null!==r.parent&&r._remove(),r.parent=this,this._children.splice(e,0,r),e++,n++;return n}_removeChildren(e,t=1){this._fireChange('children',this);for(let n=e;n<e+t;n++)this._children[n].parent=null;return this._children.splice(e,t)}_fireChange(e,t){this.fire('change:'+e,t)}}Os(lT,zv);const dT=navigator.userAgent.toLowerCase(),cT={isMac:function(e){return-1<e.indexOf('macintosh')}(dT)};const pT={"⌘":'ctrl',"⇧":'shift',"⌥":'alt'},uT={ctrl:'\u2318',shift:'\u21E7',alt:'\u2325'},mT=function(){const e={arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,backspace:8,delete:46,enter:13,space:32,esc:27,tab:9,ctrl:1114112,cmd:1114112,shift:2228224,alt:4456448};for(let t=65;90>=t;t++){const o=n(t);e[o.toLowerCase()]=t}for(let t=48;57>=t;t++)e[t-48]=t;for(let t=112;123>=t;t++)e['f'+(t-111)]=t;return e}(),gT=(e)=>{const t=e.createElement('br');return t.dataset.ckeFiller=!0,t},hT=(e)=>e.createTextNode('\xA0'),fT=7;let bT='';for(let e=0;e<fT;e++)bT+='\u200B';const _T=new WeakMap;var kT={window,document};class wT{constructor(e={}){this.blockFiller=e.blockFiller||gT,this.preElements=['pre'],this.blockElements=['p','div','h1','h2','h3','h4','h5','h6'],this._domToViewMapping=new WeakMap,this._viewToDomMapping=new WeakMap,this._fakeSelectionMapping=new WeakMap}bindFakeSelection(e,t){this._fakeSelectionMapping.set(e,new sT(t))}fakeSelectionToView(e){return this._fakeSelectionMapping.get(e)}bindElements(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}unbindDomElement(e){const t=this._domToViewMapping.get(e);if(t){this._domToViewMapping.delete(e),this._viewToDomMapping.delete(t);for(const t of Array.from(e.childNodes))this.unbindDomElement(t)}}bindDocumentFragments(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}viewToDom(e,t,n={}){if(e.is('text')){const n=this._processDataFromViewText(e);return t.createTextNode(n)}else{if(this.mapViewToDom(e))return this.mapViewToDom(e);let o;if(e.is('documentFragment'))o=t.createDocumentFragment(),n.bind&&this.bindDocumentFragments(o,e);else{if(e.is('uiElement'))return o=e.render(t),n.bind&&this.bindElements(o,e),o;o=t.createElement(e.name),n.bind&&this.bindElements(o,e);for(const t of e.getAttributeKeys())o.setAttribute(t,e.getAttribute(t))}if(n.withChildren||void 0===n.withChildren)for(const r of this.viewChildrenToDom(e,t,n))o.appendChild(r);return o}}*viewChildrenToDom(e,t,n={}){const o=e.getFillerOffset&&e.getFillerOffset();let r=0;for(const i of e.getChildren())o===r&&(yield this.blockFiller(t)),yield this.viewToDom(i,t,n),r++;o===r&&(yield this.blockFiller(t))}viewRangeToDom(e){const t=this.viewPositionToDom(e.start),n=this.viewPositionToDom(e.end),o=document.createRange();return o.setStart(t.parent,t.offset),o.setEnd(n.parent,n.offset),o}viewPositionToDom(e){const t=e.parent;if(t.is('text')){const n=this.findCorrespondingDomText(t);if(!n)return null;let o=e.offset;return hl(n)&&(o+=fT),{parent:n,offset:o}}else{let n,o,r;if(0===e.offset){if(n=this.mapViewToDom(t),!n)return null;r=n.childNodes[0]}else{const t=e.nodeBefore;if(o=t.is('text')?this.findCorrespondingDomText(t):this.mapViewToDom(e.nodeBefore),!o)return null;n=o.parentNode,r=o.nextSibling}if(vl(r)&&hl(r))return{parent:r,offset:fT};const i=o?kl(o)+1:0;return{parent:n,offset:i}}}domToView(e,t={}){if(_l(e,this.blockFiller))return null;const n=this.getParentUIElement(e,this._domToViewMapping);if(n)return n;if(vl(e)){if(fl(e))return null;else{const t=this._processDataFromDomText(e);return''===t?null:new cA(t)}}else if(this.isComment(e))return null;else{if(this.mapDomToView(e))return this.mapDomToView(e);let n;if(this.isDocumentFragment(e))n=new lT,t.bind&&this.bindDocumentFragments(e,n);else{const o=t.keepOriginalCase?e.tagName:e.tagName.toLowerCase();n=new kA(o),t.bind&&this.bindElements(e,n);const r=e.attributes;for(let e=r.length-1;0<=e;e--)n._setAttribute(r[e].name,r[e].value)}if(t.withChildren||void 0===t.withChildren)for(const o of this.domChildrenToView(e,t))n._appendChild(o);return n}}*domChildrenToView(e,t={}){for(let n=0;n<e.childNodes.length;n++){const o=e.childNodes[n],r=this.domToView(o,t);null!==r&&(yield r)}}domSelectionToView(e){if(1===e.rangeCount){let t=e.getRangeAt(0).startContainer;vl(t)&&(t=t.parentNode);const n=this.fakeSelectionToView(t);if(n)return n}const t=this.isDomSelectionBackward(e),n=[];for(let t=0;t<e.rangeCount;t++){const o=e.getRangeAt(t),r=this.domRangeToView(o);r&&n.push(r)}return new sT(n,{backward:t})}domRangeToView(e){const t=this.domPositionToView(e.startContainer,e.startOffset),n=this.domPositionToView(e.endContainer,e.endOffset);return t&&n?new iT(t,n):null}domPositionToView(e,t){if(_l(e,this.blockFiller))return this.domPositionToView(e.parentNode,kl(e));const n=this.mapDomToView(e);if(n&&n.is('uiElement'))return rT.createBefore(n);if(vl(e)){if(fl(e))return this.domPositionToView(e.parentNode,kl(e));const n=this.findCorrespondingViewText(e);let o=t;return n?(hl(e)&&(o-=fT,o=0>o?0:o),new rT(n,o)):null}if(0===t){const t=this.mapDomToView(e);if(t)return new rT(t,0)}else{const n=e.childNodes[t-1],o=vl(n)?this.findCorrespondingViewText(n):this.mapDomToView(n);if(o&&o.parent)return new rT(o.parent,o.index+1)}return null}mapDomToView(e){return this.getParentUIElement(e)||this._domToViewMapping.get(e)}findCorrespondingViewText(e){if(fl(e))return null;const t=this.getParentUIElement(e);if(t)return t;const n=e.previousSibling;if(n){if(!this.isElement(n))return null;const e=this.mapDomToView(n);if(e){const t=e.nextSibling;return t instanceof cA?e.nextSibling:null}}else{const t=this.mapDomToView(e.parentNode);if(t){const e=t.getChild(0);return e instanceof cA?e:null}}return null}mapViewToDom(e){return this._viewToDomMapping.get(e)}findCorrespondingDomText(e){const t=e.previousSibling;return t&&this.mapViewToDom(t)?this.mapViewToDom(t).nextSibling:!t&&e.parent&&this.mapViewToDom(e.parent)?this.mapViewToDom(e.parent).childNodes[0]:null}focus(e){const t=this.mapViewToDom(e);if(t&&t.ownerDocument.activeElement!==t){const{scrollX:e,scrollY:n}=kT.window,o=[];Cl(t,(e)=>{const{scrollLeft:t,scrollTop:n}=e;o.push([t,n])}),t.focus(),Cl(t,(e)=>{const[t,n]=o.shift();e.scrollLeft=t,e.scrollTop=n}),kT.window.scrollTo(e,n)}}isElement(e){return e&&e.nodeType==Node.ELEMENT_NODE}isDocumentFragment(e){return e&&e.nodeType==Node.DOCUMENT_FRAGMENT_NODE}isComment(e){return e&&e.nodeType==Node.COMMENT_NODE}isDomSelectionBackward(e){if(e.isCollapsed)return!1;const t=document.createRange();t.setStart(e.anchorNode,e.anchorOffset),t.setEnd(e.focusNode,e.focusOffset);const n=t.collapsed;return t.detach(),n}getParentUIElement(e){const t=wl(e);for(t.pop();t.length;){const e=t.pop(),n=this._domToViewMapping.get(e);if(n&&n.is('uiElement'))return n}return null}isDomSelectionCorrect(e){return this._isDomSelectionPositionCorrect(e.anchorNode,e.anchorOffset)&&this._isDomSelectionPositionCorrect(e.focusNode,e.focusOffset)}_isDomSelectionPositionCorrect(e,t){if(vl(e)&&hl(e)&&t<fT)return!1;if(this.isElement(e)&&hl(e.childNodes[t]))return!1;const n=this.mapDomToView(e);return!(n&&n.is('uiElement'))}_processDataFromViewText(e){let t=e.data;if(e.getAncestors().some((e)=>this.preElements.includes(e.name)))return t;if(' '==t.charAt(0)){const n=this._getTouchingViewTextNode(e,!1),o=n&&this._nodeEndsWithSpace(n);(o||!n)&&(t='\xA0'+t.substr(1))}if(' '==t.charAt(t.length-1)){const n=this._getTouchingViewTextNode(e,!0);n||(t=t.substr(0,t.length-1)+'\xA0')}return t.replace(/ {2}/g,' \xA0')}_nodeEndsWithSpace(e){if(e.getAncestors().some((e)=>this.preElements.includes(e.name)))return!1;const t=this._processDataFromViewText(e);return' '==t.charAt(t.length-1)}_processDataFromDomText(e){let t=e.data;if(xl(e,this.preElements))return bl(e);t=t.replace(/[ \n\t\r]{1,}/g,' ');const n=this._getTouchingDomTextNode(e,!1),o=this._getTouchingDomTextNode(e,!0);return(!n||/[^\S\u00A0]/.test(n.data.charAt(n.data.length-1)))&&(t=t.replace(/^ /,'')),o||hl(e)||(t=t.replace(/ $/,'')),t=bl(new Text(t)),t=t.replace(/ \u00A0/g,' '),(!n||/[^\S\u00A0]/.test(n.data.charAt(n.data.length-1)))&&(t=t.replace(/^\u00A0/,' ')),o&&'\xA0'!=o.data.charAt(0)||(t=t.replace(/\u00A0( *)$/,' $1')),t}_getTouchingViewTextNode(e,t){const n=new wA({startPosition:t?rT.createAfter(e):rT.createBefore(e),direction:t?'forward':'backward'});for(const o of n){if(o.item.is('containerElement'))return null;if(o.item.is('textProxy'))return o.item}return null}_getTouchingDomTextNode(e,t){if(!e.parentNode)return null;const n=t?'nextNode':'previousNode',o=e.ownerDocument,r=wl(e)[0],i=o.createTreeWalker(r,NodeFilter.SHOW_TEXT);i.currentNode=e;const a=i[n]();if(null!==a){const t=yl(e,a);if(t&&!xl(e,this.blockElements,t)&&!xl(a,this.blockElements,t))return a}return null}}class yT{constructor(){this._domParser=new DOMParser,this._domConverter=new wT({blockFiller:hT}),this._htmlWriter=new Iv}toData(e){const t=this._domConverter.viewToDom(e,document);return this._htmlWriter.getHtml(t)}toView(e){const t=this._toDom(e);return this._domConverter.domToView(t)}_toDom(e){const t=this._domParser.parseFromString(e,'text/html'),n=t.createDocumentFragment(),o=t.body.childNodes;for(;0<o.length;)n.appendChild(o[0]);return n}}var vT=/highlight-(?:text|source)-([a-z0-9]+)/,xT=Array.prototype.indexOf,CT=Array.prototype.every,AT={};AT.tableCell={filter:['th','td'],replacement:function(e,t){return Sl(e,t)}},AT.tableRow={filter:'tr',replacement:function(e,t){var n='',o={left:':--',right:'--:',center:':-:'};if(El(t))for(var r=0;r<t.childNodes.length;r++){var i='---',a=(t.childNodes[r].getAttribute('align')||'').toLowerCase();a&&(i=o[a]||i),n+=Sl(i,t.childNodes[r])}return'\n'+e+(n?'\n'+n:'')}},AT.table={filter:function(e){return'TABLE'===e.nodeName&&El(e.rows[0])},replacement:function(e){return e=e.replace('\n\n','\n'),'\n\n'+e+'\n\n'}},AT.tableSection={filter:['thead','tbody','tfoot'],replacement:function(e){return e}};var TT=['address','article','aside','audio','blockquote','body','canvas','center','dd','dir','div','dl','dt','fieldset','figcaption','figure','footer','form','frameset','h1','h2','h3','h4','h5','h6','header','hgroup','hr','html','isindex','li','main','menu','nav','noframes','noscript','ol','output','p','pre','section','table','tbody','td','tfoot','th','thead','tr','ul'],ET=['area','base','br','col','command','embed','hr','img','input','keygen','link','meta','param','source','track','wbr'],PT=ET.join(),ST={};ST.paragraph={filter:'p',replacement:function(e){return'\n\n'+e+'\n\n'}},ST.lineBreak={filter:'br',replacement:function(e,t,n){return n.br+'\n'}},ST.heading={filter:['h1','h2','h3','h4','h5','h6'],replacement:function(e,t,n){var o=+t.nodeName.charAt(1);if('setext'===n.headingStyle&&3>o){var r=Vl(1==o?'=':'-',e.length);return'\n\n'+e+'\n'+r+'\n\n'}return'\n\n'+Vl('#',o)+' '+e+'\n\n'}},ST.blockquote={filter:'blockquote',replacement:function(e){return e=e.replace(/^\n+|\n+$/g,''),e=e.replace(/^/gm,'> '),'\n\n'+e+'\n\n'}},ST.list={filter:['ul','ol'],replacement:function(e,t){var n=t.parentNode;return'LI'===n.nodeName&&n.lastElementChild===t?'\n'+e:'\n\n'+e+'\n\n'}},ST.listItem={filter:'li',replacement:function(e,t,n){e=e.replace(/^\n+/,'').replace(/\n+$/,'\n').replace(/\n/gm,'\n ');var o=n.bulletListMarker+' ',r=t.parentNode;if('OL'===r.nodeName){var i=r.getAttribute('start'),a=Array.prototype.indexOf.call(r.children,t);o=(i?+i+a:a+1)+'. '}return o+e+(t.nextSibling&&!/\n$/.test(e)?'\n':'')}},ST.indentedCodeBlock={filter:function(e,t){return'indented'===t.codeBlockStyle&&'PRE'===e.nodeName&&e.firstChild&&'CODE'===e.firstChild.nodeName},replacement:function(e,t){return'\n\n '+t.firstChild.textContent.replace(/\n/g,'\n ')+'\n\n'}},ST.fencedCodeBlock={filter:function(e,t){return'fenced'===t.codeBlockStyle&&'PRE'===e.nodeName&&e.firstChild&&'CODE'===e.firstChild.nodeName},replacement:function(e,t,n){var o=t.firstChild.className||'',r=(o.match(/language-(\S+)/)||[null,''])[1];return'\n\n'+n.fence+r+'\n'+t.firstChild.textContent+'\n'+n.fence+'\n\n'}},ST.horizontalRule={filter:'hr',replacement:function(e,t,n){return'\n\n'+n.hr+'\n\n'}},ST.inlineLink={filter:function(e,t){return'inlined'===t.linkStyle&&'A'===e.nodeName&&e.getAttribute('href')},replacement:function(e,t){var n=t.getAttribute('href'),o=t.title?' "'+t.title+'"':'';return'['+e+']('+n+o+')'}},ST.referenceLink={filter:function(e,t){return'referenced'===t.linkStyle&&'A'===e.nodeName&&e.getAttribute('href')},replacement:function(e,t,n){var o=t.getAttribute('href'),r=t.title?' "'+t.title+'"':'',i,a;switch(n.linkReferenceStyle){case'collapsed':i='['+e+'][]',a='['+e+']: '+o+r;break;case'shortcut':i='['+e+']',a='['+e+']: '+o+r;break;default:var s=this.references.length+1;i='['+e+']['+s+']',a='['+s+']: '+o+r;}return this.references.push(a),i},references:[],append:function(){var e='';return this.references.length&&(e='\n\n'+this.references.join('\n')+'\n\n',this.references=[]),e}},ST.emphasis={filter:['em','i'],replacement:function(e,t,n){return e.trim()?n.emDelimiter+e+n.emDelimiter:''}},ST.strong={filter:['strong','b'],replacement:function(e,t,n){return e.trim()?n.strongDelimiter+e+n.strongDelimiter:''}},ST.code={filter:function(e){var t=e.previousSibling||e.nextSibling,n='PRE'===e.parentNode.nodeName&&!t;return'CODE'===e.nodeName&&!n},replacement:function(e){if(!e.trim())return'';var t='`',n='',o='',r=e.match(/`+/gm);if(r)for(/^`/.test(e)&&(n=' '),/`$/.test(e)&&(o=' ');-1!==r.indexOf(t);)t+='`';return t+n+e+o+t}},ST.image={filter:'img',replacement:function(e,t){var n=t.alt||'',o=t.getAttribute('src')||'',r=t.title||'',i=r?' "'+r+'"':'';return o?'!['+n+']('+o+i+')':''}},Ml.prototype={add:function(e,t){this.array.unshift(t)},keep:function(e){this._keep.unshift({filter:e,replacement:this.keepReplacement})},remove:function(e){this._remove.unshift({filter:e,replacement:function(){return''}})},forNode:function(e){if(e.isBlank)return this.blankRule;var t;return(t=Bl(this.array,e,this.options))?t:(t=Bl(this._keep,e,this.options))?t:(t=Bl(this._remove,e,this.options))?t:this.defaultRule},forEach:function(e){for(var t=0;t<this.array.length;t++)e(this.array[t],t)}};var RT='undefined'==typeof window?{}:window,OT=function(){var e=RT.DOMParser,t=!1;try{new e().parseFromString('','text/html')&&(t=!0)}catch(t){}return t}()?RT.DOMParser:function(){var e=function(){};{var t=i(103).JSDOM;e.prototype.parseFromString=function(e){return new t(e).window.document}}return e}(),IT=Array.prototype.reduce,NT=/^\n*/,VT=/\n*$/,LT;Jl.prototype={turndown:function(e){if(!nd(e))throw new TypeError(e+' is not a string, or an element/document/fragment node.');if(''===e)return'';var t=Yl.call(this,new Hl(e));return Ql.call(this,t)},use:function(e){if(Array.isArray(e))for(var t=0;t<e.length;t++)this.use(e[t]);else if('function'==typeof e)e(this);else throw new TypeError('plugin must be a Function or an Array of Functions');return this},addRule:function(e,t){return this.rules.add(e,t),this},keep:function(e){return this.rules.keep(e),this},remove:function(e){return this.rules.remove(e),this},escape:function(e){return e.replace(/\\(\S)/g,'\\\\$1').replace(/^(#{1,6} )/gm,'\\$1').replace(/^([-*_] *){3,}$/gm,function(e,t){return e.split(t).join('\\'+t)}).replace(/^(\W* {0,3})(\d+)\. /gm,'$1$2\\. ').replace(/^([^\\\w]*)[*+-] /gm,function(e){return e.replace(/([*+-])/g,'\\$1')}).replace(/^(\W* {0,3})> /gm,'$1\\> ').replace(/\*+(?![*\s\W]).+?\*+/g,function(e){return e.replace(/\*/g,'\\*')}).replace(/_+(?![_\s\W]).+?_+/g,function(e){return e.replace(/_/g,'\\_')}).replace(/`+(?![`\s\W]).+?`+/g,function(e){return e.replace(/`/g,'\\`')}).replace(/[\[\]]/g,'\\$&')}};var DT=i(104),FT=i.n(DT);class MT{constructor(){this._htmlDP=new yT,this._domConverter=new wT}toView(e){const t=new FT.a({html:!0}),n=t.render(e);return this._htmlDP.toView(n)}toData(e){const t=this._domConverter.viewToDom(e,document),n=new Jl({headingStyle:'atx'});n.use(Il);const o=n.turndown(t);return o}}class BT{constructor(e,t){this.loader=e,this.resource=t}upload(){const e=this.resource;if(!(e&&e.uploadAttachments)){const t=e?e.name:'Missing context';return console.warn(`uploadAttachments not present on context: ${t}`),Promise.reject('You\'re not allowed to uplod attachments on this resource.')}return e.uploadAttachments([this.loader.file]).then((e)=>this.buildResponse(e[0]))}buildResponse(e){return{default:e.uploadUrl}}abort(){return!1}}class qT extends xb{static get requires(){return[rk]}static get pluginName(){return'OpUploadPlugin'}init(){this.editor.plugins.get('FileRepository').createUploadAdapter=(e)=>{const t=this.editor.config.openProject,n=t.context;return new BT(e,n)}}}class zT extends r_{}r.BalloonEditor=zT;class jT extends __{}r.ClassicEditor=jT,window.OPBalloonEditor=zT,window.OPClassicEditor=jT;const UT={plugins:[function(e){e.data.processor=new MT},tk,dk,mk,yk,Pk,Dk,Bw,cy,yw,_y,Vy,Ly,Mw,sv,fv,zw,Mw,Ov,qT],config:{toolbar:{items:['heading','|','bold','italic','link','bulletedList','numberedList','imageUpload','blockQuote','|','insertTable','insertRowBelow','insertColumnAfter','|','undo','redo']},image:{toolbar:['imageStyle:full','|','imageTextAlternative']},language:'en'}};jT.build=UT,zT.build=UT},function(e,t){'use strict';t.a=function(e){return e&&e.Object===Object?e:null}},function(e,t,n){'use strict';(function(e){var o=n(26),r=n(2),i={function:!0,object:!0},a=i[typeof exports]&&exports&&!exports.nodeType?exports:void 0,s=i[typeof e]&&e&&!e.nodeType?e:void 0,l=s&&s.exports===a?a:void 0,d=l?r.a.Buffer:void 0,c=d?function(e){return e instanceof d}:Object(o.a)(!1);t.a=c}).call(t,n(4)(e))},function(e,t){'use strict';t.a=function(e){return function(){return e}}},function(e,t,n){var o=n(28);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.ck-hidden{display:none!important}.ck.ck-reset,.ck.ck-reset_all,.ck.ck-reset_all *{box-sizing:border-box;width:auto;height:auto;position:static}:root{--ck-z-default:1;--ck-z-modal:999;--ck-color-base-foreground:#fafafa;--ck-color-base-background:#fff;--ck-color-base-border:#c4c4c4;--ck-color-base-action:#61b045;--ck-color-base-focus:#6cb5f9;--ck-color-base-text:#333;--ck-color-base-active:#198cf0;--ck-color-base-active-focus:#0e7fe1;--ck-color-focus-border:#47a4f5;--ck-color-focus-shadow:#77baf8;--ck-color-text:var(--ck-color-base-text);--ck-color-shadow-drop:rgba(0,0,0,.15);--ck-color-shadow-inner:rgba(0,0,0,.1);--ck-color-button-default-background:transparent;--ck-color-button-default-focus-background:#e6e6e6;--ck-color-button-default-active-background:#d9d9d9;--ck-color-button-default-active-shadow:#bfbfbf;--ck-color-button-default-disabled-background:transparent;--ck-color-button-on-background:#dedede;--ck-color-button-on-focus-background:#c4c4c4;--ck-color-button-on-active-background:#bababa;--ck-color-button-on-active-shadow:#a1a1a1;--ck-color-button-on-disabled-background:#dedede;--ck-color-button-action-background:var(--ck-color-base-action);--ck-color-button-action-focus-background:#579e3d;--ck-color-button-action-active-background:#53973b;--ck-color-button-action-active-shadow:#498433;--ck-color-button-action-disabled-background:#7ec365;--ck-color-button-action-text:var(--ck-color-base-background);--ck-color-button-save:#008a00;--ck-color-button-cancel:#db3700;--ck-color-dropdown-panel-background:var(--ck-color-base-background);--ck-color-dropdown-panel-border:var(--ck-color-base-border);--ck-color-input-background:var(--ck-color-base-background);--ck-color-input-border:#c7c7c7;--ck-color-input-text:var(--ck-color-base-text);--ck-color-input-disabled-background:#f2f2f2;--ck-color-input-disabled-border:#c7c7c7;--ck-color-input-disabled-text:#5c5c5c;--ck-color-list-background:var(--ck-color-base-background);--ck-color-list-item-background-hover:var(--ck-color-base-foreground);--ck-color-list-item-background-active:var(--ck-color-base-active);--ck-color-list-item-background-active-focus:var(--ck-color-base-active-focus);--ck-color-list-item-text-active:var(--ck-color-base-background);--ck-color-panel-background:var(--ck-color-base-background);--ck-color-panel-border:var(--ck-color-base-border);--ck-color-toolbar-background:var(--ck-color-base-foreground);--ck-color-toolbar-border:var(--ck-color-base-border);--ck-color-tooltip-background:var(--ck-color-base-text);--ck-color-tooltip-text:var(--ck-color-base-background);--ck-color-engine-placeholder-text:#c2c2c2;--ck-color-upload-bar-background:#6cb5f9;--ck-color-upload-infinite-background:rgba(0,0,0,.1);--ck-color-link-default:#0000f0;--ck-color-link-selected-background:#ebf8ff;--ck-disabled-opacity:.5;--ck-focus-outer-shadow:0 0 3px var(--ck-color-focus-shadow);--ck-focus-ring:1px solid var(--ck-color-focus-border);--ck-font-size-base:13px;--ck-line-height-base:1.84615;--ck-font-face:Helvetica,Arial,Tahoma,Verdana,Sans-Serif;--ck-font-size-tiny:0.7em;--ck-font-size-small:0.75em;--ck-font-size-normal:1em;--ck-font-size-big:1.4em;--ck-font-size-large:1.8em;--ck-ui-component-min-height:2.3em}.ck.ck-reset,.ck.ck-reset_all,.ck.ck-reset_all *{margin:0;padding:0;border:0;background:transparent;text-decoration:none;vertical-align:middle;transition:none;word-wrap:break-word}.ck.ck-reset_all,.ck.ck-reset_all *{border-collapse:collapse;font:normal normal normal var(--ck-font-size-base)/var(--ck-line-height-base) var(--ck-font-face);color:var(--ck-color-text);text-align:left;white-space:nowrap;cursor:auto;float:none}.ck.ck-reset_all .ck-rtl *{text-align:right}.ck.ck-reset_all iframe{vertical-align:inherit}.ck.ck-reset_all textarea{white-space:pre-wrap}.ck.ck-reset_all input[type=password],.ck.ck-reset_all input[type=text],.ck.ck-reset_all textarea{cursor:text}.ck.ck-reset_all input[type=password][disabled],.ck.ck-reset_all input[type=text][disabled],.ck.ck-reset_all textarea[disabled]{cursor:default}.ck.ck-reset_all fieldset{padding:10px;border:2px groove #dfdee3}.ck.ck-reset_all button::-moz-focus-inner{padding:0;border:0}:root{--ck-border-radius:2px;--ck-inner-shadow:2px 2px 3px var(--ck-color-shadow-inner) inset;--ck-drop-shadow:0 1px 2px 1px var(--ck-color-shadow-drop);--ck-spacing-unit:0.6em;--ck-spacing-large:calc(var(--ck-spacing-unit) * 1.5);--ck-spacing-standard:var(--ck-spacing-unit);--ck-spacing-medium:calc(var(--ck-spacing-unit) * 0.8);--ck-spacing-small:calc(var(--ck-spacing-unit) * 0.5);--ck-spacing-tiny:calc(var(--ck-spacing-unit) * 0.3);--ck-spacing-extra-tiny:calc(var(--ck-spacing-unit) * 0.16)}'},function(e){e.exports=function(e){var t='undefined'!=typeof window&&window.location;if(!t)throw new Error('fixUrls requires window.location');if(!e||'string'!=typeof e)return e;var n=t.protocol+'//'+t.host,o=n+t.pathname.replace(/\/[^\/]*$/,'/'),r=e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(e,t){var r=t.trim().replace(/^"(.*)"$/,function(e,t){return t}).replace(/^'(.*)'$/,function(e,t){return t});if(/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(r))return e;var i;return i=0===r.indexOf('//')?r:0===r.indexOf('/')?n+r:o+r.replace(/^\.\//,''),'url('+JSON.stringify(i)+')'});return r}},function(e,t,n){var o=n(31);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.ck.ck-balloon-panel{display:none;position:absolute;z-index:var(--ck-z-modal)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{content:"";position:absolute}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{z-index:var(--ck-z-default)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after{z-index:calc(var(--ck-z-default) + 1)}.ck.ck-balloon-panel[class*=arrow_n]:before{z-index:var(--ck-z-default)}.ck.ck-balloon-panel[class*=arrow_n]:after{z-index:calc(var(--ck-z-default) + 1)}.ck.ck-balloon-panel[class*=arrow_s]:before{z-index:var(--ck-z-default)}.ck.ck-balloon-panel[class*=arrow_s]:after{z-index:calc(var(--ck-z-default) + 1)}.ck.ck-balloon-panel.ck-balloon-panel_visible{display:block}:root{--ck-balloon-arrow-offset:2px;--ck-balloon-arrow-height:10px;--ck-balloon-arrow-half-width:8px}.ck.ck-balloon-panel{border-radius:0}.ck-rounded-corners .ck.ck-balloon-panel,.ck.ck-balloon-panel.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-balloon-panel{box-shadow:var(--ck-drop-shadow),0 0;min-height:15px;background:var(--ck-color-panel-background);border:1px solid var(--ck-color-panel-border)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{width:0;height:0;border-style:solid}.ck.ck-balloon-panel[class*=arrow_n]:after,.ck.ck-balloon-panel[class*=arrow_n]:before{border-width:0 var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height)}.ck.ck-balloon-panel[class*=arrow_n]:before{border-color:transparent transparent var(--ck-color-panel-border)}.ck.ck-balloon-panel[class*=arrow_n]:after{border-color:transparent transparent var(--ck-color-panel-background);margin-top:var(--ck-balloon-arrow-offset)}.ck.ck-balloon-panel[class*=arrow_s]:after,.ck.ck-balloon-panel[class*=arrow_s]:before{border-width:var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width) 0}.ck.ck-balloon-panel[class*=arrow_s]:before{border-color:var(--ck-color-panel-border) transparent transparent}.ck.ck-balloon-panel[class*=arrow_s]:after{border-color:var(--ck-color-panel-background) transparent transparent;margin-bottom:var(--ck-balloon-arrow-offset)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_n:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_n:before{left:50%;margin-left:calc(-1 * var(--ck-balloon-arrow-half-width));top:calc(-1 * var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:before{left:calc(2 * var(--ck-balloon-arrow-half-width));top:calc(-1 * var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:before{right:calc(2 * var(--ck-balloon-arrow-half-width));top:calc(-1 * var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_s:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_s:before{left:50%;margin-left:calc(-1 * var(--ck-balloon-arrow-half-width));bottom:calc(-1 * var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:before{left:calc(2 * var(--ck-balloon-arrow-half-width));bottom:calc(-1 * var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:before{right:calc(2 * var(--ck-balloon-arrow-half-width));bottom:calc(-1 * var(--ck-balloon-arrow-height))}'},function(e,t,n){var o=n(33);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.ck.ck-toolbar{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;display:flex;flex-flow:row wrap;align-items:center}.ck.ck-toolbar.ck-toolbar_vertical{flex-direction:column}.ck.ck-toolbar.ck-toolbar_floating{flex-wrap:nowrap}.ck.ck-toolbar__separator{display:inline-block}.ck.ck-toolbar__newline{display:block;width:100%}.ck.ck-toolbar{border-radius:0}.ck-rounded-corners .ck.ck-toolbar,.ck.ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-toolbar{background:var(--ck-color-toolbar-background);padding:0 var(--ck-spacing-small);border:1px solid var(--ck-color-toolbar-border)}.ck.ck-toolbar>*{margin-right:var(--ck-spacing-small);margin-top:var(--ck-spacing-small);margin-bottom:var(--ck-spacing-small)}.ck.ck-toolbar.ck-toolbar_vertical{padding:0}.ck.ck-toolbar.ck-toolbar_vertical>*{width:100%;margin:0;border-radius:0;border:0}.ck.ck-toolbar>:last-child{margin-right:0}.ck-toolbar-container .ck.ck-toolbar{border:0}.ck.ck-toolbar__separator{align-self:stretch;width:1px;margin-top:0;margin-bottom:0;background:var(--ck-color-toolbar-border)}.ck.ck-toolbar__newline{margin:0}'},function(e,t,n){var o=n(35);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.ck.ck-editor__editable:not(.ck-editor__nested-editable){border-radius:0}.ck-rounded-corners .ck.ck-editor__editable:not(.ck-editor__nested-editable),.ck.ck-editor__editable:not(.ck-editor__nested-editable).ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-editor__editable:not(.ck-editor__nested-editable).ck-focused{outline:none;border:var(--ck-focus-ring);box-shadow:var(--ck-inner-shadow),0 0}.ck.ck-editor__editable_inline{overflow:auto;padding:0 var(--ck-spacing-standard);border:1px solid transparent}.ck.ck-editor__editable_inline>:first-child{margin-top:var(--ck-spacing-large)}.ck.ck-editor__editable_inline>:last-child{margin-bottom:var(--ck-spacing-large)}.ck.ck-toolbar-container[class*=arrow_n]:after{border-bottom-color:var(--ck-color-base-foreground)}.ck.ck-toolbar-container[class*=arrow_s]:after{border-top-color:var(--ck-color-base-foreground)}'},function(e,t,n){var o=n(37);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.ck.ck-label{display:block}.ck.ck-voice-label{display:none}.ck.ck-label{font-weight:700}'},function(e,t,n){var o=n(39);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.ck.ck-sticky-panel .ck-sticky-panel__content_sticky{z-index:var(--ck-z-modal);position:fixed;top:0}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky_bottom-limit{top:auto;position:absolute}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky{box-shadow:var(--ck-drop-shadow),0 0;border-width:0 1px 1px;border-top-left-radius:0;border-top-right-radius:0}'},function(e,t,n){var o=n(41);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.ck.ck-editor{position:relative}.ck.ck-editor .ck-editor__top .ck-sticky-panel .ck-toolbar{z-index:var(--ck-z-modal)}.ck.ck-editor__top .ck-sticky-panel .ck-toolbar{border-radius:0}.ck-rounded-corners .ck.ck-editor__top .ck-sticky-panel .ck-toolbar,.ck.ck-editor__top .ck-sticky-panel .ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius);border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-editor__top .ck-sticky-panel .ck-toolbar{border-bottom-width:0}.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar{border-bottom-width:1px;border-radius:0}.ck-rounded-corners .ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar,.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius);border-radius:0}.ck.ck-editor__main>.ck-editor__editable{background:var(--ck-color-base-background);border-radius:0}.ck-rounded-corners .ck.ck-editor__main>.ck-editor__editable,.ck.ck-editor__main>.ck-editor__editable.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-top-right-radius:0}.ck.ck-editor__main>.ck-editor__editable:not(.ck-focused){border-color:var(--ck-color-base-border)}'},function(e,t,n){var o=n(43);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.ck.ck-icon{vertical-align:middle}:root{--ck-icon-size:calc(var(--ck-line-height-base) * var(--ck-font-size-normal))}.ck.ck-icon{width:var(--ck-icon-size);height:var(--ck-icon-size);font-size:.8333350694em;will-change:transform}.ck.ck-icon,.ck.ck-icon *{color:inherit;cursor:inherit}.ck.ck-icon *{fill:currentColor}'},function(e,t,n){var o=n(45);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.ck.ck-tooltip,.ck.ck-tooltip .ck-tooltip__text:after{position:absolute;pointer-events:none;-webkit-backface-visibility:hidden}.ck-tooltip{visibility:hidden;opacity:0;display:none;z-index:var(--ck-z-modal)}.ck-tooltip .ck-tooltip__text{display:inline-block}.ck-tooltip .ck-tooltip__text:after{content:"";width:0;height:0}:root{--ck-tooltip-arrow-size:5px}.ck.ck-tooltip{left:50%}.ck.ck-tooltip.ck-tooltip_s{bottom:calc(-1 * var(--ck-tooltip-arrow-size));transform:translateY(100%)}.ck.ck-tooltip.ck-tooltip_s .ck-tooltip__text:after{top:calc(-1 * var(--ck-tooltip-arrow-size));transform:translateX(-50%);border-color:transparent transparent var(--ck-color-tooltip-background);border-width:0 var(--ck-tooltip-arrow-size) var(--ck-tooltip-arrow-size)}.ck.ck-tooltip.ck-tooltip_n{top:calc(-1 * var(--ck-tooltip-arrow-size));transform:translateY(-100%)}.ck.ck-tooltip.ck-tooltip_n .ck-tooltip__text:after{bottom:calc(-1 * var(--ck-tooltip-arrow-size));transform:translateX(-50%);border-color:var(--ck-color-tooltip-background) transparent transparent;border-width:var(--ck-tooltip-arrow-size) var(--ck-tooltip-arrow-size) 0}.ck.ck-tooltip .ck-tooltip__text{border-radius:0}.ck-rounded-corners .ck.ck-tooltip .ck-tooltip__text,.ck.ck-tooltip .ck-tooltip__text.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-tooltip .ck-tooltip__text{font-size:.9em;line-height:1.5;color:var(--ck-color-tooltip-text);padding:var(--ck-spacing-small) var(--ck-spacing-medium);background:var(--ck-color-tooltip-background);position:relative;left:-50%}.ck.ck-tooltip .ck-tooltip__text:after{border-style:solid;left:50%}.ck.ck-tooltip,.ck.ck-tooltip .ck-tooltip__text:after{transition:opacity .2s ease-in-out .2s}'},function(e,t,n){var o=n(47);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.ck.ck-button,a.ck.ck-button{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ck.ck-button .ck-tooltip,a.ck.ck-button .ck-tooltip{display:block}.ck.ck-button,a.ck.ck-button{position:relative}.ck.ck-button.ck-button_with-text .ck-button__label,a.ck.ck-button.ck-button_with-text .ck-button__label{display:inline-block}.ck.ck-button:hover .ck-tooltip,a.ck.ck-button:hover .ck-tooltip{visibility:visible;opacity:1}.ck.ck-button .ck-button__label,.ck.ck-button:focus:not(:hover) .ck-tooltip,a.ck.ck-button .ck-button__label,a.ck.ck-button:focus:not(:hover) .ck-tooltip{display:none}.ck.ck-button,a.ck.ck-button{background:var(--ck-color-button-default-background)}.ck.ck-button:not(.ck-disabled):focus,.ck.ck-button:not(.ck-disabled):hover,a.ck.ck-button:not(.ck-disabled):focus,a.ck.ck-button:not(.ck-disabled):hover{background:var(--ck-color-button-default-focus-background)}.ck.ck-button:not(.ck-disabled):active,a.ck.ck-button:not(.ck-disabled):active{background:var(--ck-color-button-default-active-background);box-shadow:inset 0 2px 2px var(--ck-color-button-default-active-shadow)}.ck.ck-button.ck-disabled,a.ck.ck-button.ck-disabled{background:var(--ck-color-button-default-disabled-background)}.ck.ck-button,a.ck.ck-button{border-radius:0}.ck-rounded-corners .ck.ck-button,.ck-rounded-corners a.ck.ck-button,.ck.ck-button.ck-rounded-corners,a.ck.ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-button,a.ck.ck-button{white-space:nowrap;cursor:default;vertical-align:middle;padding:var(--ck-spacing-tiny);text-align:center;min-width:var(--ck-ui-component-min-height);min-height:var(--ck-ui-component-min-height);line-height:1;font-size:inherit;border:1px solid transparent}.ck.ck-button:active,.ck.ck-button:focus,a.ck.ck-button:active,a.ck.ck-button:focus{outline:none;border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0;border-color:transparent}.ck.ck-button.ck-disabled .ck-button__icon,a.ck.ck-button.ck-disabled .ck-button__icon{opacity:var(--ck-disabled-opacity)}.ck.ck-button.ck-disabled .ck-button__label,a.ck.ck-button.ck-disabled .ck-button__label{opacity:var(--ck-disabled-opacity)}.ck.ck-button.ck-button_with-text,a.ck.ck-button.ck-button_with-text{padding:var(--ck-spacing-tiny) var(--ck-spacing-standard)}.ck.ck-button.ck-button_with-text .ck-button__icon,a.ck.ck-button.ck-button_with-text .ck-button__icon{margin-left:calc(-1 * var(--ck-spacing-small));margin-right:var(--ck-spacing-small)}.ck.ck-button.ck-on,a.ck.ck-button.ck-on{background:var(--ck-color-button-on-background)}.ck.ck-button.ck-on:not(.ck-disabled):focus,.ck.ck-button.ck-on:not(.ck-disabled):hover,a.ck.ck-button.ck-on:not(.ck-disabled):focus,a.ck.ck-button.ck-on:not(.ck-disabled):hover{background:var(--ck-color-button-on-focus-background)}.ck.ck-button.ck-on:not(.ck-disabled):active,a.ck.ck-button.ck-on:not(.ck-disabled):active{background:var(--ck-color-button-on-active-background);box-shadow:inset 0 2px 2px var(--ck-color-button-on-active-shadow)}.ck.ck-button.ck-on.ck-disabled,a.ck.ck-button.ck-on.ck-disabled{background:var(--ck-color-button-on-disabled-background)}.ck.ck-button.ck-button-save,a.ck.ck-button.ck-button-save{color:var(--ck-color-button-save)}.ck.ck-button.ck-button-cancel,a.ck.ck-button.ck-button-cancel{color:var(--ck-color-button-cancel)}.ck.ck-button .ck-button__icon use,.ck.ck-button .ck-button__icon use *,a.ck.ck-button .ck-button__icon use,a.ck.ck-button .ck-button__icon use *{color:inherit}.ck.ck-button .ck-button__label,a.ck.ck-button .ck-button__label{font-size:inherit;font-weight:inherit;color:inherit;cursor:inherit;vertical-align:middle}.ck.ck-button-action,a.ck.ck-button-action{background:var(--ck-color-button-action-background)}.ck.ck-button-action:not(.ck-disabled):focus,.ck.ck-button-action:not(.ck-disabled):hover,a.ck.ck-button-action:not(.ck-disabled):focus,a.ck.ck-button-action:not(.ck-disabled):hover{background:var(--ck-color-button-action-focus-background)}.ck.ck-button-action:not(.ck-disabled):active,a.ck.ck-button-action:not(.ck-disabled):active{background:var(--ck-color-button-action-active-background);box-shadow:inset 0 2px 2px var(--ck-color-button-action-active-shadow)}.ck.ck-button-action.ck-disabled,a.ck.ck-button-action.ck-disabled{background:var(--ck-color-button-action-disabled-background)}.ck.ck-button-action,a.ck.ck-button-action{color:var(--ck-color-button-action-text)}.ck.ck-button-bold,a.ck.ck-button-bold{font-weight:700}'},function(e){e.exports='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M5.042 9.367l2.189 1.837a.75.75 0 0 1-.965 1.149l-3.788-3.18a.747.747 0 0 1-.21-.284.75.75 0 0 1 .17-.945L6.23 4.762a.75.75 0 1 1 .964 1.15L4.863 7.866h8.917A.75.75 0 0 1 14 7.9a4 4 0 1 1-1.477 7.718l.344-1.489a2.5 2.5 0 1 0 1.094-4.73l.008-.032H5.042z" fill="#000" fill-rule="nonzero"/></svg>'},function(e){e.exports='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M14.958 9.367l-2.189 1.837a.75.75 0 0 0 .965 1.149l3.788-3.18a.747.747 0 0 0 .21-.284.75.75 0 0 0-.17-.945L13.77 4.762a.75.75 0 1 0-.964 1.15l2.331 1.955H6.22A.75.75 0 0 0 6 7.9a4 4 0 1 0 1.477 7.718l-.344-1.489A2.5 2.5 0 1 1 6.039 9.4l-.008-.032h8.927z" fill="#000" fill-rule="nonzero"/></svg>'},function(e){e.exports='<svg width="20" height="20" xmlns="http://www.w3.org/2000/svg"><path d="M10.187 17H5.773c-.637 0-1.092-.138-1.364-.415-.273-.277-.409-.718-.409-1.323V4.738c0-.617.14-1.062.419-1.332.279-.27.73-.406 1.354-.406h4.68c.69 0 1.288.041 1.793.124.506.083.96.242 1.36.478.341.197.644.447.906.75a3.262 3.262 0 0 1 .808 2.162c0 1.401-.722 2.426-2.167 3.075C15.05 10.175 16 11.315 16 13.01a3.756 3.756 0 0 1-2.296 3.504 6.1 6.1 0 0 1-1.517.377c-.571.073-1.238.11-2 .11zm-.217-6.217H7v4.087h3.069c1.977 0 2.965-.69 2.965-2.072 0-.707-.256-1.22-.768-1.537-.512-.319-1.277-.478-2.296-.478zM7 5.13v3.619h2.606c.729 0 1.292-.067 1.69-.2a1.6 1.6 0 0 0 .91-.765c.165-.267.247-.566.247-.897 0-.707-.26-1.176-.778-1.409-.519-.232-1.31-.348-2.375-.348H7z" fill="#000" fill-rule="evenodd"/></svg>\n'},function(e){e.exports='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M9.586 14.633l.021.004c-.036.335.095.655.393.962.082.083.173.15.274.201h1.474a.6.6 0 1 1 0 1.2H5.304a.6.6 0 0 1 0-1.2h1.15c.474-.07.809-.182 1.005-.334.157-.122.291-.32.404-.597l2.416-9.55a1.053 1.053 0 0 0-.281-.823 1.12 1.12 0 0 0-.442-.296H8.15a.6.6 0 0 1 0-1.2h6.443a.6.6 0 1 1 0 1.2h-1.195c-.376.056-.65.155-.823.296-.215.175-.423.439-.623.79l-2.366 9.347z" fill="#333" fill-rule="evenodd"/></svg>'},function(e){e.exports='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><g fill="#000" fill-rule="evenodd"><path d="M3 10.423a6.5 6.5 0 0 1 6.056-6.408l.038.67C6.448 5.423 5.354 7.663 5.22 10H9c.552 0 .5.432.5.986v4.511c0 .554-.448.503-1 .503h-5c-.552 0-.5-.449-.5-1.003v-4.011-.563zM11 10.423a6.5 6.5 0 0 1 6.056-6.408l.038.67c-2.646.739-3.74 2.979-3.873 5.315H17c.552 0 .5.432.5.986v4.511c0 .554-.448.503-1 .503h-5c-.552 0-.5-.449-.5-1.003v-4.011-.563z"/></g></svg>\n'},function(e,t,n){var o=n(54);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.ck-content blockquote{overflow:hidden;padding-right:1.5em;padding-left:1.5em;margin-left:0;font-style:italic;border-left:5px solid #ccc}'},function(e,t,n){var o=n(56);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports=':root{--ck-widget-outline-thickness:3px;--ck-color-widget-border-blurred:#dedede;--ck-color-widget-border-hover:#ffd15c;--ck-color-widget-editable-focused-background:var(--ck-color-base-background),}.ck .ck-widget{margin:var(--ck-spacing-standard) 0;padding:0}.ck .ck-widget.ck-widget_selected,.ck .ck-widget.ck-widget_selected:hover{outline:var(--ck-widget-outline-thickness) solid var(--ck-color-focus-border)}.ck-editor__editable.ck-blurred .ck .ck-widget.ck-widget_selected{outline:var(--ck-widget-outline-thickness) solid var(--ck-color-widget-border-blurred)}.ck .ck-widget:hover{outline:var(--ck-widget-outline-thickness) solid var(--ck-color-widget-border-hover)}.ck .ck-widget .ck-editor__nested-editable{border:1px solid transparent}.ck .ck-widget .ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck .ck-widget .ck-editor__nested-editable:focus{outline:none;border:var(--ck-focus-ring);box-shadow:var(--ck-inner-shadow),0 0;background-color:var(--ck-color-widget-editable-focused-background)}'},function(e,t,n){var o=n(58);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports=':root{--ck-input-text-width:18em}.ck.ck-input-text{border-radius:0}.ck-rounded-corners .ck.ck-input-text,.ck.ck-input-text.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-input-text{box-shadow:var(--ck-inner-shadow),0 0;background:var(--ck-color-input-background);border:1px solid var(--ck-color-input-border);padding:var(--ck-spacing-extra-tiny) var(--ck-spacing-medium);min-width:var(--ck-input-text-width);min-height:var(--ck-ui-component-min-height);transition-property:box-shadow,border;transition:.2s ease-in-out}.ck.ck-input-text:focus{outline:none;border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),var(--ck-inner-shadow)}.ck.ck-input-text[readonly]{border:1px solid var(--ck-color-input-disabled-border);background:var(--ck-color-input-disabled-background);color:var(--ck-color-input-disabled-text)}'},function(e,t,n){var o=n(60);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.ck.ck-text-alternative-form .ck-labeled-input{display:inline-block}.ck.ck-text-alternative-form .ck-label{display:none}.ck.ck-text-alternative-form{padding:var(--ck-spacing-standard)}.ck.ck-text-alternative-form:focus{outline:none}.ck.ck-text-alternative-form>:not(:first-child){margin-left:var(--ck-spacing-standard)}'},function(e){e.exports='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M5.085 6.22L2.943 4.078a.75.75 0 1 1 1.06-1.06l2.592 2.59A11.094 11.094 0 0 1 10 5.068c4.738 0 8.578 3.101 8.578 5.083 0 1.197-1.401 2.803-3.555 3.887l1.714 1.713a.75.75 0 0 1-.09 1.138.488.488 0 0 1-.15.084.75.75 0 0 1-.821-.16L6.17 7.304c-.258.11-.51.233-.757.365l6.239 6.24-.006.005.78.78c-.388.094-.78.166-1.174.215l-1.11-1.11h.011L4.55 8.197a7.2 7.2 0 0 0-.665.514l-.112.098 4.897 4.897-.005.006 1.276 1.276a10.164 10.164 0 0 1-1.477-.117l-.479-.479-.009.009-4.863-4.863-.022.031a2.563 2.563 0 0 0-.124.2c-.043.077-.08.158-.108.241a.534.534 0 0 0-.028.133.29.29 0 0 0 .008.072.927.927 0 0 0 .082.226c.067.133.145.26.234.379l3.242 3.365.025.01.59.623c-3.265-.918-5.59-3.155-5.59-4.668 0-1.194 1.448-2.838 3.663-3.93zm7.07.531a4.632 4.632 0 0 1 1.108 5.992l.345.344.046-.018a9.313 9.313 0 0 0 2-1.112c.256-.187.5-.392.727-.613.137-.134.27-.277.392-.431.072-.091.141-.185.203-.286.057-.093.107-.19.148-.292a.72.72 0 0 0 .036-.12.29.29 0 0 0 .008-.072.492.492 0 0 0-.028-.133.999.999 0 0 0-.036-.096 2.165 2.165 0 0 0-.071-.145 2.917 2.917 0 0 0-.125-.2 3.592 3.592 0 0 0-.263-.335 5.444 5.444 0 0 0-.53-.523 7.955 7.955 0 0 0-1.054-.768 9.766 9.766 0 0 0-1.879-.891c-.337-.118-.68-.219-1.027-.301zm-2.85.21l-.069.002a.508.508 0 0 0-.254.097.496.496 0 0 0-.104.679.498.498 0 0 0 .326.199l.045.005c.091.003.181.003.272.012.9.093 1.676.675 2.017 1.513.024.061.043.125.069.185a.494.494 0 0 0 .45.287h.008a.496.496 0 0 0 .35-.158.482.482 0 0 0 .13-.335.638.638 0 0 0-.048-.219 3.379 3.379 0 0 0-.36-.723 3.438 3.438 0 0 0-2.791-1.543l-.028-.001h-.013z" fill="#000" fill-rule="evenodd"/></svg>'},function(e,t,n){var o=n(63);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.ck-content .image{clear:both;text-align:center}.ck-content .image>img{display:block;margin:0 auto;max-width:100%}'},function(e){e.exports='<svg width="20" height="20" xmlns="http://www.w3.org/2000/svg"><path d="M6.91 10.54c.26-.23.64-.21.88.03l3.36 3.14 2.23-2.06a.64.64 0 0 1 .87 0l2.52 2.97V4.5H3.2v10.12l3.71-4.08zm10.27-7.51c.6 0 1.09.47 1.09 1.05v11.84c0 .59-.49 1.06-1.09 1.06H2.79c-.6 0-1.09-.47-1.09-1.06V4.08c0-.58.49-1.05 1.1-1.05h14.38zm-5.22 5.56a1.96 1.96 0 1 1 3.4-1.96 1.96 1.96 0 0 1-3.4 1.96z" fill="#000" fill-rule="nonzero"/></svg>\n'},function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 250"><g fill="none" fill-rule="evenodd"><rect width="700" height="250" fill="#FAFAFA" rx="4"/><text fill="#5F6F77" font-family="Arial,sans-serif" font-size="24"><tspan x="247.9" y="135">Uploading image\u2026</tspan></text></g></svg>\n'},function(e,t,n){var o=n(67);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.ck-content .image{position:relative;overflow:hidden}.ck-content .image.ck-infinite-progress:before{content:"";position:absolute;top:0;right:0}.ck-content .image .ck-progress-bar{position:absolute;top:0;left:0}:root{--ck-image-upload-progress-line-width:30px}.ck-content .image.ck-appear{animation:a .7s}.ck-content .image.ck-infinite-progress:before{width:var(--ck-image-upload-progress-line-width);height:2px;background:var(--ck-color-upload-infinite-background);animation-name:b;animation-duration:1.5s;animation-iteration-count:infinite;transition-timing-function:linear}.ck-content .image.ck-image-upload-placeholder>img{width:100%}.ck-content .image .ck-progress-bar{height:2px;width:0;background:var(--ck-color-upload-bar-background);transition:width .1s}@keyframes a{0%{opacity:0}to{opacity:1}}@keyframes b{0%{width:var(--ck-image-upload-progress-line-width);right:0}50%{width:calc(var(--ck-image-upload-progress-line-width) * 1.5)}to{right:100%}}'},function(e,t,n){var o=n(69);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.ck-image-upload-complete-icon{display:block;position:absolute;top:10px;right:10px;border-radius:50%}.ck-image-upload-complete-icon:after{content:"";position:absolute}:root{--ck-color-image-upload-icon:#fff;--ck-color-image-upload-icon-background:#008a00;--ck-image-upload-icon-size:1.25em;--ck-image-upload-icon-width:2px}.ck-image-upload-complete-icon{width:var(--ck-image-upload-icon-size);height:var(--ck-image-upload-icon-size);opacity:0;background:var(--ck-color-image-upload-icon-background);animation-name:a,b;animation-fill-mode:forwards,forwards;animation-duration:.5s,.5s;animation-delay:0ms,3s}.ck-image-upload-complete-icon:after{left:25%;top:50%;opacity:0;height:0;width:0;transform:scaleX(-1) rotate(135deg);transform-origin:left top;border-top:var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon);border-right:var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon);animation-name:c;animation-duration:.5s;animation-delay:.5s;animation-fill-mode:forwards}@keyframes a{0%{opacity:0}to{opacity:1}}@keyframes b{0%{opacity:1}to{opacity:0}}@keyframes c{0%{opacity:1;height:0;width:0}33%{width:.25em;height:0}to{width:.25em;height:.416em;opacity:1}}'},function(e,t,n){var o=n(71);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.ck.ck-dropdown{display:inline-block;position:relative}.ck.ck-dropdown .ck-dropdown__arrow{pointer-events:none;z-index:var(--ck-z-default);position:absolute;top:50%;transform:translate3d(0,-50%,0)}.ck.ck-dropdown .ck-button.ck-dropdown__button{width:100%}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on .ck-tooltip{display:none}.ck.ck-dropdown .ck-dropdown__panel{-webkit-backface-visibility:hidden;display:none;z-index:var(--ck-z-modal);position:absolute;left:0;transform:translate3d(0,100%,0)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel-visible{display:inline-block;will-change:transform}:root{--ck-dropdown-arrow-size:calc(0.5 * var(--ck-icon-size))}.ck.ck-dropdown{font-size:inherit}.ck.ck-dropdown .ck-dropdown__arrow{right:var(--ck-spacing-standard);width:var(--ck-dropdown-arrow-size)}.ck.ck-dropdown.ck-disabled .ck-dropdown__arrow{opacity:var(--ck-disabled-opacity)}.ck.ck-dropdown .ck-button.ck-dropdown__button{padding-right:calc(2.5 * var(--ck-spacing-standard))}.ck.ck-dropdown .ck-button.ck-dropdown__button:not(.ck-button_with-text){padding-left:var(--ck-spacing-small)}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-disabled .ck-button__label{opacity:var(--ck-disabled-opacity)}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on{border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-dropdown .ck-button.ck-dropdown__button .ck-button__label{width:7em;overflow:hidden;text-overflow:ellipsis}.ck.ck-dropdown__panel{border-radius:0;box-shadow:var(--ck-drop-shadow),0 0}.ck-rounded-corners .ck.ck-dropdown__panel,.ck.ck-dropdown__panel.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0}.ck.ck-dropdown__panel{background:var(--ck-color-dropdown-panel-background);border:1px solid var(--ck-color-dropdown-panel-border);bottom:0;min-width:100%}'},function(e){e.exports='<svg width="10" height="10" viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg"><path d="M.941 4.523a.75.75 0 1 1 1.06-1.06l3.006 3.005 3.005-3.005a.75.75 0 1 1 1.06 1.06l-3.549 3.55a.75.75 0 0 1-1.168-.136L.941 4.523z" fill="#000" fill-rule="evenodd"/></svg>'},function(e,t,n){var o=n(74);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.ck.ck-list{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden}.ck.ck-list .ck-list__item{display:block}.ck.ck-list .ck-list__item:focus{position:relative;z-index:var(--ck-z-default)}.ck.ck-list{border-radius:0}.ck-rounded-corners .ck.ck-list,.ck.ck-list.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-list{list-style-type:none;background:var(--ck-color-list-background)}.ck.ck-list__item{padding:var(--ck-spacing-medium);cursor:default;min-width:12em}.ck.ck-list__item:focus,.ck.ck-list__item:hover{background:var(--ck-color-list-item-background-hover)}.ck.ck-list__item:focus{box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck.ck-list__item_active{background:var(--ck-color-list-item-background-active);color:var(--ck-color-list-item-text-active)}.ck.ck-list__item_active:focus,.ck.ck-list__item_active:hover{background:var(--ck-color-list-item-background-active-focus)}'},function(e,t,n){var o=n(76);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.ck.ck-toolbar-dropdown .ck-toolbar{flex-wrap:nowrap}.ck.ck-toolbar-dropdown .ck-dropdown__panel .ck-button:focus{z-index:calc(var(--ck-z-default) + 1)}.ck.ck-toolbar-dropdown .ck-toolbar{border:0}'},function(e,t,n){var o=n(78);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.ck.ck-dropdown .ck-dropdown__panel .ck-list{border-radius:0}.ck-rounded-corners .ck.ck-dropdown .ck-dropdown__panel .ck-list,.ck.ck-dropdown .ck-dropdown__panel .ck-list.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0}.ck.ck-dropdown .ck-dropdown__panel .ck-list>.ck-list__item{line-height:calc(.8*var(--ck-line-height-base)*var(--ck-font-size-base));padding:calc(.4*var(--ck-line-height-base)*var(--ck-font-size-base))}'},function(e){e.exports='.ck.ck-heading_heading1{font-size:20px}.ck.ck-heading_heading2{font-size:17px}.ck.ck-heading_heading3{font-size:14px}.ck[class*=ck-heading_heading]{font-weight:700}.ck.ck-dropdown.ck-heading-dropdown .ck-dropdown__button .ck-button__label{width:8em}'},function(e,t,n){var o=n(81);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.ck.ck-placeholder:before,.ck .ck-placeholder:before{content:attr(data-placeholder);pointer-events:none;cursor:text;color:var(--ck-color-engine-placeholder-text)}'},function(e,t,n){var o=n(83);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.ck-content .image>figcaption{color:#333;background-color:#f7f7f7;padding:.6em;font-size:.75em;outline-offset:-1px}'},function(e){e.exports='<svg width="20" height="20" xmlns="http://www.w3.org/2000/svg"><g fill="#000" fill-rule="nonzero"><path d="M2 4.5V3h16v1.5zM4.5 7.5V12h11V7.5h-11zM4.061 6H15.94c.586 0 1.061.407 1.061.91v5.68c0 .503-.475.91-1.061.91H4.06C3.475 13.5 3 13.093 3 12.59V6.91C3 6.406 3.475 6 4.061 6zM2 16.5V15h16v1.5z"/></g></svg>\n'},function(e,t,n){var o=n(86);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports=':root{--ck-image-style-spacing:1.5em}.ck-content .image-style-align-center,.ck-content .image-style-align-left,.ck-content .image-style-align-right,.ck-content .image-style-side{max-width:50%}.ck-content .image-style-side{float:right;margin-left:var(--ck-image-style-spacing)}.ck-content .image-style-align-left{float:left;margin-right:var(--ck-image-style-spacing)}.ck-content .image-style-align-center{margin-left:auto;margin-right:auto}.ck-content .image-style-align-right{float:right;margin-left:var(--ck-image-style-spacing)}'},function(e,t,n){var o=n(88);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.ck .ck-link_selected{background:var(--ck-color-link-selected-background)}'},function(e,t,n){var o=n(90);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.ck.ck-link-form .ck-labeled-input{display:inline-block}.ck.ck-link-form .ck-label{display:none}.ck.ck-link-form{padding:var(--ck-spacing-standard)}.ck.ck-link-form:focus{outline:none}.ck.ck-link-form>:not(:first-child){margin-left:var(--ck-spacing-standard)}'},function(e){e.exports='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><g fill="#000" fill-rule="evenodd"><path d="M11.077 15l.991-1.416a.75.75 0 1 1 1.229.86l-1.148 1.64a.748.748 0 0 1-.217.206 5.251 5.251 0 0 1-8.503-5.955c.02-.095.06-.189.12-.274l1.147-1.639a.75.75 0 1 1 1.228.86L4.933 10.7l.006.003a3.75 3.75 0 0 0 6.132 4.294l.006.004zm5.494-5.335a.748.748 0 0 1-.12.274l-1.147 1.639a.75.75 0 1 1-1.228-.86l.86-1.23a3.75 3.75 0 0 0-6.144-4.301l-.86 1.229a.75.75 0 0 1-1.229-.86l1.148-1.64a.748.748 0 0 1 .217-.206 5.251 5.251 0 0 1 8.503 5.955zm-4.563-2.532a.75.75 0 0 1 .184 1.045l-3.155 4.505a.75.75 0 1 1-1.229-.86l3.155-4.506a.75.75 0 0 1 1.045-.184zM16.927 17.695l-1.414 1.414a.75.75 0 1 1-1.06-1.06l1.414-1.415-1.415-1.414a.75.75 0 0 1 1.061-1.06l1.414 1.414 1.414-1.415a.75.75 0 0 1 1.061 1.061l-1.414 1.414 1.414 1.415a.75.75 0 0 1-1.06 1.06l-1.415-1.414z"/></g></svg>'},function(e){e.exports='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M7.3 17.37l-.061.088a1.518 1.518 0 0 1-.934.535l-4.178.663-.806-4.153a1.495 1.495 0 0 1 .187-1.058l.056-.086L8.77 2.639c.958-1.351 2.803-1.076 4.296-.03 1.497 1.047 2.387 2.693 1.433 4.055L7.3 17.37zM9.14 4.728l-5.545 8.346 3.277 2.294 5.544-8.346L9.14 4.728zM6.07 16.512l-3.276-2.295.53 2.73 2.746-.435zM9.994 3.506L13.271 5.8c.316-.452-.16-1.333-1.065-1.966-.905-.634-1.895-.78-2.212-.328zM8 18.5L9.375 17H19v1.5H8z" fill="#000" fill-rule="nonzero"/></svg>\n'},function(e,t,n){var o=n(94);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.ck.ck-link-actions .ck-link-actions__preview{display:inline-block}.ck.ck-link-actions .ck-link-actions__preview .ck-button__label{overflow:hidden}.ck.ck-link-actions{padding:var(--ck-spacing-standard)}.ck.ck-link-actions .ck-button.ck-link-actions__preview{padding-left:0;padding-right:0}.ck.ck-link-actions .ck-button.ck-link-actions__preview,.ck.ck-link-actions .ck-button.ck-link-actions__preview:active,.ck.ck-link-actions .ck-button.ck-link-actions__preview:focus,.ck.ck-link-actions .ck-button.ck-link-actions__preview:hover{background:none}.ck.ck-link-actions .ck-button.ck-link-actions__preview:active{box-shadow:none}.ck.ck-link-actions .ck-button.ck-link-actions__preview:focus .ck-button__label{text-decoration:underline}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label{padding:0 var(--ck-spacing-medium);color:var(--ck-color-link-default);text-overflow:ellipsis;cursor:pointer;max-width:var(--ck-input-text-width);min-width:3em;text-align:center}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label:hover{text-decoration:underline}.ck.ck-link-actions:focus{outline:none}.ck.ck-link-actions>:not(:first-child){margin-left:var(--ck-spacing-standard)}'},function(e){e.exports='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M11.077 15l.991-1.416a.75.75 0 1 1 1.229.86l-1.148 1.64a.748.748 0 0 1-.217.206 5.251 5.251 0 0 1-8.503-5.955c.02-.095.06-.189.12-.274l1.147-1.639a.75.75 0 1 1 1.228.86L4.933 10.7l.006.003a3.75 3.75 0 0 0 6.132 4.294l.006.004zm5.494-5.335a.748.748 0 0 1-.12.274l-1.147 1.639a.75.75 0 1 1-1.228-.86l.86-1.23a3.75 3.75 0 0 0-6.144-4.301l-.86 1.229a.75.75 0 0 1-1.229-.86l1.148-1.64a.748.748 0 0 1 .217-.206 5.251 5.251 0 0 1 8.503 5.955zm-4.563-2.532a.75.75 0 0 1 .184 1.045l-3.155 4.505a.75.75 0 1 1-1.229-.86l3.155-4.506a.75.75 0 0 1 1.045-.184z" fill="#000" fill-rule="evenodd"/></svg>'},function(e){e.exports='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M7 5.75c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zM3.5 3v5H2V3.7H1v-1h2.5V3zM.343 17.857l2.59-3.257H2.92a.6.6 0 1 0-1.04 0H.302a2 2 0 1 1 3.995 0h-.001c-.048.405-.16.734-.333.988-.175.254-.59.692-1.244 1.312H4.3v1h-4l.043-.043zM7 14.75a.75.75 0 0 1 .75-.75h9.5a.75.75 0 1 1 0 1.5h-9.5a.75.75 0 0 1-.75-.75z" fill="#454545" fill-rule="evenodd"/></svg>'},function(e){e.exports='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M7 5.75c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zm-6 0C1 4.784 1.777 4 2.75 4c.966 0 1.75.777 1.75 1.75 0 .966-.777 1.75-1.75 1.75C1.784 7.5 1 6.723 1 5.75zm6 9c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75zm-6 0c0-.966.777-1.75 1.75-1.75.966 0 1.75.777 1.75 1.75 0 .966-.777 1.75-1.75 1.75-.966 0-1.75-.777-1.75-1.75z" fill="#454545" fill-rule="evenodd"/></svg>'},function(e,t,n){var o=n(99);'string'==typeof o&&(o=[[e.i,o,'']]);var r={singleton:!0,hmr:!0},i;r.transform=i,r.insertInto=void 0;n(1)(o,r);o.locals&&(e.exports=o.locals),!1},function(e){e.exports='.ck table.ck-widget td.ck-editor__nested-editable,.ck table.ck-widget th.ck-editor__nested-editable{border-color:inherit;border-style:inset}.ck table.ck-widget td.ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck table.ck-widget td.ck-editor__nested-editable:focus,.ck table.ck-widget th.ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck table.ck-widget th.ck-editor__nested-editable:focus{background-color:inherit;color:inherit}'},function(e,t){'use strict';t.a=function(e){return e&&e.Object===Object?e:null}},function(e,t,n){'use strict';(function(e){var o=n(102),r=n(3),i={function:!0,object:!0},a=i[typeof exports]&&exports&&!exports.nodeType?exports:void 0,s=i[typeof e]&&e&&!e.nodeType?e:void 0,l=s&&s.exports===a?a:void 0,d=l?r.a.Buffer:void 0,c=d?function(e){return e instanceof d}:Object(o.a)(!1);t.a=c}).call(t,n(4)(e))},function(e,t){'use strict';t.a=function(e){return function(){return e}}},function(){},function(e,t,n){'use strict';e.exports=n(105)},function(e,t,n){'use strict';function o(e){var t=e.trim().toLowerCase();return!b.test(t)||!!_.test(t)}function r(e){var t=g.parse(e,!0);if(t.hostname&&(!t.protocol||0<=k.indexOf(t.protocol)))try{t.hostname=h.toASCII(t.hostname)}catch(e){}return g.encode(g.format(t))}function i(e){var t=g.parse(e,!0);if(t.hostname&&(!t.protocol||0<=k.indexOf(t.protocol)))try{t.hostname=h.toUnicode(t.hostname)}catch(e){}return g.decode(g.format(t))}function a(e,t){return this instanceof a?void(!t&&!s.isString(e)&&(t=e||{},e='default'),this.inline=new u,this.block=new p,this.core=new c,this.renderer=new d,this.linkify=new m,this.validateLink=o,this.normalizeLink=r,this.normalizeLinkText=i,this.utils=s,this.helpers=s.assign({},l),this.options={},this.configure(e),t&&this.set(t)):new a(e,t)}var s=n(0),l=n(113),d=n(117),c=n(118),p=n(126),u=n(140),m=n(153),g=n(16),h=n(155),f={default:n(157),zero:n(158),commonmark:n(159)},b=/^(vbscript|javascript|file|data):/,_=/^data:image\/(gif|png|jpeg|webp);/,k=['http:','https:','mailto:'];a.prototype.set=function(e){return s.assign(this.options,e),this},a.prototype.configure=function(e){var t=this,n;if(s.isString(e)&&(n=e,e=f[n],!e))throw new Error('Wrong `markdown-it` preset "'+n+'", check name');if(!e)throw new Error('Wrong `markdown-it` preset, can\'t be empty');return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(n){e.components[n].rules&&t[n].ruler.enableOnly(e.components[n].rules),e.components[n].rules2&&t[n].ruler2.enableOnly(e.components[n].rules2)}),this},a.prototype.enable=function(e,t){var n=[];Array.isArray(e)||(e=[e]),['core','block','inline'].forEach(function(t){n=n.concat(this[t].ruler.enable(e,!0))},this),n=n.concat(this.inline.ruler2.enable(e,!0));var o=e.filter(function(e){return 0>n.indexOf(e)});if(o.length&&!t)throw new Error('MarkdownIt. Failed to enable unknown rule(s): '+o);return this},a.prototype.disable=function(e,t){var n=[];Array.isArray(e)||(e=[e]),['core','block','inline'].forEach(function(t){n=n.concat(this[t].ruler.disable(e,!0))},this),n=n.concat(this.inline.ruler2.disable(e,!0));var o=e.filter(function(e){return 0>n.indexOf(e)});if(o.length&&!t)throw new Error('MarkdownIt. Failed to disable unknown rule(s): '+o);return this},a.prototype.use=function(e){var t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},a.prototype.parse=function(e,t){if('string'!=typeof e)throw new Error('Input data should be a String');var n=new this.core.State(e,this,t);return this.core.process(n),n.tokens},a.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},a.prototype.parseInline=function(e,t){var n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens},a.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)},e.exports=a},function(e){e.exports={Aacute:'\xC1',aacute:'\xE1',Abreve:'\u0102',abreve:'\u0103',ac:'\u223E',acd:'\u223F',acE:'\u223E\u0333',Acirc:'\xC2',acirc:'\xE2',acute:'\xB4',Acy:'\u0410',acy:'\u0430',AElig:'\xC6',aelig:'\xE6',af:'\u2061',Afr:'\uD835\uDD04',afr:'\uD835\uDD1E',Agrave:'\xC0',agrave:'\xE0',alefsym:'\u2135',aleph:'\u2135',Alpha:'\u0391',alpha:'\u03B1',Amacr:'\u0100',amacr:'\u0101',amalg:'\u2A3F',amp:'&',AMP:'&',andand:'\u2A55',And:'\u2A53',and:'\u2227',andd:'\u2A5C',andslope:'\u2A58',andv:'\u2A5A',ang:'\u2220',ange:'\u29A4',angle:'\u2220',angmsdaa:'\u29A8',angmsdab:'\u29A9',angmsdac:'\u29AA',angmsdad:'\u29AB',angmsdae:'\u29AC',angmsdaf:'\u29AD',angmsdag:'\u29AE',angmsdah:'\u29AF',angmsd:'\u2221',angrt:'\u221F',angrtvb:'\u22BE',angrtvbd:'\u299D',angsph:'\u2222',angst:'\xC5',angzarr:'\u237C',Aogon:'\u0104',aogon:'\u0105',Aopf:'\uD835\uDD38',aopf:'\uD835\uDD52',apacir:'\u2A6F',ap:'\u2248',apE:'\u2A70',ape:'\u224A',apid:'\u224B',apos:'\'',ApplyFunction:'\u2061',approx:'\u2248',approxeq:'\u224A',Aring:'\xC5',aring:'\xE5',Ascr:'\uD835\uDC9C',ascr:'\uD835\uDCB6',Assign:'\u2254',ast:'*',asymp:'\u2248',asympeq:'\u224D',Atilde:'\xC3',atilde:'\xE3',Auml:'\xC4',auml:'\xE4',awconint:'\u2233',awint:'\u2A11',backcong:'\u224C',backepsilon:'\u03F6',backprime:'\u2035',backsim:'\u223D',backsimeq:'\u22CD',Backslash:'\u2216',Barv:'\u2AE7',barvee:'\u22BD',barwed:'\u2305',Barwed:'\u2306',barwedge:'\u2305',bbrk:'\u23B5',bbrktbrk:'\u23B6',bcong:'\u224C',Bcy:'\u0411',bcy:'\u0431',bdquo:'\u201E',becaus:'\u2235',because:'\u2235',Because:'\u2235',bemptyv:'\u29B0',bepsi:'\u03F6',bernou:'\u212C',Bernoullis:'\u212C',Beta:'\u0392',beta:'\u03B2',beth:'\u2136',between:'\u226C',Bfr:'\uD835\uDD05',bfr:'\uD835\uDD1F',bigcap:'\u22C2',bigcirc:'\u25EF',bigcup:'\u22C3',bigodot:'\u2A00',bigoplus:'\u2A01',bigotimes:'\u2A02',bigsqcup:'\u2A06',bigstar:'\u2605',bigtriangledown:'\u25BD',bigtriangleup:'\u25B3',biguplus:'\u2A04',bigvee:'\u22C1',bigwedge:'\u22C0',bkarow:'\u290D',blacklozenge:'\u29EB',blacksquare:'\u25AA',blacktriangle:'\u25B4',blacktriangledown:'\u25BE',blacktriangleleft:'\u25C2',blacktriangleright:'\u25B8',blank:'\u2423',blk12:'\u2592',blk14:'\u2591',blk34:'\u2593',block:'\u2588',bne:'=\u20E5',bnequiv:'\u2261\u20E5',bNot:'\u2AED',bnot:'\u2310',Bopf:'\uD835\uDD39',bopf:'\uD835\uDD53',bot:'\u22A5',bottom:'\u22A5',bowtie:'\u22C8',boxbox:'\u29C9',boxdl:'\u2510',boxdL:'\u2555',boxDl:'\u2556',boxDL:'\u2557',boxdr:'\u250C',boxdR:'\u2552',boxDr:'\u2553',boxDR:'\u2554',boxh:'\u2500',boxH:'\u2550',boxhd:'\u252C',boxHd:'\u2564',boxhD:'\u2565',boxHD:'\u2566',boxhu:'\u2534',boxHu:'\u2567',boxhU:'\u2568',boxHU:'\u2569',boxminus:'\u229F',boxplus:'\u229E',boxtimes:'\u22A0',boxul:'\u2518',boxuL:'\u255B',boxUl:'\u255C',boxUL:'\u255D',boxur:'\u2514',boxuR:'\u2558',boxUr:'\u2559',boxUR:'\u255A',boxv:'\u2502',boxV:'\u2551',boxvh:'\u253C',boxvH:'\u256A',boxVh:'\u256B',boxVH:'\u256C',boxvl:'\u2524',boxvL:'\u2561',boxVl:'\u2562',boxVL:'\u2563',boxvr:'\u251C',boxvR:'\u255E',boxVr:'\u255F',boxVR:'\u2560',bprime:'\u2035',breve:'\u02D8',Breve:'\u02D8',brvbar:'\xA6',bscr:'\uD835\uDCB7',Bscr:'\u212C',bsemi:'\u204F',bsim:'\u223D',bsime:'\u22CD',bsolb:'\u29C5',bsol:'\\',bsolhsub:'\u27C8',bull:'\u2022',bullet:'\u2022',bump:'\u224E',bumpE:'\u2AAE',bumpe:'\u224F',Bumpeq:'\u224E',bumpeq:'\u224F',Cacute:'\u0106',cacute:'\u0107',capand:'\u2A44',capbrcup:'\u2A49',capcap:'\u2A4B',cap:'\u2229',Cap:'\u22D2',capcup:'\u2A47',capdot:'\u2A40',CapitalDifferentialD:'\u2145',caps:'\u2229\uFE00',caret:'\u2041',caron:'\u02C7',Cayleys:'\u212D',ccaps:'\u2A4D',Ccaron:'\u010C',ccaron:'\u010D',Ccedil:'\xC7',ccedil:'\xE7',Ccirc:'\u0108',ccirc:'\u0109',Cconint:'\u2230',ccups:'\u2A4C',ccupssm:'\u2A50',Cdot:'\u010A',cdot:'\u010B',cedil:'\xB8',Cedilla:'\xB8',cemptyv:'\u29B2',cent:'\xA2',centerdot:'\xB7',CenterDot:'\xB7',cfr:'\uD835\uDD20',Cfr:'\u212D',CHcy:'\u0427',chcy:'\u0447',check:'\u2713',checkmark:'\u2713',Chi:'\u03A7',chi:'\u03C7',circ:'\u02C6',circeq:'\u2257',circlearrowleft:'\u21BA',circlearrowright:'\u21BB',circledast:'\u229B',circledcirc:'\u229A',circleddash:'\u229D',CircleDot:'\u2299',circledR:'\xAE',circledS:'\u24C8',CircleMinus:'\u2296',CirclePlus:'\u2295',CircleTimes:'\u2297',cir:'\u25CB',cirE:'\u29C3',cire:'\u2257',cirfnint:'\u2A10',cirmid:'\u2AEF',cirscir:'\u29C2',ClockwiseContourIntegral:'\u2232',CloseCurlyDoubleQuote:'\u201D',CloseCurlyQuote:'\u2019',clubs:'\u2663',clubsuit:'\u2663',colon:':',Colon:'\u2237',Colone:'\u2A74',colone:'\u2254',coloneq:'\u2254',comma:',',commat:'@',comp:'\u2201',compfn:'\u2218',complement:'\u2201',complexes:'\u2102',cong:'\u2245',congdot:'\u2A6D',Congruent:'\u2261',conint:'\u222E',Conint:'\u222F',ContourIntegral:'\u222E',copf:'\uD835\uDD54',Copf:'\u2102',coprod:'\u2210',Coproduct:'\u2210',copy:'\xA9',COPY:'\xA9',copysr:'\u2117',CounterClockwiseContourIntegral:'\u2233',crarr:'\u21B5',cross:'\u2717',Cross:'\u2A2F',Cscr:'\uD835\uDC9E',cscr:'\uD835\uDCB8',csub:'\u2ACF',csube:'\u2AD1',csup:'\u2AD0',csupe:'\u2AD2',ctdot:'\u22EF',cudarrl:'\u2938',cudarrr:'\u2935',cuepr:'\u22DE',cuesc:'\u22DF',cularr:'\u21B6',cularrp:'\u293D',cupbrcap:'\u2A48',cupcap:'\u2A46',CupCap:'\u224D',cup:'\u222A',Cup:'\u22D3',cupcup:'\u2A4A',cupdot:'\u228D',cupor:'\u2A45',cups:'\u222A\uFE00',curarr:'\u21B7',curarrm:'\u293C',curlyeqprec:'\u22DE',curlyeqsucc:'\u22DF',curlyvee:'\u22CE',curlywedge:'\u22CF',curren:'\xA4',curvearrowleft:'\u21B6',curvearrowright:'\u21B7',cuvee:'\u22CE',cuwed:'\u22CF',cwconint:'\u2232',cwint:'\u2231',cylcty:'\u232D',dagger:'\u2020',Dagger:'\u2021',daleth:'\u2138',darr:'\u2193',Darr:'\u21A1',dArr:'\u21D3',dash:'\u2010',Dashv:'\u2AE4',dashv:'\u22A3',dbkarow:'\u290F',dblac:'\u02DD',Dcaron:'\u010E',dcaron:'\u010F',Dcy:'\u0414',dcy:'\u0434',ddagger:'\u2021',ddarr:'\u21CA',DD:'\u2145',dd:'\u2146',DDotrahd:'\u2911',ddotseq:'\u2A77',deg:'\xB0',Del:'\u2207',Delta:'\u0394',delta:'\u03B4',demptyv:'\u29B1',dfisht:'\u297F',Dfr:'\uD835\uDD07',dfr:'\uD835\uDD21',dHar:'\u2965',dharl:'\u21C3',dharr:'\u21C2',DiacriticalAcute:'\xB4',DiacriticalDot:'\u02D9',DiacriticalDoubleAcute:'\u02DD',DiacriticalGrave:'`',DiacriticalTilde:'\u02DC',diam:'\u22C4',diamond:'\u22C4',Diamond:'\u22C4',diamondsuit:'\u2666',diams:'\u2666',die:'\xA8',DifferentialD:'\u2146',digamma:'\u03DD',disin:'\u22F2',div:'\xF7',divide:'\xF7',divideontimes:'\u22C7',divonx:'\u22C7',DJcy:'\u0402',djcy:'\u0452',dlcorn:'\u231E',dlcrop:'\u230D',dollar:'$',Dopf:'\uD835\uDD3B',dopf:'\uD835\uDD55',Dot:'\xA8',dot:'\u02D9',DotDot:'\u20DC',doteq:'\u2250',doteqdot:'\u2251',DotEqual:'\u2250',dotminus:'\u2238',dotplus:'\u2214',dotsquare:'\u22A1',doublebarwedge:'\u2306',DoubleContourIntegral:'\u222F',DoubleDot:'\xA8',DoubleDownArrow:'\u21D3',DoubleLeftArrow:'\u21D0',DoubleLeftRightArrow:'\u21D4',DoubleLeftTee:'\u2AE4',DoubleLongLeftArrow:'\u27F8',DoubleLongLeftRightArrow:'\u27FA',DoubleLongRightArrow:'\u27F9',DoubleRightArrow:'\u21D2',DoubleRightTee:'\u22A8',DoubleUpArrow:'\u21D1',DoubleUpDownArrow:'\u21D5',DoubleVerticalBar:'\u2225',DownArrowBar:'\u2913',downarrow:'\u2193',DownArrow:'\u2193',Downarrow:'\u21D3',DownArrowUpArrow:'\u21F5',DownBreve:'\u0311',downdownarrows:'\u21CA',downharpoonleft:'\u21C3',downharpoonright:'\u21C2',DownLeftRightVector:'\u2950',DownLeftTeeVector:'\u295E',DownLeftVectorBar:'\u2956',DownLeftVector:'\u21BD',DownRightTeeVector:'\u295F',DownRightVectorBar:'\u2957',DownRightVector:'\u21C1',DownTeeArrow:'\u21A7',DownTee:'\u22A4',drbkarow:'\u2910',drcorn:'\u231F',drcrop:'\u230C',Dscr:'\uD835\uDC9F',dscr:'\uD835\uDCB9',DScy:'\u0405',dscy:'\u0455',dsol:'\u29F6',Dstrok:'\u0110',dstrok:'\u0111',dtdot:'\u22F1',dtri:'\u25BF',dtrif:'\u25BE',duarr:'\u21F5',duhar:'\u296F',dwangle:'\u29A6',DZcy:'\u040F',dzcy:'\u045F',dzigrarr:'\u27FF',Eacute:'\xC9',eacute:'\xE9',easter:'\u2A6E',Ecaron:'\u011A',ecaron:'\u011B',Ecirc:'\xCA',ecirc:'\xEA',ecir:'\u2256',ecolon:'\u2255',Ecy:'\u042D',ecy:'\u044D',eDDot:'\u2A77',Edot:'\u0116',edot:'\u0117',eDot:'\u2251',ee:'\u2147',efDot:'\u2252',Efr:'\uD835\uDD08',efr:'\uD835\uDD22',eg:'\u2A9A',Egrave:'\xC8',egrave:'\xE8',egs:'\u2A96',egsdot:'\u2A98',el:'\u2A99',Element:'\u2208',elinters:'\u23E7',ell:'\u2113',els:'\u2A95',elsdot:'\u2A97',Emacr:'\u0112',emacr:'\u0113',empty:'\u2205',emptyset:'\u2205',EmptySmallSquare:'\u25FB',emptyv:'\u2205',EmptyVerySmallSquare:'\u25AB',emsp13:'\u2004',emsp14:'\u2005',emsp:'\u2003',ENG:'\u014A',eng:'\u014B',ensp:'\u2002',Eogon:'\u0118',eogon:'\u0119',Eopf:'\uD835\uDD3C',eopf:'\uD835\uDD56',epar:'\u22D5',eparsl:'\u29E3',eplus:'\u2A71',epsi:'\u03B5',Epsilon:'\u0395',epsilon:'\u03B5',epsiv:'\u03F5',eqcirc:'\u2256',eqcolon:'\u2255',eqsim:'\u2242',eqslantgtr:'\u2A96',eqslantless:'\u2A95',Equal:'\u2A75',equals:'=',EqualTilde:'\u2242',equest:'\u225F',Equilibrium:'\u21CC',equiv:'\u2261',equivDD:'\u2A78',eqvparsl:'\u29E5',erarr:'\u2971',erDot:'\u2253',escr:'\u212F',Escr:'\u2130',esdot:'\u2250',Esim:'\u2A73',esim:'\u2242',Eta:'\u0397',eta:'\u03B7',ETH:'\xD0',eth:'\xF0',Euml:'\xCB',euml:'\xEB',euro:'\u20AC',excl:'!',exist:'\u2203',Exists:'\u2203',expectation:'\u2130',exponentiale:'\u2147',ExponentialE:'\u2147',fallingdotseq:'\u2252',Fcy:'\u0424',fcy:'\u0444',female:'\u2640',ffilig:'\uFB03',fflig:'\uFB00',ffllig:'\uFB04',Ffr:'\uD835\uDD09',ffr:'\uD835\uDD23',filig:'\uFB01',FilledSmallSquare:'\u25FC',FilledVerySmallSquare:'\u25AA',fjlig:'fj',flat:'\u266D',fllig:'\uFB02',fltns:'\u25B1',fnof:'\u0192',Fopf:'\uD835\uDD3D',fopf:'\uD835\uDD57',forall:'\u2200',ForAll:'\u2200',fork:'\u22D4',forkv:'\u2AD9',Fouriertrf:'\u2131',fpartint:'\u2A0D',frac12:'\xBD',frac13:'\u2153',frac14:'\xBC',frac15:'\u2155',frac16:'\u2159',frac18:'\u215B',frac23:'\u2154',frac25:'\u2156',frac34:'\xBE',frac35:'\u2157',frac38:'\u215C',frac45:'\u2158',frac56:'\u215A',frac58:'\u215D',frac78:'\u215E',frasl:'\u2044',frown:'\u2322',fscr:'\uD835\uDCBB',Fscr:'\u2131',gacute:'\u01F5',Gamma:'\u0393',gamma:'\u03B3',Gammad:'\u03DC',gammad:'\u03DD',gap:'\u2A86',Gbreve:'\u011E',gbreve:'\u011F',Gcedil:'\u0122',Gcirc:'\u011C',gcirc:'\u011D',Gcy:'\u0413',gcy:'\u0433',Gdot:'\u0120',gdot:'\u0121',ge:'\u2265',gE:'\u2267',gEl:'\u2A8C',gel:'\u22DB',geq:'\u2265',geqq:'\u2267',geqslant:'\u2A7E',gescc:'\u2AA9',ges:'\u2A7E',gesdot:'\u2A80',gesdoto:'\u2A82',gesdotol:'\u2A84',gesl:'\u22DB\uFE00',gesles:'\u2A94',Gfr:'\uD835\uDD0A',gfr:'\uD835\uDD24',gg:'\u226B',Gg:'\u22D9',ggg:'\u22D9',gimel:'\u2137',GJcy:'\u0403',gjcy:'\u0453',gla:'\u2AA5',gl:'\u2277',glE:'\u2A92',glj:'\u2AA4',gnap:'\u2A8A',gnapprox:'\u2A8A',gne:'\u2A88',gnE:'\u2269',gneq:'\u2A88',gneqq:'\u2269',gnsim:'\u22E7',Gopf:'\uD835\uDD3E',gopf:'\uD835\uDD58',grave:'`',GreaterEqual:'\u2265',GreaterEqualLess:'\u22DB',GreaterFullEqual:'\u2267',GreaterGreater:'\u2AA2',GreaterLess:'\u2277',GreaterSlantEqual:'\u2A7E',GreaterTilde:'\u2273',Gscr:'\uD835\uDCA2',gscr:'\u210A',gsim:'\u2273',gsime:'\u2A8E',gsiml:'\u2A90',gtcc:'\u2AA7',gtcir:'\u2A7A',gt:'>',GT:'>',Gt:'\u226B',gtdot:'\u22D7',gtlPar:'\u2995',gtquest:'\u2A7C',gtrapprox:'\u2A86',gtrarr:'\u2978',gtrdot:'\u22D7',gtreqless:'\u22DB',gtreqqless:'\u2A8C',gtrless:'\u2277',gtrsim:'\u2273',gvertneqq:'\u2269\uFE00',gvnE:'\u2269\uFE00',Hacek:'\u02C7',hairsp:'\u200A',half:'\xBD',hamilt:'\u210B',HARDcy:'\u042A',hardcy:'\u044A',harrcir:'\u2948',harr:'\u2194',hArr:'\u21D4',harrw:'\u21AD',Hat:'^',hbar:'\u210F',Hcirc:'\u0124',hcirc:'\u0125',hearts:'\u2665',heartsuit:'\u2665',hellip:'\u2026',hercon:'\u22B9',hfr:'\uD835\uDD25',Hfr:'\u210C',HilbertSpace:'\u210B',hksearow:'\u2925',hkswarow:'\u2926',hoarr:'\u21FF',homtht:'\u223B',hookleftarrow:'\u21A9',hookrightarrow:'\u21AA',hopf:'\uD835\uDD59',Hopf:'\u210D',horbar:'\u2015',HorizontalLine:'\u2500',hscr:'\uD835\uDCBD',Hscr:'\u210B',hslash:'\u210F',Hstrok:'\u0126',hstrok:'\u0127',HumpDownHump:'\u224E',HumpEqual:'\u224F',hybull:'\u2043',hyphen:'\u2010',Iacute:'\xCD',iacute:'\xED',ic:'\u2063',Icirc:'\xCE',icirc:'\xEE',Icy:'\u0418',icy:'\u0438',Idot:'\u0130',IEcy:'\u0415',iecy:'\u0435',iexcl:'\xA1',iff:'\u21D4',ifr:'\uD835\uDD26',Ifr:'\u2111',Igrave:'\xCC',igrave:'\xEC',ii:'\u2148',iiiint:'\u2A0C',iiint:'\u222D',iinfin:'\u29DC',iiota:'\u2129',IJlig:'\u0132',ijlig:'\u0133',Imacr:'\u012A',imacr:'\u012B',image:'\u2111',ImaginaryI:'\u2148',imagline:'\u2110',imagpart:'\u2111',imath:'\u0131',Im:'\u2111',imof:'\u22B7',imped:'\u01B5',Implies:'\u21D2',incare:'\u2105',in:'\u2208',infin:'\u221E',infintie:'\u29DD',inodot:'\u0131',intcal:'\u22BA',int:'\u222B',Int:'\u222C',integers:'\u2124',Integral:'\u222B',intercal:'\u22BA',Intersection:'\u22C2',intlarhk:'\u2A17',intprod:'\u2A3C',InvisibleComma:'\u2063',InvisibleTimes:'\u2062',IOcy:'\u0401',iocy:'\u0451',Iogon:'\u012E',iogon:'\u012F',Iopf:'\uD835\uDD40',iopf:'\uD835\uDD5A',Iota:'\u0399',iota:'\u03B9',iprod:'\u2A3C',iquest:'\xBF',iscr:'\uD835\uDCBE',Iscr:'\u2110',isin:'\u2208',isindot:'\u22F5',isinE:'\u22F9',isins:'\u22F4',isinsv:'\u22F3',isinv:'\u2208',it:'\u2062',Itilde:'\u0128',itilde:'\u0129',Iukcy:'\u0406',iukcy:'\u0456',Iuml:'\xCF',iuml:'\xEF',Jcirc:'\u0134',jcirc:'\u0135',Jcy:'\u0419',jcy:'\u0439',Jfr:'\uD835\uDD0D',jfr:'\uD835\uDD27',jmath:'\u0237',Jopf:'\uD835\uDD41',jopf:'\uD835\uDD5B',Jscr:'\uD835\uDCA5',jscr:'\uD835\uDCBF',Jsercy:'\u0408',jsercy:'\u0458',Jukcy:'\u0404',jukcy:'\u0454',Kappa:'\u039A',kappa:'\u03BA',kappav:'\u03F0',Kcedil:'\u0136',kcedil:'\u0137',Kcy:'\u041A',kcy:'\u043A',Kfr:'\uD835\uDD0E',kfr:'\uD835\uDD28',kgreen:'\u0138',KHcy:'\u0425',khcy:'\u0445',KJcy:'\u040C',kjcy:'\u045C',Kopf:'\uD835\uDD42',kopf:'\uD835\uDD5C',Kscr:'\uD835\uDCA6',kscr:'\uD835\uDCC0',lAarr:'\u21DA',Lacute:'\u0139',lacute:'\u013A',laemptyv:'\u29B4',lagran:'\u2112',Lambda:'\u039B',lambda:'\u03BB',lang:'\u27E8',Lang:'\u27EA',langd:'\u2991',langle:'\u27E8',lap:'\u2A85',Laplacetrf:'\u2112',laquo:'\xAB',larrb:'\u21E4',larrbfs:'\u291F',larr:'\u2190',Larr:'\u219E',lArr:'\u21D0',larrfs:'\u291D',larrhk:'\u21A9',larrlp:'\u21AB',larrpl:'\u2939',larrsim:'\u2973',larrtl:'\u21A2',latail:'\u2919',lAtail:'\u291B',lat:'\u2AAB',late:'\u2AAD',lates:'\u2AAD\uFE00',lbarr:'\u290C',lBarr:'\u290E',lbbrk:'\u2772',lbrace:'{',lbrack:'[',lbrke:'\u298B',lbrksld:'\u298F',lbrkslu:'\u298D',Lcaron:'\u013D',lcaron:'\u013E',Lcedil:'\u013B',lcedil:'\u013C',lceil:'\u2308',lcub:'{',Lcy:'\u041B',lcy:'\u043B',ldca:'\u2936',ldquo:'\u201C',ldquor:'\u201E',ldrdhar:'\u2967',ldrushar:'\u294B',ldsh:'\u21B2',le:'\u2264',lE:'\u2266',LeftAngleBracket:'\u27E8',LeftArrowBar:'\u21E4',leftarrow:'\u2190',LeftArrow:'\u2190',Leftarrow:'\u21D0',LeftArrowRightArrow:'\u21C6',leftarrowtail:'\u21A2',LeftCeiling:'\u2308',LeftDoubleBracket:'\u27E6',LeftDownTeeVector:'\u2961',LeftDownVectorBar:'\u2959',LeftDownVector:'\u21C3',LeftFloor:'\u230A',leftharpoondown:'\u21BD',leftharpoonup:'\u21BC',leftleftarrows:'\u21C7',leftrightarrow:'\u2194',LeftRightArrow:'\u2194',Leftrightarrow:'\u21D4',leftrightarrows:'\u21C6',leftrightharpoons:'\u21CB',leftrightsquigarrow:'\u21AD',LeftRightVector:'\u294E',LeftTeeArrow:'\u21A4',LeftTee:'\u22A3',LeftTeeVector:'\u295A',leftthreetimes:'\u22CB',LeftTriangleBar:'\u29CF',LeftTriangle:'\u22B2',LeftTriangleEqual:'\u22B4',LeftUpDownVector:'\u2951',LeftUpTeeVector:'\u2960',LeftUpVectorBar:'\u2958',LeftUpVector:'\u21BF',LeftVectorBar:'\u2952',LeftVector:'\u21BC',lEg:'\u2A8B',leg:'\u22DA',leq:'\u2264',leqq:'\u2266',leqslant:'\u2A7D',lescc:'\u2AA8',les:'\u2A7D',lesdot:'\u2A7F',lesdoto:'\u2A81',lesdotor:'\u2A83',lesg:'\u22DA\uFE00',lesges:'\u2A93',lessapprox:'\u2A85',lessdot:'\u22D6',lesseqgtr:'\u22DA',lesseqqgtr:'\u2A8B',LessEqualGreater:'\u22DA',LessFullEqual:'\u2266',LessGreater:'\u2276',lessgtr:'\u2276',LessLess:'\u2AA1',lesssim:'\u2272',LessSlantEqual:'\u2A7D',LessTilde:'\u2272',lfisht:'\u297C',lfloor:'\u230A',Lfr:'\uD835\uDD0F',lfr:'\uD835\uDD29',lg:'\u2276',lgE:'\u2A91',lHar:'\u2962',lhard:'\u21BD',lharu:'\u21BC',lharul:'\u296A',lhblk:'\u2584',LJcy:'\u0409',ljcy:'\u0459',llarr:'\u21C7',ll:'\u226A',Ll:'\u22D8',llcorner:'\u231E',Lleftarrow:'\u21DA',llhard:'\u296B',lltri:'\u25FA',Lmidot:'\u013F',lmidot:'\u0140',lmoustache:'\u23B0',lmoust:'\u23B0',lnap:'\u2A89',lnapprox:'\u2A89',lne:'\u2A87',lnE:'\u2268',lneq:'\u2A87',lneqq:'\u2268',lnsim:'\u22E6',loang:'\u27EC',loarr:'\u21FD',lobrk:'\u27E6',longleftarrow:'\u27F5',LongLeftArrow:'\u27F5',Longleftarrow:'\u27F8',longleftrightarrow:'\u27F7',LongLeftRightArrow:'\u27F7',Longleftrightarrow:'\u27FA',longmapsto:'\u27FC',longrightarrow:'\u27F6',LongRightArrow:'\u27F6',Longrightarrow:'\u27F9',looparrowleft:'\u21AB',looparrowright:'\u21AC',lopar:'\u2985',Lopf:'\uD835\uDD43',lopf:'\uD835\uDD5D',loplus:'\u2A2D',lotimes:'\u2A34',lowast:'\u2217',lowbar:'_',LowerLeftArrow:'\u2199',LowerRightArrow:'\u2198',loz:'\u25CA',lozenge:'\u25CA',lozf:'\u29EB',lpar:'(',lparlt:'\u2993',lrarr:'\u21C6',lrcorner:'\u231F',lrhar:'\u21CB',lrhard:'\u296D',lrm:'\u200E',lrtri:'\u22BF',lsaquo:'\u2039',lscr:'\uD835\uDCC1',Lscr:'\u2112',lsh:'\u21B0',Lsh:'\u21B0',lsim:'\u2272',lsime:'\u2A8D',lsimg:'\u2A8F',lsqb:'[',lsquo:'\u2018',lsquor:'\u201A',Lstrok:'\u0141',lstrok:'\u0142',ltcc:'\u2AA6',ltcir:'\u2A79',lt:'<',LT:'<',Lt:'\u226A',ltdot:'\u22D6',lthree:'\u22CB',ltimes:'\u22C9',ltlarr:'\u2976',ltquest:'\u2A7B',ltri:'\u25C3',ltrie:'\u22B4',ltrif:'\u25C2',ltrPar:'\u2996',lurdshar:'\u294A',luruhar:'\u2966',lvertneqq:'\u2268\uFE00',lvnE:'\u2268\uFE00',macr:'\xAF',male:'\u2642',malt:'\u2720',maltese:'\u2720',Map:'\u2905',map:'\u21A6',mapsto:'\u21A6',mapstodown:'\u21A7',mapstoleft:'\u21A4',mapstoup:'\u21A5',marker:'\u25AE',mcomma:'\u2A29',Mcy:'\u041C',mcy:'\u043C',mdash:'\u2014',mDDot:'\u223A',measuredangle:'\u2221',MediumSpace:'\u205F',Mellintrf:'\u2133',Mfr:'\uD835\uDD10',mfr:'\uD835\uDD2A',mho:'\u2127',micro:'\xB5',midast:'*',midcir:'\u2AF0',mid:'\u2223',middot:'\xB7',minusb:'\u229F',minus:'\u2212',minusd:'\u2238',minusdu:'\u2A2A',MinusPlus:'\u2213',mlcp:'\u2ADB',mldr:'\u2026',mnplus:'\u2213',models:'\u22A7',Mopf:'\uD835\uDD44',mopf:'\uD835\uDD5E',mp:'\u2213',mscr:'\uD835\uDCC2',Mscr:'\u2133',mstpos:'\u223E',Mu:'\u039C',mu:'\u03BC',multimap:'\u22B8',mumap:'\u22B8',nabla:'\u2207',Nacute:'\u0143',nacute:'\u0144',nang:'\u2220\u20D2',nap:'\u2249',napE:'\u2A70\u0338',napid:'\u224B\u0338',napos:'\u0149',napprox:'\u2249',natural:'\u266E',naturals:'\u2115',natur:'\u266E',nbsp:'\xA0',nbump:'\u224E\u0338',nbumpe:'\u224F\u0338',ncap:'\u2A43',Ncaron:'\u0147',ncaron:'\u0148',Ncedil:'\u0145',ncedil:'\u0146',ncong:'\u2247',ncongdot:'\u2A6D\u0338',ncup:'\u2A42',Ncy:'\u041D',ncy:'\u043D',ndash:'\u2013',nearhk:'\u2924',nearr:'\u2197',neArr:'\u21D7',nearrow:'\u2197',ne:'\u2260',nedot:'\u2250\u0338',NegativeMediumSpace:'\u200B',NegativeThickSpace:'\u200B',NegativeThinSpace:'\u200B',NegativeVeryThinSpace:'\u200B',nequiv:'\u2262',nesear:'\u2928',nesim:'\u2242\u0338',NestedGreaterGreater:'\u226B',NestedLessLess:'\u226A',NewLine:'\n',nexist:'\u2204',nexists:'\u2204',Nfr:'\uD835\uDD11',nfr:'\uD835\uDD2B',ngE:'\u2267\u0338',nge:'\u2271',ngeq:'\u2271',ngeqq:'\u2267\u0338',ngeqslant:'\u2A7E\u0338',nges:'\u2A7E\u0338',nGg:'\u22D9\u0338',ngsim:'\u2275',nGt:'\u226B\u20D2',ngt:'\u226F',ngtr:'\u226F',nGtv:'\u226B\u0338',nharr:'\u21AE',nhArr:'\u21CE',nhpar:'\u2AF2',ni:'\u220B',nis:'\u22FC',nisd:'\u22FA',niv:'\u220B',NJcy:'\u040A',njcy:'\u045A',nlarr:'\u219A',nlArr:'\u21CD',nldr:'\u2025',nlE:'\u2266\u0338',nle:'\u2270',nleftarrow:'\u219A',nLeftarrow:'\u21CD',nleftrightarrow:'\u21AE',nLeftrightarrow:'\u21CE',nleq:'\u2270',nleqq:'\u2266\u0338',nleqslant:'\u2A7D\u0338',nles:'\u2A7D\u0338',nless:'\u226E',nLl:'\u22D8\u0338',nlsim:'\u2274',nLt:'\u226A\u20D2',nlt:'\u226E',nltri:'\u22EA',nltrie:'\u22EC',nLtv:'\u226A\u0338',nmid:'\u2224',NoBreak:'\u2060',NonBreakingSpace:'\xA0',nopf:'\uD835\uDD5F',Nopf:'\u2115',Not:'\u2AEC',not:'\xAC',NotCongruent:'\u2262',NotCupCap:'\u226D',NotDoubleVerticalBar:'\u2226',NotElement:'\u2209',NotEqual:'\u2260',NotEqualTilde:'\u2242\u0338',NotExists:'\u2204',NotGreater:'\u226F',NotGreaterEqual:'\u2271',NotGreaterFullEqual:'\u2267\u0338',NotGreaterGreater:'\u226B\u0338',NotGreaterLess:'\u2279',NotGreaterSlantEqual:'\u2A7E\u0338',NotGreaterTilde:'\u2275',NotHumpDownHump:'\u224E\u0338',NotHumpEqual:'\u224F\u0338',notin:'\u2209',notindot:'\u22F5\u0338',notinE:'\u22F9\u0338',notinva:'\u2209',notinvb:'\u22F7',notinvc:'\u22F6',NotLeftTriangleBar:'\u29CF\u0338',NotLeftTriangle:'\u22EA',NotLeftTriangleEqual:'\u22EC',NotLess:'\u226E',NotLessEqual:'\u2270',NotLessGreater:'\u2278',NotLessLess:'\u226A\u0338',NotLessSlantEqual:'\u2A7D\u0338',NotLessTilde:'\u2274',NotNestedGreaterGreater:'\u2AA2\u0338',NotNestedLessLess:'\u2AA1\u0338',notni:'\u220C',notniva:'\u220C',notnivb:'\u22FE',notnivc:'\u22FD',NotPrecedes:'\u2280',NotPrecedesEqual:'\u2AAF\u0338',NotPrecedesSlantEqual:'\u22E0',NotReverseElement:'\u220C',NotRightTriangleBar:'\u29D0\u0338',NotRightTriangle:'\u22EB',NotRightTriangleEqual:'\u22ED',NotSquareSubset:'\u228F\u0338',NotSquareSubsetEqual:'\u22E2',NotSquareSuperset:'\u2290\u0338',NotSquareSupersetEqual:'\u22E3',NotSubset:'\u2282\u20D2',NotSubsetEqual:'\u2288',NotSucceeds:'\u2281',NotSucceedsEqual:'\u2AB0\u0338',NotSucceedsSlantEqual:'\u22E1',NotSucceedsTilde:'\u227F\u0338',NotSuperset:'\u2283\u20D2',NotSupersetEqual:'\u2289',NotTilde:'\u2241',NotTildeEqual:'\u2244',NotTildeFullEqual:'\u2247',NotTildeTilde:'\u2249',NotVerticalBar:'\u2224',nparallel:'\u2226',npar:'\u2226',nparsl:'\u2AFD\u20E5',npart:'\u2202\u0338',npolint:'\u2A14',npr:'\u2280',nprcue:'\u22E0',nprec:'\u2280',npreceq:'\u2AAF\u0338',npre:'\u2AAF\u0338',nrarrc:'\u2933\u0338',nrarr:'\u219B',nrArr:'\u21CF',nrarrw:'\u219D\u0338',nrightarrow:'\u219B',nRightarrow:'\u21CF',nrtri:'\u22EB',nrtrie:'\u22ED',nsc:'\u2281',nsccue:'\u22E1',nsce:'\u2AB0\u0338',Nscr:'\uD835\uDCA9',nscr:'\uD835\uDCC3',nshortmid:'\u2224',nshortparallel:'\u2226',nsim:'\u2241',nsime:'\u2244',nsimeq:'\u2244',nsmid:'\u2224',nspar:'\u2226',nsqsube:'\u22E2',nsqsupe:'\u22E3',nsub:'\u2284',nsubE:'\u2AC5\u0338',nsube:'\u2288',nsubset:'\u2282\u20D2',nsubseteq:'\u2288',nsubseteqq:'\u2AC5\u0338',nsucc:'\u2281',nsucceq:'\u2AB0\u0338',nsup:'\u2285',nsupE:'\u2AC6\u0338',nsupe:'\u2289',nsupset:'\u2283\u20D2',nsupseteq:'\u2289',nsupseteqq:'\u2AC6\u0338',ntgl:'\u2279',Ntilde:'\xD1',ntilde:'\xF1',ntlg:'\u2278',ntriangleleft:'\u22EA',ntrianglelefteq:'\u22EC',ntriangleright:'\u22EB',ntrianglerighteq:'\u22ED',Nu:'\u039D',nu:'\u03BD',num:'#',numero:'\u2116',numsp:'\u2007',nvap:'\u224D\u20D2',nvdash:'\u22AC',nvDash:'\u22AD',nVdash:'\u22AE',nVDash:'\u22AF',nvge:'\u2265\u20D2',nvgt:'>\u20D2',nvHarr:'\u2904',nvinfin:'\u29DE',nvlArr:'\u2902',nvle:'\u2264\u20D2',nvlt:'<\u20D2',nvltrie:'\u22B4\u20D2',nvrArr:'\u2903',nvrtrie:'\u22B5\u20D2',nvsim:'\u223C\u20D2',nwarhk:'\u2923',nwarr:'\u2196',nwArr:'\u21D6',nwarrow:'\u2196',nwnear:'\u2927',Oacute:'\xD3',oacute:'\xF3',oast:'\u229B',Ocirc:'\xD4',ocirc:'\xF4',ocir:'\u229A',Ocy:'\u041E',ocy:'\u043E',odash:'\u229D',Odblac:'\u0150',odblac:'\u0151',odiv:'\u2A38',odot:'\u2299',odsold:'\u29BC',OElig:'\u0152',oelig:'\u0153',ofcir:'\u29BF',Ofr:'\uD835\uDD12',ofr:'\uD835\uDD2C',ogon:'\u02DB',Ograve:'\xD2',ograve:'\xF2',ogt:'\u29C1',ohbar:'\u29B5',ohm:'\u03A9',oint:'\u222E',olarr:'\u21BA',olcir:'\u29BE',olcross:'\u29BB',oline:'\u203E',olt:'\u29C0',Omacr:'\u014C',omacr:'\u014D',Omega:'\u03A9',omega:'\u03C9',Omicron:'\u039F',omicron:'\u03BF',omid:'\u29B6',ominus:'\u2296',Oopf:'\uD835\uDD46',oopf:'\uD835\uDD60',opar:'\u29B7',OpenCurlyDoubleQuote:'\u201C',OpenCurlyQuote:'\u2018',operp:'\u29B9',oplus:'\u2295',orarr:'\u21BB',Or:'\u2A54',or:'\u2228',ord:'\u2A5D',order:'\u2134',orderof:'\u2134',ordf:'\xAA',ordm:'\xBA',origof:'\u22B6',oror:'\u2A56',orslope:'\u2A57',orv:'\u2A5B',oS:'\u24C8',Oscr:'\uD835\uDCAA',oscr:'\u2134',Oslash:'\xD8',oslash:'\xF8',osol:'\u2298',Otilde:'\xD5',otilde:'\xF5',otimesas:'\u2A36',Otimes:'\u2A37',otimes:'\u2297',Ouml:'\xD6',ouml:'\xF6',ovbar:'\u233D',OverBar:'\u203E',OverBrace:'\u23DE',OverBracket:'\u23B4',OverParenthesis:'\u23DC',para:'\xB6',parallel:'\u2225',par:'\u2225',parsim:'\u2AF3',parsl:'\u2AFD',part:'\u2202',PartialD:'\u2202',Pcy:'\u041F',pcy:'\u043F',percnt:'%',period:'.',permil:'\u2030',perp:'\u22A5',pertenk:'\u2031',Pfr:'\uD835\uDD13',pfr:'\uD835\uDD2D',Phi:'\u03A6',phi:'\u03C6',phiv:'\u03D5',phmmat:'\u2133',phone:'\u260E',Pi:'\u03A0',pi:'\u03C0',pitchfork:'\u22D4',piv:'\u03D6',planck:'\u210F',planckh:'\u210E',plankv:'\u210F',plusacir:'\u2A23',plusb:'\u229E',pluscir:'\u2A22',plus:'+',plusdo:'\u2214',plusdu:'\u2A25',pluse:'\u2A72',PlusMinus:'\xB1',plusmn:'\xB1',plussim:'\u2A26',plustwo:'\u2A27',pm:'\xB1',Poincareplane:'\u210C',pointint:'\u2A15',popf:'\uD835\uDD61',Popf:'\u2119',pound:'\xA3',prap:'\u2AB7',Pr:'\u2ABB',pr:'\u227A',prcue:'\u227C',precapprox:'\u2AB7',prec:'\u227A',preccurlyeq:'\u227C',Precedes:'\u227A',PrecedesEqual:'\u2AAF',PrecedesSlantEqual:'\u227C',PrecedesTilde:'\u227E',preceq:'\u2AAF',precnapprox:'\u2AB9',precneqq:'\u2AB5',precnsim:'\u22E8',pre:'\u2AAF',prE:'\u2AB3',precsim:'\u227E',prime:'\u2032',Prime:'\u2033',primes:'\u2119',prnap:'\u2AB9',prnE:'\u2AB5',prnsim:'\u22E8',prod:'\u220F',Product:'\u220F',profalar:'\u232E',profline:'\u2312',profsurf:'\u2313',prop:'\u221D',Proportional:'\u221D',Proportion:'\u2237',propto:'\u221D',prsim:'\u227E',prurel:'\u22B0',Pscr:'\uD835\uDCAB',pscr:'\uD835\uDCC5',Psi:'\u03A8',psi:'\u03C8',puncsp:'\u2008',Qfr:'\uD835\uDD14',qfr:'\uD835\uDD2E',qint:'\u2A0C',qopf:'\uD835\uDD62',Qopf:'\u211A',qprime:'\u2057',Qscr:'\uD835\uDCAC',qscr:'\uD835\uDCC6',quaternions:'\u210D',quatint:'\u2A16',quest:'?',questeq:'\u225F',quot:'"',QUOT:'"',rAarr:'\u21DB',race:'\u223D\u0331',Racute:'\u0154',racute:'\u0155',radic:'\u221A',raemptyv:'\u29B3',rang:'\u27E9',Rang:'\u27EB',rangd:'\u2992',range:'\u29A5',rangle:'\u27E9',raquo:'\xBB',rarrap:'\u2975',rarrb:'\u21E5',rarrbfs:'\u2920',rarrc:'\u2933',rarr:'\u2192',Rarr:'\u21A0',rArr:'\u21D2',rarrfs:'\u291E',rarrhk:'\u21AA',rarrlp:'\u21AC',rarrpl:'\u2945',rarrsim:'\u2974',Rarrtl:'\u2916',rarrtl:'\u21A3',rarrw:'\u219D',ratail:'\u291A',rAtail:'\u291C',ratio:'\u2236',rationals:'\u211A',rbarr:'\u290D',rBarr:'\u290F',RBarr:'\u2910',rbbrk:'\u2773',rbrace:'}',rbrack:']',rbrke:'\u298C',rbrksld:'\u298E',rbrkslu:'\u2990',Rcaron:'\u0158',rcaron:'\u0159',Rcedil:'\u0156',rcedil:'\u0157',rceil:'\u2309',rcub:'}',Rcy:'\u0420',rcy:'\u0440',rdca:'\u2937',rdldhar:'\u2969',rdquo:'\u201D',rdquor:'\u201D',rdsh:'\u21B3',real:'\u211C',realine:'\u211B',realpart:'\u211C',reals:'\u211D',Re:'\u211C',rect:'\u25AD',reg:'\xAE',REG:'\xAE',ReverseElement:'\u220B',ReverseEquilibrium:'\u21CB',ReverseUpEquilibrium:'\u296F',rfisht:'\u297D',rfloor:'\u230B',rfr:'\uD835\uDD2F',Rfr:'\u211C',rHar:'\u2964',rhard:'\u21C1',rharu:'\u21C0',rharul:'\u296C',Rho:'\u03A1',rho:'\u03C1',rhov:'\u03F1',RightAngleBracket:'\u27E9',RightArrowBar:'\u21E5',rightarrow:'\u2192',RightArrow:'\u2192',Rightarrow:'\u21D2',RightArrowLeftArrow:'\u21C4',rightarrowtail:'\u21A3',RightCeiling:'\u2309',RightDoubleBracket:'\u27E7',RightDownTeeVector:'\u295D',RightDownVectorBar:'\u2955',RightDownVector:'\u21C2',RightFloor:'\u230B',rightharpoondown:'\u21C1',rightharpoonup:'\u21C0',rightleftarrows:'\u21C4',rightleftharpoons:'\u21CC',rightrightarrows:'\u21C9',rightsquigarrow:'\u219D',RightTeeArrow:'\u21A6',RightTee:'\u22A2',RightTeeVector:'\u295B',rightthreetimes:'\u22CC',RightTriangleBar:'\u29D0',RightTriangle:'\u22B3',RightTriangleEqual:'\u22B5',RightUpDownVector:'\u294F',RightUpTeeVector:'\u295C',RightUpVectorBar:'\u2954',RightUpVector:'\u21BE',RightVectorBar:'\u2953',RightVector:'\u21C0',ring:'\u02DA',risingdotseq:'\u2253',rlarr:'\u21C4',rlhar:'\u21CC',rlm:'\u200F',rmoustache:'\u23B1',rmoust:'\u23B1',rnmid:'\u2AEE',roang:'\u27ED',roarr:'\u21FE',robrk:'\u27E7',ropar:'\u2986',ropf:'\uD835\uDD63',Ropf:'\u211D',roplus:'\u2A2E',rotimes:'\u2A35',RoundImplies:'\u2970',rpar:')',rpargt:'\u2994',rppolint:'\u2A12',rrarr:'\u21C9',Rrightarrow:'\u21DB',rsaquo:'\u203A',rscr:'\uD835\uDCC7',Rscr:'\u211B',rsh:'\u21B1',Rsh:'\u21B1',rsqb:']',rsquo:'\u2019',rsquor:'\u2019',rthree:'\u22CC',rtimes:'\u22CA',rtri:'\u25B9',rtrie:'\u22B5',rtrif:'\u25B8',rtriltri:'\u29CE',RuleDelayed:'\u29F4',ruluhar:'\u2968',rx:'\u211E',Sacute:'\u015A',sacute:'\u015B',sbquo:'\u201A',scap:'\u2AB8',Scaron:'\u0160',scaron:'\u0161',Sc:'\u2ABC',sc:'\u227B',sccue:'\u227D',sce:'\u2AB0',scE:'\u2AB4',Scedil:'\u015E',scedil:'\u015F',Scirc:'\u015C',scirc:'\u015D',scnap:'\u2ABA',scnE:'\u2AB6',scnsim:'\u22E9',scpolint:'\u2A13',scsim:'\u227F',Scy:'\u0421',scy:'\u0441',sdotb:'\u22A1',sdot:'\u22C5',sdote:'\u2A66',searhk:'\u2925',searr:'\u2198',seArr:'\u21D8',searrow:'\u2198',sect:'\xA7',semi:';',seswar:'\u2929',setminus:'\u2216',setmn:'\u2216',sext:'\u2736',Sfr:'\uD835\uDD16',sfr:'\uD835\uDD30',sfrown:'\u2322',sharp:'\u266F',SHCHcy:'\u0429',shchcy:'\u0449',SHcy:'\u0428',shcy:'\u0448',ShortDownArrow:'\u2193',ShortLeftArrow:'\u2190',shortmid:'\u2223',shortparallel:'\u2225',ShortRightArrow:'\u2192',ShortUpArrow:'\u2191',shy:'\xAD',Sigma:'\u03A3',sigma:'\u03C3',sigmaf:'\u03C2',sigmav:'\u03C2',sim:'\u223C',simdot:'\u2A6A',sime:'\u2243',simeq:'\u2243',simg:'\u2A9E',simgE:'\u2AA0',siml:'\u2A9D',simlE:'\u2A9F',simne:'\u2246',simplus:'\u2A24',simrarr:'\u2972',slarr:'\u2190',SmallCircle:'\u2218',smallsetminus:'\u2216',smashp:'\u2A33',smeparsl:'\u29E4',smid:'\u2223',smile:'\u2323',smt:'\u2AAA',smte:'\u2AAC',smtes:'\u2AAC\uFE00',SOFTcy:'\u042C',softcy:'\u044C',solbar:'\u233F',solb:'\u29C4',sol:'/',Sopf:'\uD835\uDD4A',sopf:'\uD835\uDD64',spades:'\u2660',spadesuit:'\u2660',spar:'\u2225',sqcap:'\u2293',sqcaps:'\u2293\uFE00',sqcup:'\u2294',sqcups:'\u2294\uFE00',Sqrt:'\u221A',sqsub:'\u228F',sqsube:'\u2291',sqsubset:'\u228F',sqsubseteq:'\u2291',sqsup:'\u2290',sqsupe:'\u2292',sqsupset:'\u2290',sqsupseteq:'\u2292',square:'\u25A1',Square:'\u25A1',SquareIntersection:'\u2293',SquareSubset:'\u228F',SquareSubsetEqual:'\u2291',SquareSuperset:'\u2290',SquareSupersetEqual:'\u2292',SquareUnion:'\u2294',squarf:'\u25AA',squ:'\u25A1',squf:'\u25AA',srarr:'\u2192',Sscr:'\uD835\uDCAE',sscr:'\uD835\uDCC8',ssetmn:'\u2216',ssmile:'\u2323',sstarf:'\u22C6',Star:'\u22C6',star:'\u2606',starf:'\u2605',straightepsilon:'\u03F5',straightphi:'\u03D5',strns:'\xAF',sub:'\u2282',Sub:'\u22D0',subdot:'\u2ABD',subE:'\u2AC5',sube:'\u2286',subedot:'\u2AC3',submult:'\u2AC1',subnE:'\u2ACB',subne:'\u228A',subplus:'\u2ABF',subrarr:'\u2979',subset:'\u2282',Subset:'\u22D0',subseteq:'\u2286',subseteqq:'\u2AC5',SubsetEqual:'\u2286',subsetneq:'\u228A',subsetneqq:'\u2ACB',subsim:'\u2AC7',subsub:'\u2AD5',subsup:'\u2AD3',succapprox:'\u2AB8',succ:'\u227B',succcurlyeq:'\u227D',Succeeds:'\u227B',SucceedsEqual:'\u2AB0',SucceedsSlantEqual:'\u227D',SucceedsTilde:'\u227F',succeq:'\u2AB0',succnapprox:'\u2ABA',succneqq:'\u2AB6',succnsim:'\u22E9',succsim:'\u227F',SuchThat:'\u220B',sum:'\u2211',Sum:'\u2211',sung:'\u266A',sup1:'\xB9',sup2:'\xB2',sup3:'\xB3',sup:'\u2283',Sup:'\u22D1',supdot:'\u2ABE',supdsub:'\u2AD8',supE:'\u2AC6',supe:'\u2287',supedot:'\u2AC4',Superset:'\u2283',SupersetEqual:'\u2287',suphsol:'\u27C9',suphsub:'\u2AD7',suplarr:'\u297B',supmult:'\u2AC2',supnE:'\u2ACC',supne:'\u228B',supplus:'\u2AC0',supset:'\u2283',Supset:'\u22D1',supseteq:'\u2287',supseteqq:'\u2AC6',supsetneq:'\u228B',supsetneqq:'\u2ACC',supsim:'\u2AC8',supsub:'\u2AD4',supsup:'\u2AD6',swarhk:'\u2926',swarr:'\u2199',swArr:'\u21D9',swarrow:'\u2199',swnwar:'\u292A',szlig:'\xDF',Tab:'\t',target:'\u2316',Tau:'\u03A4',tau:'\u03C4',tbrk:'\u23B4',Tcaron:'\u0164',tcaron:'\u0165',Tcedil:'\u0162',tcedil:'\u0163',Tcy:'\u0422',tcy:'\u0442',tdot:'\u20DB',telrec:'\u2315',Tfr:'\uD835\uDD17',tfr:'\uD835\uDD31',there4:'\u2234',therefore:'\u2234',Therefore:'\u2234',Theta:'\u0398',theta:'\u03B8',thetasym:'\u03D1',thetav:'\u03D1',thickapprox:'\u2248',thicksim:'\u223C',ThickSpace:'\u205F\u200A',ThinSpace:'\u2009',thinsp:'\u2009',thkap:'\u2248',thksim:'\u223C',THORN:'\xDE',thorn:'\xFE',tilde:'\u02DC',Tilde:'\u223C',TildeEqual:'\u2243',TildeFullEqual:'\u2245',TildeTilde:'\u2248',timesbar:'\u2A31',timesb:'\u22A0',times:'\xD7',timesd:'\u2A30',tint:'\u222D',toea:'\u2928',topbot:'\u2336',topcir:'\u2AF1',top:'\u22A4',Topf:'\uD835\uDD4B',topf:'\uD835\uDD65',topfork:'\u2ADA',tosa:'\u2929',tprime:'\u2034',trade:'\u2122',TRADE:'\u2122',triangle:'\u25B5',triangledown:'\u25BF',triangleleft:'\u25C3',trianglelefteq:'\u22B4',triangleq:'\u225C',triangleright:'\u25B9',trianglerighteq:'\u22B5',tridot:'\u25EC',trie:'\u225C',triminus:'\u2A3A',TripleDot:'\u20DB',triplus:'\u2A39',trisb:'\u29CD',tritime:'\u2A3B',trpezium:'\u23E2',Tscr:'\uD835\uDCAF',tscr:'\uD835\uDCC9',TScy:'\u0426',tscy:'\u0446',TSHcy:'\u040B',tshcy:'\u045B',Tstrok:'\u0166',tstrok:'\u0167',twixt:'\u226C',twoheadleftarrow:'\u219E',twoheadrightarrow:'\u21A0',Uacute:'\xDA',uacute:'\xFA',uarr:'\u2191',Uarr:'\u219F',uArr:'\u21D1',Uarrocir:'\u2949',Ubrcy:'\u040E',ubrcy:'\u045E',Ubreve:'\u016C',ubreve:'\u016D',Ucirc:'\xDB',ucirc:'\xFB',Ucy:'\u0423',ucy:'\u0443',udarr:'\u21C5',Udblac:'\u0170',udblac:'\u0171',udhar:'\u296E',ufisht:'\u297E',Ufr:'\uD835\uDD18',ufr:'\uD835\uDD32',Ugrave:'\xD9',ugrave:'\xF9',uHar:'\u2963',uharl:'\u21BF',uharr:'\u21BE',uhblk:'\u2580',ulcorn:'\u231C',ulcorner:'\u231C',ulcrop:'\u230F',ultri:'\u25F8',Umacr:'\u016A',umacr:'\u016B',uml:'\xA8',UnderBar:'_',UnderBrace:'\u23DF',UnderBracket:'\u23B5',UnderParenthesis:'\u23DD',Union:'\u22C3',UnionPlus:'\u228E',Uogon:'\u0172',uogon:'\u0173',Uopf:'\uD835\uDD4C',uopf:'\uD835\uDD66',UpArrowBar:'\u2912',uparrow:'\u2191',UpArrow:'\u2191',Uparrow:'\u21D1',UpArrowDownArrow:'\u21C5',updownarrow:'\u2195',UpDownArrow:'\u2195',Updownarrow:'\u21D5',UpEquilibrium:'\u296E',upharpoonleft:'\u21BF',upharpoonright:'\u21BE',uplus:'\u228E',UpperLeftArrow:'\u2196',UpperRightArrow:'\u2197',upsi:'\u03C5',Upsi:'\u03D2',upsih:'\u03D2',Upsilon:'\u03A5',upsilon:'\u03C5',UpTeeArrow:'\u21A5',UpTee:'\u22A5',upuparrows:'\u21C8',urcorn:'\u231D',urcorner:'\u231D',urcrop:'\u230E',Uring:'\u016E',uring:'\u016F',urtri:'\u25F9',Uscr:'\uD835\uDCB0',uscr:'\uD835\uDCCA',utdot:'\u22F0',Utilde:'\u0168',utilde:'\u0169',utri:'\u25B5',utrif:'\u25B4',uuarr:'\u21C8',Uuml:'\xDC',uuml:'\xFC',uwangle:'\u29A7',vangrt:'\u299C',varepsilon:'\u03F5',varkappa:'\u03F0',varnothing:'\u2205',varphi:'\u03D5',varpi:'\u03D6',varpropto:'\u221D',varr:'\u2195',vArr:'\u21D5',varrho:'\u03F1',varsigma:'\u03C2',varsubsetneq:'\u228A\uFE00',varsubsetneqq:'\u2ACB\uFE00',varsupsetneq:'\u228B\uFE00',varsupsetneqq:'\u2ACC\uFE00',vartheta:'\u03D1',vartriangleleft:'\u22B2',vartriangleright:'\u22B3',vBar:'\u2AE8',Vbar:'\u2AEB',vBarv:'\u2AE9',Vcy:'\u0412',vcy:'\u0432',vdash:'\u22A2',vDash:'\u22A8',Vdash:'\u22A9',VDash:'\u22AB',Vdashl:'\u2AE6',veebar:'\u22BB',vee:'\u2228',Vee:'\u22C1',veeeq:'\u225A',vellip:'\u22EE',verbar:'|',Verbar:'\u2016',vert:'|',Vert:'\u2016',VerticalBar:'\u2223',VerticalLine:'|',VerticalSeparator:'\u2758',VerticalTilde:'\u2240',VeryThinSpace:'\u200A',Vfr:'\uD835\uDD19',vfr:'\uD835\uDD33',vltri:'\u22B2',vnsub:'\u2282\u20D2',vnsup:'\u2283\u20D2',Vopf:'\uD835\uDD4D',vopf:'\uD835\uDD67',vprop:'\u221D',vrtri:'\u22B3',Vscr:'\uD835\uDCB1',vscr:'\uD835\uDCCB',vsubnE:'\u2ACB\uFE00',vsubne:'\u228A\uFE00',vsupnE:'\u2ACC\uFE00',vsupne:'\u228B\uFE00',Vvdash:'\u22AA',vzigzag:'\u299A',Wcirc:'\u0174',wcirc:'\u0175',wedbar:'\u2A5F',wedge:'\u2227',Wedge:'\u22C0',wedgeq:'\u2259',weierp:'\u2118',Wfr:'\uD835\uDD1A',wfr:'\uD835\uDD34',Wopf:'\uD835\uDD4E',wopf:'\uD835\uDD68',wp:'\u2118',wr:'\u2240',wreath:'\u2240',Wscr:'\uD835\uDCB2',wscr:'\uD835\uDCCC',xcap:'\u22C2',xcirc:'\u25EF',xcup:'\u22C3',xdtri:'\u25BD',Xfr:'\uD835\uDD1B',xfr:'\uD835\uDD35',xharr:'\u27F7',xhArr:'\u27FA',Xi:'\u039E',xi:'\u03BE',xlarr:'\u27F5',xlArr:'\u27F8',xmap:'\u27FC',xnis:'\u22FB',xodot:'\u2A00',Xopf:'\uD835\uDD4F',xopf:'\uD835\uDD69',xoplus:'\u2A01',xotime:'\u2A02',xrarr:'\u27F6',xrArr:'\u27F9',Xscr:'\uD835\uDCB3',xscr:'\uD835\uDCCD',xsqcup:'\u2A06',xuplus:'\u2A04',xutri:'\u25B3',xvee:'\u22C1',xwedge:'\u22C0',Yacute:'\xDD',yacute:'\xFD',YAcy:'\u042F',yacy:'\u044F',Ycirc:'\u0176',ycirc:'\u0177',Ycy:'\u042B',ycy:'\u044B',yen:'\xA5',Yfr:'\uD835\uDD1C',yfr:'\uD835\uDD36',YIcy:'\u0407',yicy:'\u0457',Yopf:'\uD835\uDD50',yopf:'\uD835\uDD6A',Yscr:'\uD835\uDCB4',yscr:'\uD835\uDCCE',YUcy:'\u042E',yucy:'\u044E',yuml:'\xFF',Yuml:'\u0178',Zacute:'\u0179',zacute:'\u017A',Zcaron:'\u017D',zcaron:'\u017E',Zcy:'\u0417',zcy:'\u0437',Zdot:'\u017B',zdot:'\u017C',zeetrf:'\u2128',ZeroWidthSpace:'\u200B',Zeta:'\u0396',zeta:'\u03B6',zfr:'\uD835\uDD37',Zfr:'\u2128',ZHcy:'\u0416',zhcy:'\u0436',zigrarr:'\u21DD',zopf:'\uD835\uDD6B',Zopf:'\u2124',Zscr:'\uD835\uDCB5',zscr:'\uD835\uDCCF',zwj:'\u200D',zwnj:'\u200C'}},function(e){'use strict';function t(e){var t=r[e],o,i;if(t)return t;for(t=r[e]=[],o=0;128>o;o++)i=n(o),/^[0-9a-z]$/i.test(i)?t.push(i):t.push('%'+('0'+o.toString(16).toUpperCase()).slice(-2));for(o=0;o<e.length;o++)t[e.charCodeAt(o)]=e[o];return t}function o(e,n,r){var a='',s,i,l,d,c;for('string'!=typeof n&&(r=n,n=o.defaultChars),'undefined'==typeof r&&(r=!0),c=t(n),(s=0,i=e.length);s<i;s++){if(l=e.charCodeAt(s),r&&37===l&&s+2<i&&/^[0-9a-f]{2}$/i.test(e.slice(s+1,s+3))){a+=e.slice(s,s+3),s+=2;continue}if(128>l){a+=c[l];continue}if(55296<=l&&57343>=l){if(55296<=l&&56319>=l&&s+1<i&&(d=e.charCodeAt(s+1),56320<=d&&57343>=d)){a+=encodeURIComponent(e[s]+e[s+1]),s++;continue}a+='%EF%BF%BD';continue}a+=encodeURIComponent(e[s])}return a}var r={};o.defaultChars=';/?:@&=+$,-_.!~*\'()#',o.componentChars='-_.!~*\'()',e.exports=o},function(e){'use strict';function t(e){var t=r[e],o,i;if(t)return t;for(t=r[e]=[],o=0;128>o;o++)i=n(o),t.push(i);for(o=0;o<e.length;o++)i=e.charCodeAt(o),t[i]='%'+('0'+i.toString(16).toUpperCase()).slice(-2);return t}function o(e,r){var i;return'string'!=typeof r&&(r=o.defaultChars),i=t(r),e.replace(/(%[a-f0-9]{2})+/gi,function(e){var t='',o,r,a,s,l,d,c;for(o=0,r=e.length;o<r;o+=3){if(a=parseInt(e.slice(o+1,o+3),16),128>a){t+=i[a];continue}if(192==(224&a)&&o+3<r&&(s=parseInt(e.slice(o+4,o+6),16),128==(192&s))){c=1984&a<<6|63&s,t+=128>c?'\uFFFD\uFFFD':n(c),o+=3;continue}if(224==(240&a)&&o+6<r&&(s=parseInt(e.slice(o+4,o+6),16),l=parseInt(e.slice(o+7,o+9),16),128==(192&s)&&128==(192&l))){c=61440&a<<12|4032&s<<6|63&l,t+=2048>c||55296<=c&&57343>=c?'\uFFFD\uFFFD\uFFFD':n(c),o+=6;continue}if(240==(248&a)&&o+9<r&&(s=parseInt(e.slice(o+4,o+6),16),l=parseInt(e.slice(o+7,o+9),16),d=parseInt(e.slice(o+10,o+12),16),128==(192&s)&&128==(192&l)&&128==(192&d))){c=1835008&a<<18|258048&s<<12|4032&l<<6|63&d,65536>c||1114111<c?t+='\uFFFD\uFFFD\uFFFD\uFFFD':(c-=65536,t+=n(55296+(c>>10),56320+(1023&c))),o+=9;continue}t+='\uFFFD'}return t})}var r={};o.defaultChars=';/?:@&=+$,#',o.componentChars='',e.exports=o},function(e){'use strict';e.exports=function(e){var t='';return t+=e.protocol||'',t+=e.slashes?'//':'',t+=e.auth?e.auth+'@':'',t+=e.hostname&&-1!==e.hostname.indexOf(':')?'['+e.hostname+']':e.hostname||'',t+=e.port?':'+e.port:'',t+=e.pathname||'',t+=e.search||'',t+=e.hash||'',t}},function(e){'use strict';function t(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var n=/^([a-z0-9.+-]+:)/i,o=/:[0-9]*$/,r=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,i=['{','}','|','\\','^','`'].concat(['<','>','"','`',' ','\r','\n','\t']),a=['\''].concat(i),s=['%','/','?',';','#'].concat(a),l=['/','?','#'],d=/^[+a-z0-9A-Z_-]{0,63}$/,c=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,p={javascript:!0,"javascript:":!0},u={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};t.prototype.parse=function(e,t){var o=e,a,i,m,g,h;if(o=o.trim(),!t&&1===e.split('#').length){var f=r.exec(o);if(f)return this.pathname=f[1],f[2]&&(this.search=f[2]),this}var b=n.exec(o);if(b&&(b=b[0],m=b.toLowerCase(),this.protocol=b,o=o.substr(b.length)),(t||b||o.match(/^\/\/[^@\/]+@[^@\/]+/))&&(h='//'===o.substr(0,2),h&&!(b&&p[b])&&(o=o.substr(2),this.slashes=!0)),!p[b]&&(h||b&&!u[b])){var _=-1;for(a=0;a<l.length;a++)g=o.indexOf(l[a]),-1!==g&&(-1===_||g<_)&&(_=g);var w,y;for(y=-1===_?o.lastIndexOf('@'):o.lastIndexOf('@',_),-1!==y&&(w=o.slice(0,y),o=o.slice(y+1),this.auth=w),_=-1,a=0;a<s.length;a++)g=o.indexOf(s[a]),-1!==g&&(-1===_||g<_)&&(_=g);-1===_&&(_=o.length),':'===o[_-1]&&_--;var v=o.slice(0,_);o=o.slice(_),this.parseHost(v),this.hostname=this.hostname||'';var x='['===this.hostname[0]&&']'===this.hostname[this.hostname.length-1];if(!x){var C=this.hostname.split(/\./);for(a=0,i=C.length;a<i;a++){var A=C[a];if(A&&!A.match(d)){for(var T='',E=0,P=A.length;E<P;E++)T+=127<A.charCodeAt(E)?'x':A[E];if(!T.match(d)){var k=C.slice(0,a),S=C.slice(a+1),R=A.match(c);R&&(k.push(R[1]),S.unshift(R[2])),S.length&&(o=S.join('.')+o),this.hostname=k.join('.');break}}}}this.hostname.length>255&&(this.hostname=''),x&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var O=o.indexOf('#');-1!==O&&(this.hash=o.substr(O),o=o.slice(0,O));var I=o.indexOf('?');return-1!==I&&(this.search=o.substr(I),o=o.slice(0,I)),o&&(this.pathname=o),u[m]&&this.hostname&&!this.pathname&&(this.pathname=''),this},t.prototype.parseHost=function(e){var t=o.exec(e);t&&(t=t[0],':'!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)},e.exports=function(e,n){if(e&&e instanceof t)return e;var o=new t;return o.parse(e,n),o}},function(e,t,n){'use strict';t.Any=n(17),t.Cc=n(18),t.Cf=n(112),t.P=n(6),t.Z=n(19)},function(e){e.exports=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804\uDCBD|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/},function(e,t,n){'use strict';t.parseLinkLabel=n(114),t.parseLinkDestination=n(115),t.parseLinkTitle=n(116)},function(e){'use strict';e.exports=function(e,t,n){var o=-1,r=e.posMax,i=e.pos,a,s,l,d;for(e.pos=t+1,a=1;e.pos<r;){if(l=e.src.charCodeAt(e.pos),93===l&&(a--,0===a)){s=!0;break}if(d=e.pos,e.md.inline.skipToken(e),91===l)if(d===e.pos-1)a++;else if(n)return e.pos=i,-1}return s&&(o=e.pos),e.pos=i,o}},function(e,t,n){'use strict';var o=n(0).isSpace,r=n(0).unescapeAll;e.exports=function(e,t,n){var i=t,a={ok:!1,pos:0,lines:0,str:''},s,l;if(60===e.charCodeAt(t)){for(t++;t<n;){if(s=e.charCodeAt(t),10===s||o(s))return a;if(62===s)return a.pos=t+1,a.str=r(e.slice(i+1,t)),a.ok=!0,a;if(92===s&&t+1<n){t+=2;continue}t++}return a}for(l=0;t<n&&(s=e.charCodeAt(t),32!==s)&&!(32>s||127===s);){if(92===s&&t+1<n){t+=2;continue}if(40===s&&l++,41===s){if(0===l)break;l--}t++}return i===t?a:0===l?(a.str=r(e.slice(i,t)),a.lines=0,a.pos=t,a.ok=!0,a):a}},function(e,t,n){'use strict';var o=n(0).unescapeAll;e.exports=function(e,t,n){var r=0,i=t,a={ok:!1,pos:0,lines:0,str:''},s,l;if(t>=n)return a;if(l=e.charCodeAt(t),34!==l&&39!==l&&40!==l)return a;for(t++,40===l&&(l=41);t<n;){if(s=e.charCodeAt(t),s===l)return a.pos=t+1,a.lines=r,a.str=o(e.slice(i+1,t)),a.ok=!0,a;10===s?r++:92===s&&t+1<n&&(t++,10===e.charCodeAt(t)&&r++),t++}return a}},function(e,t,n){'use strict';function o(){this.rules=r({},i)}var r=n(0).assign,a=n(0).unescapeAll,s=n(0).escapeHtml,i={};i.code_inline=function(e,t,n,o,r){var i=e[t];return'<code'+r.renderAttrs(i)+'>'+s(e[t].content)+'</code>'},i.code_block=function(e,t,n,o,r){var i=e[t];return'<pre'+r.renderAttrs(i)+'><code>'+s(e[t].content)+'</code></pre>\n'},i.fence=function(e,t,n,o,r){var l=e[t],d=l.info?a(l.info).trim():'',c='',p,u,i,m;return d&&(c=d.split(/\s+/g)[0]),p=n.highlight?n.highlight(l.content,c)||s(l.content):s(l.content),0===p.indexOf('<pre')?p+'\n':d?(u=l.attrIndex('class'),i=l.attrs?l.attrs.slice():[],0>u?i.push(['class',n.langPrefix+c]):i[u][1]+=' '+n.langPrefix+c,m={attrs:i},'<pre><code'+r.renderAttrs(m)+'>'+p+'</code></pre>\n'):'<pre><code'+r.renderAttrs(l)+'>'+p+'</code></pre>\n'},i.image=function(e,t,n,o,r){var i=e[t];return i.attrs[i.attrIndex('alt')][1]=r.renderInlineAsText(i.children,n,o),r.renderToken(e,t,n)},i.hardbreak=function(e,t,n){return n.xhtmlOut?'<br />\n':'<br>\n'},i.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?'<br />\n':'<br>\n':'\n'},i.text=function(e,t){return s(e[t].content)},i.html_block=function(e,t){return e[t].content},i.html_inline=function(e,t){return e[t].content},o.prototype.renderAttrs=function(e){var t,n,o;if(!e.attrs)return'';for(o='',t=0,n=e.attrs.length;t<n;t++)o+=' '+s(e.attrs[t][0])+'="'+s(e.attrs[t][1])+'"';return o},o.prototype.renderToken=function(e,t,n){var o='',r=!1,i=e[t],a;return i.hidden?'':(i.block&&-1!==i.nesting&&t&&e[t-1].hidden&&(o+='\n'),o+=(-1===i.nesting?'</':'<')+i.tag,o+=this.renderAttrs(i),0===i.nesting&&n.xhtmlOut&&(o+=' /'),i.block&&(r=!0,1===i.nesting&&t+1<e.length&&(a=e[t+1],'inline'===a.type||a.hidden?r=!1:-1===a.nesting&&a.tag===i.tag&&(r=!1))),o+=r?'>\n':'>',o)},o.prototype.renderInline=function(e,t,n){for(var o='',r=this.rules,a=0,i=e.length,s;a<i;a++)s=e[a].type,o+='undefined'==typeof r[s]?this.renderToken(e,a,t):r[s](e,a,t,n,this);return o},o.prototype.renderInlineAsText=function(e,t,n){for(var o='',r=0,i=e.length;r<i;r++)'text'===e[r].type?o+=e[r].content:'image'===e[r].type&&(o+=this.renderInlineAsText(e[r].children,t,n));return o},o.prototype.render=function(e,t,n){var o='',r=this.rules,a,i,s;for(a=0,i=e.length;a<i;a++)s=e[a].type,o+='inline'===s?this.renderInline(e[a].children,t,n):'undefined'==typeof r[s]?this.renderToken(e,a,t,n):r[e[a].type](e,a,t,n,this);return o},e.exports=o},function(e,t,n){'use strict';function o(){this.ruler=new r;for(var e=0;e<a.length;e++)this.ruler.push(a[e][0],a[e][1])}var r=n(7),a=[['normalize',n(119)],['block',n(120)],['inline',n(121)],['linkify',n(122)],['replacements',n(123)],['smartquotes',n(124)]];o.prototype.process=function(e){var t,n,o;for(o=this.ruler.getRules(''),t=0,n=o.length;t<n;t++)o[t](e)},o.prototype.State=n(125),e.exports=o},function(e){'use strict';var t=/\r[\n\u0085]?|[\u2424\u2028\u0085]/g,n=/\u0000/g;e.exports=function(e){var o;o=e.src.replace(t,'\n'),o=o.replace(n,'\uFFFD'),e.src=o}},function(e){'use strict';e.exports=function(e){var t;e.inlineMode?(t=new e.Token('inline','',0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}},function(e){'use strict';e.exports=function(e){var t=e.tokens,n,o,r;for(o=0,r=t.length;o<r;o++)n=t[o],'inline'===n.type&&e.md.inline.parse(n.content,e.md,e.env,n.children)}},function(e,t,n){'use strict';function o(e){return /^<a[>\s]/i.test(e)}function r(e){return /^<\/a\s*>/i.test(e)}var a=n(0).arrayReplaceAt;e.exports=function(e){var t=e.tokens,n,i,s,l,d,c,p,u,m,g,h,f,b,_,k,w,y;if(e.md.options.linkify)for(i=0,s=t.length;i<s;i++)if('inline'===t[i].type&&e.md.linkify.pretest(t[i].content))for(l=t[i].children,b=0,n=l.length-1;0<=n;n--){if(c=l[n],'link_close'===c.type){for(n--;l[n].level!==c.level&&'link_open'!==l[n].type;)n--;continue}if(('html_inline'===c.type&&(o(c.content)&&0<b&&b--,r(c.content)&&b++),!(0<b))&&'text'===c.type&&e.md.linkify.test(c.content)){for(m=c.content,y=e.md.linkify.match(m),p=[],f=c.level,h=0,u=0;u<y.length;u++)(_=y[u].url,k=e.md.normalizeLink(_),!!e.md.validateLink(k))&&(w=y[u].text,w=y[u].schema?'mailto:'!==y[u].schema||/^mailto:/i.test(w)?e.md.normalizeLinkText(w):e.md.normalizeLinkText('mailto:'+w).replace(/^mailto:/,''):e.md.normalizeLinkText('http://'+w).replace(/^http:\/\//,''),g=y[u].index,g>h&&(d=new e.Token('text','',0),d.content=m.slice(h,g),d.level=f,p.push(d)),d=new e.Token('link_open','a',1),d.attrs=[['href',k]],d.level=f++,d.markup='linkify',d.info='auto',p.push(d),d=new e.Token('text','',0),d.content=w,d.level=f,p.push(d),d=new e.Token('link_close','a',-1),d.level=--f,d.markup='linkify',d.info='auto',p.push(d),h=y[u].lastIndex);h<m.length&&(d=new e.Token('text','',0),d.content=m.slice(h),d.level=f,p.push(d)),t[i].children=l=a(l,n,p)}}}},function(e){'use strict';function t(e,t){return s[t.toLowerCase()]}function n(e){var n=0,o,r;for(o=e.length-1;0<=o;o--)r=e[o],'text'!==r.type||n||(r.content=r.content.replace(a,t)),'link_open'===r.type&&'auto'===r.info&&n--,'link_close'===r.type&&'auto'===r.info&&n++}function o(e){var t=0,n,o;for(n=e.length-1;0<=n;n--)o=e[n],'text'===o.type&&!t&&r.test(o.content)&&(o.content=o.content.replace(/\+-/g,'\xB1').replace(/\.{2,}/g,'\u2026').replace(/([?!])…/g,'$1..').replace(/([?!]){4,}/g,'$1$1$1').replace(/,{2,}/g,',').replace(/(^|[^-])---([^-]|$)/mg,'$1\u2014$2').replace(/(^|\s)--(\s|$)/mg,'$1\u2013$2').replace(/(^|[^-\s])--([^-\s]|$)/mg,'$1\u2013$2')),'link_open'===o.type&&'auto'===o.info&&t--,'link_close'===o.type&&'auto'===o.info&&t++}var r=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,i=/\((c|tm|r|p)\)/i,a=/\((c|tm|r|p)\)/ig,s={c:'\xA9',r:'\xAE',p:'\xA7',tm:'\u2122'};e.exports=function(e){var t;if(e.md.options.typographer)for(t=e.tokens.length-1;0<=t;t--)'inline'===e.tokens[t].type&&(i.test(e.tokens[t].content)&&n(e.tokens[t].children),r.test(e.tokens[t].content)&&o(e.tokens[t].children))}},function(e,t,o){'use strict';function r(e,t,n){return e.substr(0,t)+n+e.substr(t+1)}function i(e,o){var d,u,m,g,h,f,b,_,k,w,y,v,x,C,A,T,E,P,S,R,O;for(S=[],d=0;d<e.length;d++){for(u=e[d],b=e[d].level,E=S.length-1;0<=E&&!(S[E].level<=b);E--);if(S.length=E+1,'text'===u.type){m=u.content,h=0,f=m.length;OUTER:for(;h<f&&(c.lastIndex=h,g=c.exec(m),!!g);){if(A=T=!0,h=g.index+1,P='\''===g[0],k=32,0<=g.index-1)k=m.charCodeAt(g.index-1);else for(E=d-1;0<=E&&'softbreak'!==e[E].type&&'hardbreak'!==e[E].type;E--)if('text'===e[E].type){k=e[E].content.charCodeAt(e[E].content.length-1);break}if(w=32,h<f)w=m.charCodeAt(h);else for(E=d+1;E<e.length&&'softbreak'!==e[E].type&&'hardbreak'!==e[E].type;E++)if('text'===e[E].type){w=e[E].content.charCodeAt(0);break}if(y=l(k)||s(n(k)),v=l(w)||s(n(w)),x=a(k),C=a(w),C?A=!1:v&&!(x||y)&&(A=!1),x?T=!1:y&&!(C||v)&&(T=!1),34===w&&'"'===g[0]&&48<=k&&57>=k&&(T=A=!1),A&&T&&(A=!1,T=v),!A&&!T){P&&(u.content=r(u.content,g.index,p));continue}if(T)for(E=S.length-1;0<=E&&(_=S[E],!(S[E].level<b));E--)if(_.single===P&&S[E].level===b){_=S[E],P?(R=o.md.options.quotes[2],O=o.md.options.quotes[3]):(R=o.md.options.quotes[0],O=o.md.options.quotes[1]),u.content=r(u.content,g.index,O),e[_.token].content=r(e[_.token].content,_.pos,R),h+=O.length-1,_.token===d&&(h+=R.length-1),m=u.content,f=m.length,S.length=E;continue OUTER}A?S.push({token:d,pos:g.index,single:P,level:b}):T&&P&&(u.content=r(u.content,g.index,p))}}}}var a=o(0).isWhiteSpace,s=o(0).isPunctChar,l=o(0).isMdAsciiPunct,d=/['"]/,c=/['"]/g,p='\u2019';e.exports=function(e){var t;if(e.md.options.typographer)for(t=e.tokens.length-1;0<=t;t--)'inline'===e.tokens[t].type&&d.test(e.tokens[t].content)&&i(e.tokens[t].children,e)}},function(e,t,n){'use strict';function o(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}var r=n(8);o.prototype.Token=r,e.exports=o},function(e,t,n){'use strict';function o(){this.ruler=new r;for(var e=0;e<a.length;e++)this.ruler.push(a[e][0],a[e][1],{alt:(a[e][2]||[]).slice()})}var r=n(7),a=[['table',n(127),['paragraph','reference']],['code',n(128)],['fence',n(129),['paragraph','reference','blockquote','list']],['blockquote',n(130),['paragraph','reference','blockquote','list']],['hr',n(131),['paragraph','reference','blockquote','list']],['list',n(132),['paragraph','reference','blockquote']],['reference',n(133)],['heading',n(134),['paragraph','reference','blockquote']],['lheading',n(135)],['html_block',n(136),['paragraph','reference','blockquote']],['paragraph',n(138)]];o.prototype.tokenize=function(e,t,n){for(var o=this.ruler.getRules(''),r=o.length,a=t,s=!1,l=e.md.options.maxNesting,d,c;a<n&&(e.line=a=e.skipEmptyLines(a),!(a>=n))&&!(e.sCount[a]<e.blkIndent);){if(e.level>=l){e.line=n;break}for(c=0;c<r&&(d=o[c](e,a,n,!1),!d);c++);e.tight=!s,e.isEmpty(e.line-1)&&(s=!0),a=e.line,a<n&&e.isEmpty(a)&&(s=!0,a++,e.line=a)}},o.prototype.parse=function(e,t,n,o){var r;e&&(r=new this.State(e,t,n,o),this.tokenize(r,r.line,r.lineMax))},o.prototype.State=n(139),e.exports=o},function(e,t,n){'use strict';function o(e,t){var n=e.bMarks[t]+e.blkIndent,o=e.eMarks[t];return e.src.substr(n,o-n)}function r(e){var t=[],n=0,o=e.length,r=0,i=0,a=!1,s=0,l;for(l=e.charCodeAt(n);n<o;)96===l?a?(a=!1,s=n):0==r%2&&(a=!0,s=n):124===l&&0==r%2&&!a&&(t.push(e.substring(i,n)),i=n+1),92===l?r++:r=0,n++,n===o&&a&&(a=!1,n=s+1),l=e.charCodeAt(n);return t.push(e.substring(i)),t}var i=n(0).isSpace;e.exports=function(e,n,a,s){var l,d,c,p,u,m,g,h,f,b,_,k;if(n+2>a)return!1;if(u=n+1,e.sCount[u]<e.blkIndent)return!1;if(4<=e.sCount[u]-e.blkIndent)return!1;if(c=e.bMarks[u]+e.tShift[u],c>=e.eMarks[u])return!1;if(l=e.src.charCodeAt(c++),124!==l&&45!==l&&58!==l)return!1;for(;c<e.eMarks[u];){if(l=e.src.charCodeAt(c),124!==l&&45!==l&&58!==l&&!i(l))return!1;c++}for(d=o(e,n+1),m=d.split('|'),f=[],p=0;p<m.length;p++){if(b=m[p].trim(),!b)if(0===p||p===m.length-1)continue;else return!1;if(!/^:?-+:?$/.test(b))return!1;58===b.charCodeAt(b.length-1)?f.push(58===b.charCodeAt(0)?'center':'right'):58===b.charCodeAt(0)?f.push('left'):f.push('')}if(d=o(e,n).trim(),-1===d.indexOf('|'))return!1;if(4<=e.sCount[n]-e.blkIndent)return!1;if(m=r(d.replace(/^\||\|$/g,'')),g=m.length,g>f.length)return!1;if(s)return!0;for(h=e.push('table_open','table',1),h.map=_=[n,0],h=e.push('thead_open','thead',1),h.map=[n,n+1],h=e.push('tr_open','tr',1),h.map=[n,n+1],p=0;p<m.length;p++)h=e.push('th_open','th',1),h.map=[n,n+1],f[p]&&(h.attrs=[['style','text-align:'+f[p]]]),h=e.push('inline','',0),h.content=m[p].trim(),h.map=[n,n+1],h.children=[],h=e.push('th_close','th',-1);for(h=e.push('tr_close','tr',-1),h=e.push('thead_close','thead',-1),h=e.push('tbody_open','tbody',1),h.map=k=[n+2,0],u=n+2;u<a&&!(e.sCount[u]<e.blkIndent)&&(d=o(e,u).trim(),-1!==d.indexOf('|'))&&!(4<=e.sCount[u]-e.blkIndent);u++){for(m=r(d.replace(/^\||\|$/g,'')),h=e.push('tr_open','tr',1),p=0;p<g;p++)h=e.push('td_open','td',1),f[p]&&(h.attrs=[['style','text-align:'+f[p]]]),h=e.push('inline','',0),h.content=m[p]?m[p].trim():'',h.children=[],h=e.push('td_close','td',-1);h=e.push('tr_close','tr',-1)}return h=e.push('tbody_close','tbody',-1),h=e.push('table_close','table',-1),_[1]=k[1]=u,e.line=u,!0}},function(e){'use strict';e.exports=function(e,t,n){var o,r,i;if(4>e.sCount[t]-e.blkIndent)return!1;for(r=o=t+1;o<n;){if(e.isEmpty(o)){o++;continue}if(4<=e.sCount[o]-e.blkIndent){o++,r=o;continue}break}return e.line=r,i=e.push('code_block','code',0),i.content=e.getLines(t,r,4+e.blkIndent,!0),i.map=[t,e.line],!0}},function(e){'use strict';e.exports=function(e,t,o,r){var i=!1,a=e.bMarks[t]+e.tShift[t],s=e.eMarks[t],l,d,c,p,u,m,g;if(4<=e.sCount[t]-e.blkIndent)return!1;if(a+3>s)return!1;if(l=e.src.charCodeAt(a),126!==l&&96!==l)return!1;if(u=a,a=e.skipChars(a,l),d=a-u,3>d)return!1;if(g=e.src.slice(u,a),c=e.src.slice(a,s),0<=c.indexOf(n(l)))return!1;if(r)return!0;for(p=t;;){if(p++,p>=o)break;if(a=u=e.bMarks[p]+e.tShift[p],s=e.eMarks[p],a<s&&e.sCount[p]<e.blkIndent)break;if(e.src.charCodeAt(a)===l&&!(4<=e.sCount[p]-e.blkIndent)&&(a=e.skipChars(a,l),!(a-u<d))&&(a=e.skipSpaces(a),!(a<s))){i=!0;break}}return d=e.sCount[t],e.line=p+(i?1:0),m=e.push('fence','code',0),m.info=c,m.content=e.getLines(t+1,p,d,!0),m.markup=g,m.map=[t,e.line],!0}},function(e,t,n){'use strict';var o=n(0).isSpace;e.exports=function(e,t,n,r){var a=e.lineMax,s=e.bMarks[t]+e.tShift[t],d=e.eMarks[t],c,p,u,i,m,l,g,h,f,b,_,k,w,y,v,x,C,A,T,E;if(4<=e.sCount[t]-e.blkIndent)return!1;if(62!==e.src.charCodeAt(s++))return!1;if(r)return!0;for(i=f=e.sCount[t]+s-(e.bMarks[t]+e.tShift[t]),32===e.src.charCodeAt(s)?(s++,i++,f++,c=!1,x=!0):9===e.src.charCodeAt(s)?(x=!0,3==(e.bsCount[t]+f)%4?(s++,i++,f++,c=!1):c=!0):x=!1,b=[e.bMarks[t]],e.bMarks[t]=s;s<d&&(p=e.src.charCodeAt(s),o(p));)9===p?f+=4-(f+e.bsCount[t]+(c?1:0))%4:f++,s++;for(_=[e.bsCount[t]],e.bsCount[t]=e.sCount[t]+1+(x?1:0),l=s>=d,y=[e.sCount[t]],e.sCount[t]=f-i,v=[e.tShift[t]],e.tShift[t]=s-e.bMarks[t],A=e.md.block.ruler.getRules('blockquote'),w=e.parentType,e.parentType='blockquote',E=!1,h=t+1;h<n&&(e.sCount[h]<e.blkIndent&&(E=!0),s=e.bMarks[h]+e.tShift[h],d=e.eMarks[h],!(s>=d));h++){if(62===e.src.charCodeAt(s++)&&!E){for(i=f=e.sCount[h]+s-(e.bMarks[h]+e.tShift[h]),32===e.src.charCodeAt(s)?(s++,i++,f++,c=!1,x=!0):9===e.src.charCodeAt(s)?(x=!0,3==(e.bsCount[h]+f)%4?(s++,i++,f++,c=!1):c=!0):x=!1,b.push(e.bMarks[h]),e.bMarks[h]=s;s<d&&(p=e.src.charCodeAt(s),o(p));)9===p?f+=4-(f+e.bsCount[h]+(c?1:0))%4:f++,s++;l=s>=d,_.push(e.bsCount[h]),e.bsCount[h]=e.sCount[h]+1+(x?1:0),y.push(e.sCount[h]),e.sCount[h]=f-i,v.push(e.tShift[h]),e.tShift[h]=s-e.bMarks[h];continue}if(l)break;for(C=!1,u=0,m=A.length;u<m;u++)if(A[u](e,h,n,!0)){C=!0;break}if(C){e.lineMax=h,0!==e.blkIndent&&(b.push(e.bMarks[h]),_.push(e.bsCount[h]),v.push(e.tShift[h]),y.push(e.sCount[h]),e.sCount[h]-=e.blkIndent);break}b.push(e.bMarks[h]),_.push(e.bsCount[h]),v.push(e.tShift[h]),y.push(e.sCount[h]),e.sCount[h]=-1}for(k=e.blkIndent,e.blkIndent=0,T=e.push('blockquote_open','blockquote',1),T.markup='>',T.map=g=[t,0],e.md.block.tokenize(e,t,h),T=e.push('blockquote_close','blockquote',-1),T.markup='>',e.lineMax=a,e.parentType=w,g[1]=e.line,u=0;u<v.length;u++)e.bMarks[u+t]=b[u],e.tShift[u+t]=v[u],e.sCount[u+t]=y[u],e.bsCount[u+t]=_[u];return e.blkIndent=k,!0}},function(e,t,o){'use strict';var r=o(0).isSpace;e.exports=function(e,t,o,i){var a=e.bMarks[t]+e.tShift[t],s=e.eMarks[t],l,d,c,p;if(4<=e.sCount[t]-e.blkIndent)return!1;if(l=e.src.charCodeAt(a++),42!==l&&45!==l&&95!==l)return!1;for(d=1;a<s;){if(c=e.src.charCodeAt(a++),c!==l&&!r(c))return!1;c===l&&d++}return!(3>d)&&(!!i||(e.line=t+1,p=e.push('hr','hr',0),p.map=[t,e.line],p.markup=Array(d+1).join(n(l)),!0))}},function(t,o,r){'use strict';function a(e,t){var n,o,r,a;return o=e.bMarks[t]+e.tShift[t],r=e.eMarks[t],n=e.src.charCodeAt(o++),42!==n&&45!==n&&43!==n?-1:o<r&&(a=e.src.charCodeAt(o),!i(a))?-1:o}function s(e,t){var n=e.bMarks[t]+e.tShift[t],o=n,r=e.eMarks[t],a;if(o+1>=r)return-1;if(a=e.src.charCodeAt(o++),48>a||57<a)return-1;for(;;){if(o>=r)return-1;if(a=e.src.charCodeAt(o++),48<=a&&57>=a){if(10<=o-n)return-1;continue}if(41===a||46===a)break;return-1}return o<r&&(a=e.src.charCodeAt(o),!i(a))?-1:o}function d(e,t){var n=e.level+2,o,r;for(o=t+2,r=e.tokens.length-2;o<r;o++)e.tokens[o].level===n&&'paragraph_open'===e.tokens[o].type&&(e.tokens[o+2].hidden=!0,e.tokens[o].hidden=!0,o+=2)}var i=r(0).isSpace;t.exports=function(t,o,r,c){var p=!1,u=!0,m,g,h,i,f,b,_,k,w,l,y,v,x,C,A,T,E,P,S,R,O,I,N,V,L,D,F,M;if(4<=t.sCount[o]-t.blkIndent)return!1;if(c&&'paragraph'===t.parentType&&t.tShift[o]>=t.blkIndent&&(p=!0),0<=(N=s(t,o))){if(_=!0,L=t.bMarks[o]+t.tShift[o],x=+t.src.substr(L,N-L-1),p&&1!==x)return!1;}else if(0<=(N=a(t,o)))_=!1;else return!1;if(p&&t.skipSpaces(N)>=t.eMarks[o])return!1;if(v=t.src.charCodeAt(N-1),c)return!0;for(y=t.tokens.length,_?(M=t.push('ordered_list_open','ol',1),1!==x&&(M.attrs=[['start',x]])):M=t.push('bullet_list_open','ul',1),M.map=l=[o,0],M.markup=n(v),A=o,V=!1,F=t.md.block.ruler.getRules('list'),S=t.parentType,t.parentType='list';A<r;){for(I=N,C=t.eMarks[A],b=T=t.sCount[A]+N-(t.bMarks[o]+t.tShift[o]);I<C;){if(m=t.src.charCodeAt(I),9===m)T+=4-(T+t.bsCount[A])%4;else if(32===m)T++;else break;I++}if(g=I,f=g>=C?1:T-b,4<f&&(f=1),i=b+f,M=t.push('list_item_open','li',1),M.markup=n(v),M.map=k=[o,0],E=t.blkIndent,O=t.tight,R=t.tShift[o],P=t.sCount[o],t.blkIndent=i,t.tight=!0,t.tShift[o]=g-t.bMarks[o],t.sCount[o]=T,g>=C&&t.isEmpty(o+1)?t.line=e(t.line+2,r):t.md.block.tokenize(t,o,r,!0),(!t.tight||V)&&(u=!1),V=1<t.line-o&&t.isEmpty(t.line-1),t.blkIndent=E,t.tShift[o]=R,t.sCount[o]=P,t.tight=O,M=t.push('list_item_close','li',-1),M.markup=n(v),A=o=t.line,k[1]=A,g=t.bMarks[o],A>=r)break;if(t.sCount[A]<t.blkIndent)break;for(D=!1,h=0,w=F.length;h<w;h++)if(F[h](t,A,r,!0)){D=!0;break}if(D)break;if(_){if(N=s(t,A),0>N)break;}else if(N=a(t,A),0>N)break;if(v!==t.src.charCodeAt(N-1))break}return M=_?t.push('ordered_list_close','ol',-1):t.push('bullet_list_close','ul',-1),M.markup=n(v),l[1]=A,t.line=A,t.parentType=S,u&&d(t,y),!0}},function(e,t,n){'use strict';var o=n(0).normalizeReference,r=n(0).isSpace;e.exports=function(e,t,n,a){var s=0,d=e.bMarks[t]+e.tShift[t],c=e.eMarks[t],p=t+1,u,m,g,h,f,b,i,l,_,k,w,y,v,x,C,A;if(4<=e.sCount[t]-e.blkIndent)return!1;if(91!==e.src.charCodeAt(d))return!1;for(;++d<c;)if(93===e.src.charCodeAt(d)&&92!==e.src.charCodeAt(d-1)){if(d+1===c)return!1;if(58!==e.src.charCodeAt(d+1))return!1;break}for(h=e.lineMax,C=e.md.block.ruler.getRules('reference'),k=e.parentType,e.parentType='reference';p<h&&!e.isEmpty(p);p++)if(!(3<e.sCount[p]-e.blkIndent)&&!(0>e.sCount[p])){for(x=!1,b=0,i=C.length;b<i;b++)if(C[b](e,p,h,!0)){x=!0;break}if(x)break}for(v=e.getLines(t,p,e.blkIndent,!1).trim(),c=v.length,d=1;d<c;d++){if(u=v.charCodeAt(d),91===u)return!1;if(93===u){_=d;break}else 10===u?s++:92===u&&(d++,d<c&&10===v.charCodeAt(d)&&s++)}if(0>_||58!==v.charCodeAt(_+1))return!1;for(d=_+2;d<c;d++)if(u=v.charCodeAt(d),10===u)s++;else if(r(u));else break;if(w=e.md.helpers.parseLinkDestination(v,d,c),!w.ok)return!1;if(f=e.md.normalizeLink(w.str),!e.md.validateLink(f))return!1;for(d=w.pos,s+=w.lines,m=d,g=s,y=d;d<c;d++)if(u=v.charCodeAt(d),10===u)s++;else if(r(u));else break;for(w=e.md.helpers.parseLinkTitle(v,d,c),d<c&&y!==d&&w.ok?(A=w.str,d=w.pos,s+=w.lines):(A='',d=m,s=g);d<c&&(u=v.charCodeAt(d),!!r(u));)d++;if(d<c&&10!==v.charCodeAt(d)&&A)for(A='',d=m,s=g;d<c&&(u=v.charCodeAt(d),!!r(u));)d++;return!(d<c&&10!==v.charCodeAt(d))&&(l=o(v.slice(1,_)),!!l)&&(!!a||('undefined'==typeof e.env.references&&(e.env.references={}),'undefined'==typeof e.env.references[l]&&(e.env.references[l]={title:A,href:f}),e.parentType=k,e.line=t+s+1,!0))}},function(e,t,n){'use strict';var o=n(0).isSpace;e.exports=function(e,t,n,r){var i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t],s,l,d,c;if(4<=e.sCount[t]-e.blkIndent)return!1;if(s=e.src.charCodeAt(i),35!==s||i>=a)return!1;for(l=1,s=e.src.charCodeAt(++i);35===s&&i<a&&6>=l;)l++,s=e.src.charCodeAt(++i);return!(6<l||i<a&&!o(s))&&(!!r||(a=e.skipSpacesBack(a,i),d=e.skipCharsBack(a,35,i),d>i&&o(e.src.charCodeAt(d-1))&&(a=d),e.line=t+1,c=e.push('heading_open','h'+(l+''),1),c.markup='########'.slice(0,l),c.map=[t,e.line],c=e.push('inline','',0),c.content=e.src.slice(i,a).trim(),c.map=[t,e.line],c.children=[],c=e.push('heading_close','h'+(l+''),-1),c.markup='########'.slice(0,l),!0))}},function(e){'use strict';e.exports=function(e,t,o){var r=t+1,a=e.md.block.ruler.getRules('paragraph'),s,d,c,i,l,p,u,m,g,h;if(4<=e.sCount[t]-e.blkIndent)return!1;for(h=e.parentType,e.parentType='paragraph';r<o&&!e.isEmpty(r);r++)if(!(3<e.sCount[r]-e.blkIndent)){if(e.sCount[r]>=e.blkIndent&&(p=e.bMarks[r]+e.tShift[r],u=e.eMarks[r],p<u&&(g=e.src.charCodeAt(p),(45===g||61===g)&&(p=e.skipChars(p,g),p=e.skipSpaces(p),p>=u)))){m=61===g?1:2;break}if(!(0>e.sCount[r])){for(d=!1,c=0,i=a.length;c<i;c++)if(a[c](e,r,o,!0)){d=!0;break}if(d)break}}return!!m&&(s=e.getLines(t,r,e.blkIndent,!1).trim(),e.line=r+1,l=e.push('heading_open','h'+(m+''),1),l.markup=n(g),l.map=[t,e.line],l=e.push('inline','',0),l.content=s,l.map=[t,e.line-1],l.children=[],l=e.push('heading_close','h'+(m+''),-1),l.markup=n(g),e.parentType=h,!0)}},function(e,t,n){'use strict';var o=n(137),r=n(20).HTML_OPEN_CLOSE_TAG_RE,a=[[/^<(script|pre|style)(?=(\s|>|$))/i,/<\/(script|pre|style)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp('^</?('+o.join('|')+')(?=(\\s|/?>|$))','i'),/^$/,!0],[new RegExp(r.source+'\\s*$'),/^$/,!1]];e.exports=function(e,t,n,o){var r=e.bMarks[t]+e.tShift[t],s=e.eMarks[t],l,i,d,c;if(4<=e.sCount[t]-e.blkIndent)return!1;if(!e.md.options.html)return!1;if(60!==e.src.charCodeAt(r))return!1;for(c=e.src.slice(r,s),l=0;l<a.length&&!a[l][0].test(c);l++);if(l===a.length)return!1;if(o)return a[l][2];if(i=t+1,!a[l][1].test(c))for(;i<n&&!(e.sCount[i]<e.blkIndent);i++)if(r=e.bMarks[i]+e.tShift[i],s=e.eMarks[i],c=e.src.slice(r,s),a[l][1].test(c)){0!==c.length&&i++;break}return e.line=i,d=e.push('html_block','',0),d.map=[t,i],d.content=e.getLines(t,i,e.blkIndent,!0),!0}},function(e){'use strict';e.exports=['address','article','aside','base','basefont','blockquote','body','caption','center','col','colgroup','dd','details','dialog','dir','div','dl','dt','fieldset','figcaption','figure','footer','form','frame','frameset','h1','h2','h3','h4','h5','h6','head','header','hr','html','iframe','legend','li','link','main','menu','menuitem','meta','nav','noframes','ol','optgroup','option','p','param','section','source','summary','table','tbody','td','tfoot','th','thead','title','tr','track','ul']},function(e){'use strict';e.exports=function(e,t){var n=t+1,o=e.md.block.ruler.getRules('paragraph'),r=e.lineMax,a,s,d,i,l,c;for(c=e.parentType,e.parentType='paragraph';n<r&&!e.isEmpty(n);n++)if(!(3<e.sCount[n]-e.blkIndent)&&!(0>e.sCount[n])){for(s=!1,d=0,i=o.length;d<i;d++)if(o[d](e,n,r,!0)){s=!0;break}if(s)break}return a=e.getLines(t,n,e.blkIndent,!1).trim(),e.line=n,l=e.push('paragraph_open','p',1),l.map=[t,e.line],l=e.push('inline','',0),l.content=a,l.map=[t,e.line],l.children=[],l=e.push('paragraph_close','p',-1),e.parentType=c,!0}},function(e,t,n){'use strict';function o(e,t,n,o){var r,a,s,l,d,c,p,u;for(this.src=e,this.md=t,this.env=n,this.tokens=o,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.parentType='root',this.level=0,this.result='',a=this.src,u=!1,(s=l=c=p=0,d=a.length);l<d;l++){if(r=a.charCodeAt(l),!u)if(i(r)){c++,9===r?p+=4-p%4:p++;continue}else u=!0;(10===r||l===d-1)&&(10!==r&&l++,this.bMarks.push(s),this.eMarks.push(l),this.tShift.push(c),this.sCount.push(p),this.bsCount.push(0),u=!1,c=0,p=0,s=l+1)}this.bMarks.push(a.length),this.eMarks.push(a.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}var r=n(8),i=n(0).isSpace;o.prototype.push=function(e,t,n){var o=new r(e,t,n);return o.block=!0,0>n&&this.level--,o.level=this.level,0<n&&this.level++,this.tokens.push(o),o},o.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},o.prototype.skipEmptyLines=function(e){for(var t=this.lineMax;e<t&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e},o.prototype.skipSpaces=function(e){for(var t=this.src.length,n;e<t&&(n=this.src.charCodeAt(e),!!i(n));e++);return e},o.prototype.skipSpacesBack=function(e,t){if(e<=t)return e;for(;e>t;)if(!i(this.src.charCodeAt(--e)))return e+1;return e},o.prototype.skipChars=function(e,t){for(var n=this.src.length;e<n&&!(this.src.charCodeAt(e)!==t);e++);return e},o.prototype.skipCharsBack=function(e,t,n){if(e<=n)return e;for(;e>n;)if(t!==this.src.charCodeAt(--e))return e+1;return e},o.prototype.getLines=function(e,t,n,o){var r=e,a,s,l,d,c,p,u;if(e>=t)return'';for(p=Array(t-e),a=0;r<t;r++,a++){for(s=0,u=d=this.bMarks[r],c=r+1<t||o?this.eMarks[r]+1:this.eMarks[r];d<c&&s<n;){if(l=this.src.charCodeAt(d),i(l))9===l?s+=4-(s+this.bsCount[r])%4:s++;else if(d-u<this.tShift[r])s++;else break;d++}p[a]=s>n?Array(s-n+1).join(' ')+this.src.slice(d,c):this.src.slice(d,c)}return p.join('')},o.prototype.Token=r,e.exports=o},function(e,t,n){'use strict';function o(){var e;for(this.ruler=new r,e=0;e<a.length;e++)this.ruler.push(a[e][0],a[e][1]);for(this.ruler2=new r,e=0;e<s.length;e++)this.ruler2.push(s[e][0],s[e][1])}var r=n(7),a=[['text',n(141)],['newline',n(142)],['escape',n(143)],['backticks',n(144)],['strikethrough',n(21).tokenize],['emphasis',n(22).tokenize],['link',n(145)],['image',n(146)],['autolink',n(147)],['html_inline',n(148)],['entity',n(149)]],s=[['balance_pairs',n(150)],['strikethrough',n(21).postProcess],['emphasis',n(22).postProcess],['text_collapse',n(151)]];o.prototype.skipToken=function(e){var t=e.pos,n=this.ruler.getRules(''),o=n.length,r=e.md.options.maxNesting,a=e.cache,s,l;if('undefined'!=typeof a[t])return void(e.pos=a[t]);if(e.level<r)for(l=0;l<o&&(e.level++,s=n[l](e,!0),e.level--,!s);l++);else e.pos=e.posMax;s||e.pos++,a[t]=e.pos},o.prototype.tokenize=function(e){for(var t=this.ruler.getRules(''),n=t.length,o=e.posMax,r=e.md.options.maxNesting,a,s;e.pos<o;){if(e.level<r)for(s=0;s<n&&(a=t[s](e,!1),!a);s++);if(a){if(e.pos>=o)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},o.prototype.parse=function(e,t,n,o){var r=new this.State(e,t,n,o),a,i,s;for(this.tokenize(r),i=this.ruler2.getRules(''),s=i.length,a=0;a<s;a++)i[a](r)},o.prototype.State=n(152),e.exports=o},function(e){'use strict';function t(e){return!(10!==e&&33!==e&&35!==e&&36!==e&&37!==e&&38!==e&&42!==e&&43!==e&&45!==e&&58!==e&&60!==e&&61!==e&&62!==e&&64!==e&&91!==e&&92!==e&&93!==e&&94!==e&&95!==e&&96!==e&&123!==e&&125!==e&&126!==e)}e.exports=function(e,n){for(var o=e.pos;o<e.posMax&&!t(e.src.charCodeAt(o));)o++;return o!==e.pos&&(n||(e.pending+=e.src.slice(e.pos,o)),e.pos=o,!0)}},function(e,t,n){'use strict';var o=n(0).isSpace;e.exports=function(e,t){var n=e.pos,r,i;if(10!==e.src.charCodeAt(n))return!1;for(r=e.pending.length-1,i=e.posMax,t||(0<=r&&32===e.pending.charCodeAt(r)?1<=r&&32===e.pending.charCodeAt(r-1)?(e.pending=e.pending.replace(/ +$/,''),e.push('hardbreak','br',0)):(e.pending=e.pending.slice(0,-1),e.push('softbreak','br',0)):e.push('softbreak','br',0)),n++;n<i&&o(e.src.charCodeAt(n));)n++;return e.pos=n,!0}},function(e,t,n){'use strict';for(var o=n(0).isSpace,r=[],a=0;256>a;a++)r.push(0);['\\','!','"','#','$','%','&','\'','(',')','*','+',',','.','/',':',';','<','=','>','?','@','[',']','^','_','`','{','|','}','~','-'].forEach(function(e){r[e.charCodeAt(0)]=1}),e.exports=function(e,t){var n=e.pos,i=e.posMax,a;if(92!==e.src.charCodeAt(n))return!1;if(n++,n<i){if(a=e.src.charCodeAt(n),256>a&&0!==r[a])return t||(e.pending+=e.src[n]),e.pos+=2,!0;if(10===a){for(t||e.push('hardbreak','br',0),n++;n<i&&(a=e.src.charCodeAt(n),!!o(a));)n++;return e.pos=n,!0}}return t||(e.pending+='\\'),e.pos++,!0}},function(e){'use strict';e.exports=function(e,t){var n=e.pos,o=e.src.charCodeAt(n),r,i,a,s,l,d;if(96!==o)return!1;for(r=n,n++,i=e.posMax;n<i&&96===e.src.charCodeAt(n);)n++;for(a=e.src.slice(r,n),s=l=n;-1!==(s=e.src.indexOf('`',l));){for(l=s+1;l<i&&96===e.src.charCodeAt(l);)l++;if(l-s===a.length)return t||(d=e.push('code_inline','code',0),d.markup=a,d.content=e.src.slice(n,s).replace(/[ \n]+/g,' ').trim()),e.pos=l,!0}return t||(e.pending+=a),e.pos+=a.length,!0}},function(e,t,n){'use strict';var o=n(0).normalizeReference,r=n(0).isSpace;e.exports=function(e,t){var n='',i=e.pos,a=e.posMax,s=e.pos,l=!0,d,c,p,u,m,g,h,f,b,_;if(91!==e.src.charCodeAt(e.pos))return!1;if(m=e.pos+1,u=e.md.helpers.parseLinkLabel(e,e.pos,!0),0>u)return!1;if(g=u+1,g<a&&40===e.src.charCodeAt(g)){for(l=!1,g++;g<a&&(c=e.src.charCodeAt(g),r(c)||10===c);g++);if(g>=a)return!1;for(s=g,h=e.md.helpers.parseLinkDestination(e.src,g,e.posMax),h.ok&&(n=e.md.normalizeLink(h.str),e.md.validateLink(n)?g=h.pos:n=''),s=g;g<a&&(c=e.src.charCodeAt(g),r(c)||10===c);g++);if(h=e.md.helpers.parseLinkTitle(e.src,g,e.posMax),g<a&&s!==g&&h.ok)for(b=h.str,g=h.pos;g<a&&(c=e.src.charCodeAt(g),r(c)||10===c);g++);else b='';(g>=a||41!==e.src.charCodeAt(g))&&(l=!0),g++}if(l){if('undefined'==typeof e.env.references)return!1;if(g<a&&91===e.src.charCodeAt(g)?(s=g+1,g=e.md.helpers.parseLinkLabel(e,g),0<=g?p=e.src.slice(s,g++):g=u+1):g=u+1,p||(p=e.src.slice(m,u)),f=e.env.references[o(p)],!f)return e.pos=i,!1;n=f.href,b=f.title}return t||(e.pos=m,e.posMax=u,_=e.push('link_open','a',1),_.attrs=d=[['href',n]],b&&d.push(['title',b]),e.md.inline.tokenize(e),_=e.push('link_close','a',-1)),e.pos=g,e.posMax=a,!0}},function(e,t,n){'use strict';var o=n(0).normalizeReference,r=n(0).isSpace;e.exports=function(e,t){var n='',i=e.pos,a=e.posMax,s,l,d,c,p,u,m,g,h,f,b,_,k;if(33!==e.src.charCodeAt(e.pos))return!1;if(91!==e.src.charCodeAt(e.pos+1))return!1;if(u=e.pos+2,p=e.md.helpers.parseLinkLabel(e,e.pos+1,!1),0>p)return!1;if(m=p+1,m<a&&40===e.src.charCodeAt(m)){for(m++;m<a&&(l=e.src.charCodeAt(m),r(l)||10===l);m++);if(m>=a)return!1;for(k=m,h=e.md.helpers.parseLinkDestination(e.src,m,e.posMax),h.ok&&(n=e.md.normalizeLink(h.str),e.md.validateLink(n)?m=h.pos:n=''),k=m;m<a&&(l=e.src.charCodeAt(m),r(l)||10===l);m++);if(h=e.md.helpers.parseLinkTitle(e.src,m,e.posMax),m<a&&k!==m&&h.ok)for(f=h.str,m=h.pos;m<a&&(l=e.src.charCodeAt(m),r(l)||10===l);m++);else f='';if(m>=a||41!==e.src.charCodeAt(m))return e.pos=i,!1;m++}else{if('undefined'==typeof e.env.references)return!1;if(m<a&&91===e.src.charCodeAt(m)?(k=m+1,m=e.md.helpers.parseLinkLabel(e,m),0<=m?c=e.src.slice(k,m++):m=p+1):m=p+1,c||(c=e.src.slice(u,p)),g=e.env.references[o(c)],!g)return e.pos=i,!1;n=g.href,f=g.title}return t||(d=e.src.slice(u,p),e.md.inline.parse(d,e.md,e.env,_=[]),b=e.push('image','img',0),b.attrs=s=[['src',n],['alt','']],b.children=_,b.content=d,f&&s.push(['title',f])),e.pos=m,e.posMax=a,!0}},function(e){'use strict';var t=/^<([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/,n=/^<([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)>/;e.exports=function(e,o){var r=e.pos,i,a,s,l,d,c;return!(60!==e.src.charCodeAt(r))&&(i=e.src.slice(r),!(0>i.indexOf('>'))&&(n.test(i)?(a=i.match(n),l=a[0].slice(1,-1),d=e.md.normalizeLink(l),!!e.md.validateLink(d))&&(o||(c=e.push('link_open','a',1),c.attrs=[['href',d]],c.markup='autolink',c.info='auto',c=e.push('text','',0),c.content=e.md.normalizeLinkText(l),c=e.push('link_close','a',-1),c.markup='autolink',c.info='auto'),e.pos+=a[0].length,!0):!!t.test(i)&&(s=i.match(t),l=s[0].slice(1,-1),d=e.md.normalizeLink('mailto:'+l),!!e.md.validateLink(d))&&(o||(c=e.push('link_open','a',1),c.attrs=[['href',d]],c.markup='autolink',c.info='auto',c=e.push('text','',0),c.content=e.md.normalizeLinkText(l),c=e.push('link_close','a',-1),c.markup='autolink',c.info='auto'),e.pos+=s[0].length,!0)))}},function(e,t,n){'use strict';function o(e){var t=32|e;return 97<=t&&122>=t}var r=n(20).HTML_TAG_RE;e.exports=function(e,t){var n=e.pos,i,a,s,l;return!!e.md.options.html&&(s=e.posMax,!(60!==e.src.charCodeAt(n)||n+2>=s))&&(i=e.src.charCodeAt(n+1),33===i||63===i||47===i||o(i))&&(a=e.src.slice(n).match(r),!!a)&&(t||(l=e.push('html_inline','',0),l.content=e.src.slice(n,n+a[0].length)),e.pos+=a[0].length,!0)}},function(e,t,n){'use strict';var o=n(15),r=n(0).has,i=n(0).isValidEntityCode,a=n(0).fromCodePoint,s=/^&#((?:x[a-f0-9]{1,8}|[0-9]{1,8}));/i,l=/^&([a-z][a-z0-9]{1,31});/i;e.exports=function(e,t){var n=e.pos,d=e.posMax,c,p,u;if(38!==e.src.charCodeAt(n))return!1;if(n+1<d)if(c=e.src.charCodeAt(n+1),35===c){if(u=e.src.slice(n).match(s),u)return t||(p='x'===u[1][0].toLowerCase()?parseInt(u[1].slice(1),16):parseInt(u[1],10),e.pending+=i(p)?a(p):a(65533)),e.pos+=u[0].length,!0;}else if(u=e.src.slice(n).match(l),u&&r(o,u[1]))return t||(e.pending+=o[u[1]]),e.pos+=u[0].length,!0;return t||(e.pending+='&'),e.pos++,!0}},function(e){'use strict';e.exports=function(e){var t=e.delimiters,n=e.delimiters.length,o,r,i,a;for(o=0;o<n;o++)if(i=t[o],!!i.close)for(r=o-i.jump-1;0<=r;){if(a=t[r],a.open&&a.marker===i.marker&&0>a.end&&a.level===i.level){var s=(a.close||i.open)&&'undefined'!=typeof a.length&&'undefined'!=typeof i.length&&0==(a.length+i.length)%3;if(!s){i.jump=o-r,i.open=!1,a.end=o,a.jump=0;break}}r-=a.jump+1}}},function(e){'use strict';e.exports=function(e){var t=0,n=e.tokens,o=e.tokens.length,r,i;for(r=i=0;r<o;r++)t+=n[r].nesting,n[r].level=t,'text'===n[r].type&&r+1<o&&'text'===n[r+1].type?n[r+1].content=n[r].content+n[r+1].content:(r!==i&&(n[i]=n[r]),i++);r!==i&&(n.length=i)}},function(e,t,o){'use strict';function r(e,t,n,o){this.src=e,this.env=n,this.md=t,this.tokens=o,this.pos=0,this.posMax=this.src.length,this.level=0,this.pending='',this.pendingLevel=0,this.cache={},this.delimiters=[]}var i=o(8),a=o(0).isWhiteSpace,s=o(0).isPunctChar,l=o(0).isMdAsciiPunct;r.prototype.pushPending=function(){var e=new i('text','',0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending='',e},r.prototype.push=function(e,t,n){this.pending&&this.pushPending();var o=new i(e,t,n);return 0>n&&this.level--,o.level=this.level,0<n&&this.level++,this.pendingLevel=this.level,this.tokens.push(o),o},r.prototype.scanDelims=function(e,t){var o=e,r=!0,i=!0,d=this.posMax,c=this.src.charCodeAt(e),p,u,m,g,h,f,b,_,k;for(p=0<e?this.src.charCodeAt(e-1):32;o<d&&this.src.charCodeAt(o)===c;)o++;return m=o-e,u=o<d?this.src.charCodeAt(o):32,b=l(p)||s(n(p)),k=l(u)||s(n(u)),f=a(p),_=a(u),_?r=!1:k&&!(f||b)&&(r=!1),f?i=!1:b&&!(_||k)&&(i=!1),t?(g=r,h=i):(g=r&&(!i||b),h=i&&(!r||k)),{can_open:g,can_close:h,length:m}},r.prototype.Token=i,e.exports=r},function(e,t,n){'use strict';function o(e){var t=Array.prototype.slice.call(arguments,1);return t.forEach(function(t){t&&Object.keys(t).forEach(function(n){e[n]=t[n]})}),e}function r(e){return Object.prototype.toString.call(e)}function i(e){return'[object String]'===r(e)}function a(e){return'[object Object]'===r(e)}function s(e){return'[object RegExp]'===r(e)}function l(e){return'[object Function]'===r(e)}function d(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,'\\$&')}function c(e){return Object.keys(e||{}).reduce(function(e,t){return e||_.hasOwnProperty(t)},!1)}function p(e){e.__index__=-1,e.__text_cache__=''}function u(e){return function(t,n){var o=t.slice(n);return e.test(o)?o.match(e)[0].length:0}}function m(){return function(e,t){t.normalize(e)}}function g(e){function t(e){return e.replace('%TLDS%',r.src_tlds)}function o(e,t){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}var r=e.re=n(154)(e.__opts__),c=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||c.push(w),c.push(r.src_xn),r.src_tlds=c.join('|'),r.email_fuzzy=RegExp(t(r.tpl_email_fuzzy),'i'),r.link_fuzzy=RegExp(t(r.tpl_link_fuzzy),'i'),r.link_no_ip_fuzzy=RegExp(t(r.tpl_link_no_ip_fuzzy),'i'),r.host_fuzzy_test=RegExp(t(r.tpl_host_fuzzy_test),'i');var g=[];e.__compiled__={},Object.keys(e.__schemas__).forEach(function(t){var n=e.__schemas__[t];if(null!==n){var r={validate:null,link:null};return e.__compiled__[t]=r,a(n)?(s(n.validate)?r.validate=u(n.validate):l(n.validate)?r.validate=n.validate:o(t,n),void(l(n.normalize)?r.normalize=n.normalize:n.normalize?o(t,n):r.normalize=m())):i(n)?void g.push(t):void o(t,n)}}),g.forEach(function(t){e.__compiled__[e.__schemas__[t]]&&(e.__compiled__[t].validate=e.__compiled__[e.__schemas__[t]].validate,e.__compiled__[t].normalize=e.__compiled__[e.__schemas__[t]].normalize)}),e.__compiled__['']={validate:null,normalize:m()};var h=Object.keys(e.__compiled__).filter(function(t){return 0<t.length&&e.__compiled__[t]}).map(d).join('|');e.re.schema_test=RegExp('(^|(?!_)(?:[><\uFF5C]|'+r.src_ZPCc+'))('+h+')','i'),e.re.schema_search=RegExp('(^|(?!_)(?:[><\uFF5C]|'+r.src_ZPCc+'))('+h+')','ig'),e.re.pretest=RegExp('('+e.re.schema_test.source+')|('+e.re.host_fuzzy_test.source+')|@','i'),p(e)}function h(e,t){var n=e.__index__,o=e.__last_index__,r=e.__text_cache__.slice(n,o);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=o+t,this.raw=r,this.text=r,this.url=r}function f(e,t){var n=new h(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function b(e,t){return this instanceof b?void(!t&&c(e)&&(t=e,e={}),this.__opts__=o({},_,t),this.__index__=-1,this.__last_index__=-1,this.__schema__='',this.__text_cache__='',this.__schemas__=o({},k,e),this.__compiled__={},this.__tlds__=y,this.__tlds_replaced__=!1,this.re={},g(this)):new b(e,t)}var _={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1},k={"http:":{validate:function(e,t,n){var o=e.slice(t);return n.re.http||(n.re.http=new RegExp('^\\/\\/'+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,'i')),n.re.http.test(o)?o.match(n.re.http)[0].length:0}},"https:":'http:',"ftp:":'http:',"//":{validate:function(e,t,n){var o=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp('^'+n.re.src_auth+'(?:localhost|(?:(?:'+n.re.src_domain+')\\.)+'+n.re.src_domain_root+')'+n.re.src_port+n.re.src_host_terminator+n.re.src_path,'i')),n.re.no_http.test(o)?3<=t&&':'===e[t-3]?0:3<=t&&'/'===e[t-3]?0:o.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){var o=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp('^'+n.re.src_email_name+'@'+n.re.src_host_strict,'i')),n.re.mailto.test(o)?o.match(n.re.mailto)[0].length:0}}},w='a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]',y=['biz','com','edu','gov','net','org','pro','web','xxx','aero','asia','coop','info','museum','name','shop','\u0440\u0444'];b.prototype.add=function(e,t){return this.__schemas__[e]=t,g(this),this},b.prototype.set=function(e){return this.__opts__=o(this.__opts__,e),this},b.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var t,n,o,r,i,a,s,l,d;if(this.re.schema_test.test(e))for(s=this.re.schema_search,s.lastIndex=0;null!==(t=s.exec(e));)if(r=this.testSchemaAt(e,t[2],s.lastIndex),r){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+r;break}return this.__opts__.fuzzyLink&&this.__compiled__['http:']&&(l=e.search(this.re.host_fuzzy_test),0<=l&&(0>this.__index__||l<this.__index__)&&null!==(n=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))&&(i=n.index+n[1].length,(0>this.__index__||i<this.__index__)&&(this.__schema__='',this.__index__=i,this.__last_index__=n.index+n[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__['mailto:']&&(d=e.indexOf('@'),0<=d&&null!==(o=e.match(this.re.email_fuzzy))&&(i=o.index+o[1].length,a=o.index+o[0].length,(0>this.__index__||i<this.__index__||i===this.__index__&&a>this.__last_index__)&&(this.__schema__='mailto:',this.__index__=i,this.__last_index__=a))),0<=this.__index__},b.prototype.pretest=function(e){return this.re.pretest.test(e)},b.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},b.prototype.match=function(e){var t=0,n=[];0<=this.__index__&&this.__text_cache__===e&&(n.push(f(this,t)),t=this.__last_index__);for(var o=t?e.slice(t):e;this.test(o);)n.push(f(this,t)),o=o.slice(this.__last_index__),t+=this.__last_index__;return n.length?n:null},b.prototype.tlds=function(e,t){return(e=Array.isArray(e)?e:[e],!t)?(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,g(this),this):(this.__tlds__=this.__tlds__.concat(e).sort().filter(function(e,t,n){return e!==n[t-1]}).reverse(),g(this),this)},b.prototype.normalize=function(e){e.schema||(e.url='http://'+e.url),'mailto:'!==e.schema||/^mailto:/i.test(e.url)||(e.url='mailto:'+e.url)},b.prototype.onCompile=function(){},e.exports=b},function(e,t,n){'use strict';e.exports=function(e){var t={};t.src_Any=n(17).source,t.src_Cc=n(18).source,t.src_Z=n(19).source,t.src_P=n(6).source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join('|'),t.src_ZCc=[t.src_Z,t.src_Cc].join('|');var o='[><\uFF5C]';return t.src_pseudo_letter='(?:(?!'+o+'|'+t.src_ZPCc+')'+t.src_Any+')',t.src_ip4='(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)',t.src_auth='(?:(?:(?!'+t.src_ZCc+'|[@/\\[\\]()]).)+@)?',t.src_port='(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?',t.src_host_terminator='(?=$|'+o+'|'+t.src_ZPCc+')(?!-|_|:\\d|\\.-|\\.(?!$|'+t.src_ZPCc+'))',t.src_path='(?:[/?#](?:(?!'+t.src_ZCc+'|'+o+'|[()[\\]{}.,"\'?!\\-]).|\\[(?:(?!'+t.src_ZCc+'|\\]).)*\\]|\\((?:(?!'+t.src_ZCc+'|[)]).)*\\)|\\{(?:(?!'+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+t.src_ZCc+'|[\']).)+\\\'|\\\'(?='+t.src_pseudo_letter+'|[-]).|\\.{2,3}[a-zA-Z0-9%/]|\\.(?!'+t.src_ZCc+'|[.]).|'+(e&&e['---']?'\\-(?!--(?:[^-]|$))(?:-*)|':'\\-+|')+'\\,(?!'+t.src_ZCc+').|\\!(?!'+t.src_ZCc+'|[!]).|\\?(?!'+t.src_ZCc+'|[?]).)+|\\/)?',t.src_email_name='[\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]+',t.src_xn='xn--[a-z0-9\\-]{1,59}',t.src_domain_root='(?:'+t.src_xn+'|'+t.src_pseudo_letter+'{1,63})',t.src_domain='(?:'+t.src_xn+'|(?:'+t.src_pseudo_letter+')|(?:'+t.src_pseudo_letter+'(?:-(?!-)|'+t.src_pseudo_letter+'){0,61}'+t.src_pseudo_letter+'))',t.src_host='(?:(?:(?:(?:'+t.src_domain+')\\.)*'+t.src_domain+'))',t.tpl_host_fuzzy='(?:'+t.src_ip4+'|(?:(?:(?:'+t.src_domain+')\\.)+(?:%TLDS%)))',t.tpl_host_no_ip_fuzzy='(?:(?:(?:'+t.src_domain+')\\.)+(?:%TLDS%))',t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test='localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:'+t.src_ZPCc+'|>|$))',t.tpl_email_fuzzy='(^|'+o+'|\\(|'+t.src_ZCc+')('+t.src_email_name+'@'+t.tpl_host_fuzzy_strict+')',t.tpl_link_fuzzy='(^|(?![.:/\\-_@])(?:[$+<=>^`|\uFF5C]|'+t.src_ZPCc+'))((?![$+<=>^`|\uFF5C])'+t.tpl_host_port_fuzzy_strict+t.src_path+')',t.tpl_link_no_ip_fuzzy='(^|(?![.:/\\-_@])(?:[$+<=>^`|\uFF5C]|'+t.src_ZPCc+'))((?![$+<=>^`|\uFF5C])'+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+')',t}},function(e,o,r){(function(e,i){var a;(function(s){function l(e){throw new RangeError(N[e])}function d(e,t){for(var n=e.length,o=[];n--;)o[n]=t(e[n]);return o}function c(e,t){var n=e.split('@'),o='';1<n.length&&(o=n[0]+'@',e=n[1]),e=e.replace(I,'.');var r=e.split('.'),i=d(r,t).join('.');return o+i}function p(e){for(var t=[],n=0,o=e.length,r,i;n<o;)r=e.charCodeAt(n++),55296<=r&&56319>=r&&n<o?(i=e.charCodeAt(n++),56320==(64512&i)?t.push(((1023&r)<<10)+(1023&i)+65536):(t.push(r),n--)):t.push(r);return t}function u(e){return d(e,function(e){var t='';return 65535<e&&(e-=65536,t+=D(55296|1023&e>>>10),e=56320|1023&e),t+=D(e),t}).join('')}function m(e){return 10>e-48?e-22:26>e-65?e-65:26>e-97?e-97:v}function g(e,t){return e+22+75*(26>e)-((0!=t)<<5)}function h(e,t,n){var o=0;for(e=n?L(e/T):e>>1,e+=L(e/t);e>V*C>>1;o+=v)e=L(e/V);return L(o+(V+1)*e/(e+A))}function f(e){var o=[],r=e.length,a=0,i=P,n=E,s,d,c,p,g,f,b,_,k,t;for(d=e.lastIndexOf(S),0>d&&(d=0),c=0;c<d;++c)128<=e.charCodeAt(c)&&l('not-basic'),o.push(e.charCodeAt(c));for(p=0<d?d+1:0;p<r;){for(g=a,f=1,b=v;;b+=v){if(p>=r&&l('invalid-input'),_=m(e.charCodeAt(p++)),(_>=v||_>L((y-a)/f))&&l('overflow'),a+=_*f,k=b<=n?x:b>=n+C?C:b-n,_<k)break;t=v-k,f>L(y/t)&&l('overflow'),f*=t}s=o.length+1,n=h(a-g,s,0==g),L(a/s)>y-i&&l('overflow'),i+=L(a/s),a%=s,o.splice(a++,0,i)}return u(o)}function b(e){var o=[],r,n,i,a,s,d,c,u,m,f,t,b,_,k,w;for(e=p(e),b=e.length,r=P,n=0,s=E,d=0;d<b;++d)t=e[d],128>t&&o.push(D(t));for(i=a=o.length,a&&o.push(S);i<b;){for(c=y,d=0;d<b;++d)t=e[d],t>=r&&t<c&&(c=t);for(_=i+1,c-r>L((y-n)/_)&&l('overflow'),n+=(c-r)*_,r=c,d=0;d<b;++d)if(t=e[d],t<r&&++n>y&&l('overflow'),t==r){for(u=n,m=v;;m+=v){if(f=m<=s?x:m>=s+C?C:m-s,u<f)break;w=u-f,k=v-f,o.push(D(g(f+w%k,0))),u=L(w/k)}o.push(D(g(u,0))),s=h(n,_,i==a),n=0,++i}++n,++r}return o.join('')}var _='object'==typeof o&&o&&!o.nodeType&&o,k='object'==typeof e&&e&&!e.nodeType&&e,w='object'==typeof i&&i;(w.global===w||w.window===w||w.self===w)&&(s=w);var y=2147483647,v=36,x=1,C=26,A=38,T=700,E=72,P=128,S='-',R=/^xn--/,O=/[^\x20-\x7E]/,I=/[\x2E\u3002\uFF0E\uFF61]/g,N={overflow:'Overflow: input needs wider integers to process',"not-basic":'Illegal input >= 0x80 (not a basic code point)',"invalid-input":'Invalid input'},V=v-x,L=t,D=n,F;F={version:'1.4.1',ucs2:{decode:p,encode:u},decode:f,encode:b,toASCII:function(e){return c(e,function(e){return O.test(e)?'xn--'+b(e):e})},toUnicode:function(e){return c(e,function(e){return R.test(e)?f(e.slice(4).toLowerCase()):e})}};a=function(){return F}.call(o,r,o,e),!(void 0!==a&&(e.exports=a))})(this)}).call(o,r(156)(e),r(5))},function(e){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],!e.children&&(e.children=[]),Object.defineProperty(e,'loaded',{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,'id',{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e){'use strict';e.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:'language-',linkify:!1,typographer:!1,quotes:'\u201C\u201D\u2018\u2019',highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}}},function(e){'use strict';e.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:'language-',linkify:!1,typographer:!1,quotes:'\u201C\u201D\u2018\u2019',highlight:null,maxNesting:20},components:{core:{rules:['normalize','block','inline']},block:{rules:['paragraph']},inline:{rules:['text'],rules2:['balance_pairs','text_collapse']}}}},function(e){'use strict';e.exports={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:'language-',linkify:!1,typographer:!1,quotes:'\u201C\u201D\u2018\u2019',highlight:null,maxNesting:20},components:{core:{rules:['normalize','block','inline']},block:{rules:['blockquote','code','fence','heading','hr','html_block','lheading','list','reference','paragraph']},inline:{rules:['autolink','backticks','emphasis','entity','escape','html_inline','image','link','newline','text'],rules2:['balance_pairs','emphasis','text_collapse']}}}}])['default']});